diff --git a/src/apis/accesscontextmanager/v1beta.ts b/src/apis/accesscontextmanager/v1beta.ts index 76cf3b0f712..3997773a8f8 100644 --- a/src/apis/accesscontextmanager/v1beta.ts +++ b/src/apis/accesscontextmanager/v1beta.ts @@ -113,8 +113,7 @@ export namespace accesscontextmanager_v1beta { /** * An `AccessLevel` is a label that can be applied to requests to GCP * services, along with a list of requirements necessary for the label to be - * applied. `AccessLevels` can be referenced in `AccessZones` and in the - * `Cloud Org Policy` API. + * applied. */ export interface Schema$AccessLevel { /** diff --git a/src/apis/adexchangebuyer2/v2beta1.ts b/src/apis/adexchangebuyer2/v2beta1.ts index 717b43d0e92..10cb9fcd65a 100644 --- a/src/apis/adexchangebuyer2/v2beta1.ts +++ b/src/apis/adexchangebuyer2/v2beta1.ts @@ -444,7 +444,7 @@ export namespace adexchangebuyer2_v2beta1 { type?: string; } /** - * A creative and its classification data. Next ID: 38 + * A creative and its classification data. Next ID: 39 */ export interface Schema$Creative { /** diff --git a/src/apis/admin/reports_v1.ts b/src/apis/admin/reports_v1.ts index cf8a82be4b1..272a1101a07 100644 --- a/src/apis/admin/reports_v1.ts +++ b/src/apis/admin/reports_v1.ts @@ -311,6 +311,7 @@ export namespace admin_reports_v1 { * @param {string=} params.eventName Name of the event being queried. * @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... * @param {integer=} params.maxResults Number of activity records to be shown in each page. + * @param {string=} params.orgUnitID the organizational unit's(OU) ID to filter activities from users belonging to a specific OU or one of its sub-OU(s) * @param {string=} params.pageToken Token to specify next page. * @param {string=} params.startTime Return events which occurred at or after this time. * @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. @@ -387,6 +388,7 @@ export namespace admin_reports_v1 { * @param {string=} params.eventName Name of the event being queried. * @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... * @param {integer=} params.maxResults Number of activity records to be shown in each page. + * @param {string=} params.orgUnitID the organizational unit's(OU) ID to filter activities from users belonging to a specific OU or one of its sub-OU(s) * @param {string=} params.pageToken Token to specify next page. * @param {string=} params.startTime Return events which occurred at or after this time. * @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. @@ -485,6 +487,11 @@ export namespace admin_reports_v1 { * Number of activity records to be shown in each page. */ maxResults?: number; + /** + * the organizational unit's(OU) ID to filter activities from users + * belonging to a specific OU or one of its sub-OU(s) + */ + orgUnitID?: string; /** * Token to specify next page. */ @@ -536,6 +543,11 @@ export namespace admin_reports_v1 { * Number of activity records to be shown in each page. */ maxResults?: number; + /** + * the organizational unit's(OU) ID to filter activities from users + * belonging to a specific OU or one of its sub-OU(s) + */ + orgUnitID?: string; /** * Token to specify next page. */ @@ -876,6 +888,7 @@ export namespace admin_reports_v1 { * @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched. * @param {string=} params.filters Represents the set of filters including parameter operator value. * @param {integer=} params.maxResults Maximum number of results to return. Maximum allowed is 1000 + * @param {string=} params.orgUnitID the organizational unit's ID to filter usage parameters from users belonging to a specific OU or one of its sub-OU(s). * @param {string=} params.pageToken Token to specify next page. * @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. * @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. @@ -959,6 +972,11 @@ export namespace admin_reports_v1 { * Maximum number of results to return. Maximum allowed is 1000 */ maxResults?: number; + /** + * the organizational unit's ID to filter usage parameters from users + * belonging to a specific OU or one of its sub-OU(s). + */ + orgUnitID?: string; /** * Token to specify next page. */ diff --git a/src/apis/alertcenter/v1beta1.ts b/src/apis/alertcenter/v1beta1.ts index 2a39579bd39..2de8c405119 100644 --- a/src/apis/alertcenter/v1beta1.ts +++ b/src/apis/alertcenter/v1beta1.ts @@ -99,11 +99,13 @@ export namespace alertcenter_v1beta1 { */ export class Alertcenter { alerts: Resource$Alerts; + v1beta1: Resource$V1beta1; constructor(options: GlobalOptions, google?: GoogleConfigurable) { context = {_options: options || {}, google}; this.alerts = new Resource$Alerts(); + this.v1beta1 = new Resource$V1beta1(); } } @@ -159,7 +161,7 @@ export namespace alertcenter_v1beta1 { */ securityInvestigationToolLink?: string; /** - * Required. A unique identifier for the system that is reported the alert. + * Required. A unique identifier for the system that reported the alert. * Supported sources are any of the following: * Google Operations * Mobile * device management * Gmail phishing * Domain wide takeout * Government * attack warning * Google identity @@ -236,6 +238,24 @@ export namespace alertcenter_v1beta1 { */ sourceIp?: string; } + /** + * A reference to a Cloud Pubsub topic. To register for notifications, the + * owner of the topic must grant + * `alerts-api-push-notifications@system.gserviceaccount.com` the + * `projects.topics.publish` permission. + */ + export interface Schema$CloudPubsubTopic { + /** + * Optional. The format of the payload that would be sent. If not specified + * the format will be JSON. + */ + payloadFormat?: string; + /** + * The `name` field of a Cloud Pubsub [Topic] + * (https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic). + */ + topicName?: string; + } /** * A representation of a CSV file attachment, as a list of column headers and * a list of data rows. @@ -475,6 +495,16 @@ export namespace alertcenter_v1beta1 { */ fromHeader?: string; } + /** + * Settings for callback notifications. For more details see [G Suite Alert + * Notification](/admin-sdk/alertcenter/guides/notifications). + */ + export interface Schema$Notification { + /** + * A Google Cloud Pub/sub topic destination. + */ + cloudPubsubTopic?: Schema$CloudPubsubTopic; + } /** * Alert for a spike in user reported phishing. <aside * class="warning"><b>Warning</b>: This type has been @@ -500,6 +530,15 @@ export namespace alertcenter_v1beta1 { */ messages?: Schema$GmailMessageInfo[]; } + /** + * Customer-level settings. + */ + export interface Schema$Settings { + /** + * The list of notifications. + */ + notifications?: Schema$Notification[]; + } /** * A state-sponsored attack alert. Derived from audit logs. */ @@ -563,6 +602,17 @@ export namespace alertcenter_v1beta1 { */ serialNumber?: string; } + /** + * A request to undelete a specific alert that was marked for deletion. + */ + export interface Schema$UndeleteAlertRequest { + /** + * Optional. The unique identifier of the G Suite organization account of + * the customer the alert is associated with. Inferred from the caller + * identity if not provided. + */ + customerId?: string; + } export class Resource$Alerts { @@ -769,6 +819,76 @@ export namespace alertcenter_v1beta1 { return createAPIRequest(parameters); } } + + + /** + * alertcenter.alerts.undelete + * @desc Restores, or "undeletes", an alert that was marked for deletion + * within the past 30 days. Attempting to undelete an alert which was marked + * for deletion over 30 days ago (which has been removed from the Alert + * Center database) or a nonexistent alert returns a `NOT_FOUND` error. + * Attempting to undelete an alert which has not been marked for deletion + * has no effect. + * @alias alertcenter.alerts.undelete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.alertId Required. The identifier of the alert to undelete. + * @param {().UndeleteAlertRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + undelete(params?: Params$Resource$Alerts$Undelete, options?: MethodOptions): + AxiosPromise; + undelete( + params: Params$Resource$Alerts$Undelete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + undelete( + params: Params$Resource$Alerts$Undelete, + callback: BodyResponseCallback): void; + undelete(callback: BodyResponseCallback): void; + undelete( + paramsOrCallback?: Params$Resource$Alerts$Undelete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Alerts$Undelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Alerts$Undelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/alerts/{alertId}:undelete') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['alertId'], + pathParams: ['alertId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Alerts$Delete extends StandardParameters { @@ -845,6 +965,22 @@ export namespace alertcenter_v1beta1 { */ pageToken?: string; } + export interface Params$Resource$Alerts$Undelete extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The identifier of the alert to undelete. + */ + alertId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UndeleteAlertRequest; + } export class Resource$Alerts$Feedback { constructor() {} @@ -1042,4 +1178,177 @@ export namespace alertcenter_v1beta1 { */ filter?: string; } + + + + export class Resource$V1beta1 { + constructor() {} + + + /** + * alertcenter.getSettings + * @desc Returns customer-level settings. + * @alias alertcenter.getSettings + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.customerId Optional. The unique identifier of the G Suite organization account of the customer the alert settings are associated with. Inferred from the caller identity if not provided. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getSettings( + params?: Params$Resource$V1beta1$Getsettings, + options?: MethodOptions): AxiosPromise; + getSettings( + params: Params$Resource$V1beta1$Getsettings, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getSettings( + params: Params$Resource$V1beta1$Getsettings, + callback: BodyResponseCallback): void; + getSettings(callback: BodyResponseCallback): void; + getSettings( + paramsOrCallback?: Params$Resource$V1beta1$Getsettings| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$V1beta1$Getsettings; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$V1beta1$Getsettings; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1beta1/settings').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * alertcenter.updateSettings + * @desc Update the customer-level settings. + * @alias alertcenter.updateSettings + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.customerId Optional. The unique identifier of the G Suite organization account of the customer the alert settings are associated with. Inferred from the caller identity if not provided. + * @param {().Settings} 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 + */ + updateSettings( + params?: Params$Resource$V1beta1$Updatesettings, + options?: MethodOptions): AxiosPromise; + updateSettings( + params: Params$Resource$V1beta1$Updatesettings, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + updateSettings( + params: Params$Resource$V1beta1$Updatesettings, + callback: BodyResponseCallback): void; + updateSettings(callback: BodyResponseCallback): void; + updateSettings( + paramsOrCallback?: Params$Resource$V1beta1$Updatesettings| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$V1beta1$Updatesettings; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$V1beta1$Updatesettings; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1beta1/settings').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$V1beta1$Getsettings extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The unique identifier of the G Suite organization account of + * the customer the alert settings are associated with. Inferred from the + * caller identity if not provided. + */ + customerId?: string; + } + export interface Params$Resource$V1beta1$Updatesettings extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The unique identifier of the G Suite organization account of + * the customer the alert settings are associated with. Inferred from the + * caller identity if not provided. + */ + customerId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Settings; + } } diff --git a/src/apis/androidenterprise/v1.ts b/src/apis/androidenterprise/v1.ts index 3447c4c034d..d56086d9553 100644 --- a/src/apis/androidenterprise/v1.ts +++ b/src/apis/androidenterprise/v1.ts @@ -402,6 +402,46 @@ export namespace androidenterprise_v1 { */ token?: string; } + /** + * The Auto install constraint. Defines a set of restrictions for + * installation. At least one of the fields must be set. + */ + export interface Schema$AutoInstallConstraint { + /** + * Charging state to constrain on. + */ + chargingStateConstraint?: string; + /** + * The idle state of the device to constrain on. + */ + deviceIdleStateConstraint?: string; + /** + * Network type to constrain on. + */ + networkTypeConstraint?: string; + } + export interface Schema$AutoInstallPolicy { + /** + * The constraints for the install. Currently there can be at most one + * constraint. + */ + autoInstallConstraint?: Schema$AutoInstallConstraint[]; + /** + * The auto install mode. If unset defaults to AVAILABLE. + */ + autoInstallMode?: string; + /** + * The priority of the install, as an unsigned integer. Lower number means + * higher priority. + */ + autoInstallPriority?: number; + /** + * The minimum version of the app. If a lower version of the app is + * installed then the app will be auto-updated according to the auto-install + * constraints, instead of waiting for the regular auto-update. + */ + minimumVersionCode?: number; + } /** * A configuration variables resource contains the managed configuration * settings ID to be applied to a single user, as well as the variable set @@ -1360,6 +1400,10 @@ export namespace androidenterprise_v1 { * The policy for a product. */ export interface Schema$ProductPolicy { + /** + * The auto install policy for the product. + */ + autoInstallPolicy?: Schema$AutoInstallPolicy; /** * The ID of the product. For example, * "app:com.google.android.gm". diff --git a/src/apis/appengine/v1.ts b/src/apis/appengine/v1.ts index 5560a49b924..9de10c268f6 100644 --- a/src/apis/appengine/v1.ts +++ b/src/apis/appengine/v1.ts @@ -1929,6 +1929,10 @@ export namespace appengine_v1 { * Defaults to the default channel. */ runtimeChannel?: string; + /** + * The path or name of the app's main executable. + */ + runtimeMainExecutablePath?: string; /** * Current serving status of this version. Only the versions with a SERVING * status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is diff --git a/src/apis/appengine/v1beta.ts b/src/apis/appengine/v1beta.ts index 10f39f64583..000f3561cb5 100644 --- a/src/apis/appengine/v1beta.ts +++ b/src/apis/appengine/v1beta.ts @@ -2008,6 +2008,10 @@ export namespace appengine_v1beta { * Defaults to the default channel. */ runtimeChannel?: string; + /** + * The path or name of the app's main executable. + */ + runtimeMainExecutablePath?: string; /** * Current serving status of this version. Only the versions with a SERVING * status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is diff --git a/src/apis/appengine/v1beta4.ts b/src/apis/appengine/v1beta4.ts index d4525ce3f73..d99ca9ef3ef 100644 --- a/src/apis/appengine/v1beta4.ts +++ b/src/apis/appengine/v1beta4.ts @@ -1456,6 +1456,10 @@ export namespace appengine_v1beta4 { * https://cloud.google.com/appengine/docs/standard/<language>/config/appref */ runtimeApiVersion?: string; + /** + * The path or name of the app's main executable. + */ + runtimeMainExecutablePath?: string; /** * Current serving status of this version. Only the versions with a SERVING * status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is diff --git a/src/apis/appengine/v1beta5.ts b/src/apis/appengine/v1beta5.ts index 52c914cb57b..2bf93861843 100644 --- a/src/apis/appengine/v1beta5.ts +++ b/src/apis/appengine/v1beta5.ts @@ -1432,6 +1432,10 @@ export namespace appengine_v1beta5 { * https://cloud.google.com/appengine/docs/standard/<language>/config/appref */ runtimeApiVersion?: string; + /** + * The path or name of the app's main executable. + */ + runtimeMainExecutablePath?: string; /** * Current serving status of this version. Only the versions with a SERVING * status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is diff --git a/src/apis/bigquery/v2.ts b/src/apis/bigquery/v2.ts index a9161cd0d12..f11326892c5 100644 --- a/src/apis/bigquery/v2.ts +++ b/src/apis/bigquery/v2.ts @@ -291,6 +291,7 @@ export namespace bigquery_v2 { access?: Array<{ domain?: string; groupByEmail?: string; + iamMember?: string; role?: string; specialGroup?: string; userByEmail?: string; @@ -372,7 +373,7 @@ export namespace bigquery_v2 { /** * The geographic location where the dataset should reside. The default * value is US. See details at - * https://cloud.google.com/bigquery/docs/dataset-locations. + * https://cloud.google.com/bigquery/docs/locations. */ location?: string; /** @@ -749,7 +750,9 @@ export namespace bigquery_v2 { export interface Schema$GoogleSheetsOptions { /** * [Beta] [Optional] Range of a sheet to query from. Only used when - * non-empty. Typical format: !: + * non-empty. Typical format: + * sheet_name!top_left_cell_id:bottom_right_cell_id For example: + * sheet1!A1:B20 */ range?: string; /** @@ -1043,7 +1046,7 @@ export namespace bigquery_v2 { */ quote?: string; /** - * [Experimental] Range partitioning specification for this table. Only one + * [TrustedTester] Range partitioning specification for this table. Only one * of timePartitioning and rangePartitioning should be specified. */ rangePartitioning?: Schema$RangePartitioning; @@ -1213,7 +1216,7 @@ export namespace bigquery_v2 { */ queryParameters?: Schema$QueryParameter[]; /** - * [Experimental] Range partitioning specification for this table. Only one + * [TrustedTester] Range partitioning specification for this table. Only one * of timePartitioning and rangePartitioning should be specified. */ rangePartitioning?: Schema$RangePartitioning; @@ -1392,6 +1395,10 @@ export namespace bigquery_v2 { * [Output-only] Quotas which delayed this job's start time. */ quotaDeferments?: string[]; + /** + * [Output-only] Job resource usage breakdown by reservation. + */ + reservationUsage?: Array<{name?: string; slotMs?: string;}>; /** * [Output-only] Start time of this job, in milliseconds since the epoch. * This field will be present when the job transitions from the PENDING @@ -1403,6 +1410,10 @@ export namespace bigquery_v2 { * statistics instead. */ totalBytesProcessed?: string; + /** + * [Output-only] Slot-milliseconds for the job. + */ + totalSlotMs?: string; } export interface Schema$JobStatistics2 { /** @@ -1472,18 +1483,19 @@ export namespace bigquery_v2 { * The type of query statement, if valid. Possible values (new values might * be added in the future): "SELECT": SELECT query. * "INSERT": INSERT query; see - * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language + * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. * "UPDATE": UPDATE query; see - * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language + * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. * "DELETE": DELETE query; see - * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language + * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. * "MERGE": MERGE query; see - * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language + * https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. * "CREATE_TABLE": CREATE [OR REPLACE] TABLE without AS SELECT. * "CREATE_TABLE_AS_SELECT": CREATE [OR REPLACE] TABLE ... AS - * SELECT ... "DROP_TABLE": DROP TABLE query. - * "CREATE_VIEW": CREATE [OR REPLACE] VIEW ... AS SELECT ... - * "DROP_VIEW": DROP VIEW query. + * SELECT ... . "DROP_TABLE": DROP TABLE query. + * "CREATE_VIEW": CREATE [OR REPLACE] VIEW ... AS SELECT ... . + * "DROP_VIEW": DROP VIEW query. "ALTER_TABLE": ALTER + * TABLE query. "ALTER_VIEW": ALTER VIEW query. */ statementType?: string; /** @@ -1498,6 +1510,14 @@ export namespace bigquery_v2 { * [Output-only] Total bytes processed for the job. */ totalBytesProcessed?: string; + /** + * [Output-only] For dry-run jobs, totalBytesProcessed is an estimate and + * this field specifies the accuracy of the estimate. Possible values can + * be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is + * precise. LOWER_BOUND: estimate is lower bound of what the query would + * cost. UPPER_BOUND: estiamte is upper bound of what the query would cost. + */ + totalBytesProcessedAccuracy?: string; /** * [Output-only] Total number of partitions processed from all partitioned * tables referenced in the job. @@ -1571,6 +1591,17 @@ export namespace bigquery_v2 { */ export interface Schema$JsonObject {} export interface Schema$JsonValue {} + export interface Schema$MaterializedViewDefinition { + /** + * [Output-only] [TrustedTester] The time when this materialized view was + * last modified, in milliseconds since the epoch. + */ + lastRefreshTime?: string; + /** + * [Required] A query whose result is persisted. + */ + query?: string; + } export interface Schema$ModelDefinition { /** * [Output-only, Beta] Model options used for the first training run. These @@ -1690,8 +1721,8 @@ export namespace bigquery_v2 { */ kind?: string; /** - * The geographic location where the job should run. Required except for US - * and EU. + * The geographic location where the job should run. See details at + * https://cloud.google.com/bigquery/docs/locations#specifying_your_location. */ location?: string; /** @@ -1836,13 +1867,13 @@ export namespace bigquery_v2 { } export interface Schema$RangePartitioning { /** - * [Experimental] [Required] The table is partitioned by this field. The + * [TrustedTester] [Required] The table is partitioned by this field. The * field must be a top-level NULLABLE/REQUIRED field. The only supported * type is INTEGER/INT64. */ field?: string; /** - * [Experimental] [Required] Defines the ranges for range partitioning. + * [TrustedTester] [Required] Defines the ranges for range partitioning. */ range?: {end?: string; interval?: string; start?: string;}; } @@ -1866,8 +1897,8 @@ export namespace bigquery_v2 { } export interface Schema$Table { /** - * [Experimental] Clustering specification for the table. Must be specified - * with partitioning, data in the table will be first partitioned and + * [Beta] Clustering specification for the table. Must be specified with + * partitioning, data in the table will be first partitioned and * subsequently clustered. */ clustering?: Schema$Clustering; @@ -1936,6 +1967,10 @@ export namespace bigquery_v2 { * is inherited from the dataset. */ location?: string; + /** + * [Optional] Materialized view definition. + */ + materializedView?: Schema$MaterializedViewDefinition; /** * [Output-only, Beta] Present iff this table represents a ML model. * Describes the training information for the model, and it is required to @@ -1953,7 +1988,7 @@ export namespace bigquery_v2 { */ numLongTermBytes?: string; /** - * [Output-only] [Experimental] The physical size of this table in bytes, + * [Output-only] [TrustedTester] The physical size of this table in bytes, * excluding any data in the streaming buffer. This includes compression and * storage used for time travel. */ @@ -1964,13 +1999,13 @@ export namespace bigquery_v2 { */ numRows?: string; /** - * [Experimental] Range partitioning specification for this table. Only one + * [TrustedTester] Range partitioning specification for this table. Only one * of timePartitioning and rangePartitioning should be specified. */ rangePartitioning?: Schema$RangePartitioning; /** - * [Experimental] [Optional] If set to true, queries over this table require - * a partition filter that can be used for partition elimination to be + * [Beta] [Optional] If set to true, queries over this table require a + * partition filter that can be used for partition elimination to be * specified. */ requirePartitionFilter?: boolean; @@ -2000,7 +2035,8 @@ export namespace bigquery_v2 { /** * [Output-only] Describes the table type. The following values are * supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined - * by a SQL query. EXTERNAL: A table that references data stored in an + * by a SQL query. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result + * is persisted. EXTERNAL: A table that references data stored in an * external storage system, such as Google Cloud Storage. The default value * is TABLE. */ @@ -2035,8 +2071,8 @@ export namespace bigquery_v2 { */ skipInvalidRows?: boolean; /** - * [Experimental] If specified, treats the destination table as a base - * template, and inserts the rows into an instance table named + * If specified, treats the destination table as a base template, and + * inserts the rows into an instance table named * "{destination}{templateSuffix}". BigQuery will manage creation * of the instance table, using the schema of the base template table. See * https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables @@ -2186,11 +2222,6 @@ export namespace bigquery_v2 { * TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. */ field?: string; - /** - * [Beta] [Optional] If set to true, queries over this table require a - * partition filter that can be used for partition elimination to be - * specified. - */ requirePartitionFilter?: boolean; /** * [Required] The only type supported is DAY, which will generate one @@ -3229,7 +3260,7 @@ export namespace bigquery_v2 { * * @param {object} params Parameters for request * @param {string} params.jobId [Required] Job ID of the job to cancel - * @param {string=} params.location [Experimental] The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location. + * @param {string=} params.location The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. * @param {string} params.projectId [Required] Project ID of the job to cancel * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3355,7 +3386,7 @@ export namespace bigquery_v2 { * * @param {object} params Parameters for request * @param {string} params.jobId [Required] Job ID of the requested job - * @param {string=} params.location [Experimental] The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location. + * @param {string=} params.location The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. * @param {string} params.projectId [Required] Project ID of the requested job * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3487,7 +3518,7 @@ export namespace bigquery_v2 { * * @param {object} params Parameters for request * @param {string} params.jobId [Required] Job ID of the query job - * @param {string=} params.location [Experimental] The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location. + * @param {string=} params.location The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location. * @param {integer=} params.maxResults Maximum number of results to read * @param {string=} params.pageToken Page token, returned by a previous call, to request the next page of results * @param {string} params.projectId [Required] Project ID of the query job @@ -3965,9 +3996,9 @@ export namespace bigquery_v2 { */ jobId?: string; /** - * [Experimental] The geographic location of the job. Required except for US - * and EU. See details at - * https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location. + * The geographic location of the job. Required except for US and EU. See + * details at + * https://cloud.google.com/bigquery/docs/locations#specifying_your_location. */ location?: string; /** @@ -3986,9 +4017,9 @@ export namespace bigquery_v2 { */ jobId?: string; /** - * [Experimental] The geographic location of the job. Required except for US - * and EU. See details at - * https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location. + * The geographic location of the job. Required except for US and EU. See + * details at + * https://cloud.google.com/bigquery/docs/locations#specifying_your_location. */ location?: string; /** @@ -4008,9 +4039,9 @@ export namespace bigquery_v2 { */ jobId?: string; /** - * [Experimental] The geographic location where the job should run. Required - * except for US and EU. See details at - * https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location. + * The geographic location where the job should run. Required except for US + * and EU. See details at + * https://cloud.google.com/bigquery/docs/locations#specifying_your_location. */ location?: string; /** diff --git a/src/apis/bigquerydatatransfer/v1.ts b/src/apis/bigquerydatatransfer/v1.ts index d13992a178d..5560437cb3c 100644 --- a/src/apis/bigquerydatatransfer/v1.ts +++ b/src/apis/bigquerydatatransfer/v1.ts @@ -513,7 +513,7 @@ export namespace bigquerydatatransfer_v1 { /** * The resource name of the transfer config. Transfer config names have the * form of - * `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. + * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. * The name is automatically generated based on the config_id specified in * CreateTransferConfigRequest along with project_id and region. If * config_id is not provided, usually a uuid, even though it is not @@ -548,11 +548,7 @@ export namespace bigquerydatatransfer_v1 { */ updateTime?: string; /** - * Output only. Unique ID of the user on whose behalf transfer is done. - * Applicable only to data sources that do not support service accounts. - * When set to 0, the data source service account credentials are used. May - * be negative. Note, that this identifier is not stable. It may change over - * time even for the same user. + * Deprecated. Unique ID of the user on whose behalf transfer is done. */ userId?: string; } @@ -635,11 +631,7 @@ export namespace bigquerydatatransfer_v1 { */ updateTime?: string; /** - * Output only. Unique ID of the user on whose behalf transfer is done. - * Applicable only to data sources that do not support service accounts. - * When set to 0, the data source service account credentials are used. May - * be negative. Note, that this identifier is not stable. It may change over - * time even for the same user. + * Deprecated. Unique ID of the user on whose behalf transfer is done. */ userId?: string; } @@ -1683,7 +1675,7 @@ export namespace bigquerydatatransfer_v1 { * * @param {object} params Parameters for request * @param {string=} params.authorizationCode Optional OAuth2 authorization code to use with this transfer configuration. If it is provided, the transfer configuration will be associated with the authorizing user. In order to obtain authorization_code, please make a request to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for the given data source returned by ListDataSources method. * data_source_scopes are the scopes returned by ListDataSources method. * redirect_uri is an optional parameter. If not specified, then authorization code is posted to the opener of authorization flow window. Otherwise it will be sent to the redirect uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization code should be returned in the title bar of the browser, with the page text prompting the user to copy the code and paste it in the application. - * @param {string} params.name The resource name of the transfer config. Transfer config names have the form of `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. The name is automatically generated based on the config_id specified in CreateTransferConfigRequest along with project_id and region. If config_id is not provided, usually a uuid, even though it is not guaranteed or required, will be generated for config_id. + * @param {string} params.name The resource name of the transfer config. Transfer config names have the form of `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. The name is automatically generated based on the config_id specified in CreateTransferConfigRequest along with project_id and region. If config_id is not provided, usually a uuid, even though it is not guaranteed or required, will be generated for config_id. * @param {string=} params.updateMask Required list of fields to be updated in this request. * @param {().TransferConfig} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -1950,7 +1942,7 @@ export namespace bigquerydatatransfer_v1 { /** * The resource name of the transfer config. Transfer config names have the * form of - * `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. + * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. * The name is automatically generated based on the config_id specified in * CreateTransferConfigRequest along with project_id and region. If * config_id is not provided, usually a uuid, even though it is not @@ -2670,7 +2662,7 @@ export namespace bigquerydatatransfer_v1 { * * @param {object} params Parameters for request * @param {string=} params.authorizationCode Optional OAuth2 authorization code to use with this transfer configuration. If it is provided, the transfer configuration will be associated with the authorizing user. In order to obtain authorization_code, please make a request to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for the given data source returned by ListDataSources method. * data_source_scopes are the scopes returned by ListDataSources method. * redirect_uri is an optional parameter. If not specified, then authorization code is posted to the opener of authorization flow window. Otherwise it will be sent to the redirect uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization code should be returned in the title bar of the browser, with the page text prompting the user to copy the code and paste it in the application. - * @param {string} params.name The resource name of the transfer config. Transfer config names have the form of `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. The name is automatically generated based on the config_id specified in CreateTransferConfigRequest along with project_id and region. If config_id is not provided, usually a uuid, even though it is not guaranteed or required, will be generated for config_id. + * @param {string} params.name The resource name of the transfer config. Transfer config names have the form of `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. The name is automatically generated based on the config_id specified in CreateTransferConfigRequest along with project_id and region. If config_id is not provided, usually a uuid, even though it is not guaranteed or required, will be generated for config_id. * @param {string=} params.updateMask Required list of fields to be updated in this request. * @param {().TransferConfig} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -2933,7 +2925,7 @@ export namespace bigquerydatatransfer_v1 { /** * The resource name of the transfer config. Transfer config names have the * form of - * `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. + * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. * The name is automatically generated based on the config_id specified in * CreateTransferConfigRequest along with project_id and region. If * config_id is not provided, usually a uuid, even though it is not diff --git a/src/apis/replicapoolupdater/README.md b/src/apis/bigtableadmin/README.md similarity index 80% rename from src/apis/replicapoolupdater/README.md rename to src/apis/bigtableadmin/README.md index 5a75e730b40..7d9ae2ea6be 100644 --- a/src/apis/replicapoolupdater/README.md +++ b/src/apis/bigtableadmin/README.md @@ -1,13 +1,13 @@ Google Inc. logo -# @google/replicapoolupdater +# @google/bigtableadmin -> [Deprecated. Please use compute.instanceGroupManagers.update method. replicapoolupdater API will be disabled after December 30th, 2016] Updates groups of Compute Engine instances. +> ## Installation ```sh -$ npm install @google/replicapoolupdater +$ npm install @google/bigtableadmin ``` ## Usage diff --git a/src/apis/replicapoolupdater/index.ts b/src/apis/bigtableadmin/index.ts similarity index 53% rename from src/apis/replicapoolupdater/index.ts rename to src/apis/bigtableadmin/index.ts index 37fa98ddac3..1b21f10513b 100644 --- a/src/apis/replicapoolupdater/index.ts +++ b/src/apis/bigtableadmin/index.ts @@ -14,19 +14,16 @@ /*! THIS FILE IS AUTO-GENERATED */ import {getAPI, GoogleConfigurable} from 'googleapis-common'; -import {replicapoolupdater_v1beta1} from './v1beta1'; +import {bigtableadmin_v2} from './v2'; export const VERSIONS = { - 'v1beta1': replicapoolupdater_v1beta1.Replicapoolupdater, + 'v2': bigtableadmin_v2.Bigtableadmin, }; -export function replicapoolupdater(version: 'v1beta1'): - replicapoolupdater_v1beta1.Replicapoolupdater; -export function replicapoolupdater(options: replicapoolupdater_v1beta1.Options): - replicapoolupdater_v1beta1.Replicapoolupdater; -export function -replicapoolupdater( - this: GoogleConfigurable, - versionOrOptions: 'v1beta1'|replicapoolupdater_v1beta1.Options) { - return getAPI('replicapoolupdater', versionOrOptions, VERSIONS, this); +export function bigtableadmin(version: 'v2'): bigtableadmin_v2.Bigtableadmin; +export function bigtableadmin(options: bigtableadmin_v2.Options): + bigtableadmin_v2.Bigtableadmin; +export function bigtableadmin( + this: GoogleConfigurable, versionOrOptions: 'v2'|bigtableadmin_v2.Options) { + return getAPI('bigtableadmin', versionOrOptions, VERSIONS, this); } diff --git a/src/apis/replicapoolupdater/package.json b/src/apis/bigtableadmin/package.json similarity index 90% rename from src/apis/replicapoolupdater/package.json rename to src/apis/bigtableadmin/package.json index 537cd033208..0c6f3fcf03f 100644 --- a/src/apis/replicapoolupdater/package.json +++ b/src/apis/bigtableadmin/package.json @@ -1,7 +1,7 @@ { - "name": "@google/replicapoolupdater", + "name": "@google/bigtableadmin", "version": "0.1.0", - "description": "replicapoolupdater", + "description": "bigtableadmin", "main": "build/index.js", "types": "build/index.d.ts", "keywords": ["google"], diff --git a/src/apis/replicapoolupdater/tsconfig.json b/src/apis/bigtableadmin/tsconfig.json similarity index 100% rename from src/apis/replicapoolupdater/tsconfig.json rename to src/apis/bigtableadmin/tsconfig.json diff --git a/src/apis/bigtableadmin/v2.ts b/src/apis/bigtableadmin/v2.ts new file mode 100644 index 00000000000..62e7c99fc4b --- /dev/null +++ b/src/apis/bigtableadmin/v2.ts @@ -0,0 +1,3814 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace bigtableadmin_v2 { + export interface Options extends GlobalOptions { + version: 'v2'; + } + + let context: APIRequestContext; + + 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 Bigtable Admin API + * + * + * + * @example + * const {google} = require('googleapis'); + * const bigtableadmin = google.bigtableadmin('v2'); + * + * @namespace bigtableadmin + * @type {Function} + * @version v2 + * @variation v2 + * @param {object=} options Options for Bigtableadmin + */ + export class Bigtableadmin { + operations: Resource$Operations; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.operations = new Resource$Operations(); + this.projects = new Resource$Projects(); + } + } + + /** + * A configuration object describing how Cloud Bigtable should treat traffic + * from a particular end user application. + */ + export interface Schema$AppProfile { + /** + * Optional long form description of the use case for this AppProfile. + */ + description?: string; + /** + * Strongly validated etag for optimistic concurrency control. Preserve the + * value returned from `GetAppProfile` when calling `UpdateAppProfile` to + * fail the request if there has been a modification in the mean time. The + * `update_mask` of the request need not include `etag` for this protection + * to apply. See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and + * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more + * details. + */ + etag?: string; + /** + * Use a multi-cluster routing policy that may pick any cluster. + */ + multiClusterRoutingUseAny?: Schema$MultiClusterRoutingUseAny; + /** + * (`OutputOnly`) The unique name of the app profile. Values are of the form + * `projects/<project>/instances/<instance>/appProfiles/_a-zA-Z0-9*`. + */ + name?: string; + /** + * Use a single-cluster routing policy. + */ + singleClusterRouting?: Schema$SingleClusterRouting; + } + /** + * Specifies the audit configuration for a service. The configuration + * determines which permission types are logged, and what identities, if any, + * are exempted from logging. An AuditConfig must have one or more + * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a + * specific service, the union of the two AuditConfigs is used for that + * service: the log_types specified in each AuditConfig are enabled, and the + * exempted_members in each AuditLogConfig are exempted. Example Policy with + * multiple AuditConfigs: { "audit_configs": [ { + * "service": "allServices" "audit_log_configs": + * [ { "log_type": "DATA_READ", + * "exempted_members": [ "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", }, { + * "log_type": "ADMIN_READ", } ] }, + * { "service": "fooservice.googleapis.com" + * "audit_log_configs": [ { "log_type": + * "DATA_READ", }, { "log_type": + * "DATA_WRITE", "exempted_members": [ + * "user:bar@gmail.com" ] } ] } + * ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and + * ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, + * and bar@gmail.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, + * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a + * special value that covers all services. + */ + service?: string; + } + /** + * Provides the configuration for logging a type of permissions. Example: { + * "audit_log_configs": [ { "log_type": + * "DATA_READ", "exempted_members": [ + * "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", } ] } This + * enables 'DATA_READ' and 'DATA_WRITE' logging, while + * exempting foo@gmail.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[]; + /** + * The log type that this config enables. + */ + logType?: string; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: * `allUsers`: A special + * identifier that represents anyone who is on the internet; with or + * without a Google account. * `allAuthenticatedUsers`: A special + * identifier that represents anyone who is authenticated with a Google + * account or a service account. * `user:{emailid}`: An email address that + * represents a specific Google account. For example, `alice@gmail.com` . + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. * + * `group:{emailid}`: An email address that represents a Google group. For + * example, `admins@example.com`. * `domain:{domain}`: A Google Apps + * domain name that represents all the users of that domain. For example, + * `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, + * `roles/editor`, or `roles/owner`. + */ + role?: string; + } + /** + * Request message for + * google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency + */ + export interface Schema$CheckConsistencyRequest { + /** + * The token created using GenerateConsistencyToken for the Table. + */ + consistencyToken?: string; + } + /** + * Response message for + * google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency + */ + export interface Schema$CheckConsistencyResponse { + /** + * True only if the token is consistent. A token is consistent if + * replication has caught up with the restrictions specified in the request. + */ + consistent?: boolean; + } + /** + * A resizable group of nodes in a particular cloud location, capable of + * serving all Tables in the parent Instance. + */ + export interface Schema$Cluster { + /** + * (`CreationOnly`) The type of storage used by this cluster to serve its + * parent instance's tables, unless explicitly overridden. + */ + defaultStorageType?: string; + /** + * (`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; + /** + * (`OutputOnly`) The unique name of the cluster. Values are of the form + * `projects/<project>/instances/<instance>/clusters/a-z*`. + */ + name?: string; + /** + * The number of nodes allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + */ + serveNodes?: number; + /** + * (`OutputOnly`) The current state of the cluster. + */ + state?: string; + } + /** + * The state of a table's data in a particular cluster. + */ + export interface Schema$ClusterState { + /** + * (`OutputOnly`) The state of replication for the table in this cluster. + */ + replicationState?: string; + } + /** + * A set of columns within a table which share a common configuration. + */ + export interface Schema$ColumnFamily { + /** + * Garbage collection rule specified as a protobuf. Must serialize to at + * most 500 bytes. NOTE: Garbage collection executes opportunistically in + * the background, and so it's possible for reads to return a cell even + * if it matches the active GC expression for its family. + */ + gcRule?: Schema$GcRule; + } + /** + * The metadata for the Operation returned by CreateCluster. + */ + export interface Schema$CreateClusterMetadata { + /** + * The time at which the operation failed or was completed successfully. + */ + finishTime?: string; + /** + * The request that prompted the initiation of this CreateCluster operation. + */ + originalRequest?: Schema$CreateClusterRequest; + /** + * The time at which the original request was received. + */ + requestTime?: string; + /** + * Keys: the full `name` of each table that existed in the instance when + * CreateCluster was first called, i.e. + * `projects/<project>/instances/<instance>/tables/<table>`. + * Any table added to the instance by a later API call will be created in + * the new cluster by that API call, not this one. Values: information on + * how much of a table's data has been copied to the newly-created + * cluster so far. + */ + tables?: {[key: string]: Schema$TableProgress;}; + } + /** + * Request message for BigtableInstanceAdmin.CreateCluster. + */ + export interface Schema$CreateClusterRequest { + /** + * 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`. + */ + clusterId?: string; + /** + * The unique name of the instance in which to create the new cluster. + * Values are of the form + * `projects/<project>/instances/<instance>`. + */ + parent?: string; + } + /** + * The metadata for the Operation returned by CreateInstance. + */ + export interface Schema$CreateInstanceMetadata { + /** + * The time at which the operation failed or was completed successfully. + */ + finishTime?: string; + /** + * The request that prompted the initiation of this CreateInstance + * operation. + */ + originalRequest?: Schema$CreateInstanceRequest; + /** + * The time at which the original request was received. + */ + requestTime?: string; + } + /** + * Request message for BigtableInstanceAdmin.CreateInstance. + */ + 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 two clusters + * can be specified. + */ + clusters?: {[key: string]: Schema$Cluster;}; + /** + * 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`. + */ + instanceId?: string; + /** + * The unique name of the project in which to create the new instance. + * Values are of the form `projects/<project>`. + */ + parent?: string; + } + /** + * Request message for google.bigtable.admin.v2.BigtableTableAdmin.CreateTable + */ + export interface Schema$CreateTableRequest { + /** + * The optional list of row keys that will be used to initially split the + * table into several tablets (tablets are similar to HBase regions). Given + * two split keys, `s1` and `s2`, three tablets will be created, spanning + * the key ranges: `[, s1), [s1, s2), [s2, )`. Example: * Row keys := + * `["a", "apple", "custom", + * "customer_1", "customer_2",` `"other", + * "zz"]` * initial_split_keys := `["apple", + * "customer_1", "customer_2", "other"]` * Key + * assignment: - Tablet 1 `[, apple) => + * {"a"}.` - Tablet 2 `[apple, customer_1) => + * {"apple", "custom"}.` - Tablet 3 `[customer_1, + * customer_2) => {"customer_1"}.` - Tablet 4 `[customer_2, + * other) => {"customer_2"}.` - Tablet 5 `[other, ) + * => {"other", "zz"}.` + */ + initialSplits?: Schema$Split[]; + /** + * 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`. + */ + tableId?: string; + } + /** + * Request message for + * google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange + */ + export interface Schema$DropRowRangeRequest { + /** + * Delete all rows in the table. Setting this to false is a no-op. + */ + deleteAllDataFromTable?: boolean; + /** + * Delete all rows that start with this row key prefix. Prefix cannot be + * zero length. + */ + rowKeyPrefix?: string; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} + /** + * Represents an expression text. Example: title: "User account + * presence" description: "Determines whether the request has a + * user account" expression: "size(request.user) > 0" + */ + export interface Schema$Expr { + /** + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + */ + description?: string; + /** + * Textual representation of an expression in Common Expression Language + * syntax. The application context of the containing message determines + * which well-known feature set of CEL is supported. + */ + expression?: string; + /** + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + */ + location?: string; + /** + * An optional title for the expression, i.e. a short string describing its + * purpose. This can be used e.g. in UIs which allow to enter the + * expression. + */ + title?: string; + } + /** + * Rule for determining which cells to delete during garbage collection. + */ + export interface Schema$GcRule { + /** + * Delete cells that would be deleted by every nested rule. + */ + intersection?: Schema$Intersection; + /** + * Delete cells in a column older than the given age. Values must be at + * least one millisecond, and will be truncated to microsecond granularity. + */ + maxAge?: string; + /** + * Delete all cells in a column except the most recent N. + */ + maxNumVersions?: number; + /** + * Delete cells that would be deleted by any nested rule. + */ + union?: Schema$Union; + } + /** + * Request message for + * google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken + */ + export interface Schema$GenerateConsistencyTokenRequest {} + /** + * Response message for + * google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken + */ + export interface Schema$GenerateConsistencyTokenResponse { + /** + * The generated consistency token. + */ + consistencyToken?: string; + } + /** + * Request message for `GetIamPolicy` method. + */ + export interface Schema$GetIamPolicyRequest {} + /** + * A collection of Bigtable Tables and the resources that serve them. All + * tables in an instance are served from all Clusters in the instance. + */ + 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. + */ + displayName?: string; + /** + * 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;}; + /** + * (`OutputOnly`) The unique name of the instance. Values are of the form + * `projects/<project>/instances/a-z+[a-z0-9]`. + */ + name?: string; + /** + * (`OutputOnly`) The current state of the instance. + */ + state?: string; + /** + * The type of the instance. Defaults to `PRODUCTION`. + */ + type?: string; + } + /** + * A GcRule which deletes cells matching all of the given rules. + */ + export interface Schema$Intersection { + /** + * Only delete cells which would be deleted by every element of `rules`. + */ + rules?: Schema$GcRule[]; + } + /** + * Response message for BigtableInstanceAdmin.ListAppProfiles. + */ + export interface Schema$ListAppProfilesResponse { + /** + * The list of requested app profiles. + */ + appProfiles?: Schema$AppProfile[]; + /** + * Locations from which AppProfile information could not be retrieved, due + * to an outage or some other transient condition. AppProfiles from these + * locations may be missing from `app_profiles`. Values are of the form + * `projects/<project>/locations/<zone_id>` + */ + failedLocations?: string[]; + /** + * Set if not all app profiles could be returned in a single response. Pass + * this value to `page_token` in another request to get the next page of + * results. + */ + nextPageToken?: string; + } + /** + * Response message for BigtableInstanceAdmin.ListClusters. + */ + export interface Schema$ListClustersResponse { + /** + * The list of requested clusters. + */ + clusters?: Schema$Cluster[]; + /** + * Locations from which Cluster information could not be retrieved, due to + * an outage or some other transient condition. Clusters from these + * locations may be missing from `clusters`, or may only have partial + * information returned. Values are of the form + * `projects/<project>/locations/<zone_id>` + */ + failedLocations?: string[]; + /** + * DEPRECATED: This field is unused and ignored. + */ + nextPageToken?: string; + } + /** + * Response message for BigtableInstanceAdmin.ListInstances. + */ + export interface Schema$ListInstancesResponse { + /** + * Locations from which Instance information could not be retrieved, due to + * an outage or some other transient condition. Instances whose Clusters are + * all in one of the failed locations may be missing from `instances`, and + * Instances with at least one Cluster in a failed location may only have + * partial information returned. Values are of the form + * `projects/<project>/locations/<zone_id>` + */ + failedLocations?: string[]; + /** + * The list of requested instances. + */ + instances?: Schema$Instance[]; + /** + * DEPRECATED: This field is unused and ignored. + */ + nextPageToken?: string; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * Response message for google.bigtable.admin.v2.BigtableTableAdmin.ListTables + */ + export interface Schema$ListTablesResponse { + /** + * Set if not all tables could be returned in a single response. Pass this + * value to `page_token` in another request to get the next page of results. + */ + nextPageToken?: string; + /** + * The tables present in the requested instance. + */ + tables?: Schema$Table[]; + } + /** + * A create, update, or delete of a particular column family. + */ + export interface Schema$Modification { + /** + * Create a new column family with the specified schema, or fail if one + * already exists with the given ID. + */ + create?: Schema$ColumnFamily; + /** + * Drop (delete) the column family with the given ID, or fail if no such + * family exists. + */ + drop?: boolean; + /** + * The ID of the column family to be modified. + */ + id?: string; + /** + * Update an existing column family to the specified schema, or fail if no + * column family exists with the given ID. + */ + update?: Schema$ColumnFamily; + } + /** + * Request message for + * google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies + */ + 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). + */ + modifications?: Schema$Modification[]; + } + /** + * Read/write requests may be routed to any cluster in the instance, and will + * fail over to another cluster in the event of transient errors or delays. + * Choosing this option sacrifices read-your-writes consistency to improve + * availability. + */ + export interface Schema$MultiClusterRoutingUseAny {} + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: {[key: string]: any;}; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any;}; + } + /** + * Request message for BigtableInstanceAdmin.PartialUpdateInstance. + */ + export interface Schema$PartialUpdateInstanceRequest { + /** + * 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. + */ + updateMask?: string; + } + /** + * Defines an Identity and Access Management (IAM) policy. It is used to + * specify access control policies for Cloud Platform resources. A `Policy` + * consists of a list of `bindings`. A `binding` binds a list of `members` to + * a `role`, where the members can be user accounts, Google groups, Google + * domains, and service accounts. A `role` is a named list of permissions + * defined by IAM. **JSON Example** { "bindings": [ { + * "role": "roles/owner", "members": [ + * "user:mike@example.com", "group:admins@example.com", + * "domain:google.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { + * "role": "roles/viewer", "members": + * ["user:sean@example.com"] } ] } **YAML + * Example** bindings: - members: - user:mike@example.com - + * group:admins@example.com - domain:google.com - + * serviceAccount:my-other-app@appspot.gserviceaccount.com role: + * roles/owner - members: - user:sean@example.com role: + * roles/viewer For a description of IAM and its features, see the [IAM + * developer's guide](https://cloud.google.com/iam/docs). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. `bindings` with no members + * will result in an error. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. It + * is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the + * policy. If no `etag` is provided in the call to `setIamPolicy`, then the + * existing policy is overwritten blindly. + */ + etag?: string; + /** + * Deprecated. + */ + version?: number; + } + /** + * 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; + } + /** + * Unconditionally routes all read/write requests to a specific cluster. This + * option preserves read-your-writes consistency, but does not improve + * availability. + */ + export interface Schema$SingleClusterRouting { + /** + * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are + * allowed by this app profile. It is unsafe to send these requests to the + * same table/row/column in multiple clusters. + */ + allowTransactionalWrites?: boolean; + /** + * The cluster to which read/write requests should be routed. + */ + clusterId?: string; + } + /** + * An initial split point for a newly created table. + */ + export interface Schema$Split { + /** + * Row key to use as an initial tablet boundary. + */ + key?: string; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + /** + * A collection of user data indexed by row, column, and timestamp. Each table + * is served using the resources of its parent cluster. + */ + export interface Schema$Table { + /** + * (`OutputOnly`) Map from cluster ID to per-cluster table state. If it + * could not be determined whether or not the table has data in a particular + * cluster (for example, if its zone is unavailable), then there will be an + * entry for the cluster with UNKNOWN `replication_status`. Views: + * `REPLICATION_VIEW`, `FULL` + */ + clusterStates?: {[key: string]: Schema$ClusterState;}; + /** + * (`CreationOnly`) The column families configured for this table, mapped by + * column family ID. Views: `SCHEMA_VIEW`, `FULL` + */ + columnFamilies?: {[key: string]: Schema$ColumnFamily;}; + /** + * (`CreationOnly`) The granularity (i.e. `MILLIS`) at which timestamps are + * stored in this table. Timestamps not matching the granularity will be + * rejected. If unspecified at creation time, the value will be set to + * `MILLIS`. Views: `SCHEMA_VIEW`, `FULL` + */ + granularity?: string; + /** + * (`OutputOnly`) The unique name of the table. Values are of the form + * `projects/<project>/instances/<instance>/tables/_a-zA-Z0-9*`. + * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` + */ + name?: string; + } + /** + * Progress info for copying a table's data to the new cluster. + */ + export interface Schema$TableProgress { + /** + * Estimate of the number of bytes copied so far for this table. This will + * eventually reach 'estimated_size_bytes' unless the table copy is + * CANCELLED. + */ + estimatedCopiedBytes?: string; + /** + * Estimate of the size of the table to be copied. + */ + estimatedSizeBytes?: string; + state?: string; + } + /** + * 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[]; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + /** + * A GcRule which deletes cells matching any of the given rules. + */ + export interface Schema$Union { + /** + * Delete cells which would be deleted by any element of `rules`. + */ + rules?: Schema$GcRule[]; + } + /** + * The metadata for the Operation returned by UpdateAppProfile. + */ + export interface Schema$UpdateAppProfileMetadata {} + /** + * The metadata for the Operation returned by UpdateCluster. + */ + export interface Schema$UpdateClusterMetadata { + /** + * The time at which the operation failed or was completed successfully. + */ + finishTime?: string; + /** + * The request that prompted the initiation of this UpdateCluster operation. + */ + originalRequest?: Schema$Cluster; + /** + * The time at which the original request was received. + */ + requestTime?: string; + } + /** + * The metadata for the Operation returned by UpdateInstance. + */ + export interface Schema$UpdateInstanceMetadata { + /** + * The time at which the operation failed or was completed successfully. + */ + finishTime?: string; + /** + * The request that prompted the initiation of this UpdateInstance + * operation. + */ + originalRequest?: Schema$PartialUpdateInstanceRequest; + /** + * The time at which the original request was received. + */ + requestTime?: string; + } + + + export class Resource$Operations { + projects: Resource$Operations$Projects; + constructor() { + this.projects = new Resource$Operations$Projects(); + } + + + /** + * bigtableadmin.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 bigtableadmin.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$Operations$Cancel, options?: MethodOptions): + AxiosPromise; + cancel( + params: Params$Resource$Operations$Cancel, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + cancel( + params: Params$Resource$Operations$Cancel, + callback: BodyResponseCallback): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Operations$Cancel| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.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 bigtableadmin.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$Operations$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Operations$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Operations$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Operations$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.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 bigtableadmin.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Operations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Operations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Operations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$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$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$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$Operations$Projects { + operations: Resource$Operations$Projects$Operations; + constructor() { + this.operations = new Resource$Operations$Projects$Operations(); + } + } + + + export class Resource$Operations$Projects$Operations { + constructor() {} + + + /** + * bigtableadmin.operations.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 bigtableadmin.operations.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$Operations$Projects$Operations$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Operations$Projects$Operations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Operations$Projects$Operations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Operations$Projects$Operations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Operations$Projects$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Projects$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}/operations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$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; + } + + + + export class Resource$Projects { + instances: Resource$Projects$Instances; + constructor() { + this.instances = new Resource$Projects$Instances(); + } + } + + + export class Resource$Projects$Instances { + appProfiles: Resource$Projects$Instances$Appprofiles; + clusters: Resource$Projects$Instances$Clusters; + tables: Resource$Projects$Instances$Tables; + constructor() { + this.appProfiles = new Resource$Projects$Instances$Appprofiles(); + this.clusters = new Resource$Projects$Instances$Clusters(); + this.tables = new Resource$Projects$Instances$Tables(); + } + + + /** + * bigtableadmin.projects.instances.create + * @desc Create an instance within a project. + * @alias bigtableadmin.projects.instances.create + * @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 {().CreateInstanceRequest} 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$Instances$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Instances$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Instances$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Instances$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/instances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.delete + * @desc Delete an instance from a project. + * @alias bigtableadmin.projects.instances.delete + * @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 {object} [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$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Instances$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Instances$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Instances$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.get + * @desc Gets information about an instance. + * @alias bigtableadmin.projects.instances.get + * @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 {object} [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$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Instances$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Instances$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Instances$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.getIamPolicy + * @desc Gets the access control policy for an instance resource. Returns an + * empty policy if an instance exists but does not have a policy set. + * @alias bigtableadmin.projects.instances.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Instances$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Instances$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Instances$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Instances$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Getiampolicy; + 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}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.list + * @desc Lists information about instances in a project. + * @alias bigtableadmin.projects.instances.list + * @memberOf! () + * + * @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 {object} [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$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Instances$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Instances$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Instances$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/instances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.partialUpdateInstance + * @desc Partially updates an instance within a project. This method can + * modify all fields of an Instance and is the preferred way to update an + * Instance. + * @alias bigtableadmin.projects.instances.partialUpdateInstance + * @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 {().Instance} 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 + */ + partialUpdateInstance( + params?: Params$Resource$Projects$Instances$Partialupdateinstance, + options?: MethodOptions): AxiosPromise; + partialUpdateInstance( + params: Params$Resource$Projects$Instances$Partialupdateinstance, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + partialUpdateInstance( + params: Params$Resource$Projects$Instances$Partialupdateinstance, + callback: BodyResponseCallback): void; + partialUpdateInstance(callback: BodyResponseCallback): + void; + partialUpdateInstance( + paramsOrCallback?: + Params$Resource$Projects$Instances$Partialupdateinstance| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Partialupdateinstance; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Partialupdateinstance; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.setIamPolicy + * @desc Sets the access control policy on an instance resource. Replaces + * any existing policy. + * @alias bigtableadmin.projects.instances.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Instances$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Instances$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Instances$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Instances$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Setiampolicy; + 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}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.testIamPermissions + * @desc Returns permissions that the caller has on the specified instance + * resource. + * @alias bigtableadmin.projects.instances.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Instances$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Instances$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Instances$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Instances$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$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 + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.update + * @desc Updates an instance within a project. This method updates only the + * display name and type for an Instance. To update other Instance + * properties, such as labels, use PartialUpdateInstance. + * @alias bigtableadmin.projects.instances.update + * @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 {().Instance} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Projects$Instances$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Projects$Instances$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Projects$Instances$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Projects$Instances$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Instances$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + 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/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CreateInstanceRequest; + } + export interface Params$Resource$Projects$Instances$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique name of the instance to be deleted. Values are of the form + * `projects//instances/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique name of the requested instance. Values are of the form + * `projects//instances/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Instances$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * DEPRECATED: This field is unused and ignored. + */ + pageToken?: string; + /** + * The unique name of the project for which a list of instances is + * requested. Values are of the form `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Instances$Partialupdateinstance + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + 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]`. + */ + name?: string; + /** + * The subset of Instance fields which should be replaced. Must be + * explicitly set. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Instance; + } + export interface Params$Resource$Projects$Instances$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$Instances$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$Instances$Update extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + 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]`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Instance; + } + + export class Resource$Projects$Instances$Appprofiles { + constructor() {} + + + /** + * bigtableadmin.projects.instances.appProfiles.create + * @desc Creates an app profile within an instance. + * @alias bigtableadmin.projects.instances.appProfiles.create + * @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 {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 {().AppProfile} 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$Instances$Appprofiles$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Instances$Appprofiles$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Instances$Appprofiles$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + Params$Resource$Projects$Instances$Appprofiles$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Appprofiles$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Appprofiles$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/appProfiles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.appProfiles.delete + * @desc Deletes an app profile from an instance. + * @alias bigtableadmin.projects.instances.appProfiles.delete + * @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 {object} [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$Appprofiles$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Instances$Appprofiles$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Instances$Appprofiles$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + Params$Resource$Projects$Instances$Appprofiles$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Appprofiles$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Appprofiles$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.appProfiles.get + * @desc Gets information about an app profile. + * @alias bigtableadmin.projects.instances.appProfiles.get + * @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 {object} [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$Appprofiles$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Instances$Appprofiles$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Instances$Appprofiles$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Instances$Appprofiles$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Appprofiles$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Appprofiles$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.appProfiles.list + * @desc Lists information about app profiles in an instance. + * @alias bigtableadmin.projects.instances.appProfiles.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of results per page. CURRENTLY UNIMPLEMENTED AND IGNORED. + * @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 {object} [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$Appprofiles$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Instances$Appprofiles$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Instances$Appprofiles$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Instances$Appprofiles$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Appprofiles$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Appprofiles$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/appProfiles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.appProfiles.patch + * @desc Updates an app profile within an instance. + * @alias bigtableadmin.projects.instances.appProfiles.patch + * @memberOf! () + * + * @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 {().AppProfile} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Instances$Appprofiles$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Instances$Appprofiles$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Instances$Appprofiles$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Instances$Appprofiles$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Appprofiles$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Appprofiles$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Instances$Appprofiles$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + 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`. + */ + appProfileId?: string; + /** + * If true, ignore safety checks when creating the app profile. + */ + ignoreWarnings?: boolean; + /** + * The unique name of the instance in which to create the new app profile. + * Values are of the form `projects//instances/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AppProfile; + } + export interface Params$Resource$Projects$Instances$Appprofiles$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * 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/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Appprofiles$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique name of the requested app profile. Values are of the form + * `projects//instances//appProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Appprofiles$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of results per page. CURRENTLY UNIMPLEMENTED AND IGNORED. + */ + pageSize?: number; + /** + * The value of `next_page_token` returned by a previous call. + */ + 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/-`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Instances$Appprofiles$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If true, ignore safety checks when updating the app profile. + */ + ignoreWarnings?: boolean; + /** + * (`OutputOnly`) The unique name of the app profile. Values are of the form + * `projects//instances//appProfiles/_a-zA-Z0-9*`. + */ + name?: string; + /** + * The subset of app profile fields which should be replaced. If unset, all + * fields will be replaced. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AppProfile; + } + + + export class Resource$Projects$Instances$Clusters { + constructor() {} + + + /** + * bigtableadmin.projects.instances.clusters.create + * @desc Creates a cluster within an instance. + * @alias bigtableadmin.projects.instances.clusters.create + * @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 {().Cluster} 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$Instances$Clusters$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Instances$Clusters$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Instances$Clusters$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Instances$Clusters$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Clusters$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Clusters$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/clusters') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.clusters.delete + * @desc Deletes a cluster from an instance. + * @alias bigtableadmin.projects.instances.clusters.delete + * @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 {object} [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$Clusters$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Instances$Clusters$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Instances$Clusters$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Instances$Clusters$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Clusters$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Clusters$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.clusters.get + * @desc Gets information about a cluster. + * @alias bigtableadmin.projects.instances.clusters.get + * @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 {object} [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$Clusters$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Instances$Clusters$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Instances$Clusters$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Instances$Clusters$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Clusters$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Clusters$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.clusters.list + * @desc Lists information about clusters in an instance. + * @alias bigtableadmin.projects.instances.clusters.list + * @memberOf! () + * + * @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 {object} [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$Clusters$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Instances$Clusters$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Instances$Clusters$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Instances$Clusters$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Clusters$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Clusters$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/clusters') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.clusters.update + * @desc Updates a cluster within an instance. + * @alias bigtableadmin.projects.instances.clusters.update + * @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 {().Cluster} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Projects$Instances$Clusters$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Projects$Instances$Clusters$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Projects$Instances$Clusters$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Projects$Instances$Clusters$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Clusters$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Clusters$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Instances$Clusters$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + 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`. + */ + clusterId?: string; + /** + * The unique name of the instance in which to create the new cluster. + * Values are of the form `projects//instances/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Cluster; + } + export interface Params$Resource$Projects$Instances$Clusters$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique name of the cluster to be deleted. Values are of the form + * `projects//instances//clusters/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Clusters$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique name of the requested cluster. Values are of the form + * `projects//instances//clusters/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Clusters$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * DEPRECATED: This field is unused and ignored. + */ + 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/-`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Instances$Clusters$Update extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * (`OutputOnly`) The unique name of the cluster. Values are of the form + * `projects//instances//clusters/a-z*`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Cluster; + } + + + export class Resource$Projects$Instances$Tables { + constructor() {} + + + /** + * bigtableadmin.projects.instances.tables.checkConsistency + * @desc Checks replication consistency based on a consistency token, that + * is, if replication has caught up based on the conditions specified in the + * token and the check request. + * @alias bigtableadmin.projects.instances.tables.checkConsistency + * @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 {().CheckConsistencyRequest} 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 + */ + checkConsistency( + params?: Params$Resource$Projects$Instances$Tables$Checkconsistency, + options?: MethodOptions): AxiosPromise; + checkConsistency( + params: Params$Resource$Projects$Instances$Tables$Checkconsistency, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + checkConsistency( + params: Params$Resource$Projects$Instances$Tables$Checkconsistency, + callback: BodyResponseCallback): void; + checkConsistency( + callback: BodyResponseCallback): void; + checkConsistency( + paramsOrCallback?: + Params$Resource$Projects$Instances$Tables$Checkconsistency| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$Checkconsistency; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Instances$Tables$Checkconsistency; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:checkConsistency') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.tables.create + * @desc Creates a new table in the specified instance. The table can be + * created with a full set of initial column families, specified in the + * request. + * @alias bigtableadmin.projects.instances.tables.create + * @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 {().CreateTableRequest} 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$Instances$Tables$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Instances$Tables$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Instances$Tables$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Instances$Tables$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Tables$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/tables') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.tables.delete + * @desc Permanently deletes a specified table and all of its data. + * @alias bigtableadmin.projects.instances.tables.delete + * @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 {object} [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$Tables$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Instances$Tables$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Instances$Tables$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Instances$Tables$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Tables$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.tables.dropRowRange + * @desc Permanently drop/delete a row range from a specified table. The + * request can specify whether to delete all rows in a table, or only those + * that match a particular prefix. + * @alias bigtableadmin.projects.instances.tables.dropRowRange + * @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 {().DropRowRangeRequest} 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 + */ + dropRowRange( + params?: Params$Resource$Projects$Instances$Tables$Droprowrange, + options?: MethodOptions): AxiosPromise; + dropRowRange( + params: Params$Resource$Projects$Instances$Tables$Droprowrange, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + dropRowRange( + params: Params$Resource$Projects$Instances$Tables$Droprowrange, + callback: BodyResponseCallback): void; + dropRowRange(callback: BodyResponseCallback): void; + dropRowRange( + paramsOrCallback?: + Params$Resource$Projects$Instances$Tables$Droprowrange| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$Droprowrange; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Tables$Droprowrange; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:dropRowRange') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.tables.generateConsistencyToken + * @desc Generates a consistency token for a Table, which can be used in + * CheckConsistency to check whether mutations to the table that finished + * before this call started have been replicated. The tokens will be + * available for 90 days. + * @alias bigtableadmin.projects.instances.tables.generateConsistencyToken + * @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 {().GenerateConsistencyTokenRequest} 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 + */ + generateConsistencyToken( + params?: + Params$Resource$Projects$Instances$Tables$Generateconsistencytoken, + options?: MethodOptions): + AxiosPromise; + generateConsistencyToken( + params: + Params$Resource$Projects$Instances$Tables$Generateconsistencytoken, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + generateConsistencyToken( + params: + Params$Resource$Projects$Instances$Tables$Generateconsistencytoken, + callback: + BodyResponseCallback): + void; + generateConsistencyToken( + callback: + BodyResponseCallback): + void; + generateConsistencyToken( + paramsOrCallback?: + Params$Resource$Projects$Instances$Tables$Generateconsistencytoken| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$Generateconsistencytoken; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Instances$Tables$Generateconsistencytoken; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:generateConsistencyToken') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * bigtableadmin.projects.instances.tables.get + * @desc Gets metadata information about the specified table. + * @alias bigtableadmin.projects.instances.tables.get + * @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.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. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Instances$Tables$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Instances$Tables$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Instances$Tables$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Instances$Tables$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Tables$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.tables.list + * @desc Lists all tables served from a specified instance. + * @alias bigtableadmin.projects.instances.tables.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of results per page. CURRENTLY UNIMPLEMENTED AND IGNORED. + * @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.view The view to be applied to the returned tables' fields. Defaults to `NAME_ONLY` if unspecified; no others are currently supported. + * @param {object} [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$Tables$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Instances$Tables$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Instances$Tables$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Instances$Tables$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Tables$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/tables') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * bigtableadmin.projects.instances.tables.modifyColumnFamilies + * @desc Performs a series of column family modifications on the specified + * table. Either all or none of the modifications will occur before this + * method returns, but data requests received prior to that point may see a + * table where only some modifications have taken effect. + * @alias bigtableadmin.projects.instances.tables.modifyColumnFamilies + * @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 {().ModifyColumnFamiliesRequest} 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 + */ + modifyColumnFamilies( + params?: Params$Resource$Projects$Instances$Tables$Modifycolumnfamilies, + options?: MethodOptions): AxiosPromise; + modifyColumnFamilies( + params: Params$Resource$Projects$Instances$Tables$Modifycolumnfamilies, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + modifyColumnFamilies( + params: Params$Resource$Projects$Instances$Tables$Modifycolumnfamilies, + callback: BodyResponseCallback): void; + modifyColumnFamilies(callback: BodyResponseCallback): void; + modifyColumnFamilies( + paramsOrCallback?: + Params$Resource$Projects$Instances$Tables$Modifycolumnfamilies| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Tables$Modifycolumnfamilies; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Instances$Tables$Modifycolumnfamilies; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:modifyColumnFamilies') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Instances$Tables$Checkconsistency + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + 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/
`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CheckConsistencyRequest; + } + export interface Params$Resource$Projects$Instances$Tables$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + 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/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CreateTableRequest; + } + export interface Params$Resource$Projects$Instances$Tables$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique name of the table to be deleted. Values are of the form + * `projects//instances//tables/
`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Tables$Droprowrange + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + 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/
`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DropRowRangeRequest; + } + export interface Params$Resource$Projects$Instances$Tables$Generateconsistencytoken + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + 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/
`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GenerateConsistencyTokenRequest; + } + export interface Params$Resource$Projects$Instances$Tables$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique name of the requested table. Values are of the form + * `projects//instances//tables/
`. + */ + name?: string; + /** + * The view to be applied to the returned table's fields. Defaults to + * `SCHEMA_VIEW` if unspecified. + */ + view?: string; + } + export interface Params$Resource$Projects$Instances$Tables$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of results per page. CURRENTLY UNIMPLEMENTED AND IGNORED. + */ + pageSize?: number; + /** + * The value of `next_page_token` returned by a previous call. + */ + pageToken?: string; + /** + * The unique name of the instance for which tables should be listed. Values + * are of the form `projects//instances/`. + */ + parent?: string; + /** + * The view to be applied to the returned tables' fields. Defaults to + * `NAME_ONLY` if unspecified; no others are currently supported. + */ + view?: string; + } + export interface Params$Resource$Projects$Instances$Tables$Modifycolumnfamilies + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + 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/
`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ModifyColumnFamiliesRequest; + } +} diff --git a/src/apis/cloudasset/v1beta1.ts b/src/apis/cloudasset/v1beta1.ts index 442e3b6f862..2b61dcb6157 100644 --- a/src/apis/cloudasset/v1beta1.ts +++ b/src/apis/cloudasset/v1beta1.ts @@ -115,7 +115,7 @@ export namespace cloudasset_v1beta1 { */ export interface Schema$Asset { /** - * Type of the asset. Example: "google.compute.disk". + * Type of the asset. Example: "google.compute.Disk". */ assetType?: string; /** @@ -239,7 +239,7 @@ export namespace cloudasset_v1beta1 { export interface Schema$ExportAssetsRequest { /** * A list of asset types of which to take a snapshot for. For example: - * "google.compute.disk". If specified, only matching assets will + * "google.compute.Disk". If specified, only matching assets will * be returned. See [Introduction to Cloud Asset * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) * for all supported asset types. diff --git a/src/apis/cloudbuild/index.ts b/src/apis/cloudbuild/index.ts index 7a4eec3dea7..4e12b237052 100644 --- a/src/apis/cloudbuild/index.ts +++ b/src/apis/cloudbuild/index.ts @@ -15,15 +15,23 @@ import {getAPI, GoogleConfigurable} from 'googleapis-common'; import {cloudbuild_v1} from './v1'; +import {cloudbuild_v1alpha1} from './v1alpha1'; export const VERSIONS = { 'v1': cloudbuild_v1.Cloudbuild, + 'v1alpha1': cloudbuild_v1alpha1.Cloudbuild, }; export function cloudbuild(version: 'v1'): cloudbuild_v1.Cloudbuild; export function cloudbuild(options: cloudbuild_v1.Options): cloudbuild_v1.Cloudbuild; -export function cloudbuild( - this: GoogleConfigurable, versionOrOptions: 'v1'|cloudbuild_v1.Options) { +export function cloudbuild(version: 'v1alpha1'): cloudbuild_v1alpha1.Cloudbuild; +export function cloudbuild(options: cloudbuild_v1alpha1.Options): + cloudbuild_v1alpha1.Cloudbuild; +export function +cloudbuild( + this: GoogleConfigurable, + versionOrOptions: 'v1'|cloudbuild_v1.Options|'v1alpha1'| + cloudbuild_v1alpha1.Options) { return getAPI('cloudbuild', versionOrOptions, VERSIONS, this); } diff --git a/src/apis/cloudbuild/v1alpha1.ts b/src/apis/cloudbuild/v1alpha1.ts new file mode 100644 index 00000000000..193f4928e0a --- /dev/null +++ b/src/apis/cloudbuild/v1alpha1.ts @@ -0,0 +1,1246 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace cloudbuild_v1alpha1 { + export interface Options extends GlobalOptions { + version: 'v1alpha1'; + } + + let context: APIRequestContext; + + 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 Build API + * + * Creates and manages builds on Google Cloud Platform. + * + * @example + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1alpha1'); + * + * @namespace cloudbuild + * @type {Function} + * @version v1alpha1 + * @variation v1alpha1 + * @param {object=} options Options for Cloudbuild + */ + export class Cloudbuild { + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.projects = new Resource$Projects(); + } + } + + /** + * Files in the workspace to upload to Cloud Storage upon successful + * completion of all build steps. + */ + export interface Schema$ArtifactObjects { + /** + * Cloud Storage bucket and optional object path, in the form + * "gs://bucket/path/to/somewhere/". (see [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Files in the workspace matching any path pattern will be uploaded to + * Cloud Storage with this location as a prefix. + */ + location?: string; + /** + * Path globs used to match files in the build's workspace. + */ + paths?: string[]; + /** + * Output only. Stores timing information for pushing all artifact objects. + */ + timing?: Schema$TimeSpan; + } + /** + * An artifact that was uploaded during a build. This is a single record in + * the artifact manifest JSON file. + */ + export interface Schema$ArtifactResult { + /** + * The file hash of the artifact. + */ + fileHash?: Schema$FileHashes[]; + /** + * The path of an artifact in a Google Cloud Storage bucket, with the + * generation number. For example, + * `gs://mybucket/path/to/output.jar#generation`. + */ + location?: string; + } + /** + * Artifacts produced by a build that should be uploaded upon successful + * completion of all build steps. + */ + export interface Schema$Artifacts { + /** + * A list of images to be pushed upon the successful completion of all build + * steps. The images will be pushed using the builder service account's + * credentials. The digests of the pushed images will be stored in the + * Build resource's results field. If any of the images fail to be + * pushed, the build is marked FAILURE. + */ + images?: string[]; + /** + * A list of objects to be uploaded to Cloud Storage upon successful + * completion of all build steps. Files in the workspace matching specified + * paths globs will be uploaded to the specified Cloud Storage location + * using the builder service account's credentials. The location and + * generation of the uploaded objects will be stored in the Build + * resource's results field. If any objects fail to be pushed, the + * build is marked FAILURE. + */ + objects?: Schema$ArtifactObjects; + } + /** + * A build resource in the Cloud Build API. At a high level, a `Build` + * describes where to find source code, how to build it (for example, the + * builder image to run on the source), and where to store the built + * artifacts. Fields can include the following variables, which will be + * expanded when the build is created: - $PROJECT_ID: the project ID of the + * build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the + * source repository name specified by RepoSource. - $BRANCH_NAME: the branch + * name specified by RepoSource. - $TAG_NAME: the tag name specified by + * RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by + * RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: + * first 7 characters of $REVISION_ID or $COMMIT_SHA. + */ + export interface Schema$Build { + /** + * Artifacts produced by the build that should be uploaded upon successful + * completion of all build steps. + */ + artifacts?: Schema$Artifacts; + /** + * Output only. The ID of the `BuildTrigger` that triggered this build, if + * it was triggered automatically. + */ + buildTriggerId?: string; + /** + * Output only. Time at which the request to create the build was received. + */ + createTime?: string; + /** + * Output only. Time at which execution of the build was finished. The + * difference between finish_time and start_time is the duration of the + * build's execution. + */ + finishTime?: string; + /** + * Output only. Unique identifier of the build. + */ + id?: string; + /** + * A list of images to be pushed upon the successful completion of all build + * steps. The images are pushed using the builder service account's + * credentials. The digests of the pushed images will be stored in the + * `Build` resource's results field. If any of the images fail to be + * pushed, the build status is marked `FAILURE`. + */ + images?: string[]; + /** + * Google Cloud Storage bucket where logs should be written (see [Bucket + * Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format + * `${logs_bucket}/log-${build_id}.txt`. + */ + logsBucket?: string; + /** + * Output only. URL to logs for this build in Google Cloud Console. + */ + logUrl?: string; + /** + * Special options for this build. + */ + options?: Schema$BuildOptions; + /** + * Output only. ID of the project. + */ + projectId?: string; + /** + * Output only. Results of the build. + */ + results?: Schema$Results; + /** + * Secrets to decrypt using Cloud Key Management Service. + */ + secrets?: Schema$Secret[]; + /** + * The location of the source files to build. + */ + source?: Schema$Source; + /** + * Output only. A permanent fixed identifier for source. + */ + sourceProvenance?: Schema$SourceProvenance; + /** + * Output only. Time at which execution of the build was started. + */ + startTime?: string; + /** + * Output only. Status of the build. + */ + status?: string; + /** + * Output only. Customer-readable message about the current status. + */ + statusDetail?: string; + /** + * Required. The operations to be performed on the workspace. + */ + steps?: Schema$BuildStep[]; + /** + * Substitutions data for `Build` resource. + */ + substitutions?: {[key: string]: string;}; + /** + * Tags for annotation of a `Build`. These are not docker tags. + */ + tags?: string[]; + /** + * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. Default time is ten minutes. + */ + timeout?: string; + /** + * Output only. Stores timing information for phases of the build. Valid + * keys are: * BUILD: time to execute all build steps * PUSH: time to push + * all specified images. * FETCHSOURCE: time to fetch source. If the build + * does not specify source or images, these keys will not be included. + */ + timing?: {[key: string]: Schema$TimeSpan;}; + } + /** + * Metadata for build operations. + */ + export interface Schema$BuildOperationMetadata { + /** + * The build that the operation is tracking. + */ + build?: Schema$Build; + } + /** + * Optional arguments to enable specific features of builds. + */ + export interface Schema$BuildOptions { + /** + * Requested disk size for the VM that runs the build. Note that this is + * *NOT* "disk free"; some of the space will be used by the + * operating system and build utilities. Also note that this is the minimum + * disk size that will be allocated for the build -- the build may run with + * a larger disk than requested. At present, the maximum disk size is + * 1000GB; builds that request more than the maximum are rejected with an + * error. + */ + diskSizeGb?: string; + /** + * A list of global environment variable definitions that will exist for all + * build steps in this build. If a variable is defined in both globally and + * in a build step, the variable will use the build step value. The + * elements are of the form "KEY=VALUE" for the environment + * variable "KEY" being given the value "VALUE". + */ + env?: string[]; + /** + * Option to specify the logging mode, which determines where the logs are + * stored. + */ + logging?: string; + /** + * Option to define build log streaming behavior to Google Cloud Storage. + */ + logStreamingOption?: string; + /** + * Compute Engine machine type on which to run the build. + */ + machineType?: string; + /** + * Requested verifiability options. + */ + requestedVerifyOption?: string; + /** + * A list of global environment variables, which are encrypted using a Cloud + * Key Management Service crypto key. These values must be specified in the + * build's `Secret`. These variables will be available to all build + * steps in this build. + */ + secretEnv?: string[]; + /** + * Requested hash for SourceProvenance. + */ + sourceProvenanceHash?: string[]; + /** + * Option to specify behavior when there is an error in the substitution + * checks. + */ + substitutionOption?: string; + /** + * Global list of volumes to mount for ALL build steps Each volume is + * created as an empty volume prior to starting the build process. Upon + * completion of the build, volumes and their contents are discarded. Global + * volume names and paths cannot conflict with the volumes defined a build + * step. Using a global volume in a build with only one step is not valid + * as it is indicative of a build request with an incorrect configuration. + */ + volumes?: Schema$Volume[]; + /** + * Option to specify a `WorkerPool` for the build. User specifies the pool + * with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". + * This is an experimental field. + */ + workerPool?: string; + } + /** + * A step in the build pipeline. + */ + export interface Schema$BuildStep { + /** + * A list of arguments that will be presented to the step when it is + * started. If the image used to run the step's container has an + * entrypoint, the `args` are used as arguments to that entrypoint. If the + * image does not define an entrypoint, the first element in args is used as + * the entrypoint, and the remainder will be used as arguments. + */ + args?: string[]; + /** + * Working directory to use when running this step's container. If this + * value is a relative path, it is relative to the build's working + * directory. If this value is absolute, it may be outside the build's + * working directory, in which case the contents of the path may not be + * persisted across build step executions, unless a `volume` for that path + * is specified. If the build specifies a `RepoSource` with `dir` and a + * step with a `dir`, which specifies an absolute path, the `RepoSource` + * `dir` is ignored for the step's execution. + */ + dir?: string; + /** + * Entrypoint to be used instead of the build step image's default + * entrypoint. If unset, the image's default entrypoint is used. + */ + entrypoint?: string; + /** + * A list of environment variable definitions to be used when running a + * step. The elements are of the form "KEY=VALUE" for the + * environment variable "KEY" being given the value + * "VALUE". + */ + env?: string[]; + /** + * Unique identifier for this build step, used in `wait_for` to reference + * this build step as a dependency. + */ + id?: string; + /** + * Required. The name of the container image that will run this particular + * build step. If the image is available in the host's Docker + * daemon's cache, it will be run directly. If not, the host will + * attempt to pull the image first, using the builder service account's + * credentials if necessary. The Docker daemon's cache will already + * have the latest versions of all of the officially supported build steps + * ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). + * The Docker daemon will also have cached many of the layers for some + * popular images, like "ubuntu", "debian", but they + * will be refreshed at the time you attempt to use them. If you built an + * image in a previous build step, it will be stored in the host's + * Docker daemon's cache and is available to use as the name for a later + * build step. + */ + name?: string; + /** + * Output only. Stores timing information for pulling this build step's + * builder image only. + */ + pullTiming?: Schema$TimeSpan; + /** + * A list of environment variables which are encrypted using a Cloud Key + * Management Service crypto key. These values must be specified in the + * build's `Secret`. + */ + secretEnv?: string[]; + /** + * Output only. Status of the build step. At this time, build step status is + * only updated on build completion; step status is not updated in real-time + * as the build progresses. + */ + status?: string; + /** + * Time limit for executing this build step. If not defined, the step has no + * time limit and will be allowed to continue to run until either it + * completes or the build itself times out. + */ + timeout?: string; + /** + * Output only. Stores timing information for executing this build step. + */ + timing?: Schema$TimeSpan; + /** + * List of volumes to mount into the build step. Each volume is created as + * an empty volume prior to execution of the build step. Upon completion of + * the build, volumes and their contents are discarded. Using a named + * volume in only one step is not valid as it is indicative of a build + * request with an incorrect configuration. + */ + volumes?: Schema$Volume[]; + /** + * The ID(s) of the step(s) that this build step depends on. This build step + * will not start until all the build steps in `wait_for` have completed + * successfully. If `wait_for` is empty, this build step will start when all + * previous build steps in the `Build.Steps` list have completed + * successfully. + */ + waitFor?: string[]; + } + /** + * An image built by the pipeline. + */ + export interface Schema$BuiltImage { + /** + * Docker Registry 2.0 digest. + */ + digest?: string; + /** + * Name used to push the container image to Google Container Registry, as + * presented to `docker push`. + */ + name?: string; + /** + * Output only. Stores timing information for pushing the specified image. + */ + pushTiming?: Schema$TimeSpan; + } + /** + * 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 {} + /** + * Container message for hashes of byte content of files, used in + * SourceProvenance messages to verify integrity of source input to the build. + */ + export interface Schema$FileHashes { + /** + * Collection of file hashes. + */ + fileHash?: Schema$Hash[]; + } + /** + * Container message for hash values. + */ + export interface Schema$Hash { + /** + * The type of hash that was performed. + */ + type?: string; + /** + * The hash value. + */ + value?: string; + } + /** + * Response containing existing `WorkerPools`. + */ + export interface Schema$ListWorkerPoolsResponse { + /** + * `WorkerPools` for the project. + */ + workerPools?: Schema$WorkerPool[]; + } + /** + * Network describes the GCP network used to create workers in. + */ + export interface Schema$Network { + /** + * Network on which the workers are created. “default” network is used if + * empty. + */ + network?: string; + /** + * Project id containing the defined network and subnetwork. For a peered + * VPC, this will be the same as the project_id in which the workers are + * created. For a shared VPC, this will be the project sharing the network + * with the project_id project in which workers will be created. For custom + * workers with no VPC, this will be the same as project_id. + */ + projectId?: string; + /** + * Subnetwork on which the workers are created. “default” subnetwork is used + * if empty. + */ + subnetwork?: string; + } + /** + * Location of the source in a Google Cloud Source Repository. + */ + export interface Schema$RepoSource { + /** + * Name of the branch to build. + */ + branchName?: string; + /** + * Explicit commit SHA to build. + */ + commitSha?: string; + /** + * Directory, relative to the source root, in which to run the build. This + * must be a relative path. If a step's `dir` is specified and is an + * absolute path, this value is ignored for that step's execution. + */ + dir?: string; + /** + * ID of the project that owns the Cloud Source Repository. If omitted, the + * project ID requesting the build is assumed. + */ + projectId?: string; + /** + * Name of the Cloud Source Repository. If omitted, the name + * "default" is assumed. + */ + repoName?: string; + /** + * Name of the tag to build. + */ + tagName?: string; + } + /** + * Artifacts created by the build pipeline. + */ + export interface Schema$Results { + /** + * Path to the artifact manifest. Only populated when artifacts are + * uploaded. + */ + artifactManifest?: string; + /** + * List of build step digests, in the order corresponding to build step + * indices. + */ + buildStepImages?: string[]; + /** + * List of build step outputs, produced by builder images, in the order + * corresponding to build step indices. [Cloud + * Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can + * produce this output by writing to `$BUILDER_OUTPUT/output`. Only the + * first 4KB of data is stored. + */ + buildStepOutputs?: string[]; + /** + * Container images that were built as a part of the build. + */ + images?: Schema$BuiltImage[]; + /** + * Number of artifacts uploaded. Only populated when artifacts are uploaded. + */ + numArtifacts?: string; + } + /** + * Pairs a set of secret environment variables containing encrypted values + * with the Cloud KMS key to use to decrypt the value. + */ + export interface Schema$Secret { + /** + * Cloud KMS key name to use to decrypt these envs. + */ + kmsKeyName?: string; + /** + * Map of environment variable name to its encrypted value. Secret + * environment variables must be unique across all of a build's secrets, + * and must be used by at least one build step. Values can be at most 64 KB + * in size. There can be at most 100 secret values across all of a + * build's secrets. + */ + secretEnv?: {[key: string]: string;}; + } + /** + * Location of the source in a supported storage service. + */ + export interface Schema$Source { + /** + * If provided, get the source from this location in a Cloud Source + * Repository. + */ + repoSource?: Schema$RepoSource; + /** + * If provided, get the source from this location in Google Cloud Storage. + */ + storageSource?: Schema$StorageSource; + } + /** + * Provenance of the source. Ways to find the original source, or verify that + * some source was used for this build. + */ + export interface Schema$SourceProvenance { + /** + * Output only. Hash(es) of the build source, which can be used to verify + * that the originalsource integrity was maintained in the build. Note that + * `FileHashes` willonly be populated if `BuildOptions` has requested a + * `SourceProvenanceHash`. The keys to this map are file paths used as + * build source and the values contain the hash values for those files. If + * the build source came in a single package such as a gzipped tarfile + * (`.tar.gz`), the `FileHash` will be for the single path to that file. + */ + fileHashes?: {[key: string]: Schema$FileHashes;}; + /** + * A copy of the build's `source.repo_source`, if exists, with any + * revisions resolved. + */ + resolvedRepoSource?: Schema$RepoSource; + /** + * A copy of the build's `source.storage_source`, if exists, with any + * generations resolved. + */ + resolvedStorageSource?: Schema$StorageSource; + } + /** + * Location of the source in an archive file in Google Cloud Storage. + */ + export interface Schema$StorageSource { + /** + * Google Cloud Storage bucket containing the source (see [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string; + /** + * Google Cloud Storage generation for the object. If the generation is + * omitted, the latest generation will be used. + */ + generation?: string; + /** + * Google Cloud Storage object containing the source. This object must be a + * gzipped archive file (`.tar.gz`) containing source to build. + */ + object?: string; + } + /** + * Start and end times for a build execution phase. + */ + export interface Schema$TimeSpan { + /** + * End of time span. + */ + endTime?: string; + /** + * Start of time span. + */ + startTime?: string; + } + /** + * Volume describes a Docker container volume which is mounted into build + * steps in order to persist files across build step execution. + */ + export interface Schema$Volume { + /** + * Name of the volume to mount. Volume names must be unique per build step + * and must be valid names for Docker volumes. Each named volume must be + * used by at least two build steps. + */ + name?: string; + /** + * Path at which to mount the volume. Paths must be absolute and cannot + * conflict with other volume paths on the same build step or with certain + * reserved volume paths. + */ + path?: string; + } + /** + * WorkerConfig defines the configuration to be used for a creating workers in + * the pool. + */ + export interface Schema$WorkerConfig { + /** + * Size of the disk attached to the worker, in GB. See + * https://cloud.google.com/compute/docs/disks/ If `0` is specified, Cloud + * Build will use a standard disk size. `disk_size` is overridden if you + * specify a different disk size in `build_options`. In this case, a VM with + * a disk size specified in the `build_options` will be created on demand at + * build time. For more information see + * https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions + */ + diskSizeGb?: string; + /** + * Machine Type of the worker, such as n1-standard-1. See + * https://cloud.google.com/compute/docs/machine-types. If left blank, Cloud + * Build will use a standard unspecified machine to create the worker pool. + * `machine_type` is overridden if you specify a different machine type in + * `build_options`. In this case, the VM specified in the `build_options` + * will be created on demand at build time. For more information see + * https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes + */ + machineType?: string; + /** + * The network definition used to create the worker. If this section is left + * empty, the workers will be created in WorkerPool.project_id on the + * default network. + */ + network?: Schema$Network; + /** + * The tag applied to the worker, and the same tag used by the firewall + * rule. It is used to identify the Cloud Build workers among other VMs. The + * default value for tag is `worker`. + */ + tag?: string; + } + /** + * Configuration for a WorkerPool to run the builds. Workers are machines + * that Cloud Build uses to run your builds. By default, all workers run in a + * project owned by Cloud Build. To have full control over the workers that + * execute your builds -- such as enabling them to access private resources on + * your private network -- you can request Cloud Build to run the workers in + * your own project by creating a custom workers pool. + */ + export interface Schema$WorkerPool { + /** + * Output only. Time at which the request to create the `WorkerPool` was + * received. + */ + createTime?: string; + /** + * Output only. Time at which the request to delete the `WorkerPool` was + * received. + */ + deleteTime?: string; + /** + * User-defined name of the `WorkerPool`. + */ + name?: string; + /** + * The project ID of the GCP project in which the `WorkerPool` is created. + */ + projectId?: string; + /** + * List of regions to create the `WorkerPool`. Regions can’t be empty. If + * Cloud Build adds a new GCP region in the future, the existing + * `WorkerPool` will not be enabled in the new region automatically; you + * must add the new region to the `regions` field to enable the `WorkerPool` + * in that region. + */ + regions?: string[]; + /** + * Output only. The service account used to manage the `WorkerPool`. The + * service account must have the Compute Instance Admin (Beta) permission at + * the project level. + */ + serviceAccountEmail?: string; + /** + * Output only. WorkerPool Status. + */ + status?: string; + /** + * Output only. Time at which the request to update the `WorkerPool` was + * received. + */ + updateTime?: string; + /** + * Configuration to be used for a creating workers in the `WorkerPool`. + */ + workerConfig?: Schema$WorkerConfig; + /** + * Total number of workers to be created across all requested regions. + */ + workerCount?: string; + } + + + export class Resource$Projects { + workerPools: Resource$Projects$Workerpools; + constructor() { + this.workerPools = new Resource$Projects$Workerpools(); + } + } + + + export class Resource$Projects$Workerpools { + constructor() {} + + + /** + * cloudbuild.projects.workerPools.create + * @desc Creates a `WorkerPool` to run the builds, and returns the new + * worker pool. This API is experimental. + * @alias cloudbuild.projects.workerPools.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent ID of the parent project. + * @param {().WorkerPool} 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$Workerpools$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Workerpools$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Workerpools$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Workerpools$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Workerpools$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Workerpools$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/workerPools') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudbuild.projects.workerPools.delete + * @desc Deletes a `WorkerPool` by its project ID and WorkerPool ID. This + * API is experimental. + * @alias cloudbuild.projects.workerPools.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The field will contain name of the resource requested, for example: "projects/project-1/workerPools/workerpool-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$Workerpools$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Workerpools$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Workerpools$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Workerpools$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Workerpools$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Workerpools$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudbuild.projects.workerPools.get + * @desc Returns information about a `WorkerPool`. This API is + * experimental. + * @alias cloudbuild.projects.workerPools.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The field will contain name of the resource requested, for example: "projects/project-1/workerPools/workerpool-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$Workerpools$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Workerpools$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Workerpools$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Workerpools$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Workerpools$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Workerpools$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudbuild.projects.workerPools.list + * @desc List project's `WorkerPool`s. This API is experimental. + * @alias cloudbuild.projects.workerPools.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent ID of the parent 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 + */ + list( + params?: Params$Resource$Projects$Workerpools$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Workerpools$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Workerpools$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Workerpools$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Workerpools$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Workerpools$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/workerPools') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudbuild.projects.workerPools.patch + * @desc Update a `WorkerPool`. This API is experimental. + * @alias cloudbuild.projects.workerPools.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The field will contain name of the resource requested, for example: "projects/project-1/workerPools/workerpool-name" + * @param {().WorkerPool} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Workerpools$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Workerpools$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Workerpools$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Workerpools$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Workerpools$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Workerpools$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Workerpools$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * ID of the parent project. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkerPool; + } + export interface Params$Resource$Projects$Workerpools$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + */ + name?: string; + } + export interface Params$Resource$Projects$Workerpools$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + */ + name?: string; + } + export interface Params$Resource$Projects$Workerpools$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * ID of the parent project. + */ + parent?: string; + } + export interface Params$Resource$Projects$Workerpools$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkerPool; + } +} diff --git a/src/apis/cloudfunctions/v1.ts b/src/apis/cloudfunctions/v1.ts index 59e087b41f0..41bdce6e478 100644 --- a/src/apis/cloudfunctions/v1.ts +++ b/src/apis/cloudfunctions/v1.ts @@ -893,8 +893,8 @@ export namespace cloudfunctions_v1 { * @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 {string=} params.filter Required. A filter for matching the requested operations.

The supported formats of filter are:
To query for specific function: project:*,location:*,function:*
To query for all of the latest operations for a project: project:*,latest:true + * @param {string=} params.name Must not be set. * @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`. @@ -973,11 +973,15 @@ export namespace cloudfunctions_v1 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * The standard list filter. + * Required. A filter for matching the requested operations.

The + * supported formats of filter are:
To query for specific + * function: project:*,location:*,function:*
To query for + * all of the latest operations for a project: + * project:*,latest:true */ filter?: string; /** - * The name of the operation's parent resource. + * Must not be set. */ name?: string; /** @@ -1109,8 +1113,10 @@ export namespace cloudfunctions_v1 { /** * cloudfunctions.projects.locations.functions.call - * @desc Invokes synchronously deployed function. To be used for testing, - * very limited traffic allowed. + * @desc Synchronously invokes a deployed Cloud Function. To be used for + * testing purposes as very limited traffic is allowed. For more information + * on the actual limits refer to [API Calls]( + * https://cloud.google.com/functions/quotas#rate_limits). * @alias cloudfunctions.projects.locations.functions.call * @memberOf! () * diff --git a/src/apis/cloudfunctions/v1beta2.ts b/src/apis/cloudfunctions/v1beta2.ts index 31dfa979a85..5b522d60dd2 100644 --- a/src/apis/cloudfunctions/v1beta2.ts +++ b/src/apis/cloudfunctions/v1beta2.ts @@ -708,8 +708,8 @@ export namespace cloudfunctions_v1beta2 { * @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 {string=} params.filter Required. A filter for matching the requested operations.

The supported formats of filter are:
To query for specific function: project:*,location:*,function:*
To query for all of the latest operations for a project: project:*,latest:true + * @param {string=} params.name Must not be set. * @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`. @@ -789,11 +789,15 @@ export namespace cloudfunctions_v1beta2 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * The standard list filter. + * Required. A filter for matching the requested operations.

The + * supported formats of filter are:
To query for specific + * function: project:*,location:*,function:*
To query for + * all of the latest operations for a project: + * project:*,latest:true */ filter?: string; /** - * The name of the operation's parent resource. + * Must not be set. */ name?: string; /** @@ -925,8 +929,10 @@ export namespace cloudfunctions_v1beta2 { /** * cloudfunctions.projects.locations.functions.call - * @desc Invokes synchronously deployed function. To be used for testing, - * very limited traffic allowed. + * @desc Synchronously invokes a deployed Cloud Function. To be used for + * testing purposes as very limited traffic is allowed. For more information + * on the actual limits refer to [API Calls]( + * https://cloud.google.com/functions/quotas#rate_limits). * @alias cloudfunctions.projects.locations.functions.call * @memberOf! () * diff --git a/src/apis/cloudidentity/README.md b/src/apis/cloudidentity/README.md new file mode 100644 index 00000000000..732cabec56e --- /dev/null +++ b/src/apis/cloudidentity/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/cloudidentity + +> API for provisioning and managing identity resources. + +## Installation + +```sh +$ npm install @google/cloudidentity +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/google/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/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/cloudidentity/index.ts b/src/apis/cloudidentity/index.ts new file mode 100644 index 00000000000..4e654374b54 --- /dev/null +++ b/src/apis/cloudidentity/index.ts @@ -0,0 +1,38 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {cloudidentity_v1} from './v1'; +import {cloudidentity_v1beta1} from './v1beta1'; + +export const VERSIONS = { + 'v1': cloudidentity_v1.Cloudidentity, + 'v1beta1': cloudidentity_v1beta1.Cloudidentity, +}; + +export function cloudidentity(version: 'v1'): cloudidentity_v1.Cloudidentity; +export function cloudidentity(options: cloudidentity_v1.Options): + cloudidentity_v1.Cloudidentity; +export function cloudidentity(version: 'v1beta1'): + cloudidentity_v1beta1.Cloudidentity; +export function cloudidentity(options: cloudidentity_v1beta1.Options): + cloudidentity_v1beta1.Cloudidentity; +export function cloudidentity< + T = cloudidentity_v1.Cloudidentity | cloudidentity_v1beta1.Cloudidentity>( + this: GoogleConfigurable, + versionOrOptions: 'v1'| + cloudidentity_v1.Options|'v1beta1'|cloudidentity_v1beta1.Options) { + return getAPI('cloudidentity', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/cloudidentity/package.json b/src/apis/cloudidentity/package.json new file mode 100644 index 00000000000..32a36e383d4 --- /dev/null +++ b/src/apis/cloudidentity/package.json @@ -0,0 +1,36 @@ +{ + "name": "@google/cloudidentity", + "version": "0.1.0", + "description": "cloudidentity", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/" + }, + "dependencies": { + "googleapis-common": "^0.4.0" + }, + "devDependencies": { + "gts": "^0.9.0", + "typescript": "~3.2.0", + "typedoc": "^0.14.0" + } +} diff --git a/src/apis/cloudidentity/tsconfig.json b/src/apis/cloudidentity/tsconfig.json new file mode 100644 index 00000000000..e0810904968 --- /dev/null +++ b/src/apis/cloudidentity/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/cloudidentity/v1.ts b/src/apis/cloudidentity/v1.ts new file mode 100644 index 00000000000..06daffc3eff --- /dev/null +++ b/src/apis/cloudidentity/v1.ts @@ -0,0 +1,1436 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace cloudidentity_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + let context: APIRequestContext; + + 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 Identity API + * + * API for provisioning and managing identity resources. + * + * @example + * const {google} = require('googleapis'); + * const cloudidentity = google.cloudidentity('v1'); + * + * @namespace cloudidentity + * @type {Function} + * @version v1 + * @variation v1 + * @param {object=} options Options for Cloudidentity + */ + export class Cloudidentity { + groups: Resource$Groups; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.groups = new Resource$Groups(); + } + } + + /** + * An EntityKey uniquely identifies an Entity. Namespaces are used to provide + * isolation for IDs. A single ID can be reused across namespaces but the + * combination of a namespace and an ID must be unique. + */ + export interface Schema$EntityKey { + /** + * The ID of the entity within the given namespace. The ID must be unique + * within its namespace. + */ + id?: string; + /** + * Namespaces provide isolation for IDs, so an ID only needs to be unique + * within its namespace. Namespaces are currently only created as part of + * IdentitySource creation from Admin Console. A namespace + * `"identitysources/{identity_source_id}"` is created + * corresponding to every Identity Source `identity_source_id`. + */ + namespace?: string; + } + /** + * Resource representing a Group. + */ + export interface Schema$Group { + /** + * The time when the Group was created. Output only. + */ + createTime?: string; + /** + * An extended description to help users determine the purpose of a Group. + * For example, you can include information about who should join the Group, + * the types of messages to send to the Group, links to FAQs about the + * Group, or related Groups. Maximum length is 4,096 characters. + */ + description?: string; + /** + * The Group's display name. + */ + displayName?: string; + /** + * EntityKey of the Group. Must be set when creating a Group, read-only + * afterwards. + */ + groupKey?: Schema$EntityKey; + /** + * `Required`. Labels for Group resource. For creating Groups under a + * namespace, set label key to 'labels/system/groups/external' and + * label value as empty. + */ + labels?: {[key: string]: string;}; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where group_id is the + * unique ID assigned to the Group. Must be left blank while creating a + * Group. + */ + name?: string; + /** + * The entity under which this Group resides in Cloud Identity resource + * hierarchy. Must be set when creating a Group, read-only afterwards. + * Currently allowed types: `identitysources`. + */ + parent?: string; + /** + * The time when the Group was last updated. Output only. + */ + updateTime?: string; + } + /** + * Response message for ListGroups operation. + */ + export interface Schema$ListGroupsResponse { + /** + * Groups returned in response to list request. The results are not sorted. + */ + groups?: Schema$Group[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results available for listing. + */ + nextPageToken?: string; + } + export interface Schema$ListMembershipsResponse { + /** + * List of Memberships. + */ + memberships?: Schema$Membership[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results available for listing. + */ + nextPageToken?: string; + } + export interface Schema$LookupGroupNameResponse { + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where `group_id` is the + * unique ID assigned to the Group. + */ + name?: string; + } + export interface Schema$LookupMembershipNameResponse { + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership being looked up. Format: + * `groups/{group_id}/memberships/{member_id}`, where `group_id` is the + * unique ID assigned to the Group to which Membership belongs to, and + * `member_id` is the unique ID assigned to the member. + */ + name?: string; + } + /** + * Resource representing a Membership within a Group + */ + export interface Schema$Membership { + /** + * Creation timestamp of the Membership. Output only. + */ + createTime?: string; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership in the format: + * `groups/{group_id}/memberships/{member_id}`, where group_id is the unique + * ID assigned to the Group to which Membership belongs to, and member_id is + * the unique ID assigned to the member Must be left blank while creating a + * Membership. + */ + name?: string; + /** + * EntityKey of the entity to be added as the member. Must be set while + * creating a Membership, read-only afterwards. Currently allowed entity + * types: `Users`, `Groups`. + */ + preferredMemberKey?: Schema$EntityKey; + /** + * Roles for a member within the Group. Currently supported + * MembershipRoles: `"MEMBER"`. + */ + roles?: Schema$MembershipRole[]; + /** + * Last updated timestamp of the Membership. Output only. + */ + updateTime?: string; + } + /** + * Resource representing a role within a Membership. + */ + export interface Schema$MembershipRole { + /** + * MembershipRole in string format. Currently supported MembershipRoles: + * `"MEMBER"`. + */ + name?: string; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: {[key: string]: any;}; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any;}; + } + export interface Schema$SearchGroupsResponse { + /** + * List of Groups satisfying the search query. + */ + groups?: Schema$Group[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results available for specified query. + */ + nextPageToken?: string; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + + + export class Resource$Groups { + memberships: Resource$Groups$Memberships; + constructor() { + this.memberships = new Resource$Groups$Memberships(); + } + + + /** + * cloudidentity.groups.create + * @desc Creates a Group. + * @alias cloudidentity.groups.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().Group} 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$Groups$Create, options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Groups$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Groups$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Groups$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/groups').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.delete + * @desc Deletes a Group. + * @alias cloudidentity.groups.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group in the format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group. + * @param {object} [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$Groups$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Groups$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Groups$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Groups$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.get + * @desc Retrieves a Group. + * @alias cloudidentity.groups.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group in the format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group. + * @param {object} [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$Groups$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Groups$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Groups$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Groups$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.list + * @desc List groups within a customer or a domain. + * @alias cloudidentity.groups.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of Groups to return. View | Default | Maximum -----|---------|-------- BASIC | 200 | 1000 FULL | 50 | 500 + * @param {string=} params.pageToken The next_page_token value returned from a previous list request, if any. + * @param {string=} params.parent `Required`. May be made Optional in the future. Customer ID to list all groups from. + * @param {string=} params.view Group resource view to be returned. Defaults to [View.BASIC](). + * @param {object} [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$Groups$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Groups$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Groups$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Groups$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/groups').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.lookup + * @desc Looks up [resource + * name](https://cloud.google.com/apis/design/resource_names) of a Group by + * its EntityKey. + * @alias cloudidentity.groups.lookup + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.groupKey.id The ID of the entity within the given namespace. The ID must be unique within its namespace. + * @param {string=} params.groupKey.namespace Namespaces provide isolation for IDs, so an ID only needs to be unique within its namespace. Namespaces are currently only created as part of IdentitySource creation from Admin Console. A namespace `"identitysources/{identity_source_id}"` is created corresponding to every Identity Source `identity_source_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 + */ + lookup(params?: Params$Resource$Groups$Lookup, options?: MethodOptions): + AxiosPromise; + lookup( + params: Params$Resource$Groups$Lookup, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + lookup( + params: Params$Resource$Groups$Lookup, + callback: BodyResponseCallback): void; + lookup(callback: BodyResponseCallback): + void; + lookup( + paramsOrCallback?: Params$Resource$Groups$Lookup| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Lookup; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Lookup; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1/groups:lookup').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.patch + * @desc Updates a Group. + * @alias cloudidentity.groups.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group in the format: `groups/{group_id}`, where group_id is the unique ID assigned to the Group. Must be left blank while creating a Group. + * @param {string=} params.updateMask Editable fields: `display_name`, `description` + * @param {().Group} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch(params?: Params$Resource$Groups$Patch, options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Groups$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Groups$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Groups$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.search + * @desc Searches for Groups. + * @alias cloudidentity.groups.search + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of Groups to return. View | Default | Maximum -----|---------|-------- BASIC | 200 | 1000 FULL | 50 | 500 + * @param {string=} params.pageToken The next_page_token value returned from a previous search request, if any. + * @param {string=} params.query `Required`. Query string for performing search on groups. Users can search on parent and label attributes of groups. EXACT match ('==') is supported on parent, and CONTAINS match ('in') is supported on labels. + * @param {string=} params.view Group resource view to be returned. Defaults to [View.BASIC](). + * @param {object} [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$Groups$Search, options?: MethodOptions): + AxiosPromise; + search( + params: Params$Resource$Groups$Search, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + search( + params: Params$Resource$Groups$Search, + callback: BodyResponseCallback): void; + search(callback: BodyResponseCallback): void; + search( + paramsOrCallback?: Params$Resource$Groups$Search| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1/groups:search').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Groups$Create extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$Group; + } + export interface Params$Resource$Groups$Delete extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where `group_id` is the + * unique ID assigned to the Group. + */ + name?: string; + } + export interface Params$Resource$Groups$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where `group_id` is the + * unique ID assigned to the Group. + */ + name?: string; + } + export interface Params$Resource$Groups$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of Groups to return. View | Default | Maximum + * -----|---------|-------- BASIC | 200 | 1000 FULL | 50 | 500 + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request, if any. + */ + pageToken?: string; + /** + * `Required`. May be made Optional in the future. Customer ID to list all + * groups from. + */ + parent?: string; + /** + * Group resource view to be returned. Defaults to [View.BASIC](). + */ + view?: string; + } + export interface Params$Resource$Groups$Lookup extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the entity within the given namespace. The ID must be unique + * within its namespace. + */ + 'groupKey.id'?: string; + /** + * Namespaces provide isolation for IDs, so an ID only needs to be unique + * within its namespace. Namespaces are currently only created as part of + * IdentitySource creation from Admin Console. A namespace + * `"identitysources/{identity_source_id}"` is created corresponding to + * every Identity Source `identity_source_id`. + */ + 'groupKey.namespace'?: string; + } + export interface Params$Resource$Groups$Patch extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where group_id is the + * unique ID assigned to the Group. Must be left blank while creating a + * Group. + */ + name?: string; + /** + * Editable fields: `display_name`, `description` + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Group; + } + export interface Params$Resource$Groups$Search extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of Groups to return. View | Default | Maximum + * -----|---------|-------- BASIC | 200 | 1000 FULL | 50 | 500 + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous search request, if + * any. + */ + pageToken?: string; + /** + * `Required`. Query string for performing search on groups. Users can + * search on parent and label attributes of groups. EXACT match ('==') is + * supported on parent, and CONTAINS match ('in') is supported on labels. + */ + query?: string; + /** + * Group resource view to be returned. Defaults to [View.BASIC](). + */ + view?: string; + } + + export class Resource$Groups$Memberships { + constructor() {} + + + /** + * cloudidentity.groups.memberships.create + * @desc Creates a Membership. + * @alias cloudidentity.groups.memberships.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group to create Membership within. Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group. + * @param {().Membership} 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$Groups$Memberships$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Groups$Memberships$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Groups$Memberships$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Groups$Memberships$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/memberships') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.delete + * @desc Deletes a Membership. + * @alias cloudidentity.groups.memberships.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Membership to be deleted. Format: `groups/{group_id}/memberships/{member_id}`, where `group_id` is the unique ID assigned to the Group to which Membership belongs to, and member_id is the unique ID assigned to the member. + * @param {object} [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$Groups$Memberships$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Groups$Memberships$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Groups$Memberships$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Groups$Memberships$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.get + * @desc Retrieves a Membership. + * @alias cloudidentity.groups.memberships.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Membership to be retrieved. Format: `groups/{group_id}/memberships/{member_id}`, where `group_id` is the unique id assigned to the Group to which Membership belongs to, and `member_id` is the unique ID assigned to the member. + * @param {object} [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$Groups$Memberships$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Groups$Memberships$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Groups$Memberships$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Groups$Memberships$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.list + * @desc List Memberships within a Group. + * @alias cloudidentity.groups.memberships.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of Memberships to return. View | Default | Maximum -----|---------|-------- BASIC | 200 | 1000 FULL | 50 | 500 + * @param {string=} params.pageToken The next_page_token value returned from a previous list request, if any. + * @param {string} params.parent [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group to list Memberships within. Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group. + * @param {string=} params.view Membership resource view to be returned. Defaults to View.BASIC. + * @param {object} [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$Groups$Memberships$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Groups$Memberships$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Groups$Memberships$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Groups$Memberships$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/memberships') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.lookup + * @desc Looks up [resource + * name](https://cloud.google.com/apis/design/resource_names) of a + * Membership within a Group by member's EntityKey. + * @alias cloudidentity.groups.memberships.lookup + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.memberKey.id The ID of the entity within the given namespace. The ID must be unique within its namespace. + * @param {string=} params.memberKey.namespace Namespaces provide isolation for IDs, so an ID only needs to be unique within its namespace. Namespaces are currently only created as part of IdentitySource creation from Admin Console. A namespace `"identitysources/{identity_source_id}"` is created corresponding to every Identity Source `identity_source_id`. + * @param {string} params.parent [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group to lookup Membership within. Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + lookup( + params?: Params$Resource$Groups$Memberships$Lookup, + options?: MethodOptions): + AxiosPromise; + lookup( + params: Params$Resource$Groups$Memberships$Lookup, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + lookup( + params: Params$Resource$Groups$Memberships$Lookup, + callback: BodyResponseCallback): + void; + lookup(callback: BodyResponseCallback): + void; + lookup( + paramsOrCallback?: Params$Resource$Groups$Memberships$Lookup| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Lookup; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Lookup; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/memberships:lookup') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Groups$Memberships$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group to create Membership within. Format: `groups/{group_id}`, where + * `group_id` is the unique ID assigned to the Group. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Groups$Memberships$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership to be deleted. Format: + * `groups/{group_id}/memberships/{member_id}`, where `group_id` is the + * unique ID assigned to the Group to which Membership belongs to, and + * member_id is the unique ID assigned to the member. + */ + name?: string; + } + export interface Params$Resource$Groups$Memberships$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership to be retrieved. Format: + * `groups/{group_id}/memberships/{member_id}`, where `group_id` is the + * unique id assigned to the Group to which Membership belongs to, and + * `member_id` is the unique ID assigned to the member. + */ + name?: string; + } + export interface Params$Resource$Groups$Memberships$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of Memberships to return. View | Default | Maximum + * -----|---------|-------- BASIC | 200 | 1000 FULL | 50 | 500 + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request, if any. + */ + pageToken?: string; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group to list Memberships within. Format: `groups/{group_id}`, where + * `group_id` is the unique ID assigned to the Group. + */ + parent?: string; + /** + * Membership resource view to be returned. Defaults to View.BASIC. + */ + view?: string; + } + export interface Params$Resource$Groups$Memberships$Lookup extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the entity within the given namespace. The ID must be unique + * within its namespace. + */ + 'memberKey.id'?: string; + /** + * Namespaces provide isolation for IDs, so an ID only needs to be unique + * within its namespace. Namespaces are currently only created as part of + * IdentitySource creation from Admin Console. A namespace + * `"identitysources/{identity_source_id}"` is created corresponding to + * every Identity Source `identity_source_id`. + */ + 'memberKey.namespace'?: string; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group to lookup Membership within. Format: `groups/{group_id}`, + * where `group_id` is the unique ID assigned to the Group. + */ + parent?: string; + } +} diff --git a/src/apis/cloudidentity/v1beta1.ts b/src/apis/cloudidentity/v1beta1.ts new file mode 100644 index 00000000000..cdcf51e4c9f --- /dev/null +++ b/src/apis/cloudidentity/v1beta1.ts @@ -0,0 +1,1339 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace cloudidentity_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + let context: APIRequestContext; + + 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 Identity API + * + * API for provisioning and managing identity resources. + * + * @example + * const {google} = require('googleapis'); + * const cloudidentity = google.cloudidentity('v1beta1'); + * + * @namespace cloudidentity + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for Cloudidentity + */ + export class Cloudidentity { + groups: Resource$Groups; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.groups = new Resource$Groups(); + } + } + + /** + * An EntityKey uniquely identifies an Entity. Namespaces are used to provide + * isolation for ids. A single Id can be reused across namespaces but the + * combination of a namespace and an id must be unique. + */ + export interface Schema$EntityKey { + /** + * The id of the entity within the given namespace. The id must be unique + * within its namespace. + */ + id?: string; + /** + * Namespaces provide isolation for ids, i.e an id only needs to be unique + * within its namespace. Namespaces are currently only created as part of + * IdentitySource creation from Admin Console. A namespace + * `"identitysources/{identity_source_id}"` is created + * corresponding to every Identity Source `identity_source_id`. + */ + namespace?: string; + } + /** + * Resource representing a Group + */ + export interface Schema$Group { + /** + * Optional. Additional entity key aliases for a Group + */ + additionalGroupKeys?: Schema$EntityKey[]; + /** + * The time when the Group was created. Output only + */ + createTime?: string; + /** + * An extended description to help users determine the purpose of a Group. + * For example, you can include information about who should join the Group, + * the types of messages to send to the Group, links to FAQs about the + * Group, or related Groups. Maximum length is 4,096 characters. + */ + description?: string; + /** + * The Group's display name. + */ + displayName?: string; + /** + * EntityKey of the Group. Must be set when creating a Group, read-only + * afterwards. + */ + groupKey?: Schema$EntityKey; + /** + * Labels for Group resource. Required. For creating Groups under a + * namespace, set label key to 'labels/system/groups/external' and + * label value as empty. + */ + labels?: {[key: string]: string;}; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where group_id is the + * unique id assigned to the Group. Must be left blank while creating a + * Group + */ + name?: string; + /** + * The entity under which this Group resides in Cloud Identity resource + * hierarchy. Must be set when creating a Group, read-only afterwards. + * Currently allowed types: 'identitysources'. + */ + parent?: string; + /** + * The time when the Group was last updated. Output only + */ + updateTime?: string; + } + export interface Schema$ListMembershipsResponse { + /** + * List of Memberships + */ + memberships?: Schema$Membership[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results available for listing. + */ + nextPageToken?: string; + } + export interface Schema$LookupGroupNameResponse { + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where `group_id` is the + * unique id assigned to the Group. + */ + name?: string; + } + export interface Schema$LookupMembershipNameResponse { + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership being looked up. Format: + * `groups/{group_id}/memberships/{member_id}`, where `group_id` is the + * unique id assigned to the Group to which Membership belongs to, and + * `member_id` is the unique id assigned to the member. + */ + name?: string; + } + /** + * Resource representing a Membership within a Group + */ + export interface Schema$Membership { + /** + * Creation timestamp of the Membership. + */ + createTime?: string; + /** + * EntityKey of the entity to be added as the member. Must be set while + * creating a Membership, read-only afterwards. Currently allowed entity + * types: `Users`, `Groups`. + */ + memberKey?: Schema$EntityKey; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership in the format: + * `groups/{group_id}/memberships/{member_id}`, where group_id is the unique + * id assigned to the Group to which Membership belongs to, and member_id is + * the unique id assigned to the member Must be left blank while creating a + * Membership. + */ + name?: string; + /** + * Roles for a member within the Group. Currently supported + * MembershipRoles: `"MEMBER"`. + */ + roles?: Schema$MembershipRole[]; + /** + * Last updated timestamp of the Membership. + */ + updateTime?: string; + } + /** + * Resource representing a role within a Membership. + */ + export interface Schema$MembershipRole { + /** + * MembershipRole in string format. Currently supported MembershipRoles: + * `"MEMBER"`. + */ + name?: string; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: {[key: string]: any;}; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any;}; + } + export interface Schema$SearchGroupsResponse { + /** + * List of Groups satisfying the search query. + */ + groups?: Schema$Group[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results available for specified query. + */ + nextPageToken?: string; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + + + export class Resource$Groups { + memberships: Resource$Groups$Memberships; + constructor() { + this.memberships = new Resource$Groups$Memberships(); + } + + + /** + * cloudidentity.groups.create + * @desc Creates a Group. + * @alias cloudidentity.groups.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().Group} 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$Groups$Create, options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Groups$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Groups$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Groups$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/groups').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.delete + * @desc Deletes a Group. + * @alias cloudidentity.groups.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group in the format: `groups/{group_id}`, where `group_id` is the unique id assigned to the Group. + * @param {object} [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$Groups$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Groups$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Groups$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Groups$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.get + * @desc Retrieves a Group. + * @alias cloudidentity.groups.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group in the format: `groups/{group_id}`, where `group_id` is the unique id assigned to the Group. + * @param {object} [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$Groups$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Groups$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Groups$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Groups$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.lookup + * @desc Looks up [resource + * name](https://cloud.google.com/apis/design/resource_names) of a Group by + * its EntityKey. + * @alias cloudidentity.groups.lookup + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.groupKey.id The id of the entity within the given namespace. The id must be unique within its namespace. + * @param {string=} params.groupKey.namespace Namespaces provide isolation for ids, i.e an id only needs to be unique within its namespace. Namespaces are currently only created as part of IdentitySource creation from Admin Console. A namespace `"identitysources/{identity_source_id}"` is created corresponding to every Identity Source `identity_source_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 + */ + lookup(params?: Params$Resource$Groups$Lookup, options?: MethodOptions): + AxiosPromise; + lookup( + params: Params$Resource$Groups$Lookup, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + lookup( + params: Params$Resource$Groups$Lookup, + callback: BodyResponseCallback): void; + lookup(callback: BodyResponseCallback): + void; + lookup( + paramsOrCallback?: Params$Resource$Groups$Lookup| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Lookup; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Lookup; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/groups:lookup') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.patch + * @desc Updates a Group. + * @alias cloudidentity.groups.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group in the format: `groups/{group_id}`, where group_id is the unique id assigned to the Group. Must be left blank while creating a Group + * @param {string=} params.updateMask Editable fields: `display_name`, `description` + * @param {().Group} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch(params?: Params$Resource$Groups$Patch, options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Groups$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Groups$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Groups$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.search + * @desc Searches for Groups. + * @alias cloudidentity.groups.search + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize The max number of groups to return. GroupView | Default | Maximum --------- | ------- | ------- BASIC | 200 | 1000 FULL | 50 | 500 + * @param {string=} params.pageToken The next_page_token value returned from a previous search request, if any. + * @param {string=} params.query Query string for performing search on groups. Users can search on namespace and label attributes of groups. EXACT match ('=') is supported on namespace, and CONTAINS match (':') is supported on labels. This is a `required` field. Multiple queries can be combined using `AND` operator. The operator is case sensitive. An example query would be: "namespace= AND labels:". + * @param {string=} params.view Group resource view to be returned. Defaults to [GroupView.BASIC](). + * @param {object} [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$Groups$Search, options?: MethodOptions): + AxiosPromise; + search( + params: Params$Resource$Groups$Search, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + search( + params: Params$Resource$Groups$Search, + callback: BodyResponseCallback): void; + search(callback: BodyResponseCallback): void; + search( + paramsOrCallback?: Params$Resource$Groups$Search| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Groups$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/groups:search') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Groups$Create extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$Group; + } + export interface Params$Resource$Groups$Delete extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where `group_id` is the + * unique id assigned to the Group. + */ + name?: string; + } + export interface Params$Resource$Groups$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where `group_id` is the + * unique id assigned to the Group. + */ + name?: string; + } + export interface Params$Resource$Groups$Lookup extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The id of the entity within the given namespace. The id must be unique + * within its namespace. + */ + 'groupKey.id'?: string; + /** + * Namespaces provide isolation for ids, i.e an id only needs to be unique + * within its namespace. Namespaces are currently only created as part of + * IdentitySource creation from Admin Console. A namespace + * `"identitysources/{identity_source_id}"` is created corresponding to + * every Identity Source `identity_source_id`. + */ + 'groupKey.namespace'?: string; + } + export interface Params$Resource$Groups$Patch extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group in the format: `groups/{group_id}`, where group_id is the + * unique id assigned to the Group. Must be left blank while creating a + * Group + */ + name?: string; + /** + * Editable fields: `display_name`, `description` + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Group; + } + export interface Params$Resource$Groups$Search extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The max number of groups to return. GroupView | Default | Maximum + * --------- | ------- | ------- BASIC | 200 | 1000 FULL | 50 + * | 500 + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous search request, if + * any. + */ + pageToken?: string; + /** + * Query string for performing search on groups. Users can search on + * namespace and label attributes of groups. EXACT match ('=') is supported + * on namespace, and CONTAINS match (':') is supported on labels. This is a + * `required` field. Multiple queries can be combined using `AND` operator. + * The operator is case sensitive. An example query would be: + * "namespace= AND labels:". + */ + query?: string; + /** + * Group resource view to be returned. Defaults to [GroupView.BASIC](). + */ + view?: string; + } + + export class Resource$Groups$Memberships { + constructor() {} + + + /** + * cloudidentity.groups.memberships.create + * @desc Creates a Membership. + * @alias cloudidentity.groups.memberships.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group to create Membership within. Format: `groups/{group_id}`, where `group_id` is the unique id assigned to the Group. + * @param {().Membership} 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$Groups$Memberships$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Groups$Memberships$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Groups$Memberships$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Groups$Memberships$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/memberships') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.delete + * @desc Deletes a Membership. + * @alias cloudidentity.groups.memberships.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Membership to be deleted. Format: `groups/{group_id}/memberships/{member_id}`, where `group_id` is the unique id assigned to the Group to which Membership belongs to, and member_id is the unique id assigned to the member. + * @param {object} [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$Groups$Memberships$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Groups$Memberships$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Groups$Memberships$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Groups$Memberships$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.get + * @desc Retrieves a Membership. + * @alias cloudidentity.groups.memberships.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name [Resource name](https://cloud.google.com/apis/design/resource_names) of the Membership to be retrieved. Format: `groups/{group_id}/memberships/{member_id}`, where `group_id` is the unique id assigned to the Group to which Membership belongs to, and `member_id` is the unique id assigned to the member. + * @param {object} [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$Groups$Memberships$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Groups$Memberships$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Groups$Memberships$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Groups$Memberships$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.list + * @desc List Memberships within a Group. + * @alias cloudidentity.groups.memberships.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of Memberships to return. MembershipView | Default | Maximum -------------- | ------- | ------- BASIC | 200 | 1000 FULL | 50 | 500 + * @param {string=} params.pageToken The next_page_token value returned from a previous list request, if any + * @param {string} params.parent [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group to list Memberships within. Format: `groups/{group_id}`, where `group_id` is the unique id assigned to the Group. + * @param {string=} params.view Membership resource view to be returned. Defaults to MembershipView.BASIC. + * @param {object} [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$Groups$Memberships$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Groups$Memberships$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Groups$Memberships$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Groups$Memberships$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/memberships') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudidentity.groups.memberships.lookup + * @desc Looks up [resource + * name](https://cloud.google.com/apis/design/resource_names) of a + * Membership within a Group by member's EntityKey. + * @alias cloudidentity.groups.memberships.lookup + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.memberKey.id The id of the entity within the given namespace. The id must be unique within its namespace. + * @param {string=} params.memberKey.namespace Namespaces provide isolation for ids, i.e an id only needs to be unique within its namespace. Namespaces are currently only created as part of IdentitySource creation from Admin Console. A namespace `"identitysources/{identity_source_id}"` is created corresponding to every Identity Source `identity_source_id`. + * @param {string} params.parent [Resource name](https://cloud.google.com/apis/design/resource_names) of the Group to lookup Membership within. Format: `groups/{group_id}`, where `group_id` is the unique id assigned to the Group. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + lookup( + params?: Params$Resource$Groups$Memberships$Lookup, + options?: MethodOptions): + AxiosPromise; + lookup( + params: Params$Resource$Groups$Memberships$Lookup, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + lookup( + params: Params$Resource$Groups$Memberships$Lookup, + callback: BodyResponseCallback): + void; + lookup(callback: BodyResponseCallback): + void; + lookup( + paramsOrCallback?: Params$Resource$Groups$Memberships$Lookup| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Groups$Memberships$Lookup; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Groups$Memberships$Lookup; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/memberships:lookup') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Groups$Memberships$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group to create Membership within. Format: `groups/{group_id}`, where + * `group_id` is the unique id assigned to the Group. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Groups$Memberships$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership to be deleted. Format: + * `groups/{group_id}/memberships/{member_id}`, where `group_id` is the + * unique id assigned to the Group to which Membership belongs to, and + * member_id is the unique id assigned to the member. + */ + name?: string; + } + export interface Params$Resource$Groups$Memberships$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Membership to be retrieved. Format: + * `groups/{group_id}/memberships/{member_id}`, where `group_id` is the + * unique id assigned to the Group to which Membership belongs to, and + * `member_id` is the unique id assigned to the member. + */ + name?: string; + } + export interface Params$Resource$Groups$Memberships$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of Memberships to return. MembershipView | Default | + * Maximum -------------- | ------- | ------- BASIC | 200 | + * 1000 FULL | 50 | 500 + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request, if any + */ + pageToken?: string; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group to list Memberships within. Format: `groups/{group_id}`, where + * `group_id` is the unique id assigned to the Group. + */ + parent?: string; + /** + * Membership resource view to be returned. Defaults to + * MembershipView.BASIC. + */ + view?: string; + } + export interface Params$Resource$Groups$Memberships$Lookup extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The id of the entity within the given namespace. The id must be unique + * within its namespace. + */ + 'memberKey.id'?: string; + /** + * Namespaces provide isolation for ids, i.e an id only needs to be unique + * within its namespace. Namespaces are currently only created as part of + * IdentitySource creation from Admin Console. A namespace + * `"identitysources/{identity_source_id}"` is created corresponding to + * every Identity Source `identity_source_id`. + */ + 'memberKey.namespace'?: string; + /** + * [Resource name](https://cloud.google.com/apis/design/resource_names) of + * the Group to lookup Membership within. Format: `groups/{group_id}`, + * where `group_id` is the unique id assigned to the Group. + */ + parent?: string; + } +} diff --git a/src/apis/cloudkms/v1.ts b/src/apis/cloudkms/v1.ts index 1038f0b14ec..dc91ecce424 100644 --- a/src/apis/cloudkms/v1.ts +++ b/src/apis/cloudkms/v1.ts @@ -915,8 +915,10 @@ export namespace cloudkms_v1 { export class Resource$Projects$Locations$Keyrings { cryptoKeys: Resource$Projects$Locations$Keyrings$Cryptokeys; + importJobs: Resource$Projects$Locations$Keyrings$Importjobs; constructor() { this.cryptoKeys = new Resource$Projects$Locations$Keyrings$Cryptokeys(); + this.importJobs = new Resource$Projects$Locations$Keyrings$Importjobs(); } @@ -3229,4 +3231,289 @@ export namespace cloudkms_v1 { */ requestBody?: Schema$RestoreCryptoKeyVersionRequest; } + + + + export class Resource$Projects$Locations$Keyrings$Importjobs { + constructor() {} + + + /** + * cloudkms.projects.locations.keyRings.importJobs.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 cloudkms.projects.locations.keyRings.importJobs.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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$Keyrings$Importjobs$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Keyrings$Importjobs$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Locations$Keyrings$Importjobs$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudkms.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudkms.projects.locations.keyRings.importJobs.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias cloudkms.projects.locations.keyRings.importJobs.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.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 + */ + setIamPolicy( + params?: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Keyrings$Importjobs$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Locations$Keyrings$Importjobs$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudkms.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * cloudkms.projects.locations.keyRings.importJobs.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 cloudkms.projects.locations.keyRings.importJobs.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.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 + */ + testIamPermissions( + params?: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Locations$Keyrings$Importjobs$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Keyrings$Importjobs$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Locations$Keyrings$Importjobs$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudkms.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Keyrings$Importjobs$Getiampolicy + 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Keyrings$Importjobs$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$Keyrings$Importjobs$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; + } } diff --git a/src/apis/cloudscheduler/v1beta1.ts b/src/apis/cloudscheduler/v1beta1.ts index 2eb91a3376f..7a0a2b68a5f 100644 --- a/src/apis/cloudscheduler/v1beta1.ts +++ b/src/apis/cloudscheduler/v1beta1.ts @@ -135,21 +135,18 @@ export namespace cloudscheduler_v1beta1 { * is `"AppEngine-Google; (+http://code.google.com/appengine)"`. * This header can be modified, but Cloud Scheduler will append * `"AppEngine-Google; (+http://code.google.com/appengine)"` to - * the modified `User-Agent`. If the job has an body, Cloud Scheduler - * sets the following headers: * `Content-Type`: By default, the - * `Content-Type` header is set to `"application/octet-stream"`. - * The default can be overridden by explictly setting `Content-Type` to a - * particular media type when the job is created. For example, - * `Content-Type` can be set to `"application/json"`. * - * `Content-Length`: This is computed by Cloud Scheduler. This value is - * output only. It cannot be changed. The headers below are output only. - * They cannot be set or overridden: * `X-Google-*`: For Google internal - * use only. * `X-AppEngine-*`: For Google internal use only. See [Reading - * request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * In addition, some App Engine headers, which contain job-specific - * information, are also be sent to the job handler; see [request - * headers](https://cloud.google.comappengine/docs/standard/python/config/cron#securing_urls_for_cron). + * the modified `User-Agent`. * `X-CloudScheduler`: This header will be + * set to true. If the job has an body, Cloud Scheduler sets the following + * headers: * `Content-Type`: By default, the `Content-Type` header is set + * to `"application/octet-stream"`. The default can be + * overridden by explictly setting `Content-Type` to a particular media + * type when the job is created. For example, `Content-Type` can be set + * to `"application/json"`. * `Content-Length`: This is computed + * by Cloud Scheduler. This value is output only. It cannot be changed. + * The headers below are output only. They cannot be set or overridden: * + * `X-Google-*`: For Google internal use only. * `X-AppEngine-*`: For Google + * internal use only. In addition, some App Engine headers, which contain + * job-specific information, are also be sent to the job handler. */ headers?: {[key: string]: string;}; /** diff --git a/src/apis/cloudsearch/v1.ts b/src/apis/cloudsearch/v1.ts index a9a4d0a8687..ae9fd46545d 100644 --- a/src/apis/cloudsearch/v1.ts +++ b/src/apis/cloudsearch/v1.ts @@ -679,10 +679,10 @@ export namespace cloudsearch_v1 { freshnessDuration?: string; /** * This property indicates the freshness level of the object in the index. - * If set, this property must be a top-level property within the - * PropertyDefinitions and it must be a timestamp type or date type. - * Otherwise, the Indexing API uses updateTime as the freshness indicator. - * The maximum length is 256 characters. + * If set, this property must be a top-level property within the property + * definitions and it must be a timestamp type or date type. Otherwise, the + * Indexing API uses updateTime as the freshness indicator. The maximum + * length is 256 characters. */ freshnessProperty?: string; } diff --git a/src/apis/cloudtrace/v2.ts b/src/apis/cloudtrace/v2.ts index c6b258ac379..334f285cddf 100644 --- a/src/apis/cloudtrace/v2.ts +++ b/src/apis/cloudtrace/v2.ts @@ -132,9 +132,10 @@ export namespace cloudtrace_v2 { export interface Schema$Attributes { /** * The set of attributes. Each attribute's key can be up to 128 bytes - * long. The value can be a string up to 256 bytes, an integer, or the - * Boolean values `true` and `false`. For example: "/instance_id": - * "my-instance" "/http/user_agent": "" + * long. The value can be a string up to 256 bytes, a signed 64-bit integer, + * or the Boolean values `true` and `false`. For example: + * "/instance_id": "my-instance" + * "/http/user_agent": "" * "/http/request_bytes": 300 "abc.com/myattribute": * true */ diff --git a/src/apis/composer/v1beta1.ts b/src/apis/composer/v1beta1.ts index 6e95961e3fd..b2073dc19e7 100644 --- a/src/apis/composer/v1beta1.ts +++ b/src/apis/composer/v1beta1.ts @@ -411,13 +411,13 @@ export namespace composer_v1beta1 { */ envVariables?: {[key: string]: string;}; /** - * Immutable. The version of the software running in the environment. This - * encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression + * The version of the software running in the environment. This encapsulates + * both the version of Cloud Composer functionality and the version of + * Apache Airflow. It must match the regular expression * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. * When used as input, the server will also check if the provided version is - * supported and deny the creation request for an unsupported version. The - * Cloud Composer portion of the version is a [semantic + * supported and deny the request for an unsupported version. The Cloud + * Composer portion of the version is a [semantic * version](https://semver.org) or `latest`. The patch version can be * omitted and the current Cloud Composer patch version will be selected. * When `latest` is provided instead of an explicit version number, the @@ -804,7 +804,7 @@ export namespace composer_v1beta1 { * * @param {object} params Parameters for request * @param {string} params.name The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string=} params.updateMask Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.pypiPackages.argparse". The included patch environment would specify the scikit-learn version as follows: { "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels "label1" and "label2" while clearing "label3" (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and "labels.label3" and populate the patch environment as follows: { "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path "config.softwareConfig.pypiPackages", and the patch environment would be the following: { "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } Note: Only the following fields can be updated:
Mask Purpose
config.softwareConfig.pypiPackages Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package.
config.softwareConfig.pypiPackages.packagename Update the custom PyPI package packagename, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the "config.softwareConfig.pypiPackages" mask.
labels Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels.
labels.labelName Set the label named labelName, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the "labels" mask.
config.nodeCount Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field.
config.softwareConfig.airflowConfigOverrides Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides.
config.softwareConfig.airflowConfigOverrides.section-name Override the Apache Airflow config property name in the section named section, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the "config.softwareConfig.airflowConfigOverrides" mask.
config.softwareConfig.envVariables Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables.
+ * @param {string=} params.updateMask Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.pypiPackages.argparse". The included patch environment would specify the scikit-learn version as follows: { "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels "label1" and "label2" while clearing "label3" (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and "labels.label3" and populate the patch environment as follows: { "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path "config.softwareConfig.pypiPackages", and the patch environment would be the following: { "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } Note: Only the following fields can be updated:
Mask Purpose
config.softwareConfig.pypiPackages Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package.
config.softwareConfig.pypiPackages.packagename Update the custom PyPI package packagename, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the "config.softwareConfig.pypiPackages" mask.
labels Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels.
labels.labelName Set the label named labelName, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the "labels" mask.
config.nodeCount Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field.
config.softwareConfig.airflowConfigOverrides Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides.
config.softwareConfig.airflowConfigOverrides.section-name Override the Apache Airflow config property name in the section named section, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the "config.softwareConfig.airflowConfigOverrides" mask.
config.softwareConfig.envVariables Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables.
config.softwareConfig.imageVersion Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade and must match the current image version's Composer major version and Airflow major and minor versions. Consult the Cloud Composer Version List for valid values.
* @param {().Environment} 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. @@ -1016,7 +1016,16 @@ export namespace composer_v1beta1 { * variables. If a replacement environment variable map is not included in * `environment`, all custom environment variables are cleared. It is an * error to provide both this mask and a mask specifying one or more - * individual environment variables. + * individual environment variables. + * config.softwareConfig.imageVersion Upgrade the version of + * the environment in-place. Refer to `SoftwareConfig.image_version` for + * information on how to format the new image version. Additionally, the + * new image version cannot effect a version downgrade and must match the + * current image version's Composer major version and Airflow major and + * minor versions. Consult the Cloud + * Composer Version List for valid values. + * */ updateMask?: string; diff --git a/src/apis/compute/alpha.ts b/src/apis/compute/alpha.ts index e28270293e1..bea49ce9512 100644 --- a/src/apis/compute/alpha.ts +++ b/src/apis/compute/alpha.ts @@ -115,6 +115,7 @@ export namespace compute_alpha { nodeGroups: Resource$Nodegroups; nodeTemplates: Resource$Nodetemplates; nodeTypes: Resource$Nodetypes; + organizationSecurityPolicies: Resource$Organizationsecuritypolicies; projects: Resource$Projects; regionAutoscalers: Resource$Regionautoscalers; regionBackendServices: Resource$Regionbackendservices; @@ -189,6 +190,8 @@ export namespace compute_alpha { this.nodeGroups = new Resource$Nodegroups(); this.nodeTemplates = new Resource$Nodetemplates(); this.nodeTypes = new Resource$Nodetypes(); + this.organizationSecurityPolicies = + new Resource$Organizationsecuritypolicies(); this.projects = new Resource$Projects(); this.regionAutoscalers = new Resource$Regionautoscalers(); this.regionBackendServices = new Resource$Regionbackendservices(); @@ -239,8 +242,10 @@ export namespace compute_alpha { acceleratorCount?: number; /** * Full or partial URL of the accelerator type resource to attach to this - * instance. If you are creating an instance template, specify only the - * accelerator name. + * instance. For example: + * projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 + * If you are creating an instance template, specify only the accelerator + * name. See GPUs on Compute Engine for a full list of accelerator types. */ acceleratorType?: string; } @@ -284,6 +289,10 @@ export namespace compute_alpha { * [Output Only] Server-defined fully-qualified URL for this resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource's resource id. + */ + selfLinkWithId?: string; /** * [Output Only] The name of the zone where the accelerator type resides, * such as us-central1-a. You must specify this field as part of the HTTP @@ -480,7 +489,8 @@ export namespace compute_alpha { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an Address. */ labelFingerprint?: string; @@ -507,8 +517,12 @@ export namespace compute_alpha { network?: string; /** * This signifies the networking tier used for configuring this Address and - * can only take the following values: PREMIUM , STANDARD. If this field is - * not specified, it is assumed to be PREMIUM. + * can only take the following values: PREMIUM, STANDARD. Global forwarding + * rules can only be Premium Tier. Regional forwarding rules can be either + * Premium or Standard Tier. Standard Tier addresses applied to regional + * forwarding rules can be used with any external load balancer. Regional + * forwarding rules in Premium Tier can only be used with a Network load + * balancer. If this field is not specified, it is assumed to be PREMIUM. */ networkTier?: string; /** @@ -530,6 +544,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * [Output Only] The status of the address, which can be one of RESERVING, * RESERVED, or IN_USE. An address that is RESERVING is currently in the @@ -696,11 +714,15 @@ export namespace compute_alpha { * [Output Only] Server-defined fully-qualified URL for this resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; specificAllocation?: Schema$AllocationSpecificSKUAllocation; /** - * Indicates whether the allocation can be consumed by VMs with ?any - * allocation? defined. If the field is set, then only VMs that target the - * allocation by name using --allocation-affinity can consume this + * Indicates whether the allocation can be consumed by VMs with "any + * allocation" defined. If the field is set, then only VMs that target + * the allocation by name using --allocation-affinity can consume this * allocation. */ specificAllocationRequired?: boolean; @@ -898,8 +920,8 @@ export namespace compute_alpha { * the instance. This name can be used to reference the device for mounting, * resizing, and so on, from within the instance. If not specified, the * server chooses a default device name to apply to this disk, in the form - * persistent-disks-x, where x is a number assigned by Google Compute - * Engine. This field is only applicable for persistent disks. + * persistent-disk-x, where x is a number assigned by Google Compute Engine. + * This field is only applicable for persistent disks. */ deviceName?: string; /** @@ -1197,6 +1219,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * [Output Only] The status of the autoscaler configuration. */ @@ -1445,7 +1471,6 @@ export namespace compute_alpha { /** * Defines how target utilization value is expressed for a Stackdriver * Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. - * If not specified, the default is GAUGE. */ utilizationTargetType?: string; } @@ -1454,7 +1479,7 @@ export namespace compute_alpha { */ export interface Schema$AutoscalingPolicyLoadBalancingUtilization { /** - * Fraction of backend capacity utilization (set in HTTP(s) load balancing + * Fraction of backend capacity utilization (set in HTTP(S) load balancing * configuration) that autoscaler should maintain. Must be a positive float * value. If not defined, the default is 0.8. */ @@ -1653,6 +1678,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; } /** * Message containing Cloud CDN configuration for a backend bucket. @@ -1663,9 +1692,9 @@ export namespace compute_alpha { * considered fresh. After this time period, the response will be * revalidated before being served. Defaults to 1hr (3600s). When serving * responses to signed URL requests, Cloud CDN will internally behave as - * though all responses from this backend had a ?Cache-Control: public, - * max-age=[TTL]? header, regardless of any existing Cache-Control header. - * The actual headers served in responses will not be altered. + * though all responses from this backend had a "Cache-Control: public, + * max-age=[TTL]" header, regardless of any existing Cache-Control + * header. The actual headers served in responses will not be altered. */ signedUrlCacheMaxAgeSec?: string; /** @@ -1766,8 +1795,9 @@ export namespace compute_alpha { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a BackendService. An up-to-date fingerprint must - * be provided in order to update the BackendService. To see the latest - * fingerprint, make a get() request to retrieve a BackendService. + * be provided in order to update the BackendService, otherwise the request + * will fail with error 412 conditionNotMet. To see the latest fingerprint, + * make a get() request to retrieve a BackendService. */ fingerprint?: string; /** @@ -1797,6 +1827,12 @@ export namespace compute_alpha { * EXTERNAL. */ loadBalancingScheme?: string; + /** + * This field denotes the logging options for the load balancer traffic + * served by this backend service. If logging is enabled, logs will be + * exported to Stackdriver. + */ + logConfig?: Schema$BackendServiceLogConfig; /** * Name of the resource. Provided by the client when the resource is * created. The name must be 1-63 characters long, and comply with RFC1035. @@ -1843,6 +1879,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * Type of session affinity to use. The default is NONE. When the load * balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or @@ -1926,9 +1966,9 @@ export namespace compute_alpha { * considered fresh. After this time period, the response will be * revalidated before being served. Defaults to 1hr (3600s). When serving * responses to signed URL requests, Cloud CDN will internally behave as - * though all responses from this backend had a ?Cache-Control: public, - * max-age=[TTL]? header, regardless of any existing Cache-Control header. - * The actual headers served in responses will not be altered. + * though all responses from this backend had a "Cache-Control: public, + * max-age=[TTL]" header, regardless of any existing Cache-Control + * header. The actual headers served in responses will not be altered. */ signedUrlCacheMaxAgeSec?: string; /** @@ -2066,6 +2106,25 @@ export namespace compute_alpha { message?: string; }; } + /** + * The available logging options for the load balancer traffic served by this + * backend service. + */ + export interface Schema$BackendServiceLogConfig { + /** + * This field denotes whether to enable logging for the load balancer + * traffic served by this backend service. + */ + enable?: boolean; + /** + * This field can only be specified if logging is enabled for this backend + * service. The value of the field must be in [0, 1]. This configures the + * sampling rate of requests to the load balancer where 1.0 means all logged + * requests are reported and 0.0 means no logged requests are reported. The + * default value is 1.0. + */ + sampleRate?: number; + } export interface Schema$BackendServiceReference { backendService?: string; } @@ -2228,6 +2287,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * [Output Only] Commitment start time in RFC3339 text format. */ @@ -2378,6 +2441,53 @@ export namespace compute_alpha { */ drainingTimeoutSec?: number; } + /** + * The specification for allowing client side cross-origin requests. Please + * see W3C Recommendation for Cross Origin Resource Sharing + */ + export interface Schema$CorsPolicy { + /** + * In response to a preflight request, setting this to true indicates that + * the actual request can include user credentials. This translates to the + * Access-Control-Allow-Credentials header. Default is false. + */ + allowCredentials?: boolean; + /** + * Specifies the content for the Access-Control-Allow-Headers header. + */ + allowHeaders?: string[]; + /** + * Specifies the content for the Access-Control-Allow-Methods header. + */ + allowMethods?: string[]; + /** + * Specifies the regualar expression patterns that match allowed origins. + * For regular expression grammar please see + * en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it + * matches either allow_origins or allow_origin_regex. + */ + allowOriginRegexes?: string[]; + /** + * Specifies the list of origins that will be allowed to do CORS requests. + * An origin is allowed if it matches either allow_origins or + * allow_origin_regex. + */ + allowOrigins?: string[]; + /** + * If true, specifies the CORS policy is disabled. The default value of + * false, which indicates that the CORS policy is in effect. + */ + disabled?: boolean; + /** + * Specifies the content for the Access-Control-Expose-Headers header. + */ + exposeHeaders?: string[]; + /** + * Specifies how long the results of a preflight request can be cached. This + * translates to the content for the Access-Control-Max-Age header. + */ + maxAge?: number; + } /** * Represents a customer-supplied encryption key */ @@ -2386,6 +2496,7 @@ export namespace compute_alpha { * The name of the encryption key that is stored in Google Cloud KMS. */ kmsKeyName?: string; + kmsKeyServiceAccount?: string; /** * Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 * base64 to either encrypt or decrypt this resource. @@ -2503,7 +2614,8 @@ export namespace compute_alpha { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a disk. */ labelFingerprint?: string; @@ -2545,10 +2657,10 @@ export namespace compute_alpha { options?: string; /** * Physical block size of the persistent disk, in bytes. If not present in a - * request, a default value is used. Initially only 4096 is supported, but - * other powers of two may be added. If an unsupported value is requested, - * the error message will list the supported values, but even a supported - * value may be allowed for only some projects. + * request, a default value is used. Currently supported sizes are 4096 and + * 16384, other sizes may be added in the future. If an unsupported value is + * requested, the error message will list the supported values for the + * caller's project. */ physicalBlockSizeBytes?: string; /** @@ -2857,6 +2969,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * [Output Only] An optional textual description of the valid disk size, * such as "10GB-10TB". @@ -2956,6 +3072,15 @@ export namespace compute_alpha { message?: string; }; } + /** + * A set of Display Device options + */ + export interface Schema$DisplayDevice { + /** + * Defines whether the instance has Display enabled. + */ + enableDisplay?: boolean; + } export interface Schema$DistributionPolicy { /** * Zones where the regional managed instance group will create and manage @@ -2970,6 +3095,26 @@ export namespace compute_alpha { */ zone?: string; } + /** + * A Duration represents a fixed-length span of time represented as a count of + * seconds and fractions of seconds at nanosecond resolution. It is + * independent of any calendar and concepts like "day" or + * "month". Range is approximately 10,000 years. + */ + export interface Schema$Duration { + /** + * Span of time that's a fraction of a second at nanosecond resolution. + * Durations less than one second are represented with a 0 `seconds` field + * and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. + */ + nanos?: number; + /** + * Span of time at a resolution of a second. Must be from 0 to + * 315,576,000,000 inclusive. Note: these bounds are computed from: 60 + * sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + */ + seconds?: string; + } export interface Schema$ExchangedPeeringRoute { /** * The destination range of the route. @@ -3100,8 +3245,9 @@ export namespace compute_alpha { */ disabled?: boolean; /** - * This field denotes whether to enable logging for a particular firewall - * rule. If logging is enabled, logs will be exported to Stackdriver. + * Deprecated in favor of enable in LogConfig. This field denotes whether to + * enable logging for a particular firewall rule. If logging is enabled, + * logs will be exported to Stackdriver. */ enableLogging?: boolean; /** @@ -3114,6 +3260,11 @@ export namespace compute_alpha { * rules. */ kind?: string; + /** + * This field denotes the logging options for a particular firewall rule. If + * logging is enabled, logs will be exported to Stackdriver. + */ + logConfig?: Schema$FirewallLogConfig; /** * Name of the resource; provided by the client when the resource is * created. The name must be 1-63 characters long, and comply with RFC1035. @@ -3148,6 +3299,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * If source ranges are specified, the firewall will apply only to traffic * that has source IP address in these ranges. These ranges must be @@ -3243,6 +3398,16 @@ export namespace compute_alpha { message?: string; }; } + /** + * The available logging options for a firewall rule. + */ + export interface Schema$FirewallLogConfig { + /** + * This field denotes whether to enable logging for a particular firewall + * rule. + */ + enable?: boolean; + } /** * Encapsulates numeric value that can be either absolute or relative. */ @@ -3373,7 +3538,8 @@ export namespace compute_alpha { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a * ForwardingRule. */ @@ -3436,10 +3602,11 @@ export namespace compute_alpha { portRange?: string; /** * This field is used along with the backend_service field for internal load - * balancing. When the load balancing scheme is INTERNAL, a single port or - * a comma separated list of ports can be configured. Only packets addressed - * to these ports will be forwarded to the backends configured with this - * forwarding rule. You may specify a maximum of up to 5 ports. + * balancing. When the load balancing scheme is INTERNAL, a list of ports + * can be configured, for example, ['80'], + * ['8000','9000'] etc. Only packets addressed to these + * ports will be forwarded to the backends configured with this forwarding + * rule. You may specify a maximum of up to 5 ports. */ ports?: string[]; /** @@ -3453,6 +3620,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * An optional prefix to the service name for this Forwarding Rule. If * specified, will be the first label of the fully qualified service name. @@ -3583,7 +3754,8 @@ export namespace compute_alpha { * detect conflicts. The fingerprint is initially generated by Compute * Engine and changes after every request to modify or update labels. You * must always provide an up-to-date fingerprint hash when updating or - * changing labels. Make a get() request to the resource to get the latest + * changing labels, otherwise the request will fail with error 412 + * conditionNotMet. Make a get() request to the resource to get the latest * fingerprint. */ labelFingerprint?: string; @@ -3601,7 +3773,7 @@ export namespace compute_alpha { } export interface Schema$GlobalSetPolicyRequest { /** - * Flatten Policy to create a backwacd compatible wire-format. Deprecated. + * Flatten Policy to create a backward compatible wire-format. Deprecated. * Use 'policy' to specify bindings. */ bindings?: Schema$Binding[]; @@ -3966,6 +4138,211 @@ export namespace compute_alpha { */ response?: string; } + /** + * Specification for how requests are aborted as part of fault injection. + */ + export interface Schema$HttpFaultAbort { + /** + * The HTTP status code used to abort the request. The value must be between + * 200 and 599 inclusive. + */ + httpStatus?: number; + /** + * The percentage of traffic (connections/operations/requests) which will be + * aborted as part of fault injection. The value must be between 0.0 and + * 100.0 inclusive. + */ + percentage?: number; + } + /** + * Specifies the delay introduced by Loadbalancer before forwarding the + * request to the backend service as part of fault injection. + */ + export interface Schema$HttpFaultDelay { + /** + * Specifies the value of the fixed delay interval. + */ + fixedDelay?: Schema$Duration; + /** + * The percentage of traffic (connections/operations/requests) on which + * delay will be introduced as part of fault injection. The value must be + * between 0.0 and 100.0 inclusive. + */ + percentage?: number; + } + /** + * The specification for fault injection introduced into traffic to test the + * resiliency of clients to backend service failure. As part of fault + * injection, when clients send requests to a backend service, delays can be + * introduced by Loadbalancer on a percentage of requests before sending those + * request to the backend service. Similarly requests from clients can be + * aborted by the Loadbalancer for a percentage of requests. + */ + export interface Schema$HttpFaultInjection { + /** + * The specification for how client requests are aborted as part of fault + * injection. + */ + abort?: Schema$HttpFaultAbort; + /** + * The specification for how client requests are delayed as part of fault + * injection, before being sent to a backend service. + */ + delay?: Schema$HttpFaultDelay; + } + /** + * The request and response header transformations that take effect before the + * request is passed along to the selected backendService. + */ + export interface Schema$HttpHeaderAction { + /** + * Headers to add to a matching request prior to forwarding the request to + * the backendService. + */ + requestHeadersToAdd?: Schema$HttpHeaderOption[]; + /** + * A list of header names for headers that need to be removed from the + * request prior to forwarding the request to the backendService. + */ + requestHeadersToRemove?: string[]; + /** + * Headers to add the response prior to sending the response back to the + * client. + */ + responseHeadersToAdd?: Schema$HttpHeaderOption[]; + /** + * A list of header names for headers that need to be removed from the + * response prior to sending the response back to the client. + */ + responseHeadersToRemove?: string[]; + } + /** + * matchRule criteria for request header matches. + */ + export interface Schema$HttpHeaderMatch { + /** + * The value should exactly match contents of exactMatch. Only one of + * exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or + * rangeMatch must be set. + */ + exactMatch?: string; + /** + * The name of the HTTP header to match. For matching against the HTTP + * request's authority, use a headerMatch with the header name + * ":authority". For matching a request's method, use the + * headerName ":method". + */ + headerName?: string; + /** + * If set to false, the headerMatch is considered a match if the match + * criteria above are met. If set to true, the headerMatch is considered a + * match if the match criteria above are NOT met. The default setting is + * false. + */ + invertMatch?: boolean; + /** + * The value of the header must start with the contents of prefixMatch. Only + * one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or + * rangeMatch must be set. + */ + prefixMatch?: string; + /** + * A header with the contents of headerName must exist. The match takes + * place whether or not the request's header has a value or not. Only + * one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or + * rangeMatch must be set. + */ + presentMatch?: boolean; + /** + * The header value must be an integer and its value must be in the range + * specified in rangeMatch. If the header does not contain an integer, + * number or is empty, the match fails. For example for a range [-5, 0] - + * -3 will match. - 0 will not match. - 0.25 will not match. - + * -3someString will not match. Only one of exactMatch, prefixMatch, + * suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + */ + rangeMatch?: Schema$Int64RangeMatch; + /** + * The value of the header must match the regualar expression specified in + * regexMatch. For regular expression grammar, please see: + * en.cppreference.com/w/cpp/regex/ecmascript For matching against a port + * specified in the HTTP request, use a headerMatch with headerName set to + * PORT and a regular expression that satisfies the RFC2616 Host + * header's port specifier. Only one of exactMatch, prefixMatch, + * suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + */ + regexMatch?: string; + /** + * The value of the header must end with the contents of suffixMatch. Only + * one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or + * rangeMatch must be set. + */ + suffixMatch?: string; + } + /** + * Specification determining how headers are added to requests or responses. + */ + export interface Schema$HttpHeaderOption { + /** + * The name of the header. + */ + headerName?: string; + /** + * The value of the header to add. + */ + headerValue?: string; + /** + * If false, headerValue is appended to any values that already exist for + * the header. If true, headerValue is set for the header, discarding any + * values that were set for that header. The default value is false. + */ + replace?: boolean; + } + export interface Schema$HTTPHealthCheck { + /** + * The value of the host header in the HTTP health check request. If left + * empty (default value), the IP on behalf of which this health check is + * performed will be used. + */ + host?: string; + /** + * The TCP port number for the health check request. The default value + * is 80. Valid values are 1 through 65535. + */ + port?: number; + /** + * Port name as defined in InstanceGroup#NamedPort#name. If both port and + * port_name are defined, port takes precedence. + */ + portName?: string; + /** + * Specifies how port is selected for health checking, can be one of + * following values: USE_FIXED_PORT: The port number in port is used for + * health checking. USE_NAMED_PORT: The portName is used for health + * checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified + * for each network endpoint is used for health checking. For other + * backends, the port or named port specified in the Backend Service is used + * for health checking. If not specified, HTTP health check follows + * behavior specified in port and portName fields. + */ + portSpecification?: string; + /** + * Specifies the type of proxy header to append before sending data to the + * backend, either NONE or PROXY_V1. The default is NONE. + */ + proxyHeader?: string; + /** + * The request path of the HTTP health check request. The default value is + * /. + */ + requestPath?: string; + /** + * The string to match anywhere in the first 1024 bytes of the response + * body. If left empty (the default value), the status code determines + * health. The response data can only be ASCII. + */ + response?: string; + } /** * An HttpHealthCheck resource. This resource defines a template for how * individual instances should be checked for health, via HTTP. @@ -4042,51 +4419,6 @@ export namespace compute_alpha { */ unhealthyThreshold?: number; } - export interface Schema$HTTPHealthCheck { - /** - * The value of the host header in the HTTP health check request. If left - * empty (default value), the IP on behalf of which this health check is - * performed will be used. - */ - host?: string; - /** - * The TCP port number for the health check request. The default value - * is 80. Valid values are 1 through 65535. - */ - port?: number; - /** - * Port name as defined in InstanceGroup#NamedPort#name. If both port and - * port_name are defined, port takes precedence. - */ - portName?: string; - /** - * Specifies how port is selected for health checking, can be one of - * following values: USE_FIXED_PORT: The port number in port is used for - * health checking. USE_NAMED_PORT: The portName is used for health - * checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified - * for each network endpoint is used for health checking. For other - * backends, the port or named port specified in the Backend Service is used - * for health checking. If not specified, HTTP health check follows - * behavior specified in port and portName fields. - */ - portSpecification?: string; - /** - * Specifies the type of proxy header to append before sending data to the - * backend, either NONE or PROXY_V1. The default is NONE. - */ - proxyHeader?: string; - /** - * The request path of the HTTP health check request. The default value is - * /. - */ - requestPath?: string; - /** - * The string to match anywhere in the first 1024 bytes of the response - * body. If left empty (the default value), the status code determines - * health. The response data can only be ASCII. - */ - response?: string; - } /** * Contains a list of HttpHealthCheck resources. */ @@ -4124,6 +4456,260 @@ export namespace compute_alpha { message?: string; }; } + /** + * HttpRouteRuleMatch criteria for a request's query parameter. + */ + export interface Schema$HttpQueryParameterMatch { + /** + * The queryParameterMatch matches if the value of the parameter exactly + * matches the contents of exactMatch. Only one of presentMatch, exactMatch + * and regexMatch must be set. + */ + exactMatch?: string; + /** + * The name of the query parameter to match. The query parameter must exist + * in the request, in the absence of which the request match fails. + */ + name?: string; + /** + * Specifies that the queryParameterMatch matches if the request contains + * the query parameter, irrespective of whether the parameter has a value or + * not. Only one of presentMatch, exactMatch and regexMatch must be set. + */ + presentMatch?: boolean; + /** + * The queryParameterMatch matches if the value of the parameter matches the + * regular expression specified by regexMatch. For the regular expression + * grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one + * of presentMatch, exactMatch and regexMatch must be set. + */ + regexMatch?: string; + } + /** + * Specifies settings for an HTTP redirect. + */ + export interface Schema$HttpRedirectAction { + /** + * The host that will be used in the redirect response instead of the one + * that was supplied in the request. The value must be between 1 and 255 + * characters. + */ + hostRedirect?: string; + /** + * If set to true, the URL scheme in the redirected request is set to https. + * If set to false, the URL scheme of the redirected request will remain the + * same as that of the request. This must only be set for UrlMaps used in + * TargetHttpProxys. Setting this true for TargetHttpsProxy is not + * permitted. The default is set to false. + */ + httpsRedirect?: boolean; + /** + * The path that will be used in the redirect response instead of the one + * that was supplied in the request. Only one of pathRedirect or + * prefixRedirect must be specified. The value must be between 1 and 1024 + * characters. + */ + pathRedirect?: string; + /** + * The prefix that replaces the prefixMatch specified in the + * HttpRouteRuleMatch, retaining the remaining portion of the URL before + * redirecting the request. + */ + prefixRedirect?: string; + /** + * The HTTP Status code to use for this RedirectAction. Supported values + * are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and + * corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER + * which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to + * 307. In this case, the request method will be retained. - + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request + * method will be retained. + */ + redirectResponseCode?: string; + /** + * If set to true, any accompanying query portion of the original URL is + * removed prior to redirecting the request. If set to false, the query + * portion of the original URL is retained. The default is set to false. + */ + stripQuery?: boolean; + } + /** + * The retry policy associates with HttpRouteRule + */ + export interface Schema$HttpRetryPolicy { + /** + * Specifies the allowed number retries. This number must be > 0. + */ + numRetries?: number; + /** + * Specifies a non-zero timeout per retry attempt. + */ + perTryTimeout?: Schema$Duration; + /** + * Specfies one or more conditions when this retry rule applies. Valid + * values are: - 5xx: Loadbalancer will attempt a retry if the backend + * service responds with any 5xx response code, or if the backend service + * does not respond at all, example: disconnects, reset, read timeout, + * connection failure, and refused streams. - gateway-error: Similar to + * 5xx, but only applies to response codes 502, 503 or 504. - - + * connect-failure: Loadbalancer will retry on failures connecting to + * backend services, for example due to connection timeouts. - + * retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. + * Currently the only retriable error supported is 409. - + * refused-stream:Loadbalancer will retry if the backend service resets the + * stream with a REFUSED_STREAM error code. This reset type indicates that + * it is safe to retry. - cancelledLoadbalancer will retry if the gRPC + * status code in the response header is set to cancelled - + * deadline-exceeded: Loadbalancer will retry if the gRPC status code in the + * response header is set to deadline-exceeded - resource-exhausted: + * Loadbalancer will retry if the gRPC status code in the response header is + * set to resource-exhausted - unavailable: Loadbalancer will retry if the + * gRPC status code in the response header is set to unavailable + */ + retryConditions?: string[]; + } + export interface Schema$HttpRouteAction { + /** + * The specification for allowing client side cross-origin requests. Please + * see W3C Recommendation for Cross Origin Resource Sharing + */ + corsPolicy?: Schema$CorsPolicy; + /** + * The specification for fault injection introduced into traffic to test the + * resiliency of clients to backend service failure. As part of fault + * injection, when clients send requests to a backend service, delays can be + * introduced by Loadbalancer on a percentage of requests before sending + * those request to the backend service. Similarly requests from clients can + * be aborted by the Loadbalancer for a percentage of requests. timeout and + * retry_policy will be ignored by clients that are configured with a + * fault_injection_policy. + */ + faultInjectionPolicy?: Schema$HttpFaultInjection; + /** + * Specifies the policy on how requests intended for the route's + * backends are shadowed to a separate mirrored backend service. + * Loadbalancer does not wait for responses from the shadow service. Prior + * to sending traffic to the shadow service, the host / authority header is + * suffixed with -shadow. + */ + requestMirrorPolicy?: Schema$RequestMirrorPolicy; + /** + * Specifies the retry policy associated with this route. + */ + retryPolicy?: Schema$HttpRetryPolicy; + /** + * Specifies the timeout for the selected route. Timeout is computed from + * the time the request is has been fully processed (i.e. end-of-stream) up + * until the response has been completely processed. Timeout includes all + * retries. If not specified, the default value is 15 seconds. + */ + timeout?: Schema$Duration; + /** + * The spec to modify the URL of the request, prior to forwarding the + * request to the matched service + */ + urlRewrite?: Schema$UrlRewrite; + /** + * A list of weighted backend services to send traffic to when a route match + * occurs. The weights determine the percentage of traffic that flows to + * their corresponding backend service. The weights must add up to 100. If + * all traffic needs to go to a single backend service, there must be one + * weightedBackendService with weight set to 100. Once a backendService is + * identified and before forwarding the request to the backend service, + * advanced routing actions like Url rewrites and header transformations are + * applied depending on additional settings specified in this + * HttpRouteAction. + */ + weightedBackendServices?: Schema$WeightedBackendService[]; + } + /** + * An HttpRouteRule specifies how to match an HTTP request and the + * corresponding routing action that load balancing proxies will perform. + */ + export interface Schema$HttpRouteRule { + /** + * Specifies changes to request and response headers that need to take + * effect for the selected backendService. The headerAction specified here + * are applied before the matching pathMatchers[].headerAction and after + * pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction + */ + headerAction?: Schema$HttpHeaderAction; + matchRules?: Schema$HttpRouteRuleMatch[]; + /** + * In response to a matching matchRule, the load balancer routes the request + * to the backend service specified by this routeAction. Only one of + * routeAction or urlRedirect must be set. + */ + routeAction?: Schema$HttpRouteAction; + /** + * In response to a route rule match, the load balancer redirects the + * request to a URL specified by the following HttpRedirectAction. Only one + * of urlRedirect or routeAction must be set. + */ + urlRedirect?: Schema$HttpRedirectAction; + } + /** + * HttpRouteRuleMatch specifies a set of criteria for matching requests to an + * HttpRouteRule. All specified criteria must be satisfied for a match to + * occur. + */ + export interface Schema$HttpRouteRuleMatch { + /** + * For satifying the matchRule condition, the path of the request must + * exactly match the value specified in fullPathMatch after removing any + * query parameters and anchor that may be part of the original URL. + * FullPathMatch must be between 1 and 1024 characters. Only one of + * prefixMatch, fullPathMatch or regexMatch must be specified. + */ + fullPathMatch?: string; + /** + * Specifies a list of header match criteria, all of which must match + * corresponding headers in the request. + */ + headerMatches?: Schema$HttpHeaderMatch[]; + /** + * Specifies that prefixMatch and fullPathMatch matches are case sensitive. + * The default value is false. caseSensitive must not be used with + * regexMatch. + */ + ignoreCase?: boolean; + /** + * Opaque filter criteria used by Loadbalancer to restrict routing + * configuration to a limited set xDS compliant clients. In their xDS + * requests to Loadbalancer, xDS clients present node metadata. If a match + * takes place, the relevant routing configuration is made available to + * those proxies. For each metadataFilter in this list, if its + * filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels + * must match the corresponding label provided in the metadata. If its + * filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels + * must match with corresponding labels in the provided metadata. + * metadataFilters specified here can be overrides those specified in + * ForwardingRule that refers to this UrlMap. metadataFilters only applies + * to Loadbalancers that have their loadBalancingScheme set to + * INTERNAL_SELF_MANAGED. + */ + metadataFilters?: Schema$MetadataFilter[]; + /** + * For satifying the matchRule condition, the request's path must begin + * with the specified prefixMatch. prefixMatch must begin with a /. The + * value must be between 1 and 1024 characters. Only one of prefixMatch, + * fullPathMatch or regexMatch must be specified. + */ + prefixMatch?: string; + /** + * Specifies a list of query parameter match criteria, all of which must + * match corresponding query parameters in the request. + */ + queryParameterMatches?: Schema$HttpQueryParameterMatch[]; + /** + * For satifying the matchRule condition, the path of the request must + * satisfy the regular expression specified in regexMatch after removing any + * query parameters and anchor supplied with the original URL. For regular + * expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript + * Only one of prefixMatch, fullPathMatch or regexMatch must be specified. + */ + regexMatch?: string; + } export interface Schema$HTTPSHealthCheck { /** * The value of the host header in the HTTPS health check request. If left @@ -4345,7 +4931,8 @@ export namespace compute_alpha { * essentially a hash of the labels used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an image. */ labelFingerprint?: string; @@ -4381,6 +4968,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource's resource id. + */ + selfLinkWithId?: string; /** * URL of the source disk used to create this image. This can be a full or * valid partial URL. You must provide either this property or the @@ -4449,6 +5040,10 @@ export namespace compute_alpha { * FAILED, PENDING, or READY. */ status?: string; + /** + * GCS bucket storage location of the image (regional or multi-regional). + */ + storageLocations?: string[]; } /** * Contains a list of images. @@ -4526,6 +5121,10 @@ export namespace compute_alpha { * created before you can assign them. */ disks?: Schema$AttachedDisk[]; + /** + * Enables display device for the instance. + */ + displayDevice?: Schema$DisplayDevice; /** * A list of the type and count of accelerator cards attached to the * instance. @@ -4632,6 +5231,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for this resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * A list of service accounts, with their specified scopes, authorized for * this instance. Only one service account per VM instance is supported. @@ -4771,6 +5374,10 @@ export namespace compute_alpha { * URL. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * [Output Only] The total number of instances in the instance group. */ @@ -4908,8 +5515,9 @@ export namespace compute_alpha { * Fingerprint of this resource. This field may be used in optimistic * locking. It will be ignored when inserting an InstanceGroupManager. An * up-to-date fingerprint must be provided in order to update the - * InstanceGroupManager. To see the latest fingerprint, make a get() - * request to retrieve an InstanceGroupManager. + * InstanceGroupManager, otherwise the request will fail with error 412 + * conditionNotMet. To see the latest fingerprint, make a get() request to + * retrieve an InstanceGroupManager. */ fingerprint?: string; /** @@ -4957,6 +5565,10 @@ export namespace compute_alpha { * this URL. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * The service account to be used as credentials for all operations * performed by the managed instance group on instances. The service @@ -5202,8 +5814,9 @@ export namespace compute_alpha { */ instances?: string[]; /** - * The maximal action that should be perfomed on the instances. By default - * REPLACE. + * The maximal action that should be performed on the instances. By default + * REPLACE. This field is deprecated, please use + * most_disruptive_allowed_action. */ maximalAction?: string; /** @@ -5212,6 +5825,15 @@ export namespace compute_alpha { */ minimalAction?: string; } + /** + * InstanceGroupManagers.createInstances + */ + export interface Schema$InstanceGroupManagersCreateInstancesRequest { + /** + * [Required] List of specifications of per-instance configs. + */ + instances?: Schema$PerInstanceConfig[]; + } export interface Schema$InstanceGroupManagersDeleteInstancesRequest { /** * The URLs of one or more instances to delete. This can be a full URL or a @@ -5228,6 +5850,11 @@ export namespace compute_alpha { * this managed instance group. */ instances?: string[]; + /** + * The list of instance names for which we want to delete per-instance + * configs on this managed instance group. + */ + names?: string[]; } export interface Schema$InstanceGroupManagersListManagedInstancesResponse { /** @@ -5528,7 +6155,8 @@ export namespace compute_alpha { * change the named ports settings concurrently. Obtain the fingerprint with * the instanceGroups.get method. Then, include the fingerprint in your * request to ensure that you do not overwrite changes that were applied - * from another concurrent request. + * from another concurrent request. A request with an incorrect fingerprint + * will fail with error 412 conditionNotMet. */ fingerprint?: string; /** @@ -5927,6 +6555,20 @@ export namespace compute_alpha { */ status?: string; } + /** + * HttpRouteRuleMatch criteria for field values that must stay within the + * specified integer range. + */ + export interface Schema$Int64RangeMatch { + /** + * The end of the range (exclusive) in signed long integer format. + */ + rangeEnd?: string; + /** + * The start of the range (inclusive) in signed long integer format. + */ + rangeStart?: string; + } /** * Represents an Interconnects resource. The Interconnects resource is a * dedicated connection between Google's network and your on-premises @@ -5999,7 +6641,8 @@ export namespace compute_alpha { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an Interconnect. */ labelFingerprint?: string; @@ -6011,8 +6654,7 @@ export namespace compute_alpha { labels?: {[key: string]: string;}; /** * Type of link requested. This field indicates speed of each of the links - * in the bundle, not the entire bundle. Only 10G per link is allowed for a - * dedicated interconnect. Options: Ethernet_10G_LR + * in the bundle, not the entire bundle. */ linkType?: string; /** @@ -6082,8 +6724,7 @@ export namespace compute_alpha { /** * Provisioned bandwidth capacity for the interconnectAttachment. Can be set * by the partner to update the customer's provisioned bandwidth. Output - * only for for PARTNER type, mutable for PARTNER_PROVIDER, not available - * for DEDICATED. + * only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED. */ bandwidth?: string; /** @@ -6150,8 +6791,9 @@ export namespace compute_alpha { * used for optimistic locking. The fingerprint is initially generated by * Compute Engine and changes after every request to modify or update * labels. You must always provide an up-to-date fingerprint hash in order - * to update or change labels. To see the latest fingerprint, make a get() - * request to retrieve an InterconnectAttachment. + * to update or change labels, otherwise the request will fail with error + * 412 conditionNotMet. To see the latest fingerprint, make a get() request + * to retrieve an InterconnectAttachment. */ labelFingerprint?: string; /** @@ -6208,7 +6850,7 @@ export namespace compute_alpha { */ region?: string; /** - * URL of the cloud router to be used for dynamic routing. This router must + * URL of the Cloud Router to be used for dynamic routing. This router must * be in the same region as this InterconnectAttachment. The * InterconnectAttachment will automatically connect the Interconnect to the * network & region within which the Cloud Router is configured. @@ -6224,9 +6866,8 @@ export namespace compute_alpha { state?: string; type?: string; /** - * Available only for DEDICATED and PARTNER_PROVIDER. Desired VLAN tag for - * this attachment, in the range 2-4094. This field refers to 802.1q VLAN - * tag, also known as IEEE 802.1Q Only specified at creation time. + * The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. Only + * specified at creation time. */ vlanTag8021q?: number; } @@ -6313,8 +6954,8 @@ export namespace compute_alpha { export interface Schema$InterconnectAttachmentPartnerMetadata { /** * Plain text name of the Interconnect this attachment is connected to, as - * displayed in the Partner?s portal. For instance ?Chicago 1?. This value - * may be validated to match approved Partner values. + * displayed in the Partner?s portal. For instance "Chicago 1". + * This value may be validated to match approved Partner values. */ interconnectName?: string; /** @@ -6423,7 +7064,10 @@ export namespace compute_alpha { export interface Schema$InterconnectDiagnosticsLinkOpticalPower { state?: string; /** - * Value of the current optical power, read in dBm. + * Value of the current optical power, read in dBm. Take a known good + * optical value, give it a 10% margin and trigger warnings relative to that + * value. In general, a -7dBm warning and a -11dBm alarm are good optical + * value estimates for most links. */ value?: number; } @@ -7045,8 +7689,7 @@ export namespace compute_alpha { */ sourceInstance?: string; /** - * [Output Only] properties of source instance. Currently, input for this - * field is not supported. + * Properties of source instance. */ sourceInstanceProperties?: Schema$SourceInstanceProperties; /** @@ -7309,6 +7952,16 @@ export namespace compute_alpha { * [Output Only] Override defined for this instance. */ override?: Schema$ManagedInstanceOverride; + /** + * [Output Only] Preserved state applied from per-instance config for this + * instance. + */ + preservedStateFromConfig?: Schema$PreservedState; + /** + * [Output Only] Preserved state generated based on stateful policy for this + * instance. + */ + preservedStateFromPolicy?: Schema$PreservedState; /** * [Output Only] Tag describing the version. */ @@ -7319,6 +7972,10 @@ export namespace compute_alpha { version?: Schema$ManagedInstanceVersion; } export interface Schema$ManagedInstanceInstanceHealth { + /** + * [Output Only] The current detailed instance health state. + */ + detailedHealthState?: string; /** * [Output Only] The URL for the health check that verifies whether the * instance is healthy. @@ -7394,9 +8051,9 @@ export namespace compute_alpha { * the metadata's contents and used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update metadata. You must always provide an - * up-to-date fingerprint hash in order to update or change metadata. To - * see the latest fingerprint, make a get() request to retrieve the - * resource. + * up-to-date fingerprint hash in order to update or change metadata, + * otherwise the request will fail with error 412 conditionNotMet. To see + * the latest fingerprint, make a get() request to retrieve the resource. */ fingerprint?: string; /** @@ -7409,6 +8066,55 @@ export namespace compute_alpha { */ kind?: string; } + /** + * Opaque filter criteria used by loadbalancers to restrict routing + * configuration to a limited set of loadbalancing proxies. Proxies and + * sidecars involved in loadbalancing would typically present metadata to the + * loadbalancers which need to match criteria specified here. If a match takes + * place, the relevant routing configuration is made available to those + * proxies. For each metadataFilter in this list, if its filterMatchCriteria + * is set to MATCH_ANY, at least one of the filterLabels must match the + * corresponding label provided in the metadata. If its filterMatchCriteria is + * set to MATCH_ALL, then all of its filterLabels must match with + * corresponding labels in the provided metadata. An example for using + * metadataFilters would be: if loadbalancing involves Envoys, they will only + * receive routing configuration when values in metadataFilters match values + * supplied in <a + * href="https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node" + * Node metadata of their XDS requests to loadbalancers. + */ + export interface Schema$MetadataFilter { + /** + * The list of label value pairs that must match labels in the provided + * metadata based on filterMatchCriteria This list must not be empty and + * can have at the most 64 entries. + */ + filterLabels?: Schema$MetadataFilterLabelMatch[]; + /** + * Specifies how individual filterLabel matches within the list of + * filterLabels contribute towards the overall metadataFilter match. + * Supported values are: - MATCH_ANY: At least one of the filterLabels + * must have a matching label in the provided metadata. - MATCH_ALL: All + * filterLabels must have matching labels in the provided metadata. + */ + filterMatchCriteria?: string; + } + /** + * MetadataFilter label name value pairs that are expected to match + * corresponding labels presented as metadata to the loadbalancer. + */ + export interface Schema$MetadataFilterLabelMatch { + /** + * Name of metadata label. The name can have a maximum length of 1024 + * characters and must be at least 1 character long. + */ + name?: string; + /** + * The value of the label must match the specified value. value can have a + * maximum length of 1024 characters. + */ + value?: string; + } /** * The named port. For example: . */ @@ -7498,6 +8204,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * [Output Only] Server-defined fully-qualified URLs for all subnetworks in * this VPC network. @@ -7809,7 +8519,8 @@ export namespace compute_alpha { * Fingerprint hash of contents stored in this network interface. This field * will be ignored when inserting an Instance or adding a NetworkInterface. * An up-to-date fingerprint must be provided in order to update the - * NetworkInterface. + * NetworkInterface, otherwise the request will fail with error 412 + * conditionNotMet. */ fingerprint?: string; /** @@ -7898,11 +8609,16 @@ export namespace compute_alpha { */ export interface Schema$NetworkPeering { /** - * Whether full mesh connectivity is created and managed automatically. When - * it is set to true, Google Compute Engine will automatically create and - * manage the routes between two networks when the state is ACTIVE. - * Otherwise, user needs to create routes manually to route packets to peer - * network. + * Whether Cloud Routers in this network can automatically advertise subnets + * from the peer network. + */ + advertisePeerSubnetsViaRouters?: boolean; + /** + * Indicates whether full mesh connectivity is created and managed + * automatically. When it is set to true, Google Compute Engine will + * automatically create and manage the routes between two networks when the + * state is ACTIVE. Otherwise, user needs to create routes manually to route + * packets to peer network. */ autoCreateRoutes?: boolean; /** @@ -7967,11 +8683,15 @@ export namespace compute_alpha { */ autoCreateRoutes?: boolean; /** - * Whether to export the custom routes to peer network. + * This field will be deprecated soon. Prefer using export_custom_routes in + * network_peering instead. Whether to export the custom routes to peer + * network. */ exportCustomRoutes?: boolean; /** - * Whether to import the custom routes from peer network. + * This field will be deprecated soon. Prefer using import_custom_routes in + * network_peering instead. Whether to import the custom routes from peer + * network. */ importCustomRoutes?: boolean; /** @@ -7979,7 +8699,11 @@ export namespace compute_alpha { */ name?: string; /** - * Network peering parameters. + * Network peering parameters. In order to specify route policies for + * peering using import/export custom routes, you will have to fill all + * peering related parameters (name, peer network, exchange_subnet_routes) + * in network_peeringfield. Corresponding fields in + * NetworksAddPeeringRequest will be deprecated soon. */ networkPeering?: Schema$NetworkPeering; /** @@ -8003,6 +8727,7 @@ export namespace compute_alpha { * A NodeGroup resource. */ export interface Schema$NodeGroup { + autoscalingPolicy?: Schema$NodeGroupAutoscalingPolicy; /** * [Output Only] Creation timestamp in RFC3339 text format. */ @@ -8086,6 +8811,10 @@ export namespace compute_alpha { message?: string; }; } + export interface Schema$NodeGroupAutoscalingPolicy { + maxSize?: number; + minSize?: number; + } /** * Contains a list of nodeGroups. */ @@ -8203,6 +8932,9 @@ export namespace compute_alpha { message?: string; }; } + export interface Schema$NodeGroupsSetAutoscalingPolicyRequest { + autoscalingPolicy?: Schema$NodeGroupAutoscalingPolicy; + } export interface Schema$NodeGroupsSetNodeTemplateRequest { /** * Full or partial URL of the node template resource to be updated for this @@ -8753,6 +9485,15 @@ export namespace compute_alpha { * default service will be used. */ export interface Schema$PathMatcher { + /** + * The default HttpRouteAction to follow if none of the pathRules or + * routeRules defined by this pathMatcher are matched. Use + * defaultRouteAction instead of defaultService when more advanced default + * routing actions like traffic splitting and URL rewrites are desired. Only + * one of defaultService, defaultRouteAction or defaultUrlRedirect must be + * set. + */ + defaultRouteAction?: Schema$HttpRouteAction; /** * The full or partial URL to the BackendService resource. This will be used * if none of the pathRules or routeRules defined by this PathMatcher are @@ -8770,11 +9511,25 @@ export namespace compute_alpha { * compute.backendServices.use */ defaultService?: string; + /** + * The request is redirected by default to a URL specified by + * defaultUrlRedirect when none of the specified pathRules or routeRules + * match. Only one of defaultService, defaultRouteAction or + * defaultUrlRedirect must be set. + */ + defaultUrlRedirect?: Schema$HttpRedirectAction; /** * An optional description of this resource. Provide this property when you * create the resource. */ description?: string; + /** + * Specifies changes to request and response headers that need to take + * effect for the selected backendService. HeaderAction specified here are + * applied after the matching HttpRouteRule HeaderAction and before the + * HeaderAction in the UrlMap + */ + headerAction?: Schema$HttpHeaderAction; /** * The name to which this PathMatcher is referred by the HostRule. */ @@ -8789,6 +9544,14 @@ export namespace compute_alpha { * be set. */ pathRules?: Schema$PathRule[]; + /** + * The list of ordered HTTP route rules. Use this list instead of pathRules + * when advanced route matching and routing actions are desired. The order + * of specifying routeRules matters: the first rule that matches will cause + * its specified routing action to take effect. Only one of pathRules or + * routeRules must be set. + */ + routeRules?: Schema$HttpRouteRule[]; } /** * A path-matching rule for a URL. If matched, will use the specified @@ -8802,6 +9565,13 @@ export namespace compute_alpha { * chars are not allowed here. */ paths?: string[]; + /** + * The HttpRouteAction to follow if this rule is matched. Use routeAction + * instead of service when more advanced default routing actions like + * traffic splitting and Url rewrites are desired. Only one of service, + * routeAction or urlRedirect should must be set. + */ + routeAction?: Schema$HttpRouteAction; /** * The URL of the backend service resource if this rule is matched. Use * service instead of routeAction when simple routing to a backend service @@ -8810,6 +9580,12 @@ export namespace compute_alpha { * urlRedirect should must be set. */ service?: string; + /** + * The request is redirected to a URL specified by urlRedirect if this rule + * is matched. Only one of service, routeAction or urlRedirect should must + * be set. + */ + urlRedirect?: Schema$HttpRedirectAction; } export interface Schema$PerInstanceConfig { /** @@ -8826,7 +9602,22 @@ export namespace compute_alpha { * will be created. */ instance?: string; + /** + * The name of the per-instance config and the corresponding instance. + * Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if + * per-instance config with the same name exists then it will be updated, + * otherwise a new one will be created for the VM instance with the same + * name. An attempt to create a per-instance config for a VM instance that + * either doesn't exist or is not part of the group will result in a + * failure. + */ + name?: string; override?: Schema$ManagedInstanceOverride; + /** + * Intended preserved state for the given instance. Does not contain state + * generated based on Stateful Policy. + */ + preservedState?: Schema$PreservedState; } /** * Defines an Identity and Access Management (IAM) policy. It is used to @@ -8891,6 +9682,40 @@ export namespace compute_alpha { */ expressionSets?: Schema$WafExpressionSet[]; } + /** + * Preserved state for a given instance. + */ + export interface Schema$PreservedState { + /** + * Preserved disks defined for this instance. This map is keyed with the + * device names of the disks. + */ + disks?: {[key: string]: Schema$PreservedStatePreservedDisk;}; + /** + * Preserved metadata defined for this instance. + */ + metadata?: {[key: string]: string;}; + } + export interface Schema$PreservedStatePreservedDisk { + /** + * These stateful disks will never be deleted during autohealing, update, + * instance recreate operations. This flag is used to configure if the disk + * should be deleted after it is no longer used by the group, e.g. when the + * given instance or the whole MIG is deleted. Note: disks attached in + * READ_ONLY mode cannot be auto-deleted. + */ + autoDelete?: string; + /** + * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If + * not specified, the default is to attach the disk in READ_WRITE mode. + */ + mode?: string; + /** + * The URL of the disk resource that is stateful and should be attached to + * the VM instance. + */ + source?: string; + } /** * A Project resource. For an overview of projects, see Cloud Platform * Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for @@ -9023,6 +9848,11 @@ export namespace compute_alpha { * [Output Only] Name of the quota metric. */ metric?: string; + /** + * [Output Only] Owning resource. This is the resource on which this quota + * is applied. + */ + owner?: string; /** * [Output Only] Current usage of this metric. */ @@ -9235,6 +10065,11 @@ export namespace compute_alpha { * this managed instance group. */ instances?: string[]; + /** + * The list of instance names for which we want to delete per-instance + * configs on this managed instance group. + */ + names?: string[]; } /** * Contains a list of managed instance groups. @@ -9292,8 +10127,9 @@ export namespace compute_alpha { */ instances?: string[]; /** - * The maximal action that should be perfomed on the instances. By default - * REPLACE. + * The maximal action that should be performed on the instances. By default + * REPLACE. This field is deprecated, please use + * most_disruptive_allowed_action. */ maximalAction?: string; /** @@ -9302,6 +10138,15 @@ export namespace compute_alpha { */ minimalAction?: string; } + /** + * RegionInstanceGroupManagers.createInstances + */ + export interface Schema$RegionInstanceGroupManagersCreateInstancesRequest { + /** + * [Required] List of specifications of per-instance configs. + */ + instances?: Schema$PerInstanceConfig[]; + } export interface Schema$RegionInstanceGroupManagersDeleteInstancesRequest { /** * The URLs of one or more instances to delete. This can be a full URL or a @@ -9534,6 +10379,18 @@ export namespace compute_alpha { */ resource?: Schema$UrlMap; } + /** + * A policy that specifies how requests intended for the route's backends + * are shadowed to a separate mirrored backend service. Loadbalancer does not + * wait for responses from the shadow service. Prior to sending traffic to the + * shadow service, the host / authority header is suffixed with -shadow. + */ + export interface Schema$RequestMirrorPolicy { + /** + * The full or partial URL to the BackendService resource being mirrored to. + */ + backendService?: string; + } /** * Commitment for a particular resource (a Commitment is composed of one or * more of these). @@ -9742,7 +10599,7 @@ export namespace compute_alpha { duration?: string; /** * Time within the window to start the operations. It must be in format - * "HH:MM?, where HH : [00-23] and MM : [00-00] GMT. + * "HH:MM", where HH : [00-23] and MM : [00-00] GMT. */ startTime?: string; } @@ -9761,7 +10618,7 @@ export namespace compute_alpha { hoursInCycle?: number; /** * Time within the window to start the operations. It must be in format - * "HH:MM?, where HH : [00-23] and MM : [00-00] GMT. + * "HH:MM", where HH : [00-23] and MM : [00-00] GMT. */ startTime?: string; } @@ -9837,7 +10694,7 @@ export namespace compute_alpha { duration?: string; /** * Time within the window to start the operations. It must be in format - * "HH:MM?, where HH : [00-23] and MM : [00-00] GMT. + * "HH:MM", where HH : [00-23] and MM : [00-00] GMT. */ startTime?: string; } @@ -9949,6 +10806,10 @@ export namespace compute_alpha { * [Output Only] Server-defined fully-qualified URL for this resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + */ + selfLinkWithId?: string; /** * A list of instance tags to which this route applies. */ @@ -10183,11 +11044,13 @@ export namespace compute_alpha { */ ipAddress?: string; /** - * [Output Only] Type of how the resource/configuration of the BGP peer is - * managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT - * represents an BGP peer that is automatically created for PARTNER - * interconnectAttachment, Google will automatically create/delete this type - * of BGP peer when the PARTNER interconnectAttachment is created/deleted. + * [Output Only] The resource that configures and manages this BGP peer. + * MANAGED_BY_USER is the default value and can be managed by you or other + * users; MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed + * by Cloud Interconnect, specifically by an InterconnectAttachment of type + * PARTNER. Google will automatically create, update, and delete this type + * of BGP peer when the PARTNER InterconnectAttachment is created, updated, + * or deleted. */ managementType?: string; /** @@ -10227,12 +11090,13 @@ export namespace compute_alpha { */ linkedVpnTunnel?: string; /** - * [Output Only] Type of how the resource/configuration of the interface is - * managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT - * represents an interface that is automatically created for PARTNER type - * interconnectAttachment, Google will automatically create/update/delete - * this type of interface when the PARTNER interconnectAttachment is - * created/provisioned/deleted. + * [Output Only] The resource that configures and manages this interface. + * MANAGED_BY_USER is the default value and can be managed by you or other + * users; MANAGED_BY_ATTACHMENT is an interface that is configured and + * managed by Cloud Interconnect, specifically by an InterconnectAttachment + * of type PARTNER. Google will automatically create, update, and delete + * this type of interface when the PARTNER InterconnectAttachment is + * created, updated, or deleted. */ managementType?: string; /** @@ -10750,8 +11614,9 @@ export namespace compute_alpha { * the metadata's contents and used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update metadata. You must always provide an - * up-to-date fingerprint hash in order to update or change metadata. To - * see the latest fingerprint, make get() request to the security policy. + * up-to-date fingerprint hash in order to update or change metadata, + * otherwise the request will fail with error 412 conditionNotMet. To see + * the latest fingerprint, make get() request to the security policy. */ fingerprint?: string; /** @@ -10896,8 +11761,9 @@ export namespace compute_alpha { preview?: boolean; /** * An integer indicating the priority of a rule in the list. The priority - * must be a positive value between 0 and 2147483647. Rules are evaluated in - * the increasing order of priority. + * must be a positive value between 0 and 2147483647. Rules are evaluated + * from highest to lowest priority where 0 is the highest priority and + * 2147483647 is the lowest prority. */ priority?: number; /** @@ -11035,19 +11901,31 @@ export namespace compute_alpha { * A shielded VM identity entry. */ export interface Schema$ShieldedVmIdentity { + /** + * An Endorsement Key (EK) issued to the Shielded VM's vTPM. + */ encryptionKey?: Schema$ShieldedVmIdentityEntry; /** * [Output Only] Type of the resource. Always compute#shieldedVmIdentity for * shielded VM identity entry. */ kind?: string; + /** + * An Attestation Key (AK) issued to the Shielded VM's vTPM. + */ signingKey?: Schema$ShieldedVmIdentityEntry; } /** - * A Shielded VM Identity Entry. + * A Shielded Instance Identity Entry. */ export interface Schema$ShieldedVmIdentityEntry { + /** + * A PEM-encoded X.509 certificate. This field can be empty. + */ ekCert?: string; + /** + * A PEM-encoded public key. + */ ekPub?: string; } /** @@ -11124,7 +12002,8 @@ export namespace compute_alpha { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a snapshot. */ labelFingerprint?: string; @@ -11158,6 +12037,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] Server-defined URL for this resource's resource id. + */ + selfLinkWithId?: string; /** * Encrypts the snapshot using a customer-supplied encryption key. After * you encrypt a snapshot using a customer-supplied key, you must provide @@ -11647,8 +12530,9 @@ export namespace compute_alpha { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a SslPolicy. An up-to-date fingerprint must be - * provided in order to update the SslPolicy. To see the latest - * fingerprint, make a get() request to retrieve an SslPolicy. + * provided in order to update the SslPolicy, otherwise the request will + * fail with error 412 conditionNotMet. To see the latest fingerprint, make + * a get() request to retrieve an SslPolicy. */ fingerprint?: string; /** @@ -11706,6 +12590,7 @@ export namespace compute_alpha { } export interface Schema$StatefulPolicy { preservedResources?: Schema$StatefulPolicyPreservedResources; + preservedState?: Schema$StatefulPolicyPreservedState; } export interface Schema$StatefulPolicyPreservedDisk { /** @@ -11723,6 +12608,26 @@ export namespace compute_alpha { */ disks?: Schema$StatefulPolicyPreservedDisk[]; } + /** + * Configuration of preserved resources. + */ + export interface Schema$StatefulPolicyPreservedState { + /** + * Disks created on the instances that will be preserved on instance delete, + * resize down, etc. This map is keyed with the device names of the disks. + */ + disks?: {[key: string]: Schema$StatefulPolicyPreservedStateDiskDevice;}; + } + export interface Schema$StatefulPolicyPreservedStateDiskDevice { + /** + * These stateful disks will never be deleted during autohealing, update or + * VM instance recreate operations. This flag is used to configure if the + * disk should be deleted after it is no longer used by the group, e.g. when + * the given instance or the whole group is deleted. Note: disks attached in + * READ_ONLY mode cannot be auto-deleted. + */ + autoDelete?: string; + } /** * A Subnetwork resource. (== resource_for beta.subnetworks ==) (== * resource_for v1.subnetworks ==) @@ -11775,8 +12680,9 @@ export namespace compute_alpha { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a Subnetwork. An up-to-date fingerprint must be - * provided in order to update the Subnetwork. To see the latest - * fingerprint, make a get() request to retrieve a Subnetwork. + * provided in order to update the Subnetwork, otherwise the request will + * fail with error 412 conditionNotMet. To see the latest fingerprint, make + * a get() request to retrieve a Subnetwork. */ fingerprint?: string; /** @@ -11815,6 +12721,12 @@ export namespace compute_alpha { * Subnetwork resources. */ kind?: string; + /** + * This field denotes the logging options for the load balancer traffic + * served by this backend service. If logging is enabled, logs will be + * exported to Stackdriver. + */ + logConfig?: Schema$SubnetworkLogConfig; /** * Can only be specified if VPC flow logging for this subnetwork is enabled. * Configures whether metadata fields should be added to the reported VPC @@ -11862,14 +12774,16 @@ export namespace compute_alpha { * INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. * An ACTIVE subnetwork is one that is currently being used for Internal * HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be - * promoted to ACTIVE or is currently draining. + * promoted to ACTIVE or is currently draining. This field can be updated + * with a patch request. */ role?: string; /** * An array of configurations for secondary IP ranges for VM instances * contained in this subnetwork. The primary IP of such VM must belong to * the primary ipCidrRange of the subnetwork. The alias IPs may belong to - * either primary or secondary ranges. + * either primary or secondary ranges. This field can be updated with a + * patch request. */ secondaryIpRanges?: Schema$SubnetworkSecondaryRange[]; /** @@ -11959,6 +12873,38 @@ export namespace compute_alpha { message?: string; }; } + /** + * The available logging options for this subnetwork. + */ + export interface Schema$SubnetworkLogConfig { + /** + * Can only be specified if VPC flow logging for this subnetwork is enabled. + * Toggles the aggregation interval for collecting flow logs. Increasing the + * interval time will reduce the amount of generated flow logs for long + * lasting connections. Default is an interval of 5 seconds per connection. + */ + aggregationInterval?: string; + /** + * Whether to enable flow logging for this subnetwork. If this field is not + * explicitly set, it will not appear in get listings. If not set the + * default behavior is to disable flow logging. + */ + enable?: boolean; + /** + * Can only be specified if VPC flow logging for this subnetwork is enabled. + * The value of the field must be in [0, 1]. Set the sampling rate of VPC + * flow logs within the subnetwork where 1.0 means all collected logs are + * reported and 0.0 means no logs are reported. Default is 0.5 which means + * half of all collected logs are reported. + */ + flowSampling?: number; + /** + * Can only be specified if VPC flow logging for this subnetwork is enabled. + * Configures whether metadata fields should be added to the reported VPC + * flow logs. Default is INCLUDE_ALL_METADATA. + */ + metadata?: string; + } /** * Represents a secondary IP range of a subnetwork. */ @@ -12967,8 +13913,9 @@ export namespace compute_alpha { * locking. The fingerprint is initially generated by Compute Engine and * changes after every request to modify or update labels. You must always * provide an up-to-date fingerprint hash in order to update or change - * labels. To see the latest fingerprint, make a get() request to retrieve - * a TargetVpnGateway. + * labels, otherwise the request will fail with error 412 conditionNotMet. + * To see the latest fingerprint, make a get() request to retrieve a + * TargetVpnGateway. */ labelFingerprint?: string; /** @@ -13195,6 +14142,14 @@ export namespace compute_alpha { * [Output Only] Creation timestamp in RFC3339 text format. */ creationTimestamp?: string; + /** + * The default HttpRouteAction to follow if none of the hostRules match. Use + * defaultRouteAction instead of defaultService when more advanced default + * routing actions like traffic splitting and Url rewrites are desired. Only + * one of defaultService, defaultRouteAction or defaultUrlRedirect should + * must be set. + */ + defaultRouteAction?: Schema$HttpRouteAction; /** * The URL of the backendService resource if none of the hostRules match. * Use defaultService instead of defaultRouteAction when simple routing to a @@ -13203,6 +14158,13 @@ export namespace compute_alpha { * defaultRouteAction or defaultUrlRedirect should must be set. */ defaultService?: string; + /** + * The request is redirected to a default URL specified by + * defaultUrlRedirect if none of the HostRules match. Only one of + * defaultService, defaultRouteAction or defaultUrlRedirect should must be + * set. + */ + defaultUrlRedirect?: Schema$HttpRedirectAction; /** * An optional description of this resource. Provide this property when you * create the resource. @@ -13212,10 +14174,17 @@ export namespace compute_alpha { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a UrlMap. An up-to-date fingerprint must be - * provided in order to update the UrlMap. To see the latest fingerprint, - * make a get() request to retrieve a UrlMap. + * provided in order to update the UrlMap, otherwise the request will fail + * with error 412 conditionNotMet. To see the latest fingerprint, make a + * get() request to retrieve a UrlMap. */ fingerprint?: string; + /** + * Specifies changes to request and response headers that need to take + * effect for the selected backendService. The headerAction specified here + * take effect after headerAction specified under pathMatcher. + */ + headerAction?: Schema$HttpHeaderAction; /** * The list of HostRules to use against the URL. */ @@ -13363,10 +14332,20 @@ export namespace compute_alpha { * Message for the expected URL mappings. */ export interface Schema$UrlMapTest { + /** + * The weight to use for the supplied host and path when using advanced + * routing rules that involve traffic splitting. + */ + backendServiceWeight?: number; /** * Description of this test case. */ description?: string; + /** + * The expected URL that should be redirected to for the host and path being + * tested. + */ + expectedUrlRedirect?: string; /** * Host portion of the URL. */ @@ -13397,6 +14376,24 @@ export namespace compute_alpha { */ testPassed?: boolean; } + /** + * The spec for modifying the path before sending the request to the matched + * backend service. + */ + export interface Schema$UrlRewrite { + /** + * Prior to forwarding the request to the selected service, the + * request's host header is replaced with contents of hostRewrite. The + * value must be between 1 and 255 characters. + */ + hostRewrite?: string; + /** + * Prior to forwarding the request to the selected backend service, the + * matching portion of the request's path is replaced by + * pathPrefixRewrite. The value must be between 1 and 1024 characters. + */ + pathPrefixRewrite?: string; + } /** * Subnetwork which the current user has compute.subnetworks.use permission * on. @@ -13599,7 +14596,8 @@ export namespace compute_alpha { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an VpnGateway. */ labelFingerprint?: string; @@ -13775,7 +14773,8 @@ export namespace compute_alpha { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a VpnTunnel. */ labelFingerprint?: string; @@ -13971,6 +14970,37 @@ export namespace compute_alpha { */ id?: string; } + /** + * In contrast to a single BackendService in HttpRouteAction to which all + * matching traffic is directed to, WeightedBackendService allows traffic to + * be split across multiple BackendServices. The volume of traffic for each + * BackendService is proportional to the weight specified in each + * WeightedBackendService + */ + export interface Schema$WeightedBackendService { + /** + * The full or partial URL to the default BackendService resource. Before + * forwarding the request to backendService, the loadbalancer applies any + * relevant headerActions specified as part of this backendServiceWeight. + */ + backendService?: string; + /** + * Specifies changes to request and response headers that need to take + * effect for the selected backendService. headerAction specified here take + * effect before headerAction in the enclosing HttpRouteRule, PathMatcher + * and UrlMap. + */ + headerAction?: Schema$HttpHeaderAction; + /** + * Specifies the fraction of traffic sent to backendService. The sum of all + * weights specified in weightedBackendServices within HttpRouteAction must + * equal 100. The selection of a backend service is determined only for new + * traffic. Once a user's request has been directed to a backendService, + * subsequent requests will be sent to the same backendService as determined + * by the BackendService's session affinity policy. + */ + weight?: number; + } export interface Schema$XpnHostList { /** * [Output Only] Unique identifier for the resource; defined by the server. @@ -14012,7 +15042,7 @@ export namespace compute_alpha { export interface Schema$XpnResourceId { /** * The ID of the service resource. In the case of projects, this field - * matches the project ID (e.g., my-project), not the project number (e.g., + * supports project id (e.g., my-project-123) and project number (e.g. * 12345678). */ id?: string; @@ -14872,7 +15902,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -15235,7 +16265,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -18543,7 +19573,7 @@ export namespace compute_alpha { /** * compute.backendServices.get * @desc Returns the specified BackendService resource. Gets a list of - * available backend services by making a list() request. + * available backend services. * @alias compute.backendServices.get * @memberOf! () * @@ -20335,7 +21365,7 @@ export namespace compute_alpha { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {string} params.zone The name of the zone for this request. * @param {().ZoneSetLabelsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -20897,7 +21927,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; /** @@ -22454,7 +23484,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -22933,7 +23963,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -23300,7 +24330,7 @@ export namespace compute_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -23578,7 +24608,7 @@ export namespace compute_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -23980,7 +25010,7 @@ export namespace compute_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -24366,7 +25396,7 @@ export namespace compute_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -28237,7 +29267,7 @@ export namespace compute_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -28599,7 +29629,7 @@ export namespace compute_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -28883,6 +29913,85 @@ export namespace compute_alpha { } + /** + * compute.instanceGroupManagers.createInstances + * @desc Creates instances with per-instance configs in this managed + * instance group. Instances are created using the current instance + * template. The create instances operation is marked DONE if the + * createInstances request is successful. The underlying actions take + * additional time. You must separately verify the status of the creating or + * actions with the listmanagedinstances method. + * @alias compute.instanceGroupManagers.createInstances + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instanceGroupManager The name of the managed instance group. It should conform to RFC1035. + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.zone The name of the zone where the managed instance group is located. It should conform to RFC1035. + * @param {().InstanceGroupManagersCreateInstancesRequest} 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 + */ + createInstances( + params?: Params$Resource$Instancegroupmanagers$Createinstances, + options?: MethodOptions): AxiosPromise; + createInstances( + params: Params$Resource$Instancegroupmanagers$Createinstances, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + createInstances( + params: Params$Resource$Instancegroupmanagers$Createinstances, + callback: BodyResponseCallback): void; + createInstances(callback: BodyResponseCallback): void; + createInstances( + paramsOrCallback?: + Params$Resource$Instancegroupmanagers$Createinstances| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instancegroupmanagers$Createinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Createinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instanceGroupManagers.delete * @desc Deletes the specified managed instance group and all of the @@ -29860,7 +30969,8 @@ export namespace compute_alpha { /** * compute.instanceGroupManagers.setAutoHealingPolicies - * @desc Modifies the autohealing policies. + * @desc Modifies the autohealing policies. [Deprecated] This method is + * deprecated. Please use Patch instead. * @alias compute.instanceGroupManagers.setAutoHealingPolicies * @memberOf! () * @@ -30438,6 +31548,44 @@ export namespace compute_alpha { */ requestBody?: Schema$InstanceGroupManagersApplyUpdatesRequest; } + export interface Params$Resource$Instancegroupmanagers$Createinstances extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the managed instance group. It should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone where the managed instance group is located. It + * should conform to RFC1035. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersCreateInstancesRequest; + } export interface Params$Resource$Instancegroupmanagers$Delete extends StandardParameters { /** @@ -32772,8 +33920,8 @@ export namespace compute_alpha { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.deviceName Disk device name to detach. - * @param {string} params.instance Instance name. + * @param {string} params.deviceName The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. + * @param {string} params.instance Instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -33646,7 +34794,7 @@ export namespace compute_alpha { * @param {boolean=} params.deletionProtection Whether the resource should be protected against deletion. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {string} params.zone The name of the zone for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -33718,8 +34866,8 @@ export namespace compute_alpha { * * @param {object} params Parameters for request * @param {boolean} params.autoDelete Whether to auto-delete the disk when the instance is deleted. - * @param {string} params.deviceName The device name of the disk to modify. - * @param {string} params.instance The instance name. + * @param {string} params.deviceName The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. + * @param {string} params.instance The instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -34235,7 +35383,7 @@ export namespace compute_alpha { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.instance Instance name. + * @param {string} params.instance Instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -35049,6 +36197,81 @@ export namespace compute_alpha { } + /** + * compute.instances.updateDisplayDevice + * @desc Updates the Display config for a VM instance. You can only use this + * method on a stopped VM instance. This method supports PATCH semantics and + * uses the JSON merge patch format and processing rules. + * @alias compute.instances.updateDisplayDevice + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instance Name of the instance scoping this request. + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.zone The name of the zone for this request. + * @param {().DisplayDevice} 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 + */ + updateDisplayDevice( + params?: Params$Resource$Instances$Updatedisplaydevice, + options?: MethodOptions): AxiosPromise; + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + callback: BodyResponseCallback): void; + updateDisplayDevice(callback: BodyResponseCallback): void; + updateDisplayDevice( + paramsOrCallback?: Params$Resource$Instances$Updatedisplaydevice| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instances$Updatedisplaydevice; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Updatedisplaydevice; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.updateNetworkInterface * @desc Updates an instance's network interface. This method follows PATCH @@ -35460,11 +36683,12 @@ export namespace compute_alpha { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Disk device name to detach. + * The device name of the disk to detach. Make a get() request on the + * instance to view currently attached disks and device names. */ deviceName?: string; /** - * Instance name. + * Instance name for this request. */ instance?: string; /** @@ -35917,7 +37141,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; /** @@ -35937,11 +37161,12 @@ export namespace compute_alpha { */ autoDelete?: boolean; /** - * The device name of the disk to modify. + * The device name of the disk to modify. Make a get() request on the + * instance to view currently attached disks and device names. */ deviceName?: string; /** - * The instance name. + * The instance name for this request. */ instance?: string; /** @@ -36189,7 +37414,7 @@ export namespace compute_alpha { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Instance name. + * Instance name for this request. */ instance?: string; /** @@ -36565,6 +37790,44 @@ export namespace compute_alpha { */ requestBody?: Schema$AccessConfig; } + export interface Params$Resource$Instances$Updatedisplaydevice extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DisplayDevice; + } export interface Params$Resource$Instances$Updatenetworkinterface extends StandardParameters { /** @@ -36654,8 +37917,8 @@ export namespace compute_alpha { /** * compute.instanceTemplates.delete * @desc Deletes the specified instance template. Deleting an instance - * template is permanent and cannot be undone. It's not possible to delete - * templates which are in use by an instance group. + * template is permanent and cannot be undone. It is not possible to delete + * templates that are already in use by a managed instance group. * @alias compute.instanceTemplates.delete * @memberOf! () * @@ -36939,7 +38202,7 @@ export namespace compute_alpha { /** * compute.instanceTemplates.list * @desc Retrieves a list of instance templates that are contained within - * the specified project and zone. + * the specified project. * @alias compute.instanceTemplates.list * @memberOf! () * @@ -37958,7 +39221,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -38410,7 +39673,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -39352,7 +40615,7 @@ export namespace compute_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -39717,7 +40980,7 @@ export namespace compute_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -44418,7 +45681,7 @@ export namespace compute_alpha { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.nodeGroup Name of the NodeGroup resource to delete. + * @param {string} params.nodeGroup Name of the NodeGroup resource. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -45061,6 +46324,80 @@ export namespace compute_alpha { } + /** + * compute.nodeGroups.setAutoscalingPolicy + * @desc Sets the autoscaling policy of the node group. + * @alias compute.nodeGroups.setAutoscalingPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.nodeGroup Name of the NodeGroup resource to update. + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.zone The name of the zone for this request. + * @param {().NodeGroupsSetAutoscalingPolicyRequest} 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 + */ + setAutoscalingPolicy( + params?: Params$Resource$Nodegroups$Setautoscalingpolicy, + options?: MethodOptions): AxiosPromise; + setAutoscalingPolicy( + params: Params$Resource$Nodegroups$Setautoscalingpolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setAutoscalingPolicy( + params: Params$Resource$Nodegroups$Setautoscalingpolicy, + callback: BodyResponseCallback): void; + setAutoscalingPolicy(callback: BodyResponseCallback): + void; + setAutoscalingPolicy( + paramsOrCallback?: Params$Resource$Nodegroups$Setautoscalingpolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Nodegroups$Setautoscalingpolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodegroups$Setautoscalingpolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setAutoscalingPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.nodeGroups.setIamPolicy * @desc Sets the access control policy on the specified resource. Replaces @@ -45140,7 +46477,7 @@ export namespace compute_alpha { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.nodeGroup Name of the NodeGroup resource to delete. + * @param {string} params.nodeGroup Name of the NodeGroup resource to update. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -45281,99 +46618,99 @@ export namespace compute_alpha { } export interface Params$Resource$Nodegroups$Addnodes extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Name of the NodeGroup resource to delete. - */ - nodeGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. For example, consider a - * situation where you make an initial request and the request times out. If - * you make the request again with the same request ID, the server can check - * if original operation with the same request ID was received, and if so, - * will ignore the second request. This prevents clients from accidentally - * creating duplicate commitments. The request ID must be a valid UUID with - * the exception that zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NodeGroupsAddNodesRequest; - } - export interface Params$Resource$Nodegroups$Aggregatedlist extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * A filter expression that filters resources listed in the response. The - * expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be either =, !=, >, or - * <. For example, if you are filtering Compute Engine instances, you can - * exclude instances named example-instance by specifying name != - * example-instance. You can also filter nested fields. For example, you - * could specify scheduling.automaticRestart = false to include instances - * only if they are not scheduled for automatic restarts. You can use - * filtering on nested fields to filter based on resource labels. To filter - * on multiple expressions, provide each separate expression within - * parentheses. For example, (scheduling.automaticRestart = true) - * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND - * expression. However, you can include AND and OR expressions explicitly. - * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel - * Broadwell") AND (scheduling.automaticRestart = true). - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the - * number of available results is larger than maxResults, Compute Engine - * returns a nextPageToken that can be used to get the next page of results - * in subsequent list requests. Acceptable values are 0 to 500, inclusive. - * (Default: 500) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned - * in alphanumerical order based on the resource name. You can also sort - * results in descending order based on the creation timestamp using - * orderBy="creationTimestamp desc". This sorts results based on the - * creationTimestamp field in reverse chronological order (newest result - * first). Use this to sort resources like operations so that the newest - * operation is returned first. Currently, only sorting by name or - * creationTimestamp desc is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set pageToken to the nextPageToken - * returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Nodegroups$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the NodeGroup resource. + */ + nodeGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NodeGroupsAddNodesRequest; + } + export interface Params$Resource$Nodegroups$Aggregatedlist extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A filter expression that filters resources listed in the response. The + * expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be either =, !=, >, or + * <. For example, if you are filtering Compute Engine instances, you can + * exclude instances named example-instance by specifying name != + * example-instance. You can also filter nested fields. For example, you + * could specify scheduling.automaticRestart = false to include instances + * only if they are not scheduled for automatic restarts. You can use + * filtering on nested fields to filter based on resource labels. To filter + * on multiple expressions, provide each separate expression within + * parentheses. For example, (scheduling.automaticRestart = true) + * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND + * expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the + * number of available results is larger than maxResults, Compute Engine + * returns a nextPageToken that can be used to get the next page of results + * in subsequent list requests. Acceptable values are 0 to 500, inclusive. + * (Default: 500) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned + * in alphanumerical order based on the resource name. You can also sort + * results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result + * first). Use this to sort resources like operations so that the newest + * operation is returned first. Currently, only sorting by name or + * creationTimestamp desc is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set pageToken to the nextPageToken + * returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Nodegroups$Delete extends StandardParameters { /** * Auth client or API Key for the request @@ -45642,6 +46979,44 @@ export namespace compute_alpha { */ zone?: string; } + export interface Params$Resource$Nodegroups$Setautoscalingpolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the NodeGroup resource to update. + */ + nodeGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NodeGroupsSetAutoscalingPolicyRequest; + } export interface Params$Resource$Nodegroups$Setiampolicy extends StandardParameters { /** @@ -45675,7 +47050,7 @@ export namespace compute_alpha { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the NodeGroup resource to delete. + * Name of the NodeGroup resource to update. */ nodeGroup?: string; /** @@ -46942,6 +48317,1105 @@ export namespace compute_alpha { } + export class Resource$Organizationsecuritypolicies { + constructor() {} + + + /** + * compute.organizationSecurityPolicies.addAssociation + * @desc Inserts an association for the specified security policy. + * @alias compute.organizationSecurityPolicies.addAssociation + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.securityPolicy Name of the security policy to update. + * @param {().SecurityPolicyAssociation} 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 + */ + addAssociation( + params?: Params$Resource$Organizationsecuritypolicies$Addassociation, + options?: MethodOptions): AxiosPromise; + addAssociation( + params: Params$Resource$Organizationsecuritypolicies$Addassociation, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + addAssociation( + params: Params$Resource$Organizationsecuritypolicies$Addassociation, + callback: BodyResponseCallback): void; + addAssociation(callback: BodyResponseCallback): void; + addAssociation( + paramsOrCallback?: + Params$Resource$Organizationsecuritypolicies$Addassociation| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Addassociation; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Organizationsecuritypolicies$Addassociation; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}/addAssociation') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.addRule + * @desc Inserts a rule into a security policy. + * @alias compute.organizationSecurityPolicies.addRule + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.securityPolicy Name of the security policy to update. + * @param {().SecurityPolicyRule} 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 + */ + addRule( + params?: Params$Resource$Organizationsecuritypolicies$Addrule, + options?: MethodOptions): AxiosPromise; + addRule( + params: Params$Resource$Organizationsecuritypolicies$Addrule, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + addRule( + params: Params$Resource$Organizationsecuritypolicies$Addrule, + callback: BodyResponseCallback): void; + addRule(callback: BodyResponseCallback): void; + addRule( + paramsOrCallback?: Params$Resource$Organizationsecuritypolicies$Addrule| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Addrule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$Addrule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}/addRule') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.delete + * @desc Deletes the specified policy. + * @alias compute.organizationSecurityPolicies.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.securityPolicy Name of the security policy to delete. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Organizationsecuritypolicies$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Organizationsecuritypolicies$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Organizationsecuritypolicies$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Organizationsecuritypolicies$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.get + * @desc List all of the ordered rules present in a single specified policy. + * @alias compute.organizationSecurityPolicies.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.securityPolicy Name of the security policy to get. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Organizationsecuritypolicies$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Organizationsecuritypolicies$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Organizationsecuritypolicies$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Organizationsecuritypolicies$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.getAssociation + * @desc Gets an association with the specified name. + * @alias compute.organizationSecurityPolicies.getAssociation + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.name The name of the association to get from the security policy. + * @param {string} params.securityPolicy Name of the security policy to which the queried rule belongs. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getAssociation( + params?: Params$Resource$Organizationsecuritypolicies$Getassociation, + options?: MethodOptions): + AxiosPromise; + getAssociation( + params: Params$Resource$Organizationsecuritypolicies$Getassociation, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + getAssociation( + params: Params$Resource$Organizationsecuritypolicies$Getassociation, + callback: BodyResponseCallback): void; + getAssociation( + callback: BodyResponseCallback): void; + getAssociation( + paramsOrCallback?: + Params$Resource$Organizationsecuritypolicies$Getassociation| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Getassociation; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Organizationsecuritypolicies$Getassociation; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}/getAssociation') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.getRule + * @desc Gets a rule at the specified priority. + * @alias compute.organizationSecurityPolicies.getRule + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.priority The priority of the rule to get from the security policy. + * @param {string} params.securityPolicy Name of the security policy to which the queried rule belongs. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getRule( + params?: Params$Resource$Organizationsecuritypolicies$Getrule, + options?: MethodOptions): AxiosPromise; + getRule( + params: Params$Resource$Organizationsecuritypolicies$Getrule, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getRule( + params: Params$Resource$Organizationsecuritypolicies$Getrule, + callback: BodyResponseCallback): void; + getRule(callback: BodyResponseCallback): void; + getRule( + paramsOrCallback?: Params$Resource$Organizationsecuritypolicies$Getrule| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Getrule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$Getrule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}/getRule') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.insert + * @desc Creates a new policy in the specified project using the data + * included in the request. + * @alias compute.organizationSecurityPolicies.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.parentId Parent ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {().SecurityPolicy} 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 + */ + insert( + params?: Params$Resource$Organizationsecuritypolicies$Insert, + options?: MethodOptions): AxiosPromise; + insert( + params: Params$Resource$Organizationsecuritypolicies$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Organizationsecuritypolicies$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Organizationsecuritypolicies$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.list + * @desc List all the policies that have been configured for the specified + * project. + * @alias compute.organizationSecurityPolicies.list + * @memberOf! () + * + * @param {object=} params Parameters for request + * @param {string=} params.filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). + * @param {integer=} params.maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string=} params.orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. + * @param {string=} params.pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. + * @param {string=} params.parentId Parent ID for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Organizationsecuritypolicies$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Organizationsecuritypolicies$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Organizationsecuritypolicies$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Organizationsecuritypolicies$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.patchRule + * @desc Patches a rule at the specified priority. + * @alias compute.organizationSecurityPolicies.patchRule + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.priority The priority of the rule to patch. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.securityPolicy Name of the security policy to update. + * @param {().SecurityPolicyRule} 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 + */ + patchRule( + params?: Params$Resource$Organizationsecuritypolicies$Patchrule, + options?: MethodOptions): AxiosPromise; + patchRule( + params: Params$Resource$Organizationsecuritypolicies$Patchrule, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patchRule( + params: Params$Resource$Organizationsecuritypolicies$Patchrule, + callback: BodyResponseCallback): void; + patchRule(callback: BodyResponseCallback): void; + patchRule( + paramsOrCallback?: + Params$Resource$Organizationsecuritypolicies$Patchrule| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Patchrule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$Patchrule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}/patchRule') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.removeAssociation + * @desc Removes an association for the specified security policy. + * @alias compute.organizationSecurityPolicies.removeAssociation + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.name Name for the attachment that will be removed. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.securityPolicy Name of the security policy to update. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + removeAssociation( + params?: Params$Resource$Organizationsecuritypolicies$Removeassociation, + options?: MethodOptions): AxiosPromise; + removeAssociation( + params: Params$Resource$Organizationsecuritypolicies$Removeassociation, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + removeAssociation( + params: Params$Resource$Organizationsecuritypolicies$Removeassociation, + callback: BodyResponseCallback): void; + removeAssociation(callback: BodyResponseCallback): void; + removeAssociation( + paramsOrCallback?: + Params$Resource$Organizationsecuritypolicies$Removeassociation| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Removeassociation; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Organizationsecuritypolicies$Removeassociation; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}/removeAssociation') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.organizationSecurityPolicies.removeRule + * @desc Deletes a rule at the specified priority. + * @alias compute.organizationSecurityPolicies.removeRule + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.priority The priority of the rule to remove from the security policy. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.securityPolicy Name of the security policy to update. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + removeRule( + params?: Params$Resource$Organizationsecuritypolicies$Removerule, + options?: MethodOptions): AxiosPromise; + removeRule( + params: Params$Resource$Organizationsecuritypolicies$Removerule, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + removeRule( + params: Params$Resource$Organizationsecuritypolicies$Removerule, + callback: BodyResponseCallback): void; + removeRule(callback: BodyResponseCallback): void; + removeRule( + paramsOrCallback?: + Params$Resource$Organizationsecuritypolicies$Removerule| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizationsecuritypolicies$Removerule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizationsecuritypolicies$Removerule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/locations/global/securityPolicies/{securityPolicy}/removeRule') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['securityPolicy'], + pathParams: ['securityPolicy'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Organizationsecuritypolicies$Addassociation + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the security policy to update. + */ + securityPolicy?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SecurityPolicyAssociation; + } + export interface Params$Resource$Organizationsecuritypolicies$Addrule extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the security policy to update. + */ + securityPolicy?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SecurityPolicyRule; + } + export interface Params$Resource$Organizationsecuritypolicies$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the security policy to delete. + */ + securityPolicy?: string; + } + export interface Params$Resource$Organizationsecuritypolicies$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the security policy to get. + */ + securityPolicy?: string; + } + export interface Params$Resource$Organizationsecuritypolicies$Getassociation + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the association to get from the security policy. + */ + name?: string; + /** + * Name of the security policy to which the queried rule belongs. + */ + securityPolicy?: string; + } + export interface Params$Resource$Organizationsecuritypolicies$Getrule extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The priority of the rule to get from the security policy. + */ + priority?: number; + /** + * Name of the security policy to which the queried rule belongs. + */ + securityPolicy?: string; + } + export interface Params$Resource$Organizationsecuritypolicies$Insert extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Parent ID for this request. + */ + parentId?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SecurityPolicy; + } + export interface Params$Resource$Organizationsecuritypolicies$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A filter expression that filters resources listed in the response. The + * expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be either =, !=, >, or + * <. For example, if you are filtering Compute Engine instances, you can + * exclude instances named example-instance by specifying name != + * example-instance. You can also filter nested fields. For example, you + * could specify scheduling.automaticRestart = false to include instances + * only if they are not scheduled for automatic restarts. You can use + * filtering on nested fields to filter based on resource labels. To filter + * on multiple expressions, provide each separate expression within + * parentheses. For example, (scheduling.automaticRestart = true) + * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND + * expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the + * number of available results is larger than maxResults, Compute Engine + * returns a nextPageToken that can be used to get the next page of results + * in subsequent list requests. Acceptable values are 0 to 500, inclusive. + * (Default: 500) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned + * in alphanumerical order based on the resource name. You can also sort + * results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result + * first). Use this to sort resources like operations so that the newest + * operation is returned first. Currently, only sorting by name or + * creationTimestamp desc is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set pageToken to the nextPageToken + * returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Parent ID for this request. + */ + parentId?: string; + } + export interface Params$Resource$Organizationsecuritypolicies$Patchrule + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The priority of the rule to patch. + */ + priority?: number; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the security policy to update. + */ + securityPolicy?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SecurityPolicyRule; + } + export interface Params$Resource$Organizationsecuritypolicies$Removeassociation + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name for the attachment that will be removed. + */ + name?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the security policy to update. + */ + securityPolicy?: string; + } + export interface Params$Resource$Organizationsecuritypolicies$Removerule + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The priority of the rule to remove from the security policy. + */ + priority?: number; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the security policy to update. + */ + securityPolicy?: string; + } + + export class Resource$Projects { constructor() {} @@ -50857,6 +53331,77 @@ export namespace compute_alpha { } + /** + * compute.regionDisks.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.regionDisks.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Regiondisks$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Regiondisks$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Regiondisks$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Regiondisks$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisks$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/disks/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.regionDisks.insert * @desc Creates a persistent regional disk in the specified project using @@ -51148,6 +53693,78 @@ export namespace compute_alpha { } + /** + * compute.regionDisks.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.regionDisks.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().RegionSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Regiondisks$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Regiondisks$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Regiondisks$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Regiondisks$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisks$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/disks/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.regionDisks.setLabels * @desc Sets the labels on the target regional disk. @@ -51158,7 +53775,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -51427,6 +54044,26 @@ export namespace compute_alpha { */ region?: string; } + export interface Params$Resource$Regiondisks$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Regiondisks$Insert extends StandardParameters { /** @@ -51599,6 +54236,31 @@ export namespace compute_alpha { */ requestBody?: Schema$RegionDisksResizeRequest; } + export interface Params$Resource$Regiondisks$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetPolicyRequest; + } export interface Params$Resource$Regiondisks$Setlabels extends StandardParameters { /** @@ -51628,7 +54290,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -52825,6 +55487,86 @@ export namespace compute_alpha { } + /** + * compute.regionInstanceGroupManagers.createInstances + * @desc Creates instances with per-instance configs in this regional + * managed instance group. Instances are created using the current instance + * template. The create instances operation is marked DONE if the + * createInstances request is successful. The underlying actions take + * additional time. You must separately verify the status of the creating or + * actions with the listmanagedinstances method. + * @alias compute.regionInstanceGroupManagers.createInstances + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instanceGroupManager The name of the managed instance group. It should conform to RFC1035. + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region where the managed instance group is located. It should conform to RFC1035. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {().RegionInstanceGroupManagersCreateInstancesRequest} 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 + */ + createInstances( + params?: Params$Resource$Regioninstancegroupmanagers$Createinstances, + options?: MethodOptions): AxiosPromise; + createInstances( + params: Params$Resource$Regioninstancegroupmanagers$Createinstances, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + createInstances( + params: Params$Resource$Regioninstancegroupmanagers$Createinstances, + callback: BodyResponseCallback): void; + createInstances(callback: BodyResponseCallback): void; + createInstances( + paramsOrCallback?: + Params$Resource$Regioninstancegroupmanagers$Createinstances| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Regioninstancegroupmanagers$Createinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Regioninstancegroupmanagers$Createinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'region'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.regionInstanceGroupManagers.delete * @desc Deletes the specified managed instance group and all of the @@ -53728,7 +56470,8 @@ export namespace compute_alpha { /** * compute.regionInstanceGroupManagers.setAutoHealingPolicies * @desc Modifies the autohealing policy for the instances in this managed - * instance group. + * instance group. [Deprecated] This method is deprecated. Please use Patch + * instead. * @alias compute.regionInstanceGroupManagers.setAutoHealingPolicies * @memberOf! () * @@ -54255,6 +56998,44 @@ export namespace compute_alpha { */ requestBody?: Schema$RegionInstanceGroupManagersApplyUpdatesRequest; } + export interface Params$Resource$Regioninstancegroupmanagers$Createinstances + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the managed instance group. It should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region where the managed instance group is located. It + * should conform to RFC1035. + */ + region?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionInstanceGroupManagersCreateInstancesRequest; + } export interface Params$Resource$Regioninstancegroupmanagers$Delete extends StandardParameters { /** @@ -62358,7 +65139,7 @@ export namespace compute_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -62823,7 +65604,7 @@ export namespace compute_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -62865,7 +65646,7 @@ export namespace compute_alpha { * a single snapshot might not necessarily delete all the data on that * snapshot. If any data on the snapshot that is marked for deletion is * needed for subsequent snapshots, the data will be moved to the next - * corresponding snapshot. For more information, see Deleting snaphots. + * corresponding snapshot. For more information, see Deleting snapshots. * @alias compute.snapshots.delete * @memberOf! () * @@ -63218,7 +65999,7 @@ export namespace compute_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -63500,7 +66281,7 @@ export namespace compute_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -65528,10 +68309,9 @@ export namespace compute_alpha { /** * compute.subnetworks.patch * @desc Patches the specified subnetwork with the data included in the - * request. Only the following fields within the subnetwork resource can be - * specified in the request: secondary_ip_range, - * allow_subnet_cidr_routes_overlap and role. It is also mandatory to - * specify the current fingeprint of the subnetwork resource being patched. + * request. Only certain fields can up updated with a patch request as + * indicated in the field descriptions. You must specify the current + * fingeprint of the subnetwork resource being patched. * @alias compute.subnetworks.patch * @memberOf! () * @@ -72165,7 +74945,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -72532,7 +75312,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -73978,7 +76758,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -74343,7 +77123,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -74751,7 +77531,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -75116,7 +77896,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; diff --git a/src/apis/compute/beta.ts b/src/apis/compute/beta.ts index 7393110536a..e3754d2caaa 100644 --- a/src/apis/compute/beta.ts +++ b/src/apis/compute/beta.ts @@ -83,6 +83,7 @@ export namespace compute_beta { export class Compute { acceleratorTypes: Resource$Acceleratortypes; addresses: Resource$Addresses; + allocations: Resource$Allocations; autoscalers: Resource$Autoscalers; backendBuckets: Resource$Backendbuckets; backendServices: Resource$Backendservices; @@ -147,6 +148,7 @@ export namespace compute_beta { this.acceleratorTypes = new Resource$Acceleratortypes(); this.addresses = new Resource$Addresses(); + this.allocations = new Resource$Allocations(); this.autoscalers = new Resource$Autoscalers(); this.backendBuckets = new Resource$Backendbuckets(); this.backendServices = new Resource$Backendservices(); @@ -220,8 +222,10 @@ export namespace compute_beta { acceleratorCount?: number; /** * Full or partial URL of the accelerator type resource to attach to this - * instance. If you are creating an instance template, specify only the - * accelerator name. + * instance. For example: + * projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 + * If you are creating an instance template, specify only the accelerator + * name. See GPUs on Compute Engine for a full list of accelerator types. */ acceleratorType?: string; } @@ -452,7 +456,8 @@ export namespace compute_beta { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an Address. */ labelFingerprint?: string; @@ -479,8 +484,12 @@ export namespace compute_beta { network?: string; /** * This signifies the networking tier used for configuring this Address and - * can only take the following values: PREMIUM , STANDARD. If this field is - * not specified, it is assumed to be PREMIUM. + * can only take the following values: PREMIUM, STANDARD. Global forwarding + * rules can only be Premium Tier. Regional forwarding rules can be either + * Premium or Standard Tier. Standard Tier addresses applied to regional + * forwarding rules can be used with any external load balancer. Regional + * forwarding rules in Premium Tier can only be used with a Network load + * balancer. If this field is not specified, it is assumed to be PREMIUM. */ networkTier?: string; /** @@ -629,6 +638,205 @@ export namespace compute_beta { */ subnetworkRangeName?: string; } + /** + * Allocation resource + */ + export interface Schema$Allocation { + /** + * [Output Only] Creation timestamp in RFC3339 text format. + */ + creationTimestamp?: string; + description?: string; + /** + * [Output Only] The unique identifier for the resource. This identifier is + * defined by the server. + */ + id?: string; + /** + * [Output Only] Type of the resource. Always compute#allocations for + * allocations. + */ + kind?: string; + /** + * The name of the resource, provided by the client when initially creating + * the resource. The resource name must be 1-63 characters long, and comply + * with RFC1035. Specifically, the name must be 1-63 characters long and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the + * first character must be a lowercase letter, and all following characters + * must be a dash, lowercase letter, or digit, except the last character, + * which cannot be a dash. + */ + name?: string; + /** + * [Output Only] Server-defined fully-qualified URL for this resource. + */ + selfLink?: string; + specificAllocation?: Schema$AllocationSpecificSKUAllocation; + /** + * Indicates whether the allocation can be consumed by VMs with "any + * allocation" defined. If the field is set, then only VMs that target + * the allocation by name using --allocation-affinity can consume this + * allocation. + */ + specificAllocationRequired?: boolean; + zone?: string; + } + /** + * AllocationAffinity is the configuration of desired allocation which this + * instance could take capacity from. + */ + export interface Schema$AllocationAffinity { + consumeAllocationType?: string; + /** + * Corresponds to the label key of allocation resource. + */ + key?: string; + /** + * Corresponds to the label values of allocation resource. + */ + values?: string[]; + } + /** + * Contains a list of allocations. + */ + export interface Schema$AllocationAggregatedList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string; + /** + * A list of Allocation resources. + */ + items?: {[key: string]: Schema$AllocationsScopedList;}; + /** + * Type of resource. + */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for + * list requests. If the number of results is larger than maxResults, use + * the nextPageToken as a value for the query parameter pageToken in the + * next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + nextPageToken?: string; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string; + /** + * [Output Only] Informational warning message. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string;}>; + message?: string; + }; + } + export interface Schema$AllocationList { + /** + * [Output Only] The unique identifier for the resource. This identifier is + * defined by the server. + */ + id?: string; + /** + * [Output Only] A list of Allocation resources. + */ + items?: Schema$Allocation[]; + /** + * [Output Only] Type of resource.Always compute#allocationsList for listsof + * allocations + */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for + * list requests. If the number of results is larger than maxResults, use + * the nextPageToken as a value for the query parameter pageToken in the + * next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + nextPageToken?: string; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string; + /** + * [Output Only] Informational warning message. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string;}>; + message?: string; + }; + } + /** + * This allocation type allows to pre allocate specific instance + * configuration. + */ + export interface Schema$AllocationSpecificSKUAllocation { + /** + * Specifies number of resources that are allocated. + */ + count?: string; + instanceProperties?: + Schema$AllocationSpecificSKUAllocationAllocatedInstanceProperties; + /** + * [OutputOnly] Indicates how many resource are in use. + */ + inUseCount?: string; + } + /** + * Properties of the SKU instances being reserved. + */ + export interface Schema$AllocationSpecificSKUAllocationAllocatedInstanceProperties { + /** + * Specifies accelerator type and count. + */ + guestAccelerators?: Schema$AcceleratorConfig[]; + /** + * Specifies amount of local ssd to reserve with each instance. The type of + * disk is local-ssd. + */ + localSsds?: + Schema$AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk[]; + /** + * Specifies type of machine (name only) which has fixed number of vCPUs and + * fixed amount of memory. This also includes specifying custom machine type + * following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. + */ + machineType?: string; + /** + * Minimum cpu platform the allocation. + */ + minCpuPlatform?: string; + } + export interface Schema$AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk { + /** + * Specifies the size of the disk in base-2 GB. + */ + diskSizeGb?: string; + /** + * Specifies the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. For performance characteristics + * of SCSI over NVMe, see Local SSD performance. + */ + interface?: string; + } + export interface Schema$AllocationsScopedList { + /** + * A list of allocations contained in this scope. + */ + allocations?: Schema$Allocation[]; + /** + * Informational warning which replaces the list of allocations when the + * list is empty. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string;}>; + message?: string; + }; + } /** * An instance-attached disk resource. */ @@ -649,8 +857,8 @@ export namespace compute_beta { * the instance. This name can be used to reference the device for mounting, * resizing, and so on, from within the instance. If not specified, the * server chooses a default device name to apply to this disk, in the form - * persistent-disks-x, where x is a number assigned by Google Compute - * Engine. This field is only applicable for persistent disks. + * persistent-disk-x, where x is a number assigned by Google Compute Engine. + * This field is only applicable for persistent disks. */ deviceName?: string; /** @@ -1155,7 +1363,6 @@ export namespace compute_beta { /** * Defines how target utilization value is expressed for a Stackdriver * Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. - * If not specified, the default is GAUGE. */ utilizationTargetType?: string; } @@ -1164,7 +1371,7 @@ export namespace compute_beta { */ export interface Schema$AutoscalingPolicyLoadBalancingUtilization { /** - * Fraction of backend capacity utilization (set in HTTP(s) load balancing + * Fraction of backend capacity utilization (set in HTTP(S) load balancing * configuration) that autoscaler should maintain. Must be a positive float * value. If not defined, the default is 0.8. */ @@ -1324,9 +1531,9 @@ export namespace compute_beta { * considered fresh. After this time period, the response will be * revalidated before being served. Defaults to 1hr (3600s). When serving * responses to signed URL requests, Cloud CDN will internally behave as - * though all responses from this backend had a ?Cache-Control: public, - * max-age=[TTL]? header, regardless of any existing Cache-Control header. - * The actual headers served in responses will not be altered. + * though all responses from this backend had a "Cache-Control: public, + * max-age=[TTL]" header, regardless of any existing Cache-Control + * header. The actual headers served in responses will not be altered. */ signedUrlCacheMaxAgeSec?: string; /** @@ -1416,8 +1623,9 @@ export namespace compute_beta { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a BackendService. An up-to-date fingerprint must - * be provided in order to update the BackendService. To see the latest - * fingerprint, make a get() request to retrieve a BackendService. + * be provided in order to update the BackendService, otherwise the request + * will fail with error 412 conditionNotMet. To see the latest fingerprint, + * make a get() request to retrieve a BackendService. */ fingerprint?: string; /** @@ -1557,9 +1765,9 @@ export namespace compute_beta { * considered fresh. After this time period, the response will be * revalidated before being served. Defaults to 1hr (3600s). When serving * responses to signed URL requests, Cloud CDN will internally behave as - * though all responses from this backend had a ?Cache-Control: public, - * max-age=[TTL]? header, regardless of any existing Cache-Control header. - * The actual headers served in responses will not be altered. + * though all responses from this backend had a "Cache-Control: public, + * max-age=[TTL]" header, regardless of any existing Cache-Control + * header. The actual headers served in responses will not be altered. */ signedUrlCacheMaxAgeSec?: string; /** @@ -1735,6 +1943,10 @@ export namespace compute_beta { * resource_for beta.commitments ==) (== resource_for v1.commitments ==) */ export interface Schema$Commitment { + /** + * List of allocations for this commitment. + */ + allocations?: Schema$Allocation[]; /** * [Output Only] Creation timestamp in RFC3339 text format. */ @@ -2056,7 +2268,8 @@ export namespace compute_beta { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a disk. */ labelFingerprint?: string; @@ -2096,6 +2309,14 @@ export namespace compute_beta { * Internal use only. */ options?: string; + /** + * Physical block size of the persistent disk, in bytes. If not present in a + * request, a default value is used. Currently supported sizes are 4096 and + * 16384, other sizes may be added in the future. If an unsupported value is + * requested, the error message will list the supported values for the + * caller's project. + */ + physicalBlockSizeBytes?: string; /** * [Output Only] URL of the region where the disk resides. Only applicable * for regional resources. You must specify this field as part of the HTTP @@ -2501,6 +2722,15 @@ export namespace compute_beta { message?: string; }; } + /** + * A set of Display Device options + */ + export interface Schema$DisplayDevice { + /** + * Defines whether the instance has Display enabled. + */ + enableDisplay?: boolean; + } export interface Schema$DistributionPolicy { /** * Zones where the regional managed instance group will create and manage @@ -2515,6 +2745,63 @@ export namespace compute_beta { */ zone?: string; } + export interface Schema$ExchangedPeeringRoute { + /** + * The destination range of the route. + */ + destRange?: string; + /** + * If the peering route is imported if there is no confliction. + */ + imported?: boolean; + /** + * The region of peering route next hop, only applies to dynamic routes. + */ + nextHopRegion?: string; + /** + * The priority of the peering route. + */ + priority?: number; + /** + * The type of the peering route. + */ + type?: string; + } + export interface Schema$ExchangedPeeringRoutesList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string; + /** + * A list of ExchangedPeeringRoute resources. + */ + items?: Schema$ExchangedPeeringRoute[]; + /** + * [Output Only] Type of resource. Always compute#exchangedPeeringRoutesList + * for exchanged peering routes lists. + */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for + * list requests. If the number of results is larger than maxResults, use + * the nextPageToken as a value for the query parameter pageToken in the + * next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + nextPageToken?: string; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string; + /** + * [Output Only] Informational warning message. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string;}>; + message?: string; + }; + } /** * Represents an expression text. Example: title: "User account * presence" description: "Determines whether the request has a user @@ -2588,8 +2875,9 @@ export namespace compute_beta { */ disabled?: boolean; /** - * This field denotes whether to enable logging for a particular firewall - * rule. If logging is enabled, logs will be exported to Stackdriver. + * Deprecated in favor of enable in LogConfig. This field denotes whether to + * enable logging for a particular firewall rule. If logging is enabled, + * logs will be exported to Stackdriver. */ enableLogging?: boolean; /** @@ -2602,6 +2890,11 @@ export namespace compute_beta { * rules. */ kind?: string; + /** + * This field denotes the logging options for a particular firewall rule. If + * logging is enabled, logs will be exported to Stackdriver. + */ + logConfig?: Schema$FirewallLogConfig; /** * Name of the resource; provided by the client when the resource is * created. The name must be 1-63 characters long, and comply with RFC1035. @@ -2731,6 +3024,16 @@ export namespace compute_beta { message?: string; }; } + /** + * The available logging options for a firewall rule. + */ + export interface Schema$FirewallLogConfig { + /** + * This field denotes whether to enable logging for a particular firewall + * rule. + */ + enable?: boolean; + } /** * Encapsulates numeric value that can be either absolute or relative. */ @@ -2844,7 +3147,8 @@ export namespace compute_beta { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a * ForwardingRule. */ @@ -2907,10 +3211,11 @@ export namespace compute_beta { portRange?: string; /** * This field is used along with the backend_service field for internal load - * balancing. When the load balancing scheme is INTERNAL, a single port or - * a comma separated list of ports can be configured. Only packets addressed - * to these ports will be forwarded to the backends configured with this - * forwarding rule. You may specify a maximum of up to 5 ports. + * balancing. When the load balancing scheme is INTERNAL, a list of ports + * can be configured, for example, ['80'], + * ['8000','9000'] etc. Only packets addressed to these + * ports will be forwarded to the backends configured with this forwarding + * rule. You may specify a maximum of up to 5 ports. */ ports?: string[]; /** @@ -3054,7 +3359,8 @@ export namespace compute_beta { * detect conflicts. The fingerprint is initially generated by Compute * Engine and changes after every request to modify or update labels. You * must always provide an up-to-date fingerprint hash when updating or - * changing labels. Make a get() request to the resource to get the latest + * changing labels, otherwise the request will fail with error 412 + * conditionNotMet. Make a get() request to the resource to get the latest * fingerprint. */ labelFingerprint?: string; @@ -3072,7 +3378,7 @@ export namespace compute_beta { } export interface Schema$GlobalSetPolicyRequest { /** - * Flatten Policy to create a backwacd compatible wire-format. Deprecated. + * Flatten Policy to create a backward compatible wire-format. Deprecated. * Use 'policy' to specify bindings. */ bindings?: Schema$Binding[]; @@ -3536,6 +3842,51 @@ export namespace compute_beta { message?: string; }; } + export interface Schema$HTTPSHealthCheck { + /** + * The value of the host header in the HTTPS health check request. If left + * empty (default value), the IP on behalf of which this health check is + * performed will be used. + */ + host?: string; + /** + * The TCP port number for the health check request. The default value is + * 443. Valid values are 1 through 65535. + */ + port?: number; + /** + * Port name as defined in InstanceGroup#NamedPort#name. If both port and + * port_name are defined, port takes precedence. + */ + portName?: string; + /** + * Specifies how port is selected for health checking, can be one of + * following values: USE_FIXED_PORT: The port number in port is used for + * health checking. USE_NAMED_PORT: The portName is used for health + * checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified + * for each network endpoint is used for health checking. For other + * backends, the port or named port specified in the Backend Service is used + * for health checking. If not specified, HTTPS health check follows + * behavior specified in port and portName fields. + */ + portSpecification?: string; + /** + * Specifies the type of proxy header to append before sending data to the + * backend, either NONE or PROXY_V1. The default is NONE. + */ + proxyHeader?: string; + /** + * The request path of the HTTPS health check request. The default value is + * /. + */ + requestPath?: string; + /** + * The string to match anywhere in the first 1024 bytes of the response + * body. If left empty (the default value), the status code determines + * health. The response data can only be ASCII. + */ + response?: string; + } /** * An HttpsHealthCheck resource. This resource defines a template for how * individual instances should be checked for health, via HTTPS. @@ -3611,51 +3962,6 @@ export namespace compute_beta { */ unhealthyThreshold?: number; } - export interface Schema$HTTPSHealthCheck { - /** - * The value of the host header in the HTTPS health check request. If left - * empty (default value), the IP on behalf of which this health check is - * performed will be used. - */ - host?: string; - /** - * The TCP port number for the health check request. The default value is - * 443. Valid values are 1 through 65535. - */ - port?: number; - /** - * Port name as defined in InstanceGroup#NamedPort#name. If both port and - * port_name are defined, port takes precedence. - */ - portName?: string; - /** - * Specifies how port is selected for health checking, can be one of - * following values: USE_FIXED_PORT: The port number in port is used for - * health checking. USE_NAMED_PORT: The portName is used for health - * checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified - * for each network endpoint is used for health checking. For other - * backends, the port or named port specified in the Backend Service is used - * for health checking. If not specified, HTTPS health check follows - * behavior specified in port and portName fields. - */ - portSpecification?: string; - /** - * Specifies the type of proxy header to append before sending data to the - * backend, either NONE or PROXY_V1. The default is NONE. - */ - proxyHeader?: string; - /** - * The request path of the HTTPS health check request. The default value is - * /. - */ - requestPath?: string; - /** - * The string to match anywhere in the first 1024 bytes of the response - * body. If left empty (the default value), the status code determines - * health. The response data can only be ASCII. - */ - response?: string; - } /** * Contains a list of HttpsHealthCheck resources. */ @@ -3757,7 +4063,8 @@ export namespace compute_beta { * essentially a hash of the labels used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an image. */ labelFingerprint?: string; @@ -3904,6 +4211,11 @@ export namespace compute_beta { * v1.instances ==) */ export interface Schema$Instance { + /** + * The configuration of desired allocations which this Instance could + * consume capacity from. + */ + allocationAffinity?: Schema$AllocationAffinity; /** * Allows this instance to send and receive packets with non-matching * destination or source IPs. This is required if you plan to use this @@ -3933,6 +4245,10 @@ export namespace compute_beta { * created before you can assign them. */ disks?: Schema$AttachedDisk[]; + /** + * Enables display device for the instance. + */ + displayDevice?: Schema$DisplayDevice; /** * A list of the type and count of accelerator cards attached to the * instance. @@ -4287,8 +4603,9 @@ export namespace compute_beta { * Fingerprint of this resource. This field may be used in optimistic * locking. It will be ignored when inserting an InstanceGroupManager. An * up-to-date fingerprint must be provided in order to update the - * InstanceGroupManager. To see the latest fingerprint, make a get() - * request to retrieve an InstanceGroupManager. + * InstanceGroupManager, otherwise the request will fail with error 412 + * conditionNotMet. To see the latest fingerprint, make a get() request to + * retrieve an InstanceGroupManager. */ fingerprint?: string; /** @@ -4810,7 +5127,8 @@ export namespace compute_beta { * change the named ports settings concurrently. Obtain the fingerprint with * the instanceGroups.get method. Then, include the fingerprint in your * request to ensure that you do not overwrite changes that were applied - * from another concurrent request. + * from another concurrent request. A request with an incorrect fingerprint + * will fail with error 412 conditionNotMet. */ fingerprint?: string; /** @@ -4912,6 +5230,11 @@ export namespace compute_beta { targetInstance?: string; } export interface Schema$InstanceProperties { + /** + * The configuration of desired allocations which this Instance could + * consume capacity from. + */ + allocationAffinity?: Schema$AllocationAffinity; /** * Enables instances created based on this template to send packets with * source IP addresses other than their own and receive packets with @@ -5257,7 +5580,8 @@ export namespace compute_beta { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an Interconnect. */ labelFingerprint?: string; @@ -5269,8 +5593,7 @@ export namespace compute_beta { labels?: {[key: string]: string;}; /** * Type of link requested. This field indicates speed of each of the links - * in the bundle, not the entire bundle. Only 10G per link is allowed for a - * dedicated interconnect. Options: Ethernet_10G_LR + * in the bundle, not the entire bundle. */ linkType?: string; /** @@ -5340,8 +5663,7 @@ export namespace compute_beta { /** * Provisioned bandwidth capacity for the interconnectAttachment. Can be set * by the partner to update the customer's provisioned bandwidth. Output - * only for for PARTNER type, mutable for PARTNER_PROVIDER, not available - * for DEDICATED. + * only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED. */ bandwidth?: string; /** @@ -5408,8 +5730,9 @@ export namespace compute_beta { * used for optimistic locking. The fingerprint is initially generated by * Compute Engine and changes after every request to modify or update * labels. You must always provide an up-to-date fingerprint hash in order - * to update or change labels. To see the latest fingerprint, make a get() - * request to retrieve an InterconnectAttachment. + * to update or change labels, otherwise the request will fail with error + * 412 conditionNotMet. To see the latest fingerprint, make a get() request + * to retrieve an InterconnectAttachment. */ labelFingerprint?: string; /** @@ -5466,7 +5789,7 @@ export namespace compute_beta { */ region?: string; /** - * URL of the cloud router to be used for dynamic routing. This router must + * URL of the Cloud Router to be used for dynamic routing. This router must * be in the same region as this InterconnectAttachment. The * InterconnectAttachment will automatically connect the Interconnect to the * network & region within which the Cloud Router is configured. @@ -5482,9 +5805,8 @@ export namespace compute_beta { state?: string; type?: string; /** - * Available only for DEDICATED and PARTNER_PROVIDER. Desired VLAN tag for - * this attachment, in the range 2-4094. This field refers to 802.1q VLAN - * tag, also known as IEEE 802.1Q Only specified at creation time. + * The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. Only + * specified at creation time. */ vlanTag8021q?: number; } @@ -5571,8 +5893,8 @@ export namespace compute_beta { export interface Schema$InterconnectAttachmentPartnerMetadata { /** * Plain text name of the Interconnect this attachment is connected to, as - * displayed in the Partner?s portal. For instance ?Chicago 1?. This value - * may be validated to match approved Partner values. + * displayed in the Partner?s portal. For instance "Chicago 1". + * This value may be validated to match approved Partner values. */ interconnectName?: string; /** @@ -5681,7 +6003,10 @@ export namespace compute_beta { export interface Schema$InterconnectDiagnosticsLinkOpticalPower { state?: string; /** - * Value of the current optical power, read in dBm. + * Value of the current optical power, read in dBm. Take a known good + * optical value, give it a 10% margin and trigger warnings relative to that + * value. In general, a -7dBm warning and a -11dBm alarm are good optical + * value estimates for most links. */ value?: number; } @@ -5816,6 +6141,12 @@ export namespace compute_beta { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] The status of this InterconnectLocation. If the status is + * AVAILABLE, new Interconnects may be provisioned in this + * InterconnectLocation. Otherwise, no new Interconnects may be provisioned. + */ + status?: string; } /** * Response to the list request, and contains a list of interconnect @@ -6373,9 +6704,9 @@ export namespace compute_beta { * the metadata's contents and used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update metadata. You must always provide an - * up-to-date fingerprint hash in order to update or change metadata. To - * see the latest fingerprint, make a get() request to retrieve the - * resource. + * up-to-date fingerprint hash in order to update or change metadata, + * otherwise the request will fail with error 412 conditionNotMet. To see + * the latest fingerprint, make a get() request to retrieve the resource. */ fingerprint?: string; /** @@ -6767,7 +7098,8 @@ export namespace compute_beta { * Fingerprint hash of contents stored in this network interface. This field * will be ignored when inserting an Instance or adding a NetworkInterface. * An up-to-date fingerprint must be provided in order to update the - * NetworkInterface. + * NetworkInterface, otherwise the request will fail with error 412 + * conditionNotMet. */ fingerprint?: string; /** @@ -6855,14 +7187,30 @@ export namespace compute_beta { * Google Compute Engine should automatically create routes for the peering. */ export interface Schema$NetworkPeering { + /** + * Indicates whether full mesh connectivity is created and managed + * automatically. When it is set to true, Google Compute Engine will + * automatically create and manage the routes between two networks when the + * state is ACTIVE. Otherwise, user needs to create routes manually to route + * packets to peer network. + */ + autoCreateRoutes?: boolean; /** * Whether full mesh connectivity is created and managed automatically. When * it is set to true, Google Compute Engine will automatically create and - * manage the routes between two networks when the state is ACTIVE. + * manage the routes between two networks when the peering state is ACTIVE. * Otherwise, user needs to create routes manually to route packets to peer * network. */ - autoCreateRoutes?: boolean; + exchangeSubnetRoutes?: boolean; + /** + * Whether to export the custom routes to peer network. + */ + exportCustomRoutes?: boolean; + /** + * Whether to import the custom routes from peer network. + */ + importCustomRoutes?: boolean; /** * Name of this peering. Provided by the client when the peering is created. * The name must comply with RFC1035. Specifically, the name must be 1-63 @@ -6912,6 +7260,14 @@ export namespace compute_beta { * Name of the peering, which should conform to RFC1035. */ name?: string; + /** + * Network peering parameters. In order to specify route policies for + * peering using import/export custom routes, you will have to fill all + * peering related parameters (name, peer network, exchange_subnet_routes) + * in network_peeringfield. Corresponding fields in + * NetworksAddPeeringRequest will be deprecated soon. + */ + networkPeering?: Schema$NetworkPeering; /** * URL of the peer network. It can be either full URL or partial URL. The * peer network may belong to a different project. If the partial URL does @@ -6926,6 +7282,9 @@ export namespace compute_beta { */ name?: string; } + export interface Schema$NetworksUpdatePeeringRequest { + networkPeering?: Schema$NetworkPeering; + } /** * A NodeGroup resource. */ @@ -7919,6 +8278,11 @@ export namespace compute_beta { * [Output Only] Name of the quota metric. */ metric?: string; + /** + * [Output Only] Owning resource. This is the resource on which this quota + * is applied. + */ + owner?: string; /** * [Output Only] Current usage of this metric. */ @@ -8527,6 +8891,11 @@ export namespace compute_beta { * the setLabels method. Label values may be empty. */ labels?: {[key: string]: string;}; + /** + * GCS bucket storage location of the auto snapshot (regional or + * multi-regional). + */ + storageLocations?: string[]; } /** * Time window specified for daily operations. @@ -8543,7 +8912,7 @@ export namespace compute_beta { duration?: string; /** * Time within the window to start the operations. It must be in format - * "HH:MM?, where HH : [00-23] and MM : [00-00] GMT. + * "HH:MM", where HH : [00-23] and MM : [00-00] GMT. */ startTime?: string; } @@ -8562,7 +8931,7 @@ export namespace compute_beta { hoursInCycle?: number; /** * Time within the window to start the operations. It must be in format - * "HH:MM?, where HH : [00-23] and MM : [00-00] GMT. + * "HH:MM", where HH : [00-23] and MM : [00-00] GMT. */ startTime?: string; } @@ -8624,7 +8993,7 @@ export namespace compute_beta { duration?: string; /** * Time within the window to start the operations. It must be in format - * "HH:MM?, where HH : [00-23] and MM : [00-00] GMT. + * "HH:MM", where HH : [00-23] and MM : [00-00] GMT. */ startTime?: string; } @@ -8970,11 +9339,13 @@ export namespace compute_beta { */ ipAddress?: string; /** - * [Output Only] Type of how the resource/configuration of the BGP peer is - * managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT - * represents an BGP peer that is automatically created for PARTNER - * interconnectAttachment, Google will automatically create/delete this type - * of BGP peer when the PARTNER interconnectAttachment is created/deleted. + * [Output Only] The resource that configures and manages this BGP peer. + * MANAGED_BY_USER is the default value and can be managed by you or other + * users; MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed + * by Cloud Interconnect, specifically by an InterconnectAttachment of type + * PARTNER. Google will automatically create, update, and delete this type + * of BGP peer when the PARTNER InterconnectAttachment is created, updated, + * or deleted. */ managementType?: string; /** @@ -9014,12 +9385,13 @@ export namespace compute_beta { */ linkedVpnTunnel?: string; /** - * [Output Only] Type of how the resource/configuration of the interface is - * managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT - * represents an interface that is automatically created for PARTNER type - * interconnectAttachment, Google will automatically create/update/delete - * this type of interface when the PARTNER interconnectAttachment is - * created/provisioned/deleted. + * [Output Only] The resource that configures and manages this interface. + * MANAGED_BY_USER is the default value and can be managed by you or other + * users; MANAGED_BY_ATTACHMENT is an interface that is configured and + * managed by Cloud Interconnect, specifically by an InterconnectAttachment + * of type PARTNER. Google will automatically create, update, and delete + * this type of interface when the PARTNER InterconnectAttachment is + * created, updated, or deleted. */ managementType?: string; /** @@ -9387,8 +9759,9 @@ export namespace compute_beta { * the metadata's contents and used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update metadata. You must always provide an - * up-to-date fingerprint hash in order to update or change metadata. To - * see the latest fingerprint, make get() request to the security policy. + * up-to-date fingerprint hash in order to update or change metadata, + * otherwise the request will fail with error 412 conditionNotMet. To see + * the latest fingerprint, make get() request to the security policy. */ fingerprint?: string; /** @@ -9504,8 +9877,9 @@ export namespace compute_beta { preview?: boolean; /** * An integer indicating the priority of a rule in the list. The priority - * must be a positive value between 0 and 2147483647. Rules are evaluated in - * the increasing order of priority. + * must be a positive value between 0 and 2147483647. Rules are evaluated + * from highest to lowest priority where 0 is the highest priority and + * 2147483647 is the lowest prority. */ priority?: number; } @@ -9605,19 +9979,31 @@ export namespace compute_beta { * A shielded VM identity entry. */ export interface Schema$ShieldedVmIdentity { + /** + * An Endorsement Key (EK) issued to the Shielded VM's vTPM. + */ encryptionKey?: Schema$ShieldedVmIdentityEntry; /** * [Output Only] Type of the resource. Always compute#shieldedVmIdentity for * shielded VM identity entry. */ kind?: string; + /** + * An Attestation Key (AK) issued to the Shielded VM's vTPM. + */ signingKey?: Schema$ShieldedVmIdentityEntry; } /** - * A Shielded VM Identity Entry. + * A Shielded Instance Identity Entry. */ export interface Schema$ShieldedVmIdentityEntry { + /** + * A PEM-encoded X.509 certificate. This field can be empty. + */ ekCert?: string; + /** + * A PEM-encoded public key. + */ ekPub?: string; } /** @@ -9688,7 +10074,8 @@ export namespace compute_beta { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a snapshot. */ labelFingerprint?: string; @@ -10079,8 +10466,9 @@ export namespace compute_beta { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a SslPolicy. An up-to-date fingerprint must be - * provided in order to update the SslPolicy. To see the latest - * fingerprint, make a get() request to retrieve an SslPolicy. + * provided in order to update the SslPolicy, otherwise the request will + * fail with error 412 conditionNotMet. To see the latest fingerprint, make + * a get() request to retrieve an SslPolicy. */ fingerprint?: string; /** @@ -10175,8 +10563,9 @@ export namespace compute_beta { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a Subnetwork. An up-to-date fingerprint must be - * provided in order to update the Subnetwork. To see the latest - * fingerprint, make a get() request to retrieve a Subnetwork. + * provided in order to update the Subnetwork, otherwise the request will + * fail with error 412 conditionNotMet. To see the latest fingerprint, make + * a get() request to retrieve a Subnetwork. */ fingerprint?: string; /** @@ -10234,7 +10623,8 @@ export namespace compute_beta { * An array of configurations for secondary IP ranges for VM instances * contained in this subnetwork. The primary IP of such VM must belong to * the primary ipCidrRange of the subnetwork. The alias IPs may belong to - * either primary or secondary ranges. + * either primary or secondary ranges. This field can be updated with a + * patch request. */ secondaryIpRanges?: Schema$SubnetworkSecondaryRange[]; /** @@ -11213,8 +11603,9 @@ export namespace compute_beta { * locking. The fingerprint is initially generated by Compute Engine and * changes after every request to modify or update labels. You must always * provide an up-to-date fingerprint hash in order to update or change - * labels. To see the latest fingerprint, make a get() request to retrieve - * a TargetVpnGateway. + * labels, otherwise the request will fail with error 412 conditionNotMet. + * To see the latest fingerprint, make a get() request to retrieve a + * TargetVpnGateway. */ labelFingerprint?: string; /** @@ -11436,8 +11827,9 @@ export namespace compute_beta { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a UrlMap. An up-to-date fingerprint must be - * provided in order to update the UrlMap. To see the latest fingerprint, - * make a get() request to retrieve a UrlMap. + * provided in order to update the UrlMap, otherwise the request will fail + * with error 412 conditionNotMet. To see the latest fingerprint, make a + * get() request to retrieve a UrlMap. */ fingerprint?: string; /** @@ -11776,7 +12168,8 @@ export namespace compute_beta { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a VpnTunnel. */ labelFingerprint?: string; @@ -12001,7 +12394,7 @@ export namespace compute_beta { export interface Schema$XpnResourceId { /** * The ID of the service resource. In the case of projects, this field - * matches the project ID (e.g., my-project), not the project number (e.g., + * supports project id (e.g., my-project-123) and project number (e.g. * 12345678). */ id?: string; @@ -13434,7 +13827,7 @@ export namespace compute_beta { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -13860,7 +14253,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -13896,6 +14289,853 @@ export namespace compute_beta { } + export class Resource$Allocations { + constructor() {} + + + /** + * compute.allocations.aggregatedList + * @desc Retrieves an aggregated list of allocations. + * @alias compute.allocations.aggregatedList + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). + * @param {integer=} params.maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string=} params.orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. + * @param {string=} params.pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. + * @param {string} params.project Project ID for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + aggregatedList( + params?: Params$Resource$Allocations$Aggregatedlist, + options?: MethodOptions): AxiosPromise; + aggregatedList( + params: Params$Resource$Allocations$Aggregatedlist, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + aggregatedList( + params: Params$Resource$Allocations$Aggregatedlist, + callback: BodyResponseCallback): void; + aggregatedList( + callback: BodyResponseCallback): void; + aggregatedList( + paramsOrCallback?: Params$Resource$Allocations$Aggregatedlist| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Allocations$Aggregatedlist; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$Aggregatedlist; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/compute/beta/projects/{project}/aggregated/allocations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project'], + pathParams: ['project'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.allocations.delete + * @desc Deletes the specified allocation. + * @alias compute.allocations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.allocation Name of the allocation to delete. + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.zone Name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Allocations$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Allocations$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Allocations$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Allocations$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Allocations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/allocations/{allocation}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['project', 'zone', 'allocation'], + pathParams: ['allocation', 'project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.allocations.get + * @desc Retrieves all information of the specified allocation. + * @alias compute.allocations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.allocation Name of the allocation to retrieve. + * @param {string} params.project Project ID for this request. + * @param {string} params.zone Name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Allocations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Allocations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Allocations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Allocations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Allocations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/allocations/{allocation}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'allocation'], + pathParams: ['allocation', 'project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.allocations.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.allocations.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Allocations$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Allocations$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Allocations$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Allocations$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Allocations$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/allocations/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.allocations.insert + * @desc Creates a new allocation. + * @alias compute.allocations.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.zone Name of the zone for this request. + * @param {().Allocation} 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 + */ + insert( + params?: Params$Resource$Allocations$Insert, + options?: MethodOptions): AxiosPromise; + insert( + params: Params$Resource$Allocations$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Allocations$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Allocations$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Allocations$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/allocations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.allocations.list + * @desc A list all the allocations that have been configured for the + * specified project in specified zone. + * @alias compute.allocations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). + * @param {integer=} params.maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string=} params.orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. + * @param {string=} params.pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. + * @param {string} params.project Project ID for this request. + * @param {string} params.zone Name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Allocations$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Allocations$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Allocations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Allocations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Allocations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/allocations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.allocations.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.allocations.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().ZoneSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Allocations$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Allocations$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Allocations$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Allocations$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Allocations$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/allocations/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.allocations.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.allocations.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Allocations$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Allocations$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Allocations$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Allocations$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Allocations$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Allocations$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/allocations/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Allocations$Aggregatedlist extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A filter expression that filters resources listed in the response. The + * expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be either =, !=, >, or + * <. For example, if you are filtering Compute Engine instances, you can + * exclude instances named example-instance by specifying name != + * example-instance. You can also filter nested fields. For example, you + * could specify scheduling.automaticRestart = false to include instances + * only if they are not scheduled for automatic restarts. You can use + * filtering on nested fields to filter based on resource labels. To filter + * on multiple expressions, provide each separate expression within + * parentheses. For example, (scheduling.automaticRestart = true) + * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND + * expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the + * number of available results is larger than maxResults, Compute Engine + * returns a nextPageToken that can be used to get the next page of results + * in subsequent list requests. Acceptable values are 0 to 500, inclusive. + * (Default: 500) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned + * in alphanumerical order based on the resource name. You can also sort + * results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result + * first). Use this to sort resources like operations so that the newest + * operation is returned first. Currently, only sorting by name or + * creationTimestamp desc is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set pageToken to the nextPageToken + * returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Allocations$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the allocation to delete. + */ + allocation?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Allocations$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the allocation to retrieve. + */ + allocation?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Allocations$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Allocations$Insert extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * Name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Allocation; + } + export interface Params$Resource$Allocations$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A filter expression that filters resources listed in the response. The + * expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be either =, !=, >, or + * <. For example, if you are filtering Compute Engine instances, you can + * exclude instances named example-instance by specifying name != + * example-instance. You can also filter nested fields. For example, you + * could specify scheduling.automaticRestart = false to include instances + * only if they are not scheduled for automatic restarts. You can use + * filtering on nested fields to filter based on resource labels. To filter + * on multiple expressions, provide each separate expression within + * parentheses. For example, (scheduling.automaticRestart = true) + * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND + * expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the + * number of available results is larger than maxResults, Compute Engine + * returns a nextPageToken that can be used to get the next page of results + * in subsequent list requests. Acceptable values are 0 to 500, inclusive. + * (Default: 500) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned + * in alphanumerical order based on the resource name. You can also sort + * results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result + * first). Use this to sort resources like operations so that the newest + * operation is returned first. Currently, only sorting by name or + * creationTimestamp desc is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set pageToken to the nextPageToken + * returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Allocations$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ZoneSetPolicyRequest; + } + export interface Params$Resource$Allocations$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + + export class Resource$Autoscalers { constructor() {} @@ -16918,7 +18158,7 @@ export namespace compute_beta { /** * compute.backendServices.get * @desc Returns the specified BackendService resource. Gets a list of - * available backend services by making a list() request. + * available backend services. * @example * * // BEFORE RUNNING: * // --------------- @@ -19698,7 +20938,7 @@ export namespace compute_beta { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {string} params.zone The name of the zone for this request. * @param {().ZoneSetLabelsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -20323,7 +21563,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; /** @@ -22797,7 +24037,7 @@ export namespace compute_beta { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -23363,7 +24603,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -24025,7 +25265,7 @@ export namespace compute_beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -24361,7 +25601,7 @@ export namespace compute_beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -24983,7 +26223,7 @@ export namespace compute_beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -25452,7 +26692,7 @@ export namespace compute_beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -30609,7 +31849,7 @@ export namespace compute_beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -31031,7 +32271,7 @@ export namespace compute_beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -32824,7 +34064,8 @@ export namespace compute_beta { /** * compute.instanceGroupManagers.setAutoHealingPolicies - * @desc Modifies the autohealing policies. + * @desc Modifies the autohealing policies. [Deprecated] This method is + * deprecated. Please use Patch instead. * @example * * // BEFORE RUNNING: * // --------------- @@ -36767,8 +38008,8 @@ export namespace compute_beta { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.deviceName Disk device name to detach. - * @param {string} params.instance Instance name. + * @param {string} params.deviceName The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. + * @param {string} params.instance Instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -38001,7 +39242,7 @@ export namespace compute_beta { * @param {boolean=} params.deletionProtection Whether the resource should be protected against deletion. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {string} params.zone The name of the zone for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -38138,8 +39379,8 @@ export namespace compute_beta { * * @param {object} params Parameters for request * @param {boolean} params.autoDelete Whether to auto-delete the disk when the instance is deleted. - * @param {string} params.deviceName The device name of the disk to modify. - * @param {string} params.instance The instance name. + * @param {string} params.deviceName The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. + * @param {string} params.instance The instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -39031,7 +40272,7 @@ export namespace compute_beta { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.instance Instance name. + * @param {string} params.instance Instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -40278,6 +41519,81 @@ export namespace compute_beta { } + /** + * compute.instances.updateDisplayDevice + * @desc Updates the Display config for a VM instance. You can only use this + * method on a stopped VM instance. This method supports PATCH semantics and + * uses the JSON merge patch format and processing rules. + * @alias compute.instances.updateDisplayDevice + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instance Name of the instance scoping this request. + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.zone The name of the zone for this request. + * @param {().DisplayDevice} 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 + */ + updateDisplayDevice( + params?: Params$Resource$Instances$Updatedisplaydevice, + options?: MethodOptions): AxiosPromise; + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + callback: BodyResponseCallback): void; + updateDisplayDevice(callback: BodyResponseCallback): void; + updateDisplayDevice( + paramsOrCallback?: Params$Resource$Instances$Updatedisplaydevice| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instances$Updatedisplaydevice; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Updatedisplaydevice; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.updateNetworkInterface * @desc Updates an instance's network interface. This method follows PATCH @@ -40717,11 +42033,12 @@ export namespace compute_beta { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Disk device name to detach. + * The device name of the disk to detach. Make a get() request on the + * instance to view currently attached disks and device names. */ deviceName?: string; /** - * Instance name. + * Instance name for this request. */ instance?: string; /** @@ -41127,7 +42444,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; /** @@ -41147,11 +42464,12 @@ export namespace compute_beta { */ autoDelete?: boolean; /** - * The device name of the disk to modify. + * The device name of the disk to modify. Make a get() request on the + * instance to view currently attached disks and device names. */ deviceName?: string; /** - * The instance name. + * The instance name for this request. */ instance?: string; /** @@ -41399,7 +42717,7 @@ export namespace compute_beta { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Instance name. + * Instance name for this request. */ instance?: string; /** @@ -41541,9 +42859,236 @@ export namespace compute_beta { /** * Request body metadata */ - requestBody?: Schema$Tags; + requestBody?: Schema$Tags; + } + export interface Params$Resource$Instances$Simulatemaintenanceevent extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Start extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance resource to start. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Startwithencryptionkey extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance resource to start. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesStartWithEncryptionKeyRequest; + } + export interface Params$Resource$Instances$Stop extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance resource to stop. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Suspend extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If true, discard the contents of any attached localSSD partitions. + * Default value is false (== preserve localSSD data). + */ + discardLocalSsd?: boolean; + /** + * Name of the instance resource to suspend. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + export interface Params$Resource$Instances$Updateaccessconfig extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The instance name for this request. + */ + instance?: string; + /** + * The name of the network interface where the access config is attached. + */ + networkInterface?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccessConfig; } - export interface Params$Resource$Instances$Simulatemaintenanceevent extends + export interface Params$Resource$Instances$Updatedisplaydevice extends StandardParameters { /** * Auth client or API Key for the request @@ -41558,58 +43103,6 @@ export namespace compute_beta { * Project ID for this request. */ project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Start extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Name of the instance resource to start. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. For example, consider a - * situation where you make an initial request and the request times out. If - * you make the request again with the same request ID, the server can check - * if original operation with the same request ID was received, and if so, - * will ignore the second request. This prevents clients from accidentally - * creating duplicate commitments. The request ID must be a valid UUID with - * the exception that zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Startwithencryptionkey extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Name of the instance resource to start. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; /** * An optional request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -41631,144 +43124,7 @@ export namespace compute_beta { /** * Request body metadata */ - requestBody?: Schema$InstancesStartWithEncryptionKeyRequest; - } - export interface Params$Resource$Instances$Stop extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Name of the instance resource to stop. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. For example, consider a - * situation where you make an initial request and the request times out. If - * you make the request again with the same request ID, the server can check - * if original operation with the same request ID was received, and if so, - * will ignore the second request. This prevents clients from accidentally - * creating duplicate commitments. The request ID must be a valid UUID with - * the exception that zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Suspend extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * If true, discard the contents of any attached localSSD partitions. - * Default value is false (== preserve localSSD data). - */ - discardLocalSsd?: boolean; - /** - * Name of the instance resource to suspend. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. For example, consider a - * situation where you make an initial request and the request times out. If - * you make the request again with the same request ID, the server can check - * if original operation with the same request ID was received, and if so, - * will ignore the second request. This prevents clients from accidentally - * creating duplicate commitments. The request ID must be a valid UUID with - * the exception that zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Testiampermissions extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - export interface Params$Resource$Instances$Updateaccessconfig extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The instance name for this request. - */ - instance?: string; - /** - * The name of the network interface where the access config is attached. - */ - networkInterface?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. For example, consider a - * situation where you make an initial request and the request times out. If - * you make the request again with the same request ID, the server can check - * if original operation with the same request ID was received, and if so, - * will ignore the second request. This prevents clients from accidentally - * creating duplicate commitments. The request ID must be a valid UUID with - * the exception that zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$AccessConfig; + requestBody?: Schema$DisplayDevice; } export interface Params$Resource$Instances$Updatenetworkinterface extends StandardParameters { @@ -41859,8 +43215,8 @@ export namespace compute_beta { /** * compute.instanceTemplates.delete * @desc Deletes the specified instance template. Deleting an instance - * template is permanent and cannot be undone. It's not possible to delete - * templates which are in use by an instance group. + * template is permanent and cannot be undone. It is not possible to delete + * templates that are already in use by a managed instance group. * @example * * // BEFORE RUNNING: * // --------------- @@ -42314,7 +43670,7 @@ export namespace compute_beta { /** * compute.instanceTemplates.list * @desc Retrieves a list of instance templates that are contained within - * the specified project and zone. + * the specified project. * @example * * // BEFORE RUNNING: * // --------------- @@ -43626,7 +44982,7 @@ export namespace compute_beta { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -44094,7 +45450,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -45220,7 +46576,7 @@ export namespace compute_beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -45606,7 +46962,7 @@ export namespace compute_beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -45918,6 +47274,76 @@ export namespace compute_beta { } + /** + * compute.licenses.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.licenses.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Licenses$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Licenses$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Licenses$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Licenses$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/global/licenses/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.licenses.insert * @desc Create a License resource in the specified project. @@ -46060,6 +47486,77 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + + /** + * compute.licenses.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.licenses.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().GlobalSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Licenses$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Licenses$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Licenses$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Licenses$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/global/licenses/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Licenses$Delete extends StandardParameters { @@ -46105,6 +47602,22 @@ export namespace compute_beta { */ project?: string; } + export interface Params$Resource$Licenses$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Licenses$Insert extends StandardParameters { /** * Auth client or API Key for the request @@ -46188,6 +47701,27 @@ export namespace compute_beta { */ project?: string; } + export interface Params$Resource$Licenses$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } export class Resource$Machinetypes { @@ -48468,6 +50002,90 @@ export namespace compute_beta { } + /** + * compute.networks.listPeeringRoutes + * @desc Lists the peering routes exchanged over peering connection. + * @alias compute.networks.listPeeringRoutes + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.direction The direction of the exchanged routes. + * @param {string=} params.filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). + * @param {integer=} params.maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string} params.network Name of the network for this request. + * @param {string=} params.orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. + * @param {string=} params.pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. + * @param {string=} params.peeringName The response will show routes exchanged over the given peering connection. + * @param {string} params.project Project ID for this request. + * @param {string=} params.region The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + listPeeringRoutes( + params?: Params$Resource$Networks$Listpeeringroutes, + options?: MethodOptions): + AxiosPromise; + listPeeringRoutes( + params: Params$Resource$Networks$Listpeeringroutes, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + listPeeringRoutes( + params: Params$Resource$Networks$Listpeeringroutes, + callback: BodyResponseCallback): + void; + listPeeringRoutes( + callback: BodyResponseCallback): + void; + listPeeringRoutes( + paramsOrCallback?: Params$Resource$Networks$Listpeeringroutes| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Networks$Listpeeringroutes; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Networks$Listpeeringroutes; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/global/networks/{network}/listPeeringRoutes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.networks.patch * @desc Patches the specified network with the data included in the @@ -48794,42 +50412,175 @@ export namespace compute_beta { * callback(authClient); * }); * } - * @alias compute.networks.switchToCustomMode + * @alias compute.networks.switchToCustomMode + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.network Name of the network to be updated. + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + switchToCustomMode( + params?: Params$Resource$Networks$Switchtocustommode, + options?: MethodOptions): AxiosPromise; + switchToCustomMode( + params: Params$Resource$Networks$Switchtocustommode, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + switchToCustomMode( + params: Params$Resource$Networks$Switchtocustommode, + callback: BodyResponseCallback): void; + switchToCustomMode(callback: BodyResponseCallback): void; + switchToCustomMode( + paramsOrCallback?: Params$Resource$Networks$Switchtocustommode| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Networks$Switchtocustommode; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Networks$Switchtocustommode; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/global/networks/{network}/switchToCustomMode') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.networks.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Compute Engine API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/compute + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var compute = google.compute('beta'); + * + * authorize(function(authClient) { + * var request = { + * // Project ID for this request. + * project: 'my-project', // TODO: Update placeholder value. + * + * // Name of the resource for this request. + * resource_: 'my-resource', // TODO: Update placeholder value. + * + * resource: { + * // TODO: Add desired properties to the request body. + * }, + * + * auth: authClient, + * }; + * + * compute.networks.testIamPermissions(request, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias compute.networks.testIamPermissions * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.network Name of the network to be updated. * @param {string} params.project Project ID for this request. - * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().TestPermissionsRequest} 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 */ - switchToCustomMode( - params?: Params$Resource$Networks$Switchtocustommode, - options?: MethodOptions): AxiosPromise; - switchToCustomMode( - params: Params$Resource$Networks$Switchtocustommode, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - switchToCustomMode( - params: Params$Resource$Networks$Switchtocustommode, - callback: BodyResponseCallback): void; - switchToCustomMode(callback: BodyResponseCallback): void; - switchToCustomMode( - paramsOrCallback?: Params$Resource$Networks$Switchtocustommode| - BodyResponseCallback, + testIamPermissions( + params?: Params$Resource$Networks$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Networks$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Networks$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Networks$Testiampermissions| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Networks$Switchtocustommode; + Params$Resource$Networks$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Switchtocustommode; + params = {} as Params$Resource$Networks$Testiampermissions; options = {}; } @@ -48844,125 +50595,67 @@ export namespace compute_beta { { url: (rootUrl + - '/compute/beta/projects/{project}/global/networks/{network}/switchToCustomMode') + '/compute/beta/projects/{project}/global/networks/{resource}/testIamPermissions') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * compute.networks.testIamPermissions - * @desc Returns permissions that a caller has on the specified resource. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Compute Engine API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/compute - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var compute = google.compute('beta'); - * - * authorize(function(authClient) { - * var request = { - * // Project ID for this request. - * project: 'my-project', // TODO: Update placeholder value. - * - * // Name of the resource for this request. - * resource_: 'my-resource', // TODO: Update placeholder value. - * - * resource: { - * // TODO: Add desired properties to the request body. - * }, - * - * auth: authClient, - * }; - * - * compute.networks.testIamPermissions(request, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias compute.networks.testIamPermissions + * compute.networks.updatePeering + * @desc Updates the specified network peering with the data included in the + * request Only the following fields can be modified: + * NetworkPeering.export_custom_routes, and + * NetworkPeering.import_custom_routes + * @alias compute.networks.updatePeering * @memberOf! () * * @param {object} params Parameters for request + * @param {string} params.network Name of the network resource which the updated peering is belonging to. * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name or id of the resource for this request. - * @param {().TestPermissionsRequest} params.resource Request body data + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {().NetworksUpdatePeeringRequest} 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 */ - testIamPermissions( - params?: Params$Resource$Networks$Testiampermissions, - options?: MethodOptions): AxiosPromise; - testIamPermissions( - params: Params$Resource$Networks$Testiampermissions, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - testIamPermissions( - params: Params$Resource$Networks$Testiampermissions, - callback: BodyResponseCallback): void; - testIamPermissions( - callback: BodyResponseCallback): void; - testIamPermissions( - paramsOrCallback?: Params$Resource$Networks$Testiampermissions| - BodyResponseCallback, + updatePeering( + params?: Params$Resource$Networks$Updatepeering, + options?: MethodOptions): AxiosPromise; + updatePeering( + params: Params$Resource$Networks$Updatepeering, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + updatePeering( + params: Params$Resource$Networks$Updatepeering, + callback: BodyResponseCallback): void; + updatePeering(callback: BodyResponseCallback): void; + updatePeering( + paramsOrCallback?: Params$Resource$Networks$Updatepeering| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Networks$Testiampermissions; + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Networks$Updatepeering; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Testiampermissions; + params = {} as Params$Resource$Networks$Updatepeering; options = {}; } @@ -48977,20 +50670,20 @@ export namespace compute_beta { { url: (rootUrl + - '/compute/beta/projects/{project}/global/networks/{resource}/testIamPermissions') + '/compute/beta/projects/{project}/global/networks/{network}/updatePeering') .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + method: 'PATCH' }, options), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } @@ -49155,6 +50848,79 @@ export namespace compute_beta { */ project?: string; } + export interface Params$Resource$Networks$Listpeeringroutes extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The direction of the exchanged routes. + */ + direction?: string; + /** + * A filter expression that filters resources listed in the response. The + * expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be either =, !=, >, or + * <. For example, if you are filtering Compute Engine instances, you can + * exclude instances named example-instance by specifying name != + * example-instance. You can also filter nested fields. For example, you + * could specify scheduling.automaticRestart = false to include instances + * only if they are not scheduled for automatic restarts. You can use + * filtering on nested fields to filter based on resource labels. To filter + * on multiple expressions, provide each separate expression within + * parentheses. For example, (scheduling.automaticRestart = true) + * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND + * expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the + * number of available results is larger than maxResults, Compute Engine + * returns a nextPageToken that can be used to get the next page of results + * in subsequent list requests. Acceptable values are 0 to 500, inclusive. + * (Default: 500) + */ + maxResults?: number; + /** + * Name of the network for this request. + */ + network?: string; + /** + * Sorts list results by a certain order. By default, results are returned + * in alphanumerical order based on the resource name. You can also sort + * results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result + * first). Use this to sort resources like operations so that the newest + * operation is returned first. Currently, only sorting by name or + * creationTimestamp desc is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set pageToken to the nextPageToken + * returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * The response will show routes exchanged over the given peering + * connection. + */ + peeringName?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The region of the request. The response will include all subnet routes, + * static routes and dynamic routes in the region. + */ + region?: string; + } export interface Params$Resource$Networks$Patch extends StandardParameters { /** * Auth client or API Key for the request @@ -49272,6 +51038,40 @@ export namespace compute_beta { */ requestBody?: Schema$TestPermissionsRequest; } + export interface Params$Resource$Networks$Updatepeering extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the network resource which the updated peering is belonging to. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworksUpdatePeeringRequest; + } export class Resource$Nodegroups { @@ -49285,7 +51085,7 @@ export namespace compute_beta { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.nodeGroup Name of the NodeGroup resource to delete. + * @param {string} params.nodeGroup Name of the NodeGroup resource. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -50007,7 +51807,7 @@ export namespace compute_beta { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.nodeGroup Name of the NodeGroup resource to delete. + * @param {string} params.nodeGroup Name of the NodeGroup resource to update. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -50155,7 +51955,7 @@ export namespace compute_beta { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the NodeGroup resource to delete. + * Name of the NodeGroup resource. */ nodeGroup?: string; /** @@ -50542,7 +52342,7 @@ export namespace compute_beta { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the NodeGroup resource to delete. + * Name of the NodeGroup resource to update. */ nodeGroup?: string; /** @@ -57695,7 +59495,7 @@ export namespace compute_beta { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -58161,7 +59961,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -59875,7 +61675,8 @@ export namespace compute_beta { /** * compute.regionInstanceGroupManagers.setAutoHealingPolicies * @desc Modifies the autohealing policy for the instances in this managed - * instance group. + * instance group. [Deprecated] This method is deprecated. Please use Patch + * instead. * @example * * // BEFORE RUNNING: * // --------------- @@ -67255,7 +69056,7 @@ export namespace compute_beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -67778,7 +69579,7 @@ export namespace compute_beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -67820,7 +69621,7 @@ export namespace compute_beta { * a single snapshot might not necessarily delete all the data on that * snapshot. If any data on the snapshot that is marked for deletion is * needed for subsequent snapshots, the data will be moved to the next - * corresponding snapshot. For more information, see Deleting snaphots. + * corresponding snapshot. For more information, see Deleting snapshots. * @example * * // BEFORE RUNNING: * // --------------- @@ -68411,7 +70212,7 @@ export namespace compute_beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -68753,7 +70554,7 @@ export namespace compute_beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -71373,10 +73174,9 @@ export namespace compute_beta { /** * compute.subnetworks.patch * @desc Patches the specified subnetwork with the data included in the - * request. Only the following fields within the subnetwork resource can be - * specified in the request: secondary_ip_range, - * allow_subnet_cidr_routes_overlap and role. It is also mandatory to - * specify the current fingeprint of the subnetwork resource being patched. + * request. Only certain fields can up updated with a patch request as + * indicated in the field descriptions. You must specify the current + * fingeprint of the subnetwork resource being patched. * @example * * // BEFORE RUNNING: * // --------------- @@ -80921,7 +82721,7 @@ export namespace compute_beta { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -81349,7 +83149,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -83514,7 +85314,7 @@ export namespace compute_beta { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -83940,7 +85740,7 @@ export namespace compute_beta { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; diff --git a/src/apis/compute/v1.ts b/src/apis/compute/v1.ts index e17d46b8efb..e44d3b183a8 100644 --- a/src/apis/compute/v1.ts +++ b/src/apis/compute/v1.ts @@ -216,8 +216,10 @@ export namespace compute_v1 { acceleratorCount?: number; /** * Full or partial URL of the accelerator type resource to attach to this - * instance. If you are creating an instance template, specify only the - * accelerator name. + * instance. For example: + * projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 + * If you are creating an instance template, specify only the accelerator + * name. See GPUs on Compute Engine for a full list of accelerator types. */ acceleratorType?: string; } @@ -453,12 +455,29 @@ export namespace compute_v1 { * dash. */ name?: string; + /** + * The URL of the network in which to reserve the address. This field can + * only be used with INTERNAL type with VPC_PEERING purpose. + */ + network?: string; /** * This signifies the networking tier used for configuring this Address and - * can only take the following values: PREMIUM , STANDARD. If this field is - * not specified, it is assumed to be PREMIUM. + * can only take the following values: PREMIUM, STANDARD. Global forwarding + * rules can only be Premium Tier. Regional forwarding rules can be either + * Premium or Standard Tier. Standard Tier addresses applied to regional + * forwarding rules can be used with any external load balancer. Regional + * forwarding rules in Premium Tier can only be used with a Network load + * balancer. If this field is not specified, it is assumed to be PREMIUM. */ networkTier?: string; + /** + * The prefix length if the resource reprensents an IP range. + */ + prefixLength?: number; + /** + * The purpose of resource, only used with INTERNAL type. + */ + purpose?: string; /** * [Output Only] URL of the region where the regional address resides. This * field is not applicable to global addresses. You must specify this field @@ -617,8 +636,8 @@ export namespace compute_v1 { * the instance. This name can be used to reference the device for mounting, * resizing, and so on, from within the instance. If not specified, the * server chooses a default device name to apply to this disk, in the form - * persistent-disks-x, where x is a number assigned by Google Compute - * Engine. This field is only applicable for persistent disks. + * persistent-disk-x, where x is a number assigned by Google Compute Engine. + * This field is only applicable for persistent disks. */ deviceName?: string; /** @@ -764,6 +783,70 @@ export namespace compute_v1 { */ sourceImageEncryptionKey?: Schema$CustomerEncryptionKey; } + /** + * Specifies the audit configuration for a service. The configuration + * determines which permission types are logged, and what identities, if any, + * are exempted from logging. An AuditConfig must have one or more + * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a + * specific service, the union of the two AuditConfigs is used for that + * service: the log_types specified in each AuditConfig are enabled, and the + * exempted_members in each AuditLogConfig are exempted. Example Policy with + * multiple AuditConfigs: { "audit_configs": [ { + * "service": "allServices" "audit_log_configs": + * [ { "log_type": "DATA_READ", + * "exempted_members": [ "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", }, { "log_type": + * "ADMIN_READ", } ] }, { "service": + * "fooservice.googleapis.com" "audit_log_configs": [ { + * "log_type": "DATA_READ", }, { "log_type": + * "DATA_WRITE", "exempted_members": [ + * "user:bar@gmail.com" ] } ] } ] } For fooservice, this policy + * enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts + * foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE + * logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + exemptedMembers?: string[]; + /** + * Specifies a service that will be enabled for audit logging. For example, + * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a + * special value that covers all services. + */ + service?: string; + } + /** + * Provides the configuration for logging a type of permissions. Example: { + * "audit_log_configs": [ { "log_type": + * "DATA_READ", "exempted_members": [ + * "user:foo@gmail.com" ] }, { "log_type": + * "DATA_WRITE", } ] } This enables 'DATA_READ' and + * 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ + * logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. Follows the same format of [Binding.members][]. + */ + exemptedMembers?: string[]; + /** + * The log type that this config enables. + */ + logType?: string; + } + /** + * Authorization-related information used by Cloud Audit Logging. + */ + export interface Schema$AuthorizationLoggingOptions { + /** + * The type of the permission that was checked. + */ + permissionType?: string; + } /** * Represents an Autoscaler resource. Autoscalers allow you to automatically * scale virtual machine instances in managed instance groups according to an @@ -1019,7 +1102,6 @@ export namespace compute_v1 { /** * Defines how target utilization value is expressed for a Stackdriver * Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. - * If not specified, the default is GAUGE. */ utilizationTargetType?: string; } @@ -1028,7 +1110,7 @@ export namespace compute_v1 { */ export interface Schema$AutoscalingPolicyLoadBalancingUtilization { /** - * Fraction of backend capacity utilization (set in HTTP(s) load balancing + * Fraction of backend capacity utilization (set in HTTP(S) load balancing * configuration) that autoscaler should maintain. Must be a positive float * value. If not defined, the default is 0.8. */ @@ -1172,9 +1254,9 @@ export namespace compute_v1 { * considered fresh. After this time period, the response will be * revalidated before being served. Defaults to 1hr (3600s). When serving * responses to signed URL requests, Cloud CDN will internally behave as - * though all responses from this backend had a ?Cache-Control: public, - * max-age=[TTL]? header, regardless of any existing Cache-Control header. - * The actual headers served in responses will not be altered. + * though all responses from this backend had a "Cache-Control: public, + * max-age=[TTL]" header, regardless of any existing Cache-Control + * header. The actual headers served in responses will not be altered. */ signedUrlCacheMaxAgeSec?: string; /** @@ -1260,8 +1342,9 @@ export namespace compute_v1 { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a BackendService. An up-to-date fingerprint must - * be provided in order to update the BackendService. To see the latest - * fingerprint, make a get() request to retrieve a BackendService. + * be provided in order to update the BackendService, otherwise the request + * will fail with error 412 conditionNotMet. To see the latest fingerprint, + * make a get() request to retrieve a BackendService. */ fingerprint?: string; /** @@ -1401,9 +1484,9 @@ export namespace compute_v1 { * considered fresh. After this time period, the response will be * revalidated before being served. Defaults to 1hr (3600s). When serving * responses to signed URL requests, Cloud CDN will internally behave as - * though all responses from this backend had a ?Cache-Control: public, - * max-age=[TTL]? header, regardless of any existing Cache-Control header. - * The actual headers served in responses will not be altered. + * though all responses from this backend had a "Cache-Control: public, + * max-age=[TTL]" header, regardless of any existing Cache-Control + * header. The actual headers served in responses will not be altered. */ signedUrlCacheMaxAgeSec?: string; /** @@ -1488,6 +1571,39 @@ export namespace compute_v1 { message?: string; }; } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: * `allUsers`: A special + * identifier that represents anyone who is on the internet; with or without + * a Google account. * `allAuthenticatedUsers`: A special identifier that + * represents anyone who is authenticated with a Google account or a service + * account. * `user:{emailid}`: An email address that represents a specific + * Google account. For example, `alice@gmail.com` . * + * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. * + * `group:{emailid}`: An email address that represents a Google group. For + * example, `admins@example.com`. * `domain:{domain}`: A Google Apps + * domain name that represents all the users of that domain. For example, + * `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, + * `roles/editor`, or `roles/owner`. + */ + role?: string; + } export interface Schema$CacheInvalidationRule { /** * If set, this invalidation rule will only apply to requests with a Host @@ -1698,6 +1814,37 @@ export namespace compute_v1 { message?: string; }; } + /** + * A condition to be met. + */ + export interface Schema$Condition { + /** + * Trusted attributes supplied by the IAM system. + */ + iam?: string; + /** + * An operator to apply the subject with. + */ + op?: string; + /** + * Trusted attributes discharged by the service. + */ + svc?: string; + /** + * Trusted attributes supplied by any service that owns resources and uses + * the IAM system for access control. + */ + sys?: string; + /** + * DEPRECATED. Use 'values' instead. + */ + value?: string; + /** + * The objects of the condition. This is mutually exclusive with + * 'value'. + */ + values?: string[]; + } /** * Message containing connection draining configuration. */ @@ -1822,7 +1969,8 @@ export namespace compute_v1 { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a disk. */ labelFingerprint?: string; @@ -1862,6 +2010,14 @@ export namespace compute_v1 { * Internal use only. */ options?: string; + /** + * Physical block size of the persistent disk, in bytes. If not present in a + * request, a default value is used. Currently supported sizes are 4096 and + * 16384, other sizes may be added in the future. If an unsupported value is + * requested, the error message will list the supported values for the + * caller's project. + */ + physicalBlockSizeBytes?: string; /** * [Output Only] URL of the region where the disk resides. Only applicable * for regional resources. You must specify this field as part of the HTTP @@ -2261,6 +2417,35 @@ export namespace compute_v1 { */ zone?: string; } + /** + * Represents an expression text. Example: title: "User account + * presence" description: "Determines whether the request has a user + * account" expression: "size(request.user) > 0" + */ + export interface Schema$Expr { + /** + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + */ + description?: string; + /** + * Textual representation of an expression in Common Expression Language + * syntax. The application context of the containing message determines + * which well-known feature set of CEL is supported. + */ + expression?: string; + /** + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + */ + location?: string; + /** + * An optional title for the expression, i.e. a short string describing its + * purpose. This can be used e.g. in UIs which allow to enter the + * expression. + */ + title?: string; + } /** * Represents a Firewall resource. */ @@ -2314,6 +2499,11 @@ export namespace compute_v1 { * rules. */ kind?: string; + /** + * This field denotes the logging options for a particular firewall rule. If + * logging is enabled, logs will be exported to Stackdriver. + */ + logConfig?: Schema$FirewallLogConfig; /** * Name of the resource; provided by the client when the resource is * created. The name must be 1-63 characters long, and comply with RFC1035. @@ -2443,6 +2633,16 @@ export namespace compute_v1 { message?: string; }; } + /** + * The available logging options for a firewall rule. + */ + export interface Schema$FirewallLogConfig { + /** + * This field denotes whether to enable logging for a particular firewall + * rule. + */ + enable?: boolean; + } /** * A ForwardingRule resource. A ForwardingRule resource specifies which pool * of target virtual machines to forward a packet to if it matches the given @@ -2569,10 +2769,11 @@ export namespace compute_v1 { portRange?: string; /** * This field is used along with the backend_service field for internal load - * balancing. When the load balancing scheme is INTERNAL, a single port or - * a comma separated list of ports can be configured. Only packets addressed - * to these ports will be forwarded to the backends configured with this - * forwarding rule. You may specify a maximum of up to 5 ports. + * balancing. When the load balancing scheme is INTERNAL, a list of ports + * can be configured, for example, ['80'], + * ['8000','9000'] etc. Only packets addressed to these + * ports will be forwarded to the backends configured with this forwarding + * rule. You may specify a maximum of up to 5 ports. */ ports?: string[]; /** @@ -2697,7 +2898,8 @@ export namespace compute_v1 { * detect conflicts. The fingerprint is initially generated by Compute * Engine and changes after every request to modify or update labels. You * must always provide an up-to-date fingerprint hash when updating or - * changing labels. Make a get() request to the resource to get the latest + * changing labels, otherwise the request will fail with error 412 + * conditionNotMet. Make a get() request to the resource to get the latest * fingerprint. */ labelFingerprint?: string; @@ -2713,6 +2915,25 @@ export namespace compute_v1 { */ labels?: {[key: string]: string;}; } + export interface Schema$GlobalSetPolicyRequest { + /** + * Flatten Policy to create a backward compatible wire-format. Deprecated. + * Use 'policy' to specify bindings. + */ + bindings?: Schema$Binding[]; + /** + * Flatten Policy to create a backward compatible wire-format. Deprecated. + * Use 'policy' to specify the etag. + */ + etag?: string; + /** + * REQUIRED: The complete policy to be applied to the 'resource'. + * The size of the policy is limited to a few 10s of KB. An empty policy is + * in general a valid policy but certain services (like Projects) might + * reject them. + */ + policy?: Schema$Policy; + } /** * Guest OS features. */ @@ -3027,6 +3248,40 @@ export namespace compute_v1 { message?: string; }; } + export interface Schema$HTTPSHealthCheck { + /** + * The value of the host header in the HTTPS health check request. If left + * empty (default value), the IP on behalf of which this health check is + * performed will be used. + */ + host?: string; + /** + * The TCP port number for the health check request. The default value is + * 443. Valid values are 1 through 65535. + */ + port?: number; + /** + * Port name as defined in InstanceGroup#NamedPort#name. If both port and + * port_name are defined, port takes precedence. + */ + portName?: string; + /** + * Specifies the type of proxy header to append before sending data to the + * backend, either NONE or PROXY_V1. The default is NONE. + */ + proxyHeader?: string; + /** + * The request path of the HTTPS health check request. The default value is + * /. + */ + requestPath?: string; + /** + * The string to match anywhere in the first 1024 bytes of the response + * body. If left empty (the default value), the status code determines + * health. The response data can only be ASCII. + */ + response?: string; + } /** * An HttpsHealthCheck resource. This resource defines a template for how * individual instances should be checked for health, via HTTPS. @@ -3102,40 +3357,6 @@ export namespace compute_v1 { */ unhealthyThreshold?: number; } - export interface Schema$HTTPSHealthCheck { - /** - * The value of the host header in the HTTPS health check request. If left - * empty (default value), the IP on behalf of which this health check is - * performed will be used. - */ - host?: string; - /** - * The TCP port number for the health check request. The default value is - * 443. Valid values are 1 through 65535. - */ - port?: number; - /** - * Port name as defined in InstanceGroup#NamedPort#name. If both port and - * port_name are defined, port takes precedence. - */ - portName?: string; - /** - * Specifies the type of proxy header to append before sending data to the - * backend, either NONE or PROXY_V1. The default is NONE. - */ - proxyHeader?: string; - /** - * The request path of the HTTPS health check request. The default value is - * /. - */ - requestPath?: string; - /** - * The string to match anywhere in the first 1024 bytes of the response - * body. If left empty (the default value), the status code determines - * health. The response data can only be ASCII. - */ - response?: string; - } /** * Contains a list of HttpsHealthCheck resources. */ @@ -3237,7 +3458,8 @@ export namespace compute_v1 { * essentially a hash of the labels used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve an image. */ labelFingerprint?: string; @@ -3418,6 +3640,7 @@ export namespace compute_v1 { * instance. */ guestAccelerators?: Schema$AcceleratorConfig[]; + hostname?: string; /** * [Output Only] The unique identifier for the resource. This identifier is * defined by the server. @@ -3723,6 +3946,11 @@ export namespace compute_v1 { * v1.regionInstanceGroupManagers ==) */ export interface Schema$InstanceGroupManager { + /** + * The autohealing policy for this managed instance group. You can specify + * only one value. + */ + autoHealingPolicies?: Schema$InstanceGroupManagerAutoHealingPolicy[]; /** * The base instance name to use for instances in this group. The value must * be 1-58 characters long. Instances are named by appending a hyphen and a @@ -3754,8 +3982,9 @@ export namespace compute_v1 { * Fingerprint of this resource. This field may be used in optimistic * locking. It will be ignored when inserting an InstanceGroupManager. An * up-to-date fingerprint must be provided in order to update the - * InstanceGroupManager. To see the latest fingerprint, make a get() - * request to retrieve an InstanceGroupManager. + * InstanceGroupManager, otherwise the request will fail with error 412 + * conditionNotMet. To see the latest fingerprint, make a get() request to + * retrieve an InstanceGroupManager. */ fingerprint?: string; /** @@ -3912,6 +4141,21 @@ export namespace compute_v1 { message?: string; }; } + export interface Schema$InstanceGroupManagerAutoHealingPolicy { + /** + * The URL for the health check that signals autohealing. + */ + healthCheck?: string; + /** + * The number of seconds that the managed instance group waits before it + * applies autohealing policies to new instances or recently recreated + * instances. This initial delay allows instances to initialize and run + * their startup scripts before the instance group determines that they are + * UNHEALTHY. This prevents the managed instance group from recreating its + * instances prematurely. This value must be from range [0, 3600]. + */ + initialDelaySec?: number; + } /** * [Output Only] A list of managed instance groups. */ @@ -4098,7 +4342,8 @@ export namespace compute_v1 { * change the named ports settings concurrently. Obtain the fingerprint with * the instanceGroups.get method. Then, include the fingerprint in your * request to ensure that you do not overwrite changes that were applied - * from another concurrent request. + * from another concurrent request. A request with an incorrect fingerprint + * will fail with error 412 conditionNotMet. */ fingerprint?: string; /** @@ -4520,8 +4765,7 @@ export namespace compute_v1 { kind?: string; /** * Type of link requested. This field indicates speed of each of the links - * in the bundle, not the entire bundle. Only 10G per link is allowed for a - * dedicated interconnect. Options: Ethernet_10G_LR + * in the bundle, not the entire bundle. */ linkType?: string; /** @@ -4591,8 +4835,7 @@ export namespace compute_v1 { /** * Provisioned bandwidth capacity for the interconnectAttachment. Can be set * by the partner to update the customer's provisioned bandwidth. Output - * only for for PARTNER type, mutable for PARTNER_PROVIDER, not available - * for DEDICATED. + * only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED. */ bandwidth?: string; /** @@ -4701,7 +4944,7 @@ export namespace compute_v1 { */ region?: string; /** - * URL of the cloud router to be used for dynamic routing. This router must + * URL of the Cloud Router to be used for dynamic routing. This router must * be in the same region as this InterconnectAttachment. The * InterconnectAttachment will automatically connect the Interconnect to the * network & region within which the Cloud Router is configured. @@ -4717,9 +4960,8 @@ export namespace compute_v1 { state?: string; type?: string; /** - * Available only for DEDICATED and PARTNER_PROVIDER. Desired VLAN tag for - * this attachment, in the range 2-4094. This field refers to 802.1q VLAN - * tag, also known as IEEE 802.1Q Only specified at creation time. + * The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. Only + * specified at creation time. */ vlanTag8021q?: number; } @@ -4806,8 +5048,8 @@ export namespace compute_v1 { export interface Schema$InterconnectAttachmentPartnerMetadata { /** * Plain text name of the Interconnect this attachment is connected to, as - * displayed in the Partner?s portal. For instance ?Chicago 1?. This value - * may be validated to match approved Partner values. + * displayed in the Partner?s portal. For instance "Chicago 1". + * This value may be validated to match approved Partner values. */ interconnectName?: string; /** @@ -4916,7 +5158,10 @@ export namespace compute_v1 { export interface Schema$InterconnectDiagnosticsLinkOpticalPower { state?: string; /** - * Value of the current optical power, read in dBm. + * Value of the current optical power, read in dBm. Take a known good + * optical value, give it a 10% margin and trigger warnings relative to that + * value. In general, a -7dBm warning and a -11dBm alarm are good optical + * value estimates for most links. */ value?: number; } @@ -5051,6 +5296,12 @@ export namespace compute_v1 { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] The status of this InterconnectLocation. If the status is + * AVAILABLE, new Interconnects may be provisioned in this + * InterconnectLocation. Otherwise, no new Interconnects may be provisioned. + */ + status?: string; } /** * Response to the list request, and contains a list of interconnect @@ -5303,6 +5554,78 @@ export namespace compute_v1 { message?: string; }; } + /** + * Specifies what kind of log the caller must write + */ + export interface Schema$LogConfig { + /** + * Cloud audit options. + */ + cloudAudit?: Schema$LogConfigCloudAuditOptions; + /** + * Counter options. + */ + counter?: Schema$LogConfigCounterOptions; + /** + * Data access options. + */ + dataAccess?: Schema$LogConfigDataAccessOptions; + } + /** + * Write a Cloud Audit log + */ + export interface Schema$LogConfigCloudAuditOptions { + /** + * Information used by the Cloud Audit Logging pipeline. + */ + authorizationLoggingOptions?: Schema$AuthorizationLoggingOptions; + /** + * The log_name to populate in the Cloud Audit Record. + */ + logName?: string; + } + /** + * Increment a streamz counter with the specified metric and field names. + * Metric names should start with a '/', generally be lowercase-only, + * and end in "_count". Field names should not contain an initial + * slash. The actual exported metric names will have "/iam/policy" + * prepended. Field names correspond to IAM request parameters and field + * values are their respective values. Supported field names: - + * "authority", which is "[token]" if IAMContext.token is + * present, otherwise the value of IAMContext.authority_selector if present, + * and otherwise a representation of IAMContext.principal; or - + * "iam_principal", a representation of IAMContext.principal even if + * a token or authority selector is present; or - "" (empty string), + * resulting in a counter with no fields. Examples: counter { metric: + * "/debug_access_count" field: "iam_principal" } ==> + * increment counter /iam/policy/backend_debug_access_count + * {iam_principal=[value of IAMContext.principal]} At this time we do not + * support multiple field names (though this may be supported in the future). + */ + export interface Schema$LogConfigCounterOptions { + /** + * The field value to attribute. + */ + field?: string; + /** + * The metric to update. + */ + metric?: string; + } + /** + * Write a Data Access (Gin) log + */ + export interface Schema$LogConfigDataAccessOptions { + /** + * Whether Gin logging should happen in a fail-closed manner at the caller. + * This is relevant only in the LocalIAM implementation, for now. NOTE: + * Logging to Gin in a fail-closed manner is currently unsupported while + * work is being done to satisfy the requirements of go/345. Currently, + * setting LOG_FAIL_CLOSED mode will have no effect, but still exists + * because there is active work being done to support it (b/115874152). + */ + logMode?: string; + } /** * A Machine Type resource. (== resource_for v1.machineTypes ==) (== * resource_for beta.machineTypes ==) @@ -5530,9 +5853,9 @@ export namespace compute_v1 { * the metadata's contents and used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update metadata. You must always provide an - * up-to-date fingerprint hash in order to update or change metadata. To - * see the latest fingerprint, make a get() request to retrieve the - * resource. + * up-to-date fingerprint hash in order to update or change metadata, + * otherwise the request will fail with error 412 conditionNotMet. To see + * the latest fingerprint, make a get() request to retrieve the resource. */ fingerprint?: string; /** @@ -5651,7 +5974,8 @@ export namespace compute_v1 { * Fingerprint hash of contents stored in this network interface. This field * will be ignored when inserting an Instance or adding a NetworkInterface. * An up-to-date fingerprint must be provided in order to update the - * NetworkInterface. + * NetworkInterface, otherwise the request will fail with error 412 + * conditionNotMet. */ fingerprint?: string; /** @@ -5740,11 +6064,11 @@ export namespace compute_v1 { */ export interface Schema$NetworkPeering { /** - * Whether full mesh connectivity is created and managed automatically. When - * it is set to true, Google Compute Engine will automatically create and - * manage the routes between two networks when the state is ACTIVE. - * Otherwise, user needs to create routes manually to route packets to peer - * network. + * Indicates whether full mesh connectivity is created and managed + * automatically. When it is set to true, Google Compute Engine will + * automatically create and manage the routes between two networks when the + * state is ACTIVE. Otherwise, user needs to create routes manually to route + * packets to peer network. */ autoCreateRoutes?: boolean; /** @@ -6614,6 +6938,63 @@ export namespace compute_v1 { */ service?: string; } + /** + * Defines an Identity and Access Management (IAM) policy. It is used to + * specify access control policies for Cloud Platform resources. A `Policy` + * consists of a list of `bindings`. A `binding` binds a list of `members` to + * a `role`, where the members can be user accounts, Google groups, Google + * domains, and service accounts. A `role` is a named list of permissions + * defined by IAM. **JSON Example** { "bindings": [ { + * "role": "roles/owner", "members": [ + * "user:mike@example.com", "group:admins@example.com", + * "domain:google.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { + * "role": "roles/viewer", "members": + * ["user:sean@example.com"] } ] } **YAML Example** bindings: - + * members: - user:mike@example.com - group:admins@example.com - + * domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com + * role: roles/owner - members: - user:sean@example.com role: roles/viewer For + * a description of IAM and its features, see the [IAM developer's + * guide](https://cloud.google.com/iam/docs). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. `bindings` with no members + * will result in an error. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. It + * is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the + * policy. If no `etag` is provided in the call to `setIamPolicy`, then the + * existing policy is overwritten blindly. + */ + etag?: string; + iamOwned?: boolean; + /** + * If more than one rule is specified, the rules are applied in the + * following manner: - All matching LOG rules are always applied. - If any + * DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be + * applied if one or more matching rule requires logging. - Otherwise, if + * any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging + * will be applied if one or more matching rule requires logging. - + * Otherwise, if no rule applies, permission is denied. + */ + rules?: Schema$Rule[]; + /** + * Deprecated. + */ + version?: number; + } /** * A Project resource. For an overview of projects, see Cloud Platform * Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for @@ -6740,6 +7121,11 @@ export namespace compute_v1 { * [Output Only] Name of the quota metric. */ metric?: string; + /** + * [Output Only] Owning resource. This is the resource on which this quota + * is applied. + */ + owner?: string; /** * [Output Only] Current usage of this metric. */ @@ -7133,6 +7519,25 @@ export namespace compute_v1 { */ labels?: {[key: string]: string;}; } + export interface Schema$RegionSetPolicyRequest { + /** + * Flatten Policy to create a backwacd compatible wire-format. Deprecated. + * Use 'policy' to specify bindings. + */ + bindings?: Schema$Binding[]; + /** + * Flatten Policy to create a backward compatible wire-format. Deprecated. + * Use 'policy' to specify the etag. + */ + etag?: string; + /** + * REQUIRED: The complete policy to be applied to the 'resource'. + * The size of the policy is limited to a few 10s of KB. An empty policy is + * in general a valid policy but certain services (like Projects) might + * reject them. + */ + policy?: Schema$Policy; + } /** * Commitment for a particular resource (a Commitment is composed of one or * more of these). @@ -7489,11 +7894,13 @@ export namespace compute_v1 { */ ipAddress?: string; /** - * [Output Only] Type of how the resource/configuration of the BGP peer is - * managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT - * represents an BGP peer that is automatically created for PARTNER - * interconnectAttachment, Google will automatically create/delete this type - * of BGP peer when the PARTNER interconnectAttachment is created/deleted. + * [Output Only] The resource that configures and manages this BGP peer. + * MANAGED_BY_USER is the default value and can be managed by you or other + * users; MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed + * by Cloud Interconnect, specifically by an InterconnectAttachment of type + * PARTNER. Google will automatically create, update, and delete this type + * of BGP peer when the PARTNER InterconnectAttachment is created, updated, + * or deleted. */ managementType?: string; /** @@ -7533,12 +7940,13 @@ export namespace compute_v1 { */ linkedVpnTunnel?: string; /** - * [Output Only] Type of how the resource/configuration of the interface is - * managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT - * represents an interface that is automatically created for PARTNER type - * interconnectAttachment, Google will automatically create/update/delete - * this type of interface when the PARTNER interconnectAttachment is - * created/provisioned/deleted. + * [Output Only] The resource that configures and manages this interface. + * MANAGED_BY_USER is the default value and can be managed by you or other + * users; MANAGED_BY_ATTACHMENT is an interface that is configured and + * managed by Cloud Interconnect, specifically by an InterconnectAttachment + * of type PARTNER. Google will automatically create, update, and delete + * this type of interface when the PARTNER InterconnectAttachment is + * created, updated, or deleted. */ managementType?: string; /** @@ -7791,6 +8199,46 @@ export namespace compute_v1 { kind?: string; result?: Schema$RouterStatus; } + /** + * A rule to be applied in a Policy. + */ + export interface Schema$Rule { + /** + * Required + */ + action?: string; + /** + * Additional restrictions that must be met. All conditions must pass for + * the rule to match. + */ + conditions?: Schema$Condition[]; + /** + * Human-readable description of the rule. + */ + description?: string; + /** + * If one or more 'in' clauses are specified, the rule matches if + * the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + */ + ins?: string[]; + /** + * The config returned to callers of tech.iam.IAM.CheckPolicy for any + * entries that match the LOG action. + */ + logConfigs?: Schema$LogConfig[]; + /** + * If one or more 'not_in' clauses are specified, the rule matches + * if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. + */ + notIns?: string[]; + /** + * A permission is a string of form '..' (e.g., + * 'storage.buckets.list'). A value of '*' matches all + * permissions, and a verb part of '*' (e.g., + * 'storage.buckets.*') matches all verbs. + */ + permissions?: string[]; + } /** * Sets the scheduling options for an Instance. */ @@ -7860,8 +8308,9 @@ export namespace compute_v1 { * the metadata's contents and used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update metadata. You must always provide an - * up-to-date fingerprint hash in order to update or change metadata. To - * see the latest fingerprint, make get() request to the security policy. + * up-to-date fingerprint hash in order to update or change metadata, + * otherwise the request will fail with error 412 conditionNotMet. To see + * the latest fingerprint, make get() request to the security policy. */ fingerprint?: string; /** @@ -7962,8 +8411,9 @@ export namespace compute_v1 { preview?: boolean; /** * An integer indicating the priority of a rule in the list. The priority - * must be a positive value between 0 and 2147483647. Rules are evaluated in - * the increasing order of priority. + * must be a positive value between 0 and 2147483647. Rules are evaluated + * from highest to lowest priority where 0 is the highest priority and + * 2147483647 is the lowest prority. */ priority?: number; } @@ -8088,7 +8538,8 @@ export namespace compute_v1 { * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an - * up-to-date fingerprint hash in order to update or change labels. To see + * up-to-date fingerprint hash in order to update or change labels, + * otherwise the request will fail with error 412 conditionNotMet. To see * the latest fingerprint, make a get() request to retrieve a snapshot. */ labelFingerprint?: string; @@ -8405,8 +8856,9 @@ export namespace compute_v1 { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a SslPolicy. An up-to-date fingerprint must be - * provided in order to update the SslPolicy. To see the latest - * fingerprint, make a get() request to retrieve an SslPolicy. + * provided in order to update the SslPolicy, otherwise the request will + * fail with error 412 conditionNotMet. To see the latest fingerprint, make + * a get() request to retrieve an SslPolicy. */ fingerprint?: string; /** @@ -8487,8 +8939,9 @@ export namespace compute_v1 { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a Subnetwork. An up-to-date fingerprint must be - * provided in order to update the Subnetwork. To see the latest - * fingerprint, make a get() request to retrieve a Subnetwork. + * provided in order to update the Subnetwork, otherwise the request will + * fail with error 412 conditionNotMet. To see the latest fingerprint, make + * a get() request to retrieve a Subnetwork. */ fingerprint?: string; /** @@ -8546,7 +8999,8 @@ export namespace compute_v1 { * An array of configurations for secondary IP ranges for VM instances * contained in this subnetwork. The primary IP of such VM must belong to * the primary ipCidrRange of the subnetwork. The alias IPs may belong to - * either primary or secondary ranges. + * either primary or secondary ranges. This field can be updated with a + * patch request. */ secondaryIpRanges?: Schema$SubnetworkSecondaryRange[]; /** @@ -9721,8 +10175,9 @@ export namespace compute_v1 { * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be * ignored when inserting a UrlMap. An up-to-date fingerprint must be - * provided in order to update the UrlMap. To see the latest fingerprint, - * make a get() request to retrieve a UrlMap. + * provided in order to update the UrlMap, otherwise the request will fail + * with error 412 conditionNotMet. To see the latest fingerprint, make a + * get() request to retrieve a UrlMap. */ fingerprint?: string; /** @@ -10243,7 +10698,7 @@ export namespace compute_v1 { export interface Schema$XpnResourceId { /** * The ID of the service resource. In the case of projects, this field - * matches the project ID (e.g., my-project), not the project number (e.g., + * supports project id (e.g., my-project-123) and project number (e.g. * 12345678). */ id?: string; @@ -10351,6 +10806,25 @@ export namespace compute_v1 { */ labels?: {[key: string]: string;}; } + export interface Schema$ZoneSetPolicyRequest { + /** + * Flatten Policy to create a backwacd compatible wire-format. Deprecated. + * Use 'policy' to specify bindings. + */ + bindings?: Schema$Binding[]; + /** + * Flatten Policy to create a backward compatible wire-format. Deprecated. + * Use 'policy' to specify the etag. + */ + etag?: string; + /** + * REQUIRED: The complete policy to be applied to the 'resource'. + * The size of the policy is limited to a few 10s of KB. An empty policy is + * in general a valid policy but certain services (like Projects) might + * reject them. + */ + policy?: Schema$Policy; + } export class Resource$Acceleratortypes { @@ -14641,7 +15115,7 @@ export namespace compute_v1 { /** * compute.backendServices.get * @desc Returns the specified BackendService resource. Gets a list of - * available backend services by making a list() request. + * available backend services. * @example * * // BEFORE RUNNING: * // --------------- @@ -16431,6 +16905,77 @@ export namespace compute_v1 { } + /** + * compute.disks.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.disks.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Disks$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Disks$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Disks$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Disks$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Disks$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Disks$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.disks.insert * @desc Creates a persistent disk in the specified project using the data @@ -16840,6 +17385,78 @@ export namespace compute_v1 { } + /** + * compute.disks.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.disks.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().ZoneSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Disks$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Disks$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Disks$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Disks$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Disks$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Disks$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.disks.setLabels * @desc Sets the labels on a disk. To learn more about labels, read the @@ -16913,7 +17530,7 @@ export namespace compute_v1 { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {string} params.zone The name of the zone for this request. * @param {().ZoneSetLabelsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -16974,6 +17591,80 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + + + /** + * compute.disks.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.disks.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Disks$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Disks$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Disks$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Disks$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Disks$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Disks$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Disks$Aggregatedlist extends @@ -17124,6 +17815,26 @@ export namespace compute_v1 { */ zone?: string; } + export interface Params$Resource$Disks$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } export interface Params$Resource$Disks$Insert extends StandardParameters { /** * Auth client or API Key for the request @@ -17256,6 +17967,31 @@ export namespace compute_v1 { */ requestBody?: Schema$DisksResizeRequest; } + export interface Params$Resource$Disks$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ZoneSetPolicyRequest; + } export interface Params$Resource$Disks$Setlabels extends StandardParameters { /** * Auth client or API Key for the request @@ -17280,7 +18016,7 @@ export namespace compute_v1 { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; /** @@ -17293,6 +18029,31 @@ export namespace compute_v1 { */ requestBody?: Schema$ZoneSetLabelsRequest; } + export interface Params$Resource$Disks$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Disktypes { @@ -25504,6 +26265,76 @@ export namespace compute_v1 { } + /** + * compute.images.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.images.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Images$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Images$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Images$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Images$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Images$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Images$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/images/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.images.insert * @desc Creates an image in the specified project using the data included @@ -25770,6 +26601,77 @@ export namespace compute_v1 { } + /** + * compute.images.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.images.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().GlobalSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Images$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Images$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Images$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Images$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Images$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Images$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/images/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.images.setLabels * @desc Sets the labels on an image. To learn more about labels, read the @@ -25839,7 +26741,7 @@ export namespace compute_v1 { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -25899,6 +26801,79 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + + + /** + * compute.images.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.images.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Images$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Images$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Images$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Images$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Images$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Images$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/images/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Images$Delete extends StandardParameters { @@ -25993,6 +26968,22 @@ export namespace compute_v1 { */ project?: string; } + export interface Params$Resource$Images$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Images$Insert extends StandardParameters { /** * Auth client or API Key for the request @@ -26080,6 +27071,27 @@ export namespace compute_v1 { */ project?: string; } + export interface Params$Resource$Images$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } export interface Params$Resource$Images$Setlabels extends StandardParameters { /** * Auth client or API Key for the request @@ -26091,7 +27103,7 @@ export namespace compute_v1 { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -26100,6 +27112,27 @@ export namespace compute_v1 { */ requestBody?: Schema$GlobalSetLabelsRequest; } + export interface Params$Resource$Images$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Instancegroupmanagers { @@ -27254,118 +28287,52 @@ export namespace compute_v1 { /** - * compute.instanceGroupManagers.recreateInstances - * @desc Flags the specified instances in the managed instance group to be - * immediately recreated. The instances are deleted and recreated using the - * current instance template for the managed instance group. This operation - * is marked as DONE when the flag is set even if the instances have not yet - * been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. If the group is part of a - * backend service that has enabled connection draining, it can take up to - * 60 seconds after the connection draining duration has elapsed before the - * VM instance is removed or deleted. You can specify a maximum of 1000 - * instances with this method per request. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Compute Engine API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/compute - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var compute = google.compute('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Project ID for this request. - * project: 'my-project', // TODO: Update placeholder value. - * - * // The name of the zone where the managed instance group is located. - * zone: 'my-zone', // TODO: Update placeholder value. - * - * // The name of the managed instance group. - * instanceGroupManager: 'my-instance-group-manager', // TODO: Update - * placeholder value. - * - * resource: { - * // TODO: Add desired properties to the request body. - * }, - * - * auth: authClient, - * }; - * - * compute.instanceGroupManagers.recreateInstances(request, function(err, - * response) { if (err) { console.error(err); return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias compute.instanceGroupManagers.recreateInstances + * compute.instanceGroupManagers.patch + * @desc Updates a managed instance group using the information that you + * specify in the request. This operation is marked as DONE when the group + * is patched even if the instances in the group are still in the process of + * being patched. You must separately verify the status of the individual + * instances with the listManagedInstances method. This method supports + * PATCH semantics and uses the JSON merge patch format and processing + * rules. + * @alias compute.instanceGroupManagers.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {string} params.instanceGroupManager The name of the instance group manager. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.zone The name of the zone where the managed instance group is located. - * @param {().InstanceGroupManagersRecreateInstancesRequest} params.resource Request body data + * @param {string} params.zone The name of the zone where you want to create the managed instance group. + * @param {().InstanceGroupManager} 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 */ - recreateInstances( - params?: Params$Resource$Instancegroupmanagers$Recreateinstances, + patch( + params?: Params$Resource$Instancegroupmanagers$Patch, options?: MethodOptions): AxiosPromise; - recreateInstances( - params: Params$Resource$Instancegroupmanagers$Recreateinstances, + patch( + params: Params$Resource$Instancegroupmanagers$Patch, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; - recreateInstances( - params: Params$Resource$Instancegroupmanagers$Recreateinstances, + patch( + params: Params$Resource$Instancegroupmanagers$Patch, callback: BodyResponseCallback): void; - recreateInstances(callback: BodyResponseCallback): void; - recreateInstances( - paramsOrCallback?: - Params$Resource$Instancegroupmanagers$Recreateinstances| + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Instancegroupmanagers$Patch| BodyResponseCallback, optionsOrCallback?: MethodOptions| BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Instancegroupmanagers$Recreateinstances; + Params$Resource$Instancegroupmanagers$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Recreateinstances; + params = {} as Params$Resource$Instancegroupmanagers$Patch; options = {}; } @@ -27380,9 +28347,9 @@ export namespace compute_v1 { { url: (rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances') + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}') .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + method: 'PATCH' }, options), params, @@ -27399,22 +28366,17 @@ export namespace compute_v1 { /** - * compute.instanceGroupManagers.resize - * @desc Resizes the managed instance group. If you increase the size, the - * group creates new instances using the current instance template. If you - * decrease the size, the group deletes instances. The resize operation is - * marked DONE when the resize actions are scheduled even if the group has - * not yet added or deleted any instances. You must separately verify the - * status of the creating or deleting actions with the listmanagedinstances - * method. When resizing down, the instance group arbitrarily chooses the - * order in which VMs are deleted. The group takes into account some VM - * attributes when making the selection including: + The status of the VM - * instance. + The health of the VM instance. + The instance template - * version the VM is based on. + For regional managed instance groups, the - * location of the VM instance. This list is subject to change. If the - * group is part of a backend service that has enabled connection draining, - * it can take up to 60 seconds after the connection draining duration has - * elapsed before the VM instance is removed or deleted. + * compute.instanceGroupManagers.recreateInstances + * @desc Flags the specified instances in the managed instance group to be + * immediately recreated. The instances are deleted and recreated using the + * current instance template for the managed instance group. This operation + * is marked as DONE when the flag is set even if the instances have not yet + * been recreated. You must separately verify the status of the recreating + * action with the listmanagedinstances method. If the group is part of a + * backend service that has enabled connection draining, it can take up to + * 60 seconds after the connection draining duration has elapsed before the + * VM instance is removed or deleted. You can specify a maximum of 1000 + * instances with this method per request. * @example * * // BEFORE RUNNING: * // --------------- @@ -27447,20 +28409,170 @@ export namespace compute_v1 { * instanceGroupManager: 'my-instance-group-manager', // TODO: Update * placeholder value. * - * // The number of running instances that the managed instance group - * should maintain at any given time. - * // The group automatically adds or removes instances to maintain the - * number of instances specified by - * // this parameter. - * size: 0, // TODO: Update placeholder value. + * resource: { + * // TODO: Add desired properties to the request body. + * }, * * auth: authClient, * }; * - * compute.instanceGroupManagers.resize(request, function(err, response) { - * if (err) { - * console.error(err); - * return; + * compute.instanceGroupManagers.recreateInstances(request, function(err, + * response) { if (err) { console.error(err); return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias compute.instanceGroupManagers.recreateInstances + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.zone The name of the zone where the managed instance group is located. + * @param {().InstanceGroupManagersRecreateInstancesRequest} 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 + */ + recreateInstances( + params?: Params$Resource$Instancegroupmanagers$Recreateinstances, + options?: MethodOptions): AxiosPromise; + recreateInstances( + params: Params$Resource$Instancegroupmanagers$Recreateinstances, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + recreateInstances( + params: Params$Resource$Instancegroupmanagers$Recreateinstances, + callback: BodyResponseCallback): void; + recreateInstances(callback: BodyResponseCallback): void; + recreateInstances( + paramsOrCallback?: + Params$Resource$Instancegroupmanagers$Recreateinstances| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instancegroupmanagers$Recreateinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Recreateinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.instanceGroupManagers.resize + * @desc Resizes the managed instance group. If you increase the size, the + * group creates new instances using the current instance template. If you + * decrease the size, the group deletes instances. The resize operation is + * marked DONE when the resize actions are scheduled even if the group has + * not yet added or deleted any instances. You must separately verify the + * status of the creating or deleting actions with the listmanagedinstances + * method. When resizing down, the instance group arbitrarily chooses the + * order in which VMs are deleted. The group takes into account some VM + * attributes when making the selection including: + The status of the VM + * instance. + The health of the VM instance. + The instance template + * version the VM is based on. + For regional managed instance groups, the + * location of the VM instance. This list is subject to change. If the + * group is part of a backend service that has enabled connection draining, + * it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Compute Engine API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/compute + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var compute = google.compute('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Project ID for this request. + * project: 'my-project', // TODO: Update placeholder value. + * + * // The name of the zone where the managed instance group is located. + * zone: 'my-zone', // TODO: Update placeholder value. + * + * // The name of the managed instance group. + * instanceGroupManager: 'my-instance-group-manager', // TODO: Update + * placeholder value. + * + * // The number of running instances that the managed instance group + * should maintain at any given time. + * // The group automatically adds or removes instances to maintain the + * number of instances specified by + * // this parameter. + * size: 0, // TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * compute.instanceGroupManagers.resize(request, function(err, response) { + * if (err) { + * console.error(err); + * return; * } * * // TODO: Change code below to process the `response` object: @@ -28171,6 +29283,44 @@ export namespace compute_v1 { */ zone?: string; } + export interface Params$Resource$Instancegroupmanagers$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the instance group manager. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone where you want to create the managed instance group. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManager; + } export interface Params$Resource$Instancegroupmanagers$Recreateinstances extends StandardParameters { /** @@ -30742,8 +31892,8 @@ export namespace compute_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.deviceName Disk device name to detach. - * @param {string} params.instance Instance name. + * @param {string} params.deviceName The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. + * @param {string} params.instance Instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -30933,6 +32083,77 @@ export namespace compute_v1 { } + /** + * compute.instances.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.instances.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Instances$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Instances$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Instances$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Instances$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Instances$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.getSerialPortOutput * @desc Returns the last 1 MB of serial port output from the specified @@ -31613,7 +32834,7 @@ export namespace compute_v1 { * @param {boolean=} params.deletionProtection Whether the resource should be protected against deletion. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {string} params.zone The name of the zone for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -31750,8 +32971,8 @@ export namespace compute_v1 { * * @param {object} params Parameters for request * @param {boolean} params.autoDelete Whether to auto-delete the disk when the instance is deleted. - * @param {string} params.deviceName The device name of the disk to modify. - * @param {string} params.instance The instance name. + * @param {string} params.deviceName The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. + * @param {string} params.instance The instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -31817,6 +33038,78 @@ export namespace compute_v1 { } + /** + * compute.instances.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.instances.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().ZoneSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Instances$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Instances$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Instances$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Instances$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Instances$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.setLabels * @desc Sets labels on an instance. To learn more about labels, read the @@ -32571,7 +33864,7 @@ export namespace compute_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.instance Instance name. + * @param {string} params.instance Instance name for this request. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -33383,6 +34676,80 @@ export namespace compute_v1 { } + /** + * compute.instances.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.instances.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Instances$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Instances$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Instances$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Instances$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instances$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.updateAccessConfig * @desc Updates the specified access config from an instance's network @@ -33757,11 +35124,12 @@ export namespace compute_v1 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Disk device name to detach. + * The device name of the disk to detach. Make a get() request on the + * instance to view currently attached disks and device names. */ deviceName?: string; /** - * Instance name. + * Instance name for this request. */ instance?: string; /** @@ -33805,6 +35173,26 @@ export namespace compute_v1 { */ zone?: string; } + export interface Params$Resource$Instances$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } export interface Params$Resource$Instances$Getserialportoutput extends StandardParameters { /** @@ -34062,7 +35450,7 @@ export namespace compute_v1 { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; /** @@ -34082,11 +35470,12 @@ export namespace compute_v1 { */ autoDelete?: boolean; /** - * The device name of the disk to modify. + * The device name of the disk to modify. Make a get() request on the + * instance to view currently attached disks and device names. */ deviceName?: string; /** - * The instance name. + * The instance name for this request. */ instance?: string; /** @@ -34111,6 +35500,31 @@ export namespace compute_v1 { */ zone?: string; } + export interface Params$Resource$Instances$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ZoneSetPolicyRequest; + } export interface Params$Resource$Instances$Setlabels extends StandardParameters { /** @@ -34309,7 +35723,7 @@ export namespace compute_v1 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Instance name. + * Instance name for this request. */ instance?: string; /** @@ -34537,6 +35951,31 @@ export namespace compute_v1 { */ zone?: string; } + export interface Params$Resource$Instances$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export interface Params$Resource$Instances$Updateaccessconfig extends StandardParameters { /** @@ -34630,8 +36069,8 @@ export namespace compute_v1 { /** * compute.instanceTemplates.delete * @desc Deletes the specified instance template. Deleting an instance - * template is permanent and cannot be undone. It's not possible to delete - * templates which are in use by an instance group. + * template is permanent and cannot be undone. It is not possible to delete + * templates that are already in use by a managed instance group. * @example * * // BEFORE RUNNING: * // --------------- @@ -34881,6 +36320,76 @@ export namespace compute_v1 { } + /** + * compute.instanceTemplates.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.instanceTemplates.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Instancetemplates$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Instancetemplates$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Instancetemplates$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Instancetemplates$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instancetemplates$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancetemplates$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instanceTemplates.insert * @desc Creates an instance template in the specified project using the @@ -35015,7 +36524,7 @@ export namespace compute_v1 { /** * compute.instanceTemplates.list * @desc Retrieves a list of instance templates that are contained within - * the specified project and zone. + * the specified project. * @example * * // BEFORE RUNNING: * // --------------- @@ -35150,6 +36659,150 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + + + /** + * compute.instanceTemplates.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.instanceTemplates.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().GlobalSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Instancetemplates$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Instancetemplates$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Instancetemplates$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Instancetemplates$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instancetemplates$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancetemplates$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.instanceTemplates.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.instanceTemplates.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Instancetemplates$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Instancetemplates$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Instancetemplates$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Instancetemplates$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instancetemplates$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancetemplates$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Instancetemplates$Delete extends @@ -35197,6 +36850,22 @@ export namespace compute_v1 { */ project?: string; } + export interface Params$Resource$Instancetemplates$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Instancetemplates$Insert extends StandardParameters { /** @@ -35282,6 +36951,48 @@ export namespace compute_v1 { */ project?: string; } + export interface Params$Resource$Instancetemplates$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } + export interface Params$Resource$Instancetemplates$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Interconnectattachments { @@ -37932,6 +39643,76 @@ export namespace compute_v1 { } + /** + * compute.licenses.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.licenses.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Licenses$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Licenses$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Licenses$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Licenses$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/licenses/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.licenses.insert * @desc Create a License resource in the specified project. @@ -38074,6 +39855,77 @@ export namespace compute_v1 { } + /** + * compute.licenses.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.licenses.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().GlobalSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Licenses$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Licenses$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Licenses$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Licenses$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/licenses/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.licenses.testIamPermissions * @desc Returns permissions that a caller has on the specified resource. @@ -38190,6 +40042,22 @@ export namespace compute_v1 { */ project?: string; } + export interface Params$Resource$Licenses$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Licenses$Insert extends StandardParameters { /** * Auth client or API Key for the request @@ -38273,6 +40141,27 @@ export namespace compute_v1 { */ project?: string; } + export interface Params$Resource$Licenses$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } export interface Params$Resource$Licenses$Testiampermissions extends StandardParameters { /** @@ -40148,7 +42037,7 @@ export namespace compute_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.nodeGroup Name of the NodeGroup resource to delete. + * @param {string} params.nodeGroup Name of the NodeGroup resource. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -40501,6 +42390,77 @@ export namespace compute_v1 { } + /** + * compute.nodeGroups.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.nodeGroups.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Nodegroups$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Nodegroups$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Nodegroups$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Nodegroups$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Nodegroups$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodegroups$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.nodeGroups.insert * @desc Creates a NodeGroup resource in the specified project using the @@ -40720,6 +42680,78 @@ export namespace compute_v1 { } + /** + * compute.nodeGroups.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.nodeGroups.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().ZoneSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Nodegroups$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Nodegroups$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Nodegroups$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Nodegroups$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Nodegroups$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodegroups$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.nodeGroups.setNodeTemplate * @desc Updates the node template of the node group. @@ -40727,7 +42759,7 @@ export namespace compute_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.nodeGroup Name of the NodeGroup resource to delete. + * @param {string} params.nodeGroup Name of the NodeGroup resource to update. * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * @param {string} params.zone The name of the zone for this request. @@ -40791,6 +42823,80 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + + + /** + * compute.nodeGroups.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.nodeGroups.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Nodegroups$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Nodegroups$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Nodegroups$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Nodegroups$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Nodegroups$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodegroups$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Nodegroups$Addnodes extends @@ -40801,7 +42907,7 @@ export namespace compute_v1 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the NodeGroup resource to delete. + * Name of the NodeGroup resource. */ nodeGroup?: string; /** @@ -40976,6 +43082,26 @@ export namespace compute_v1 { */ zone?: string; } + export interface Params$Resource$Nodegroups$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } export interface Params$Resource$Nodegroups$Insert extends StandardParameters { /** @@ -41072,68 +43198,93 @@ export namespace compute_v1 { */ zone?: string; } - export interface Params$Resource$Nodegroups$Listnodes extends + export interface Params$Resource$Nodegroups$Listnodes extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A filter expression that filters resources listed in the response. The + * expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be either =, !=, >, or + * <. For example, if you are filtering Compute Engine instances, you can + * exclude instances named example-instance by specifying name != + * example-instance. You can also filter nested fields. For example, you + * could specify scheduling.automaticRestart = false to include instances + * only if they are not scheduled for automatic restarts. You can use + * filtering on nested fields to filter based on resource labels. To filter + * on multiple expressions, provide each separate expression within + * parentheses. For example, (scheduling.automaticRestart = true) + * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND + * expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the + * number of available results is larger than maxResults, Compute Engine + * returns a nextPageToken that can be used to get the next page of results + * in subsequent list requests. Acceptable values are 0 to 500, inclusive. + * (Default: 500) + */ + maxResults?: number; + /** + * Name of the NodeGroup resource whose nodes you want to list. + */ + nodeGroup?: string; + /** + * Sorts list results by a certain order. By default, results are returned + * in alphanumerical order based on the resource name. You can also sort + * results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result + * first). Use this to sort resources like operations so that the newest + * operation is returned first. Currently, only sorting by name or + * creationTimestamp desc is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set pageToken to the nextPageToken + * returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Nodegroups$Setiampolicy extends StandardParameters { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - /** - * A filter expression that filters resources listed in the response. The - * expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be either =, !=, >, or - * <. For example, if you are filtering Compute Engine instances, you can - * exclude instances named example-instance by specifying name != - * example-instance. You can also filter nested fields. For example, you - * could specify scheduling.automaticRestart = false to include instances - * only if they are not scheduled for automatic restarts. You can use - * filtering on nested fields to filter based on resource labels. To filter - * on multiple expressions, provide each separate expression within - * parentheses. For example, (scheduling.automaticRestart = true) - * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND - * expression. However, you can include AND and OR expressions explicitly. - * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel - * Broadwell") AND (scheduling.automaticRestart = true). - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the - * number of available results is larger than maxResults, Compute Engine - * returns a nextPageToken that can be used to get the next page of results - * in subsequent list requests. Acceptable values are 0 to 500, inclusive. - * (Default: 500) - */ - maxResults?: number; - /** - * Name of the NodeGroup resource whose nodes you want to list. - */ - nodeGroup?: string; - /** - * Sorts list results by a certain order. By default, results are returned - * in alphanumerical order based on the resource name. You can also sort - * results in descending order based on the creation timestamp using - * orderBy="creationTimestamp desc". This sorts results based on the - * creationTimestamp field in reverse chronological order (newest result - * first). Use this to sort resources like operations so that the newest - * operation is returned first. Currently, only sorting by name or - * creationTimestamp desc is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set pageToken to the nextPageToken - * returned by a previous list request to get the next page of results. - */ - pageToken?: string; /** * Project ID for this request. */ project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; /** * The name of the zone for this request. */ zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ZoneSetPolicyRequest; } export interface Params$Resource$Nodegroups$Setnodetemplate extends StandardParameters { @@ -41143,7 +43294,7 @@ export namespace compute_v1 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the NodeGroup resource to delete. + * Name of the NodeGroup resource to update. */ nodeGroup?: string; /** @@ -41173,6 +43324,31 @@ export namespace compute_v1 { */ requestBody?: Schema$NodeGroupsSetNodeTemplateRequest; } + export interface Params$Resource$Nodegroups$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Nodetemplates { @@ -41398,6 +43574,77 @@ export namespace compute_v1 { } + /** + * compute.nodeTemplates.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.nodeTemplates.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Nodetemplates$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Nodetemplates$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Nodetemplates$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Nodetemplates$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Nodetemplates$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodetemplates$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.nodeTemplates.insert * @desc Creates a NodeTemplate resource in the specified project using the @@ -41543,6 +43790,152 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + + + /** + * compute.nodeTemplates.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.nodeTemplates.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().RegionSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Nodetemplates$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Nodetemplates$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Nodetemplates$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Nodetemplates$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Nodetemplates$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodetemplates$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.nodeTemplates.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.nodeTemplates.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Nodetemplates$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Nodetemplates$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Nodetemplates$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Nodetemplates$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Nodetemplates$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodetemplates$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Nodetemplates$Aggregatedlist extends @@ -41653,6 +44046,26 @@ export namespace compute_v1 { */ region?: string; } + export interface Params$Resource$Nodetemplates$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Nodetemplates$Insert extends StandardParameters { /** @@ -41746,6 +44159,56 @@ export namespace compute_v1 { */ region?: string; } + export interface Params$Resource$Nodetemplates$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetPolicyRequest; + } + export interface Params$Resource$Nodetemplates$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Nodetypes { @@ -47512,7 +49975,7 @@ export namespace compute_v1 { * @param {string} params.project Project ID for this request. * @param {string} params.region The region for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().RegionSetLabelsRequest} 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. @@ -47902,7 +50365,7 @@ export namespace compute_v1 { */ requestId?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -49162,6 +51625,85 @@ export namespace compute_v1 { } + /** + * compute.regionInstanceGroupManagers.patch + * @desc Updates a managed instance group using the information that you + * specify in the request. This operation is marked as DONE when the group + * is patched even if the instances in the group are still in the process of + * being patched. You must separately verify the status of the individual + * instances with the listmanagedinstances method. This method supports + * PATCH semantics and uses the JSON merge patch format and processing + * rules. + * @alias compute.regionInstanceGroupManagers.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instanceGroupManager The name of the instance group manager. + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of the region scoping this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {().InstanceGroupManager} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Regioninstancegroupmanagers$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Regioninstancegroupmanagers$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Regioninstancegroupmanagers$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Regioninstancegroupmanagers$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Regioninstancegroupmanagers$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regioninstancegroupmanagers$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['project', 'region', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'region'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.regionInstanceGroupManagers.recreateInstances * @desc Flags the specified instances in the managed instance group to be @@ -50013,6 +52555,44 @@ export namespace compute_v1 { */ region?: string; } + export interface Params$Resource$Regioninstancegroupmanagers$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the instance group manager. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManager; + } export interface Params$Resource$Regioninstancegroupmanagers$Recreateinstances extends StandardParameters { /** @@ -54978,7 +57558,133 @@ export namespace compute_v1 { * a single snapshot might not necessarily delete all the data on that * snapshot. If any data on the snapshot that is marked for deletion is * needed for subsequent snapshots, the data will be moved to the next - * corresponding snapshot. For more information, see Deleting snaphots. + * corresponding snapshot. For more information, see Deleting snapshots. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Compute Engine API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/compute + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var compute = google.compute('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Project ID for this request. + * project: 'my-project', // TODO: Update placeholder value. + * + * // Name of the Snapshot resource to delete. + * snapshot: 'my-snapshot', // TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * compute.snapshots.delete(request, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias compute.snapshots.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {string} params.snapshot Name of the Snapshot resource to delete. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete(params?: Params$Resource$Snapshots$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Snapshots$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Snapshots$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Snapshots$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Snapshots$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Snapshots$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/snapshots/{snapshot}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['project', 'snapshot'], + pathParams: ['project', 'snapshot'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.snapshots.get + * @desc Returns the specified Snapshot resource. Gets a list of available + * snapshots by making a list() request. * @example * * // BEFORE RUNNING: * // --------------- @@ -55004,13 +57710,13 @@ export namespace compute_v1 { * // Project ID for this request. * project: 'my-project', // TODO: Update placeholder value. * - * // Name of the Snapshot resource to delete. + * // Name of the Snapshot resource to return. * snapshot: 'my-snapshot', // TODO: Update placeholder value. * * auth: authClient, * }; * - * compute.snapshots.delete(request, function(err, response) { + * compute.snapshots.get(request, function(err, response) { * if (err) { * console.error(err); * return; @@ -55035,40 +57741,35 @@ export namespace compute_v1 { * callback(authClient); * }); * } - * @alias compute.snapshots.delete + * @alias compute.snapshots.get * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string} params.snapshot Name of the Snapshot resource to delete. + * @param {string} params.snapshot Name of the Snapshot resource to return. * @param {object} [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$Snapshots$Delete, options?: MethodOptions): - AxiosPromise; - delete( - params: Params$Resource$Snapshots$Delete, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Snapshots$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: Params$Resource$Snapshots$Delete| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Snapshots$Delete; + get(params?: Params$Resource$Snapshots$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Snapshots$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Snapshots$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Snapshots$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Snapshots$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Snapshots$Delete; + params = {} as Params$Resource$Snapshots$Get; options = {}; } @@ -55085,7 +57786,7 @@ export namespace compute_v1 { (rootUrl + '/compute/v1/projects/{project}/global/snapshots/{snapshot}') .replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + method: 'GET' }, options), params, @@ -55094,102 +57795,51 @@ export namespace compute_v1 { context }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * compute.snapshots.get - * @desc Returns the specified Snapshot resource. Gets a list of available - * snapshots by making a list() request. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Compute Engine API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/compute - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var compute = google.compute('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Project ID for this request. - * project: 'my-project', // TODO: Update placeholder value. - * - * // Name of the Snapshot resource to return. - * snapshot: 'my-snapshot', // TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * compute.snapshots.get(request, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias compute.snapshots.get + * compute.snapshots.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.snapshots.getIamPolicy * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.snapshot Name of the Snapshot resource to return. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get(params?: Params$Resource$Snapshots$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Snapshots$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Snapshots$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Snapshots$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Snapshots$Get; + getIamPolicy( + params?: Params$Resource$Snapshots$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Snapshots$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Snapshots$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Snapshots$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Snapshots$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Snapshots$Get; + params = {} as Params$Resource$Snapshots$Getiampolicy; options = {}; } @@ -55204,20 +57854,20 @@ export namespace compute_v1 { { url: (rootUrl + - '/compute/v1/projects/{project}/global/snapshots/{snapshot}') + '/compute/v1/projects/{project}/global/snapshots/{resource}/getIamPolicy') .replace(/([^:]\/)\/+/g, '$1'), method: 'GET' }, options), params, - requiredParams: ['project', 'snapshot'], - pathParams: ['project', 'snapshot'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } @@ -55358,6 +58008,77 @@ export namespace compute_v1 { } + /** + * compute.snapshots.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.snapshots.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().GlobalSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Snapshots$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Snapshots$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Snapshots$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Snapshots$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Snapshots$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Snapshots$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/snapshots/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.snapshots.setLabels * @desc Sets the labels on a snapshot. To learn more about labels, read the @@ -55427,7 +58148,7 @@ export namespace compute_v1 { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetLabelsRequest} 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. @@ -55488,6 +58209,79 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + + + /** + * compute.snapshots.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.snapshots.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Snapshots$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Snapshots$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Snapshots$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Snapshots$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Snapshots$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Snapshots$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/global/snapshots/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Snapshots$Delete extends StandardParameters { @@ -55533,6 +58327,22 @@ export namespace compute_v1 { */ snapshot?: string; } + export interface Params$Resource$Snapshots$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Snapshots$List extends StandardParameters { /** * Auth client or API Key for the request @@ -55587,6 +58397,27 @@ export namespace compute_v1 { */ project?: string; } + export interface Params$Resource$Snapshots$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } export interface Params$Resource$Snapshots$Setlabels extends StandardParameters { /** @@ -55599,7 +58430,7 @@ export namespace compute_v1 { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -55608,6 +58439,27 @@ export namespace compute_v1 { */ requestBody?: Schema$GlobalSetLabelsRequest; } + export interface Params$Resource$Snapshots$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Sslcertificates { @@ -57463,6 +60315,77 @@ export namespace compute_v1 { } + /** + * compute.subnetworks.getIamPolicy + * @desc Gets the access control policy for a resource. May be empty if no + * such policy or resource exists. + * @alias compute.subnetworks.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Subnetworks$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Subnetworks$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Subnetworks$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Subnetworks$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Subnetworks$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Subnetworks$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.subnetworks.insert * @desc Creates a subnetwork in the specified project using the data @@ -57822,10 +60745,9 @@ export namespace compute_v1 { /** * compute.subnetworks.patch * @desc Patches the specified subnetwork with the data included in the - * request. Only the following fields within the subnetwork resource can be - * specified in the request: secondary_ip_range, - * allow_subnet_cidr_routes_overlap and role. It is also mandatory to - * specify the current fingeprint of the subnetwork resource being patched. + * request. Only certain fields can up updated with a patch request as + * indicated in the field descriptions. You must specify the current + * fingeprint of the subnetwork resource being patched. * @alias compute.subnetworks.patch * @memberOf! () * @@ -57895,6 +60817,78 @@ export namespace compute_v1 { } + /** + * compute.subnetworks.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias compute.subnetworks.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().RegionSetPolicyRequest} 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 + */ + setIamPolicy( + params?: Params$Resource$Subnetworks$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Subnetworks$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Subnetworks$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Subnetworks$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Subnetworks$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Subnetworks$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/regions/{region}/subnetworks/{resource}/setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.subnetworks.setPrivateIpGoogleAccess * @desc Set whether VMs in this subnet can access Google services without @@ -58029,6 +61023,80 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + + + /** + * compute.subnetworks.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.subnetworks.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region for this request. + * @param {string} params.resource_ Name or id of the resource for this request. + * @param {().TestPermissionsRequest} 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 + */ + testIamPermissions( + params?: Params$Resource$Subnetworks$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Subnetworks$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Subnetworks$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Subnetworks$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Subnetworks$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Subnetworks$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/v1/projects/{project}/regions/{region}/subnetworks/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Subnetworks$Aggregatedlist extends @@ -58176,6 +61244,26 @@ export namespace compute_v1 { */ subnetwork?: string; } + export interface Params$Resource$Subnetworks$Getiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Subnetworks$Insert extends StandardParameters { /** @@ -58361,6 +61449,31 @@ export namespace compute_v1 { */ requestBody?: Schema$Subnetwork; } + export interface Params$Resource$Subnetworks$Setiampolicy extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetPolicyRequest; + } export interface Params$Resource$Subnetworks$Setprivateipgoogleaccess extends StandardParameters { /** @@ -58399,6 +61512,31 @@ export namespace compute_v1 { */ requestBody?: Schema$SubnetworksSetPrivateIpGoogleAccessRequest; } + export interface Params$Resource$Subnetworks$Testiampermissions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Targethttpproxies { diff --git a/src/apis/container/v1beta1.ts b/src/apis/container/v1beta1.ts index 3cc617dc395..f9421ad1412 100644 --- a/src/apis/container/v1beta1.ts +++ b/src/apis/container/v1beta1.ts @@ -127,6 +127,12 @@ export namespace container_v1beta1 { * cluster, enabling additional functionality. */ export interface Schema$AddonsConfig { + /** + * Configuration for the Cloud Run addon. The `IstioConfig` addon must be + * enabled in order to enable Cloud Run addon. This option can only be + * enabled at cluster creation time. + */ + cloudRunConfig?: Schema$CloudRunConfig; /** * Configuration for the horizontal pod autoscaling feature, which increases * or decreases the number of replica pods a replication controller has @@ -138,6 +144,11 @@ export namespace container_v1beta1 { * makes it easy to set up HTTP load balancers for services in a cluster. */ httpLoadBalancing?: Schema$HttpLoadBalancing; + /** + * Configuration for Istio, an open platform to connect, manage, and secure + * microservices. + */ + istioConfig?: Schema$IstioConfig; /** * Configuration for the Kubernetes Dashboard. */ @@ -166,6 +177,15 @@ export namespace container_v1beta1 { */ description?: string; } + /** + * Parameters for using BigQuery as the destination of resource usage export. + */ + export interface Schema$BigQueryDestination { + /** + * The ID of a BigQuery Dataset. + */ + datasetId?: string; + } /** * Configuration for Binary Authorization. */ @@ -225,6 +245,15 @@ export namespace container_v1beta1 { */ issueClientCertificate?: boolean; } + /** + * Configuration options for the Cloud Run feature. + */ + export interface Schema$CloudRunConfig { + /** + * Whether Cloud Run addon is enabled for this cluster. + */ + disabled?: boolean; + } /** * A Google Kubernetes Engine cluster. */ @@ -465,6 +494,11 @@ export namespace container_v1beta1 { * Compute Engine resources. */ resourceLabels?: {[key: string]: string;}; + /** + * Configuration for exporting resource usages. Resource usage export is + * disabled when this config unspecified. + */ + resourceUsageExportConfig?: Schema$ResourceUsageExportConfig; /** * [Output only] Server-defined URL for the resource. */ @@ -620,6 +654,10 @@ export namespace container_v1beta1 { * The desired configuration options for the PodSecurityPolicy feature. */ desiredPodSecurityPolicyConfig?: Schema$PodSecurityPolicyConfig; + /** + * The desired configuration for exporting resource usage. + */ + desiredResourceUsageExportConfig?: Schema$ResourceUsageExportConfig; /** * Cluster-level Vertical Pod Autoscaling configuration. */ @@ -871,6 +909,19 @@ export namespace container_v1beta1 { */ useIpAliases?: boolean; } + /** + * Configuration options for Istio addon. + */ + export interface Schema$IstioConfig { + /** + * The specified Istio auth mode, either none, or mutual TLS. + */ + auth?: string; + /** + * Whether Istio is enabled for this cluster. + */ + disabled?: boolean; + } /** * Configuration for the Kubernetes Dashboard. */ @@ -976,10 +1027,7 @@ export namespace container_v1beta1 { */ name?: string; /** - * Recommended is a bool combining the drain state of the location (ie- has - * the region been drained manually?), and the stockout status of any zone - * according to Zone Advisor. This will be internal only for use by - * pantheon. + * Whether the location is recomended for GKE cluster scheduling. */ recommended?: boolean; /** @@ -1546,6 +1594,20 @@ export namespace container_v1beta1 { */ resourceType?: string; } + /** + * Configuration for exporting cluster resource usages. + */ + export interface Schema$ResourceUsageExportConfig { + /** + * Configuration to use BigQuery as usage export destination. + */ + bigqueryDestination?: Schema$BigQueryDestination; + /** + * Whether to enable network egress metering for this cluster. If enabled, a + * daemonset will be created in the cluster to meter network egress traffic. + */ + enableNetworkEgressMetering?: boolean; + } /** * RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed * NodePool upgrade. This will be an no-op if the last upgrade successfully @@ -2483,6 +2545,7 @@ export namespace container_v1beta1 { /** * container.projects.locations.list + * @desc Used to fetch locations that offer GKE. * @alias container.projects.locations.list * @memberOf! () * diff --git a/src/apis/containeranalysis/README.md b/src/apis/containeranalysis/README.md new file mode 100644 index 00000000000..3b9fdc8839b --- /dev/null +++ b/src/apis/containeranalysis/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/containeranalysis + +> An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts. + +## Installation + +```sh +$ npm install @google/containeranalysis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/google/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/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/containeranalysis/index.ts b/src/apis/containeranalysis/index.ts new file mode 100644 index 00000000000..2dcfb612fd2 --- /dev/null +++ b/src/apis/containeranalysis/index.ts @@ -0,0 +1,41 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {containeranalysis_v1alpha1} from './v1alpha1'; +import {containeranalysis_v1beta1} from './v1beta1'; + +export const VERSIONS = { + 'v1alpha1': containeranalysis_v1alpha1.Containeranalysis, + 'v1beta1': containeranalysis_v1beta1.Containeranalysis, +}; + +export function containeranalysis(version: 'v1alpha1'): + containeranalysis_v1alpha1.Containeranalysis; +export function containeranalysis(options: containeranalysis_v1alpha1.Options): + containeranalysis_v1alpha1.Containeranalysis; +export function containeranalysis(version: 'v1beta1'): + containeranalysis_v1beta1.Containeranalysis; +export function containeranalysis(options: containeranalysis_v1beta1.Options): + containeranalysis_v1beta1.Containeranalysis; +export function containeranalysis< + T = containeranalysis_v1alpha1.Containeranalysis | + containeranalysis_v1beta1.Containeranalysis>( + this: GoogleConfigurable, + versionOrOptions: 'v1alpha1'| + containeranalysis_v1alpha1.Options|'v1beta1'| + containeranalysis_v1beta1.Options) { + return getAPI('containeranalysis', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/containeranalysis/package.json b/src/apis/containeranalysis/package.json new file mode 100644 index 00000000000..42139711fe1 --- /dev/null +++ b/src/apis/containeranalysis/package.json @@ -0,0 +1,36 @@ +{ + "name": "@google/containeranalysis", + "version": "0.1.0", + "description": "containeranalysis", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/" + }, + "dependencies": { + "googleapis-common": "^0.4.0" + }, + "devDependencies": { + "gts": "^0.9.0", + "typescript": "~3.2.0", + "typedoc": "^0.14.0" + } +} diff --git a/src/apis/containeranalysis/tsconfig.json b/src/apis/containeranalysis/tsconfig.json new file mode 100644 index 00000000000..e0810904968 --- /dev/null +++ b/src/apis/containeranalysis/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/containeranalysis/v1alpha1.ts b/src/apis/containeranalysis/v1alpha1.ts new file mode 100644 index 00000000000..e8626c0db74 --- /dev/null +++ b/src/apis/containeranalysis/v1alpha1.ts @@ -0,0 +1,4771 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace containeranalysis_v1alpha1 { + export interface Options extends GlobalOptions { + version: 'v1alpha1'; + } + + let context: APIRequestContext; + + 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; + } + + /** + * Container Analysis API + * + * An implementation of the Grafeas API, which stores, and enables querying + * and retrieval of critical metadata about all of your software artifacts. + * + * @example + * const {google} = require('googleapis'); + * const containeranalysis = google.containeranalysis('v1alpha1'); + * + * @namespace containeranalysis + * @type {Function} + * @version v1alpha1 + * @variation v1alpha1 + * @param {object=} options Options for Containeranalysis + */ + export class Containeranalysis { + projects: Resource$Projects; + providers: Resource$Providers; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.projects = new Resource$Projects(); + this.providers = new Resource$Providers(); + } + } + + /** + * Artifact describes a build product. + */ + export interface Schema$Artifact { + /** + * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + * container. + */ + checksum?: string; + /** + * Artifact ID, if any; for container images, this will be a URL by digest + * like gcr.io/projectID/imagename@sha256:123456 + */ + id?: string; + /** + * Name of the artifact. This may be the path to a binary or jar file, or in + * the case of a container build, the name used to push the container image + * to Google Container Registry, as presented to `docker push`. This field + * is deprecated in favor of the plural `names` field; it continues to exist + * here to allow existing BuildProvenance serialized to json in + * google.devtools.containeranalysis.v1alpha1.BuildDetails.provenance_bytes + * to deserialize back into proto. + */ + name?: string; + /** + * Related artifact names. This may be the path to a binary or jar file, or + * in the case of a container build, the name used to push the container + * image to Google Container Registry, as presented to `docker push`. Note + * that a single Artifact ID can have multiple names, for example if two + * tags are applied to one image. + */ + names?: string[]; + } + /** + * Occurrence that represents a single "attestation". The + * authenticity of an Attestation can be verified using the attached + * signature. If the verifier trusts the public key of the signer, then + * verifying the signature is sufficient to establish trust. In this + * circumstance, the AttestationAuthority to which this Attestation is + * attached is primarily useful for look-up (how to find this Attestation if + * you already know the Authority and artifact to be verified) and intent + * (which authority was this attestation intended to sign for). + */ + export interface Schema$Attestation { + pgpSignedAttestation?: Schema$PgpSignedAttestation; + } + /** + * Note kind that represents a logical attestation "role" or + * "authority". For example, an organization might have one + * `AttestationAuthority` for "QA" and one for "build". + * This Note is intended to act strictly as a grouping mechanism for the + * attached Occurrences (Attestations). This grouping mechanism also provides + * a security boundary, since IAM ACLs gate the ability for a principle to + * attach an Occurrence to a given Note. It also provides a single point of + * lookup to find all attached Attestation Occurrences, even if they don't + * all live in the same project. + */ + export interface Schema$AttestationAuthority { + hint?: Schema$AttestationAuthorityHint; + } + /** + * This submessage provides human-readable hints about the purpose of the + * AttestationAuthority. Because the name of a Note acts as its resource + * reference, it is important to disambiguate the canonical name of the Note + * (which might be a UUID for security purposes) from "readable" + * names more suitable for debug output. Note that these hints should NOT be + * used to look up AttestationAuthorities in security sensitive contexts, such + * as when looking up Attestations to verify. + */ + export interface Schema$AttestationAuthorityHint { + /** + * The human readable name of this Attestation Authority, for example + * "qa". + */ + humanReadableName?: string; + } + /** + * Specifies the audit configuration for a service. The configuration + * determines which permission types are logged, and what identities, if any, + * are exempted from logging. An AuditConfig must have one or more + * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a + * specific service, the union of the two AuditConfigs is used for that + * service: the log_types specified in each AuditConfig are enabled, and the + * exempted_members in each AuditLogConfig are exempted. Example Policy with + * multiple AuditConfigs: { "audit_configs": [ { + * "service": "allServices" "audit_log_configs": + * [ { "log_type": "DATA_READ", + * "exempted_members": [ "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", }, { + * "log_type": "ADMIN_READ", } ] }, + * { "service": "fooservice.googleapis.com" + * "audit_log_configs": [ { "log_type": + * "DATA_READ", }, { "log_type": + * "DATA_WRITE", "exempted_members": [ + * "user:bar@gmail.com" ] } ] } + * ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and + * ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, + * and bar@gmail.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, + * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a + * special value that covers all services. + */ + service?: string; + } + /** + * Provides the configuration for logging a type of permissions. Example: { + * "audit_log_configs": [ { "log_type": + * "DATA_READ", "exempted_members": [ + * "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", } ] } This + * enables 'DATA_READ' and 'DATA_WRITE' logging, while + * exempting foo@gmail.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[]; + /** + * The log type that this config enables. + */ + logType?: string; + } + /** + * Basis describes the base image portion (Note) of the DockerImage + * relationship. Linked occurrences are derived from this or an equivalent + * image via: FROM <Basis.resource_url> Or an equivalent reference, + * e.g. a tag of the resource_url. + */ + export interface Schema$Basis { + /** + * The fingerprint of the base image. + */ + fingerprint?: Schema$Fingerprint; + /** + * The resource_url for the resource representing the basis of associated + * occurrence images. + */ + resourceUrl?: string; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: * `allUsers`: A special + * identifier that represents anyone who is on the internet; with or + * without a Google account. * `allAuthenticatedUsers`: A special + * identifier that represents anyone who is authenticated with a Google + * account or a service account. * `user:{emailid}`: An email address that + * represents a specific Google account. For example, `alice@gmail.com` . + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. * + * `group:{emailid}`: An email address that represents a Google group. For + * example, `admins@example.com`. * `domain:{domain}`: A Google Apps + * domain name that represents all the users of that domain. For example, + * `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, + * `roles/editor`, or `roles/owner`. + */ + role?: string; + } + /** + * Message encapsulating build provenance details. + */ + export interface Schema$BuildDetails { + /** + * The actual provenance + */ + provenance?: Schema$BuildProvenance; + /** + * Serialized JSON representation of the provenance, used in generating the + * `BuildSignature` in the corresponding Result. After verifying the + * signature, `provenance_bytes` can be unmarshalled and compared to the + * provenance to confirm that it is unchanged. A base64-encoded string + * representation of the provenance bytes is used for the signature in order + * to interoperate with openssl which expects this format for signature + * verification. The serialized form is captured both to avoid ambiguity in + * how the provenance is marshalled to json as well to prevent + * incompatibilities with future changes. + */ + provenanceBytes?: string; + } + /** + * Provenance of a build. Contains all information needed to verify the full + * details about the build from source to completion. + */ + export interface Schema$BuildProvenance { + /** + * Version string of the builder at the time this build was executed. + */ + builderVersion?: string; + /** + * Special options applied to this build. This is a catch-all field where + * build providers can enter any desired additional details. + */ + buildOptions?: {[key: string]: string;}; + /** + * Output of the build. + */ + builtArtifacts?: Schema$Artifact[]; + /** + * Commands requested by the build. + */ + commands?: Schema$Command[]; + /** + * Time at which the build was created. + */ + createTime?: string; + /** + * E-mail address of the user who initiated this build. Note that this was + * the user's e-mail address at the time the build was initiated; this + * address may not represent the same end-user for all time. + */ + creator?: string; + /** + * Time at which execution of the build was finished. + */ + finishTime?: string; + /** + * Unique identifier of the build. + */ + id?: string; + /** + * Google Cloud Storage bucket where logs were written. + */ + logsBucket?: string; + /** + * ID of the project. + */ + projectId?: string; + /** + * Details of the Source input to the build. + */ + sourceProvenance?: Schema$Source; + /** + * Time at which execution of the build was started. + */ + startTime?: string; + /** + * Trigger identifier if the build was triggered automatically; empty if + * not. + */ + triggerId?: string; + } + /** + * Message encapsulating the signature of the verified build. + */ + export interface Schema$BuildSignature { + /** + * An Id for the key used to sign. This could be either an Id for the key + * stored in `public_key` (such as the Id or fingerprint for a PGP key, or + * the CN for a cert), or a reference to an external key (such as a + * reference to a key in Cloud Key Management Service). + */ + keyId?: string; + /** + * The type of the key, either stored in `public_key` or referenced in + * `key_id` + */ + keyType?: string; + /** + * Public key of the builder which can be used to verify that the related + * findings are valid and unchanged. If `key_type` is empty, this defaults + * to PEM encoded public keys. This field may be empty if `key_id` + * references an external key. For Cloud Build based signatures, this is a + * PEM encoded public key. To verify the Cloud Build signature, place the + * contents of this field into a file (public.pem). The signature field is + * base64-decoded into its binary representation in signature.bin, and the + * provenance bytes from `BuildDetails` are base64-decoded into a binary + * representation in signed.bin. OpenSSL can then verify the signature: + * `openssl sha256 -verify public.pem -signature signature.bin signed.bin` + */ + publicKey?: string; + /** + * Signature of the related `BuildProvenance`, encoded in a base64 string. + */ + signature?: string; + } + /** + * Note holding the version of the provider's builder and the signature of + * the provenance message in linked BuildDetails. + */ + export interface Schema$BuildType { + /** + * Version of the builder which produced this Note. + */ + builderVersion?: string; + /** + * Signature of the build in Occurrences pointing to the Note containing + * this `BuilderDetails`. + */ + signature?: Schema$BuildSignature; + } + /** + * Command describes a step performed as part of the build pipeline. + */ + export interface Schema$Command { + /** + * Command-line arguments used when executing this Command. + */ + args?: string[]; + /** + * Working directory (relative to project source root) used when running + * this Command. + */ + dir?: string; + /** + * Environment variables set before running this Command. + */ + env?: string[]; + /** + * Optional unique identifier for this Command, used in wait_for to + * reference this Command as a dependency. + */ + id?: string; + /** + * Name of the command, as presented on the command line, or if the command + * is packaged as a Docker container, as presented to `docker pull`. + */ + name?: string; + /** + * The ID(s) of the Command(s) that this Command depends on. + */ + waitFor?: string[]; + } + /** + * Request for creating an operation + */ + export interface Schema$CreateOperationRequest { + /** + * The operation to create. + */ + operation?: Schema$Operation; + /** + * The ID to use for this operation. + */ + operationId?: string; + } + /** + * An artifact that can be deployed in some runtime. + */ + export interface Schema$Deployable { + /** + * Resource URI for the artifact being deployed. + */ + resourceUri?: string[]; + } + /** + * The period during which some deployable was active in a runtime. + */ + export interface Schema$Deployment { + /** + * Address of the runtime element hosting this deployment. + */ + address?: string; + /** + * Configuration used to create this deployment. + */ + config?: string; + /** + * Beginning of the lifetime of this deployment. + */ + deployTime?: string; + /** + * Platform hosting this deployment. + */ + platform?: string; + /** + * Output only. Resource URI for the artifact being deployed taken from the + * deployable field with the same name. + */ + resourceUri?: string[]; + /** + * End of the lifetime of this deployment. + */ + undeployTime?: string; + /** + * Identity of the user that triggered this deployment. + */ + userEmail?: string; + } + /** + * Derived describes the derived image portion (Occurrence) of the DockerImage + * relationship. This image would be produced from a Dockerfile with FROM + * <DockerImage.Basis in attached Note>. + */ + export interface Schema$Derived { + /** + * Output only. This contains the base image URL for the derived image + * occurrence. + */ + baseResourceUrl?: string; + /** + * Output only. The number of layers by which this image differs from the + * associated image basis. + */ + distance?: number; + /** + * The fingerprint of the derived image. + */ + fingerprint?: Schema$Fingerprint; + /** + * This contains layer-specific metadata, if populated it has length + * "distance" and is ordered with [distance] being the layer + * immediately following the base image and [1] being the final layer. + */ + layerInfo?: Schema$Layer[]; + } + /** + * Identifies all occurrences of this vulnerability in the package for a + * specific distro/location For example: glibc in cpe:/o:debian:debian_linux:8 + * for versions 2.1 - 2.2 + */ + export interface Schema$Detail { + /** + * The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in + * which the vulnerability manifests. Examples include distro or storage + * location for vulnerable jar. This field can be used as a filter in list + * requests. + */ + cpeUri?: string; + /** + * A vendor-specific description of this note. + */ + description?: string; + /** + * The fix for this specific package version. + */ + fixedLocation?: Schema$VulnerabilityLocation; + /** + * Whether this Detail is obsolete. Occurrences are expected not to point to + * obsolete details. + */ + isObsolete?: boolean; + /** + * The max version of the package in which the vulnerability exists. This + * field can be used as a filter in list requests. + */ + maxAffectedVersion?: Schema$Version; + /** + * The min version of the package in which the vulnerability exists. + */ + minAffectedVersion?: Schema$Version; + /** + * The name of the package where the vulnerability was found. This field can + * be used as a filter in list requests. + */ + package?: string; + /** + * The type of package; whether native or non native(ruby gems, node.js + * packages etc) + */ + packageType?: string; + /** + * The severity (eg: distro assigned severity) for this vulnerability. + */ + severityName?: string; + } + /** + * Provides information about the scan status of a discovered resource. + */ + export interface Schema$Discovered { + /** + * The status of discovery for the resource. + */ + analysisStatus?: string; + /** + * When an error is encountered this will contain a LocalizedMessage under + * details to show to the user. The LocalizedMessage output only and + * populated by the API. + */ + analysisStatusError?: Schema$Status; + /** + * Whether the resource is continuously analyzed. + */ + continuousAnalysis?: string; + /** + * Output only. An operation that indicates the status of the current scan. + * This field is deprecated, do not use. + */ + operation?: Schema$Operation; + } + /** + * A note that indicates a type of analysis a provider would perform. This + * note exists in a provider's project. A `Discovery` occurrence is + * created in a consumer's project at the start of analysis. The + * occurrence's operation will indicate the status of the analysis. + * Absence of an occurrence linked to this note for a resource indicates that + * analysis hasn't started. + */ + export interface Schema$Discovery { + /** + * The kind of analysis that is handled by this discovery. + */ + analysisKind?: string; + } + /** + * This represents a particular channel of distribution for a given package. + * e.g. Debian's jessie-backports dpkg mirror + */ + export interface Schema$Distribution { + /** + * The CPU architecture for which packages in this distribution channel were + * built + */ + architecture?: string; + /** + * The cpe_uri in [cpe format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + */ + cpeUri?: string; + /** + * The distribution channel-specific description of this package. + */ + description?: string; + /** + * The latest available version of this package in this distribution + * channel. + */ + latestVersion?: Schema$Version; + /** + * A freeform string denoting the maintainer of this package. + */ + maintainer?: string; + /** + * The distribution channel-specific homepage for this package. + */ + url?: string; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} + /** + * Represents an expression text. Example: title: "User account + * presence" description: "Determines whether the request has a + * user account" expression: "size(request.user) > 0" + */ + export interface Schema$Expr { + /** + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + */ + description?: string; + /** + * Textual representation of an expression in Common Expression Language + * syntax. The application context of the containing message determines + * which well-known feature set of CEL is supported. + */ + expression?: string; + /** + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + */ + location?: string; + /** + * An optional title for the expression, i.e. a short string describing its + * purpose. This can be used e.g. in UIs which allow to enter the + * expression. + */ + title?: string; + } + /** + * Container message for hashes of byte content of files, used in Source + * messages to verify integrity of source input to the build. + */ + export interface Schema$FileHashes { + /** + * Collection of file hashes. + */ + fileHash?: Schema$Hash[]; + } + /** + * A set of properties that uniquely identify a given Docker image. + */ + export interface Schema$Fingerprint { + /** + * The layer-id of the final layer in the Docker image's v1 + * representation. This field can be used as a filter in list requests. + */ + v1Name?: string; + /** + * The ordered list of v2 blobs that represent a given image. + */ + v2Blob?: string[]; + /** + * Output only. The name of the image's v2 blobs computed via: [bottom] + * := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) + * Only the name of the final blob is kept. This field can be used as a + * filter in list requests. + */ + v2Name?: string; + } + /** + * Request message for `GetIamPolicy` method. + */ + export interface Schema$GetIamPolicyRequest {} + /** + * A summary of how many vulnz occurrences there are per severity type. counts + * by groups, or if we should have different summary messages like this. + */ + export interface Schema$GetVulnzOccurrencesSummaryResponse { + /** + * A map of how many occurrences were found for each severity. + */ + counts?: Schema$SeverityCount[]; + } + /** + * An alias to a repo revision. + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1AliasContext { + /** + * The alias kind. + */ + kind?: string; + /** + * The alias name. + */ + name?: string; + } + /** + * A CloudRepoSourceContext denotes a particular revision in a Google Cloud + * Source Repo. + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1CloudRepoSourceContext { + /** + * An alias, which may be a branch or tag. + */ + aliasContext?: Schema$GoogleDevtoolsContaineranalysisV1alpha1AliasContext; + /** + * The ID of the repo. + */ + repoId?: Schema$GoogleDevtoolsContaineranalysisV1alpha1RepoId; + /** + * A revision ID. + */ + revisionId?: string; + } + /** + * A SourceContext referring to a Gerrit project. + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1GerritSourceContext { + /** + * An alias, which may be a branch or tag. + */ + aliasContext?: Schema$GoogleDevtoolsContaineranalysisV1alpha1AliasContext; + /** + * The full project name within the host. Projects may be nested, so + * "project/subproject" is a valid project name. The "repo + * name" is the hostURI/project. + */ + gerritProject?: string; + /** + * The URI of a running Gerrit instance. + */ + hostUri?: string; + /** + * A revision (commit) ID. + */ + revisionId?: string; + } + /** + * A GitSourceContext denotes a particular revision in a third party Git + * repository (e.g., GitHub). + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1GitSourceContext { + /** + * Required. Git commit hash. + */ + revisionId?: string; + /** + * Git repository URL. + */ + url?: string; + } + /** + * Metadata for all operations used and required for all operations that + * created by Container Analysis Providers + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata { + /** + * Output only. The time this operation was created. + */ + createTime?: string; + /** + * Output only. The time that this operation was marked completed or failed. + */ + endTime?: string; + } + /** + * Selects a repo using a Google Cloud Platform project ID (e.g., + * winged-cargo-31) and a repo name within that project. + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1ProjectRepoId { + /** + * The ID of the project. + */ + projectId?: string; + /** + * The name of the repo. Leave empty for the default repo. + */ + repoName?: string; + } + /** + * A unique identifier for a Cloud Repo. + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1RepoId { + /** + * A combination of a project ID and a repo name. + */ + projectRepoId?: Schema$GoogleDevtoolsContaineranalysisV1alpha1ProjectRepoId; + /** + * A server-assigned, globally unique identifier. + */ + uid?: string; + } + /** + * A SourceContext is a reference to a tree of files. A SourceContext together + * with a path point to a unique revision of a single file or directory. + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1SourceContext { + /** + * A SourceContext referring to a revision in a Google Cloud Source Repo. + */ + cloudRepo?: + Schema$GoogleDevtoolsContaineranalysisV1alpha1CloudRepoSourceContext; + /** + * A SourceContext referring to a Gerrit project. + */ + gerrit?: Schema$GoogleDevtoolsContaineranalysisV1alpha1GerritSourceContext; + /** + * A SourceContext referring to any third party Git repo (e.g., GitHub). + */ + git?: Schema$GoogleDevtoolsContaineranalysisV1alpha1GitSourceContext; + /** + * Labels with user defined metadata. + */ + labels?: {[key: string]: string;}; + } + /** + * Container message for hash values. + */ + export interface Schema$Hash { + /** + * The type of hash that was performed. + */ + type?: string; + /** + * The hash value. + */ + value?: string; + } + /** + * This represents how a particular software package may be installed on a + * system. + */ + export interface Schema$Installation { + /** + * All of the places within the filesystem versions of this package have + * been found. + */ + location?: Schema$Location[]; + /** + * Output only. The name of the installed package. + */ + name?: string; + } + /** + * Layer holds metadata specific to a layer of a Docker image. + */ + export interface Schema$Layer { + /** + * The recovered arguments to the Dockerfile directive. + */ + arguments?: string; + /** + * The recovered Dockerfile directive used to construct this layer. + */ + directive?: string; + } + /** + * Response including listed occurrences for a note. + */ + export interface Schema$ListNoteOccurrencesResponse { + /** + * Token to receive the next page of notes. + */ + nextPageToken?: string; + /** + * The occurrences attached to the specified note. + */ + occurrences?: Schema$Occurrence[]; + } + /** + * Response including listed notes. + */ + export interface Schema$ListNotesResponse { + /** + * The next pagination token in the list response. It should be used as + * page_token for the following request. An empty value means no more + * result. + */ + nextPageToken?: string; + /** + * The occurrences requested + */ + notes?: Schema$Note[]; + } + /** + * Response including listed active occurrences. + */ + export interface Schema$ListOccurrencesResponse { + /** + * The next pagination token in the list response. It should be used as + * `page_token` for the following request. An empty value means no more + * results. + */ + nextPageToken?: string; + /** + * The occurrences requested. + */ + occurrences?: Schema$Occurrence[]; + } + /** + * A list of scan configs for the project. + */ + export interface Schema$ListScanConfigsResponse { + /** + * A page token to pass in order to get more scan configs. + */ + nextPageToken?: string; + /** + * The set of scan configs. + */ + scanConfigs?: Schema$ScanConfig[]; + } + /** + * An occurrence of a particular package installation found within a + * system's filesystem. e.g. glibc was found in /var/lib/dpkg/status + */ + export interface Schema$Location { + /** + * The cpe_uri in [cpe format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + */ + cpeUri?: string; + /** + * The path from which we gathered that this package/version is installed. + */ + path?: string; + /** + * The version installed at this location. + */ + version?: Schema$Version; + } + /** + * Provides a detailed description of a `Note`. + */ + export interface Schema$Note { + /** + * A note describing an attestation role. + */ + attestationAuthority?: Schema$AttestationAuthority; + /** + * A note describing a base image. + */ + baseImage?: Schema$Basis; + /** + * Build provenance type for a verifiable build. + */ + buildType?: Schema$BuildType; + /** + * Output only. The time this note was created. This field can be used as a + * filter in list requests. + */ + createTime?: string; + /** + * A note describing something that can be deployed. + */ + deployable?: Schema$Deployable; + /** + * A note describing a provider/analysis type. + */ + discovery?: Schema$Discovery; + /** + * Time of expiration for this note, null if note does not expire. + */ + expirationTime?: string; + /** + * Output only. This explicitly denotes which kind of note is specified. + * This field can be used as a filter in list requests. + */ + kind?: string; + /** + * A detailed description of this `Note`. + */ + longDescription?: string; + /** + * The name of the note in the form + * "providers/{provider_id}/notes/{NOTE_ID}" + */ + name?: string; + /** + * A note describing a package hosted by various package managers. + */ + package?: Schema$Package; + /** + * URLs associated with this note + */ + relatedUrl?: Schema$RelatedUrl[]; + /** + * A one sentence description of this `Note`. + */ + shortDescription?: string; + /** + * Output only. The time this note was last updated. This field can be used + * as a filter in list requests. + */ + updateTime?: string; + /** + * A package vulnerability type of note. + */ + vulnerabilityType?: Schema$VulnerabilityType; + } + /** + * `Occurrence` includes information about analysis occurrences for an image. + */ + export interface Schema$Occurrence { + /** + * Describes an attestation of an artifact. + */ + attestation?: Schema$Attestation; + /** + * Build details for a verifiable build. + */ + buildDetails?: Schema$BuildDetails; + /** + * Output only. The time this `Occurrence` was created. + */ + createTime?: string; + /** + * Describes the deployment of an artifact on a runtime. + */ + deployment?: Schema$Deployment; + /** + * Describes how this resource derives from the basis in the associated + * note. + */ + derivedImage?: Schema$Derived; + /** + * Describes the initial scan status for this resource. + */ + discovered?: Schema$Discovered; + /** + * Describes the installation of a package on the linked resource. + */ + installation?: Schema$Installation; + /** + * Output only. This explicitly denotes which of the `Occurrence` details + * are specified. This field can be used as a filter in list requests. + */ + kind?: string; + /** + * Output only. The name of the `Occurrence` in the form + * "projects/{project_id}/occurrences/{OCCURRENCE_ID}" + */ + name?: string; + /** + * An analysis note associated with this image, in the form + * "providers/{provider_id}/notes/{NOTE_ID}" This field can be + * used as a filter in list requests. + */ + noteName?: string; + /** + * A description of actions that can be taken to remedy the `Note` + */ + remediation?: string; + /** + * The resource for which the `Occurrence` applies. + */ + resource?: Schema$Resource; + /** + * The unique URL of the image or the container for which the `Occurrence` + * applies. For example, https://gcr.io/project/image@sha256:foo This field + * can be used as a filter in list requests. + */ + resourceUrl?: string; + /** + * Output only. The time this `Occurrence` was last updated. + */ + updateTime?: string; + /** + * Details of a security vulnerability note. + */ + vulnerabilityDetails?: Schema$VulnerabilityDetails; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: {[key: string]: any;}; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any;}; + } + /** + * This represents a particular package that is distributed over various + * channels. e.g. glibc (aka libc6) is distributed by many, at various + * versions. + */ + export interface Schema$Package { + /** + * The various channels by which a package is distributed. + */ + distribution?: Schema$Distribution[]; + /** + * The name of the package. + */ + name?: string; + } + /** + * This message wraps a location affected by a vulnerability and its + * associated fix (if one is available). + */ + export interface Schema$PackageIssue { + /** + * The location of the vulnerability. + */ + affectedLocation?: Schema$VulnerabilityLocation; + /** + * The location of the available fix for vulnerability. + */ + fixedLocation?: Schema$VulnerabilityLocation; + /** + * The severity (eg: distro assigned severity) for this vulnerability. + */ + severityName?: string; + } + /** + * An attestation wrapper with a PGP-compatible signature. This message only + * supports `ATTACHED` signatures, where the payload that is signed is + * included alongside the signature itself in the same file. + */ + export interface Schema$PgpSignedAttestation { + /** + * Type (for example schema) of the attestation payload that was signed. The + * verifier must ensure that the provided type is one that the verifier + * supports, and that the attestation payload is a valid instantiation of + * that type (for example by validating a JSON schema). + */ + contentType?: string; + /** + * The cryptographic fingerprint of the key used to generate the signature, + * as output by, e.g. `gpg --list-keys`. This should be the version 4, full + * 160-bit fingerprint, expressed as a 40 character hexadecimal string. See + * https://tools.ietf.org/html/rfc4880#section-12.2 for details. + * Implementations may choose to acknowledge "LONG", + * "SHORT", or other abbreviated key IDs, but only the full + * fingerprint is guaranteed to work. In gpg, the full fingerprint can be + * retrieved from the `fpr` field returned when calling --list-keys with + * --with-colons. For example: ``` gpg --with-colons --with-fingerprint + * --force-v4-certs \ --list-keys attester@example.com + * tru::1:1513631572:0:3:1:5 pub:...<SNIP>... + * fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: ``` Above, the + * fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. + */ + pgpKeyId?: string; + /** + * The raw content of the signature, as output by GNU Privacy Guard (GPG) or + * equivalent. Since this message only supports attached signatures, the + * payload that was signed must be attached. While the signature format + * supported is dependent on the verification implementation, currently only + * ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than + * `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor + * --output=signature.gpg payload.json` will create the signature content + * expected in this field in `signature.gpg` for the `payload.json` + * attestation payload. + */ + signature?: string; + } + /** + * Defines an Identity and Access Management (IAM) policy. It is used to + * specify access control policies for Cloud Platform resources. A `Policy` + * consists of a list of `bindings`. A `binding` binds a list of `members` to + * a `role`, where the members can be user accounts, Google groups, Google + * domains, and service accounts. A `role` is a named list of permissions + * defined by IAM. **JSON Example** { "bindings": [ { + * "role": "roles/owner", "members": [ + * "user:mike@example.com", "group:admins@example.com", + * "domain:google.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { + * "role": "roles/viewer", "members": + * ["user:sean@example.com"] } ] } **YAML + * Example** bindings: - members: - user:mike@example.com - + * group:admins@example.com - domain:google.com - + * serviceAccount:my-other-app@appspot.gserviceaccount.com role: + * roles/owner - members: - user:sean@example.com role: + * roles/viewer For a description of IAM and its features, see the [IAM + * developer's guide](https://cloud.google.com/iam/docs). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. `bindings` with no members + * will result in an error. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. It + * is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the + * policy. If no `etag` is provided in the call to `setIamPolicy`, then the + * existing policy is overwritten blindly. + */ + etag?: string; + /** + * Deprecated. + */ + version?: number; + } + /** + * Metadata for any related URL information + */ + export interface Schema$RelatedUrl { + /** + * Label to describe usage of the URL + */ + label?: string; + /** + * Specific URL to associate with the note + */ + url?: string; + } + /** + * RepoSource describes the location of the source in a Google Cloud Source + * Repository. + */ + export interface Schema$RepoSource { + /** + * Name of the branch to build. + */ + branchName?: string; + /** + * Explicit commit SHA to build. + */ + commitSha?: string; + /** + * ID of the project that owns the repo. + */ + projectId?: string; + /** + * Name of the repo. + */ + repoName?: string; + /** + * Name of the tag to build. + */ + tagName?: string; + } + /** + * Resource is an entity that can have metadata. E.g., a Docker image. + */ + export interface Schema$Resource { + /** + * The hash of the resource content. E.g., the Docker digest. + */ + contentHash?: Schema$Hash; + /** + * The name of the resource. E.g., the name of a Docker image - + * "Debian". + */ + name?: string; + /** + * The unique URI of the resource. E.g., + * "https://gcr.io/project/image@sha256:foo" for a Docker image. + */ + uri?: string; + } + /** + * Indicates various scans and whether they are turned on or off. + */ + export interface Schema$ScanConfig { + /** + * Output only. The time this scan config was created. + */ + createTime?: string; + /** + * Output only. A human-readable description of what the `ScanConfig` does. + */ + description?: string; + /** + * Indicates whether the Scan is enabled. + */ + enabled?: boolean; + /** + * Output only. The name of the ScanConfig in the form + * “projects/{project_id}/scanConfigs/{scan_config_id}". + */ + name?: string; + /** + * Output only. The time this scan config was last updated. + */ + updateTime?: string; + } + /** + * 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; + } + /** + * The number of occurrences created for a specific severity. + */ + export interface Schema$SeverityCount { + /** + * The number of occurrences with the severity. + */ + count?: string; + /** + * The severity of the occurrences. + */ + severity?: string; + } + /** + * Source describes the location of the source used for the build. + */ + export interface Schema$Source { + /** + * If provided, some of the source code used for the build may be found in + * these locations, in the case where the source repository had multiple + * remotes or submodules. This list will not include the context specified + * in the context field. + */ + additionalContexts?: + Schema$GoogleDevtoolsContaineranalysisV1alpha1SourceContext[]; + /** + * If provided, the input binary artifacts for the build came from this + * location. + */ + artifactStorageSource?: Schema$StorageSource; + /** + * If provided, the source code used for the build came from this location. + */ + context?: Schema$GoogleDevtoolsContaineranalysisV1alpha1SourceContext; + /** + * Hash(es) of the build source, which can be used to verify that the + * original source integrity was maintained in the build. The keys to this + * map are file paths used as build source and the values contain the hash + * values for those files. If the build source came in a single package + * such as a gzipped tarfile (.tar.gz), the FileHash will be for the single + * path to that file. + */ + fileHashes?: {[key: string]: Schema$FileHashes;}; + /** + * If provided, get source from this location in a Cloud Repo. + */ + repoSource?: Schema$RepoSource; + /** + * If provided, get the source from this location in in Google Cloud + * Storage. + */ + storageSource?: Schema$StorageSource; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + /** + * StorageSource describes the location of the source in an archive file in + * Google Cloud Storage. + */ + export interface Schema$StorageSource { + /** + * Google Cloud Storage bucket containing source (see [Bucket Name + * Requirements] + * (https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string; + /** + * Google Cloud Storage generation for the object. + */ + generation?: string; + /** + * Google Cloud Storage object containing source. + */ + object?: string; + } + /** + * 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[]; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + /** + * Request for updating an existing operation + */ + export interface Schema$UpdateOperationRequest { + /** + * The operation to create. + */ + operation?: Schema$Operation; + /** + * The fields to update. + */ + updateMask?: string; + } + /** + * Version contains structured information about the version of the package. + * For a discussion of this in Debian/Ubuntu: + * http://serverfault.com/questions/604541/debian-packages-version-convention + * For a discussion of this in Redhat/Fedora/Centos: + * http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/ + */ + export interface Schema$Version { + /** + * Used to correct mistakes in the version numbering scheme. + */ + epoch?: number; + /** + * Distinguish between sentinel MIN/MAX versions and normal versions. If + * kind is not NORMAL, then the other fields are ignored. + */ + kind?: string; + /** + * The main part of the version name. + */ + name?: string; + /** + * The iteration of the package build from the above version. + */ + revision?: string; + } + /** + * Used by Occurrence to point to where the vulnerability exists and how to + * fix it. + */ + export interface Schema$VulnerabilityDetails { + /** + * Output only. The CVSS score of this vulnerability. CVSS score is on a + * scale of 0-10 where 0 indicates low severity and 10 indicates high + * severity. + */ + cvssScore?: number; + /** + * The set of affected locations and their fixes (if available) within the + * associated resource. + */ + packageIssue?: Schema$PackageIssue[]; + /** + * Output only. The note provider assigned Severity of the vulnerability. + */ + severity?: string; + /** + * The type of package; whether native or non native(ruby gems, node.js + * packages etc) + */ + type?: string; + } + /** + * The location of the vulnerability + */ + export interface Schema$VulnerabilityLocation { + /** + * The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) + * format. Examples include distro or storage location for vulnerable jar. + * This field can be used as a filter in list requests. + */ + cpeUri?: string; + /** + * The package being described. + */ + package?: string; + /** + * The version of the package being described. This field can be used as a + * filter in list requests. + */ + version?: Schema$Version; + } + /** + * VulnerabilityType provides metadata about a security vulnerability. + */ + export interface Schema$VulnerabilityType { + /** + * The CVSS score for this Vulnerability. + */ + cvssScore?: number; + /** + * All information about the package to specifically identify this + * vulnerability. One entry per (version range and cpe_uri) the package + * vulnerability has manifested in. + */ + details?: Schema$Detail[]; + /** + * Note provider assigned impact of the vulnerability + */ + severity?: string; + } + + + export class Resource$Projects { + notes: Resource$Projects$Notes; + occurrences: Resource$Projects$Occurrences; + operations: Resource$Projects$Operations; + scanConfigs: Resource$Projects$Scanconfigs; + constructor() { + this.notes = new Resource$Projects$Notes(); + this.occurrences = new Resource$Projects$Occurrences(); + this.operations = new Resource$Projects$Operations(); + this.scanConfigs = new Resource$Projects$Scanconfigs(); + } + } + + + export class Resource$Projects$Notes { + occurrences: Resource$Projects$Notes$Occurrences; + constructor() { + this.occurrences = new Resource$Projects$Notes$Occurrences(); + } + + + /** + * containeranalysis.projects.notes.create + * @desc Creates a new `Note`. + * @alias containeranalysis.projects.notes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.name The name of the project. Should be of the form "providers/{provider_id}". @Deprecated + * @param {string=} params.noteId The ID to use for this note. + * @param {string} params.parent This field contains the project Id for example: "projects/{project_id} + * @param {().Note} 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$Notes$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Notes$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Notes$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Notes$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.delete + * @desc Deletes the given `Note` from the system. + * @alias containeranalysis.projects.notes.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note in the form of "providers/{provider_id}/notes/{NOTE_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$Notes$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Notes$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Notes$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Notes$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.get + * @desc Returns the requested `Note`. + * @alias containeranalysis.projects.notes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note in the form of "providers/{provider_id}/notes/{NOTE_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$Notes$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Notes$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Notes$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Notes$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.getIamPolicy + * @desc Gets the access control policy for a note or an `Occurrence` + * resource. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a note or occurrence, respectively. Attempting to call this method on + * a resource without the required permission will result in a + * `PERMISSION_DENIED` error. Attempting to call this method on a + * non-existent resource will result in a `NOT_FOUND` error if the user has + * list permission on the project, or a `PERMISSION_DENIED` error otherwise. + * The resource takes the following formats: + * `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and + * projects/{PROJECT_ID}/notes/{NOTE_ID} for notes + * @alias containeranalysis.projects.notes.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Notes$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Notes$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Notes$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Notes$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.list + * @desc Lists all `Notes` for a given project. + * @alias containeranalysis.projects.notes.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string=} params.name The name field will contain the project Id for example: "providers/{provider_id} @Deprecated + * @param {integer=} params.pageSize Number of notes to return in the list. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {string} params.parent This field contains the project Id for example: "projects/{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 + */ + list(params?: Params$Resource$Projects$Notes$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Notes$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Notes$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Notes$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.patch + * @desc Updates an existing `Note`. + * @alias containeranalysis.projects.notes.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note. Should be of the form "projects/{provider_id}/notes/{note_id}". + * @param {string=} params.updateMask The fields to update. + * @param {().Note} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Notes$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Notes$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Notes$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Notes$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.setIamPolicy + * @desc Sets the access control policy on the specified `Note` or + * `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a `Note` or an `Occurrence`, respectively. Attempting to call this + * method without these permissions will result in a ` `PERMISSION_DENIED` + * error. Attempting to call this method on a non-existent resource will + * result in a `NOT_FOUND` error if the user has + * `containeranalysis.notes.list` permission on a `Note` or + * `containeranalysis.occurrences.list` on an `Occurrence`, or a + * `PERMISSION_DENIED` error otherwise. The resource takes the following + * formats: `projects/{projectid}/occurrences/{occurrenceid}` for + * occurrences and projects/{projectid}/notes/{noteid} for notes + * @alias containeranalysis.projects.notes.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Notes$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Notes$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Notes$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Notes$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.testIamPermissions + * @desc Returns the permissions that a caller has on the specified note or + * occurrence resource. Requires list permission on the project (for + * example, "storage.objects.list" on the containing bucket for testing + * permission of an object). Attempting to call this method on a + * non-existent resource will result in a `NOT_FOUND` error if the user has + * list permission on the project, or a `PERMISSION_DENIED` error otherwise. + * The resource takes the following formats: + * `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and + * `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes` + * @alias containeranalysis.projects.notes.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Notes$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Notes$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Notes$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Projects$Notes$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Notes$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the project. Should be of the form "providers/{provider_id}". + * @Deprecated + */ + name?: string; + /** + * The ID to use for this note. + */ + noteId?: string; + /** + * This field contains the project Id for example: "projects/{project_id} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Note; + } + export interface Params$Resource$Projects$Notes$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note in the form of + * "providers/{provider_id}/notes/{NOTE_ID}" + */ + name?: string; + } + export interface Params$Resource$Projects$Notes$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note in the form of + * "providers/{provider_id}/notes/{NOTE_ID}" + */ + name?: string; + } + export interface Params$Resource$Projects$Notes$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Notes$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The name field will contain the project Id for example: + * "providers/{provider_id} @Deprecated + */ + name?: string; + /** + * Number of notes to return in the list. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + /** + * This field contains the project Id for example: "projects/{PROJECT_ID}". + */ + parent?: string; + } + export interface Params$Resource$Projects$Notes$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note. Should be of the form + * "projects/{provider_id}/notes/{note_id}". + */ + name?: string; + /** + * The fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Note; + } + export interface Params$Resource$Projects$Notes$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$Notes$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$Notes$Occurrences { + constructor() {} + + + /** + * containeranalysis.projects.notes.occurrences.list + * @desc Lists `Occurrences` referencing the specified `Note`. Use this + * method to get all occurrences referencing your `Note` across all your + * customer projects. + * @alias containeranalysis.projects.notes.occurrences.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string} params.name The name field will contain the note name for example: "provider/{provider_id}/notes/{note_id}" + * @param {integer=} params.pageSize Number of notes to return in the list. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {object} [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$Notes$Occurrences$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Notes$Occurrences$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Projects$Notes$Occurrences$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Projects$Notes$Occurrences$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Occurrences$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Occurrences$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}/occurrences') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Notes$Occurrences$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The name field will contain the note name for example: + * "provider/{provider_id}/notes/{note_id}" + */ + name?: string; + /** + * Number of notes to return in the list. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + } + + + + export class Resource$Projects$Occurrences { + constructor() {} + + + /** + * containeranalysis.projects.occurrences.create + * @desc Creates a new `Occurrence`. Use this method to create `Occurrences` + * for a resource. + * @alias containeranalysis.projects.occurrences.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.name The name of the project. Should be of the form "projects/{project_id}". @Deprecated + * @param {string} params.parent This field contains the project Id for example: "projects/{project_id}" + * @param {().Occurrence} 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$Occurrences$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Occurrences$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Occurrences$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/occurrences') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.delete + * @desc Deletes the given `Occurrence` from the system. Use this when an + * `Occurrence` is no longer applicable for the given resource. + * @alias containeranalysis.projects.occurrences.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence in the form of "projects/{project_id}/occurrences/{OCCURRENCE_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$Occurrences$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Occurrences$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Occurrences$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.get + * @desc Returns the requested `Occurrence`. + * @alias containeranalysis.projects.occurrences.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence of the form "projects/{project_id}/occurrences/{OCCURRENCE_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$Occurrences$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Occurrences$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Occurrences$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Occurrences$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Occurrences$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.getIamPolicy + * @desc Gets the access control policy for a note or an `Occurrence` + * resource. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a note or occurrence, respectively. Attempting to call this method on + * a resource without the required permission will result in a + * `PERMISSION_DENIED` error. Attempting to call this method on a + * non-existent resource will result in a `NOT_FOUND` error if the user has + * list permission on the project, or a `PERMISSION_DENIED` error otherwise. + * The resource takes the following formats: + * `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and + * projects/{PROJECT_ID}/notes/{NOTE_ID} for notes + * @alias containeranalysis.projects.occurrences.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Occurrences$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Occurrences$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Occurrences$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.getNotes + * @desc Gets the `Note` attached to the given `Occurrence`. + * @alias containeranalysis.projects.occurrences.getNotes + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence in the form "projects/{project_id}/occurrences/{OCCURRENCE_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 + */ + getNotes( + params?: Params$Resource$Projects$Occurrences$Getnotes, + options?: MethodOptions): AxiosPromise; + getNotes( + params: Params$Resource$Projects$Occurrences$Getnotes, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getNotes( + params: Params$Resource$Projects$Occurrences$Getnotes, + callback: BodyResponseCallback): void; + getNotes(callback: BodyResponseCallback): void; + getNotes( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Getnotes| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Getnotes; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Getnotes; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.getVulnerabilitySummary + * @desc Gets a summary of the number and severity of occurrences. + * @alias containeranalysis.projects.occurrences.getVulnerabilitySummary + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string} params.parent This contains the project Id for example: projects/{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 + */ + getVulnerabilitySummary( + params?: Params$Resource$Projects$Occurrences$Getvulnerabilitysummary, + options?: MethodOptions): + AxiosPromise; + getVulnerabilitySummary( + params: Params$Resource$Projects$Occurrences$Getvulnerabilitysummary, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + getVulnerabilitySummary( + params: Params$Resource$Projects$Occurrences$Getvulnerabilitysummary, + callback: + BodyResponseCallback): + void; + getVulnerabilitySummary( + callback: + BodyResponseCallback): + void; + getVulnerabilitySummary( + paramsOrCallback?: + Params$Resource$Projects$Occurrences$Getvulnerabilitysummary| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Getvulnerabilitysummary; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Occurrences$Getvulnerabilitysummary; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v1alpha1/{+parent}/occurrences:vulnerabilitySummary') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.list + * @desc Lists active `Occurrences` for a given project matching the + * filters. + * @alias containeranalysis.projects.occurrences.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string=} params.kind The kind of occurrences to filter on. + * @param {string=} params.name The name field contains the project Id. For example: "projects/{project_id} @Deprecated + * @param {integer=} params.pageSize Number of occurrences to return in the list. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {string} params.parent This contains the project Id for example: projects/{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 + */ + list( + params?: Params$Resource$Projects$Occurrences$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Occurrences$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Occurrences$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Occurrences$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Occurrences$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/occurrences') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.patch + * @desc Updates an existing occurrence. + * @alias containeranalysis.projects.occurrences.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence. Should be of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}". + * @param {string=} params.updateMask The fields to update. + * @param {().Occurrence} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Occurrences$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Occurrences$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Occurrences$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.setIamPolicy + * @desc Sets the access control policy on the specified `Note` or + * `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a `Note` or an `Occurrence`, respectively. Attempting to call this + * method without these permissions will result in a ` `PERMISSION_DENIED` + * error. Attempting to call this method on a non-existent resource will + * result in a `NOT_FOUND` error if the user has + * `containeranalysis.notes.list` permission on a `Note` or + * `containeranalysis.occurrences.list` on an `Occurrence`, or a + * `PERMISSION_DENIED` error otherwise. The resource takes the following + * formats: `projects/{projectid}/occurrences/{occurrenceid}` for + * occurrences and projects/{projectid}/notes/{noteid} for notes + * @alias containeranalysis.projects.occurrences.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Occurrences$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Occurrences$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Occurrences$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.testIamPermissions + * @desc Returns the permissions that a caller has on the specified note or + * occurrence resource. Requires list permission on the project (for + * example, "storage.objects.list" on the containing bucket for testing + * permission of an object). Attempting to call this method on a + * non-existent resource will result in a `NOT_FOUND` error if the user has + * list permission on the project, or a `PERMISSION_DENIED` error otherwise. + * The resource takes the following formats: + * `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and + * `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes` + * @alias containeranalysis.projects.occurrences.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Occurrences$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Occurrences$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Occurrences$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Occurrences$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Occurrences$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the project. Should be of the form "projects/{project_id}". + * @Deprecated + */ + name?: string; + /** + * This field contains the project Id for example: "projects/{project_id}" + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Occurrence; + } + export interface Params$Resource$Projects$Occurrences$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence in the form of + * "projects/{project_id}/occurrences/{OCCURRENCE_ID}" + */ + name?: string; + } + export interface Params$Resource$Projects$Occurrences$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence of the form + * "projects/{project_id}/occurrences/{OCCURRENCE_ID}" + */ + name?: string; + } + export interface Params$Resource$Projects$Occurrences$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Occurrences$Getnotes extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence in the form + * "projects/{project_id}/occurrences/{OCCURRENCE_ID}" + */ + name?: string; + } + export interface Params$Resource$Projects$Occurrences$Getvulnerabilitysummary + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * This contains the project Id for example: projects/{project_id} + */ + parent?: string; + } + export interface Params$Resource$Projects$Occurrences$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The kind of occurrences to filter on. + */ + kind?: string; + /** + * The name field contains the project Id. For example: + * "projects/{project_id} @Deprecated + */ + name?: string; + /** + * Number of occurrences to return in the list. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + /** + * This contains the project Id for example: projects/{project_id}. + */ + parent?: string; + } + export interface Params$Resource$Projects$Occurrences$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence. Should be of the form + * "projects/{project_id}/occurrences/{OCCURRENCE_ID}". + */ + name?: string; + /** + * The fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Occurrence; + } + export interface Params$Resource$Projects$Occurrences$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$Occurrences$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$Operations { + constructor() {} + + + /** + * containeranalysis.projects.operations.create + * @desc Creates a new `Operation`. + * @alias containeranalysis.projects.operations.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent The project Id that this operation should be created under. + * @param {().CreateOperationRequest} 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$Operations$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Operations$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Operations$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Operations$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Operations$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/operations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.operations.patch + * @desc Updates an existing operation returns an error if operation does + * not exist. The only valid operations are to update mark the done bit + * change the result. + * @alias containeranalysis.projects.operations.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the Operation. Should be of the form "projects/{provider_id}/operations/{operation_id}". + * @param {().UpdateOperationRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Operations$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Operations$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Operations$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Operations$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Operations$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Operations$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The project Id that this operation should be created under. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CreateOperationRequest; + } + export interface Params$Resource$Projects$Operations$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the Operation. Should be of the form + * "projects/{provider_id}/operations/{operation_id}". + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UpdateOperationRequest; + } + + + export class Resource$Projects$Scanconfigs { + constructor() {} + + + /** + * containeranalysis.projects.scanConfigs.get + * @desc Gets a specific scan configuration for a project. + * @alias containeranalysis.projects.scanConfigs.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the ScanConfig in the form projects/{project_id}/scanConfigs/{scan_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$Projects$Scanconfigs$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Scanconfigs$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Scanconfigs$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Scanconfigs$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Scanconfigs$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Scanconfigs$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.scanConfigs.list + * @desc Lists scan configurations for a project. + * @alias containeranalysis.projects.scanConfigs.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {integer=} params.pageSize The number of items to return. + * @param {string=} params.pageToken The page token to use for the next request. + * @param {string} params.parent This containers the project Id i.e.: projects/{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 + */ + list( + params?: Params$Resource$Projects$Scanconfigs$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Scanconfigs$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Scanconfigs$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Scanconfigs$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Scanconfigs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Scanconfigs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/scanConfigs') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.scanConfigs.patch + * @desc Updates the scan configuration to a new value. + * @alias containeranalysis.projects.scanConfigs.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The scan config to update of the form projects/{project_id}/scanConfigs/{scan_config_id}. + * @param {string=} params.updateMask The fields to update. + * @param {().ScanConfig} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Scanconfigs$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Scanconfigs$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Scanconfigs$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Scanconfigs$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Scanconfigs$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Scanconfigs$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Scanconfigs$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the ScanConfig in the form + * projects/{project_id}/scanConfigs/{scan_config_id} + */ + name?: string; + } + export interface Params$Resource$Projects$Scanconfigs$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The number of items to return. + */ + pageSize?: number; + /** + * The page token to use for the next request. + */ + pageToken?: string; + /** + * This containers the project Id i.e.: projects/{project_id} + */ + parent?: string; + } + export interface Params$Resource$Projects$Scanconfigs$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The scan config to update of the form + * projects/{project_id}/scanConfigs/{scan_config_id}. + */ + name?: string; + /** + * The fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ScanConfig; + } + + + + export class Resource$Providers { + notes: Resource$Providers$Notes; + constructor() { + this.notes = new Resource$Providers$Notes(); + } + } + + + export class Resource$Providers$Notes { + occurrences: Resource$Providers$Notes$Occurrences; + constructor() { + this.occurrences = new Resource$Providers$Notes$Occurrences(); + } + + + /** + * containeranalysis.providers.notes.create + * @desc Creates a new `Note`. + * @alias containeranalysis.providers.notes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the project. Should be of the form "providers/{provider_id}". @Deprecated + * @param {string=} params.noteId The ID to use for this note. + * @param {string=} params.parent This field contains the project Id for example: "projects/{project_id} + * @param {().Note} 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$Providers$Notes$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Providers$Notes$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Providers$Notes$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Providers$Notes$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Providers$Notes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.providers.notes.delete + * @desc Deletes the given `Note` from the system. + * @alias containeranalysis.providers.notes.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note in the form of "providers/{provider_id}/notes/{NOTE_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$Providers$Notes$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Providers$Notes$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Providers$Notes$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Providers$Notes$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Providers$Notes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.providers.notes.get + * @desc Returns the requested `Note`. + * @alias containeranalysis.providers.notes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note in the form of "providers/{provider_id}/notes/{NOTE_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$Providers$Notes$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Providers$Notes$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Providers$Notes$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Providers$Notes$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Providers$Notes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.providers.notes.getIamPolicy + * @desc Gets the access control policy for a note or an `Occurrence` + * resource. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a note or occurrence, respectively. Attempting to call this method on + * a resource without the required permission will result in a + * `PERMISSION_DENIED` error. Attempting to call this method on a + * non-existent resource will result in a `NOT_FOUND` error if the user has + * list permission on the project, or a `PERMISSION_DENIED` error otherwise. + * The resource takes the following formats: + * `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for occurrences and + * projects/{PROJECT_ID}/notes/{NOTE_ID} for notes + * @alias containeranalysis.providers.notes.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Providers$Notes$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Providers$Notes$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Providers$Notes$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Providers$Notes$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Providers$Notes$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.providers.notes.list + * @desc Lists all `Notes` for a given project. + * @alias containeranalysis.providers.notes.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string} params.name The name field will contain the project Id for example: "providers/{provider_id} @Deprecated + * @param {integer=} params.pageSize Number of notes to return in the list. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {string=} params.parent This field contains the project Id for example: "projects/{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 + */ + list( + params?: Params$Resource$Providers$Notes$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Providers$Notes$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Providers$Notes$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Providers$Notes$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Providers$Notes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.providers.notes.patch + * @desc Updates an existing `Note`. + * @alias containeranalysis.providers.notes.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note. Should be of the form "projects/{provider_id}/notes/{note_id}". + * @param {string=} params.updateMask The fields to update. + * @param {().Note} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Providers$Notes$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Providers$Notes$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Providers$Notes$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Providers$Notes$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Providers$Notes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.providers.notes.setIamPolicy + * @desc Sets the access control policy on the specified `Note` or + * `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a `Note` or an `Occurrence`, respectively. Attempting to call this + * method without these permissions will result in a ` `PERMISSION_DENIED` + * error. Attempting to call this method on a non-existent resource will + * result in a `NOT_FOUND` error if the user has + * `containeranalysis.notes.list` permission on a `Note` or + * `containeranalysis.occurrences.list` on an `Occurrence`, or a + * `PERMISSION_DENIED` error otherwise. The resource takes the following + * formats: `projects/{projectid}/occurrences/{occurrenceid}` for + * occurrences and projects/{projectid}/notes/{noteid} for notes + * @alias containeranalysis.providers.notes.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.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 + */ + setIamPolicy( + params?: Params$Resource$Providers$Notes$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Providers$Notes$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Providers$Notes$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Providers$Notes$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Providers$Notes$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.providers.notes.testIamPermissions + * @desc Returns the permissions that a caller has on the specified note or + * occurrence resource. Requires list permission on the project (for + * example, "storage.objects.list" on the containing bucket for testing + * permission of an object). Attempting to call this method on a + * non-existent resource will result in a `NOT_FOUND` error if the user has + * list permission on the project, or a `PERMISSION_DENIED` error otherwise. + * The resource takes the following formats: + * `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and + * `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes` + * @alias containeranalysis.providers.notes.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.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 + */ + testIamPermissions( + params?: Params$Resource$Providers$Notes$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Providers$Notes$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Providers$Notes$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Providers$Notes$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Providers$Notes$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Providers$Notes$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the project. Should be of the form "providers/{provider_id}". + * @Deprecated + */ + name?: string; + /** + * The ID to use for this note. + */ + noteId?: string; + /** + * This field contains the project Id for example: "projects/{project_id} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Note; + } + export interface Params$Resource$Providers$Notes$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note in the form of + * "providers/{provider_id}/notes/{NOTE_ID}" + */ + name?: string; + } + export interface Params$Resource$Providers$Notes$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note in the form of + * "providers/{provider_id}/notes/{NOTE_ID}" + */ + name?: string; + } + export interface Params$Resource$Providers$Notes$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Providers$Notes$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The name field will contain the project Id for example: + * "providers/{provider_id} @Deprecated + */ + name?: string; + /** + * Number of notes to return in the list. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + /** + * This field contains the project Id for example: "projects/{PROJECT_ID}". + */ + parent?: string; + } + export interface Params$Resource$Providers$Notes$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note. Should be of the form + * "projects/{provider_id}/notes/{note_id}". + */ + name?: string; + /** + * The fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Note; + } + export interface Params$Resource$Providers$Notes$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$Providers$Notes$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$Providers$Notes$Occurrences { + constructor() {} + + + /** + * containeranalysis.providers.notes.occurrences.list + * @desc Lists `Occurrences` referencing the specified `Note`. Use this + * method to get all occurrences referencing your `Note` across all your + * customer projects. + * @alias containeranalysis.providers.notes.occurrences.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string} params.name The name field will contain the note name for example: "provider/{provider_id}/notes/{note_id}" + * @param {integer=} params.pageSize Number of notes to return in the list. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {object} [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$Providers$Notes$Occurrences$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Providers$Notes$Occurrences$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Providers$Notes$Occurrences$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Providers$Notes$Occurrences$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Providers$Notes$Occurrences$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Providers$Notes$Occurrences$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}/occurrences') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Providers$Notes$Occurrences$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The name field will contain the note name for example: + * "provider/{provider_id}/notes/{note_id}" + */ + name?: string; + /** + * Number of notes to return in the list. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + } +} diff --git a/src/apis/containeranalysis/v1beta1.ts b/src/apis/containeranalysis/v1beta1.ts new file mode 100644 index 00000000000..4f1ad634bc7 --- /dev/null +++ b/src/apis/containeranalysis/v1beta1.ts @@ -0,0 +1,3812 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace containeranalysis_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + let context: APIRequestContext; + + 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; + } + + /** + * Container Analysis API + * + * An implementation of the Grafeas API, which stores, and enables querying + * and retrieval of critical metadata about all of your software artifacts. + * + * @example + * const {google} = require('googleapis'); + * const containeranalysis = google.containeranalysis('v1beta1'); + * + * @namespace containeranalysis + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for Containeranalysis + */ + export class Containeranalysis { + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.projects = new Resource$Projects(); + } + } + + /** + * An alias to a repo revision. + */ + export interface Schema$AliasContext { + /** + * The alias kind. + */ + kind?: string; + /** + * The alias name. + */ + name?: string; + } + /** + * Artifact describes a build product. + */ + export interface Schema$Artifact { + /** + * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + * container. + */ + checksum?: string; + /** + * Artifact ID, if any; for container images, this will be a URL by digest + * like `gcr.io/projectID/imagename@sha256:123456`. + */ + id?: string; + /** + * Related artifact names. This may be the path to a binary or jar file, or + * in the case of a container build, the name used to push the container + * image to Google Container Registry, as presented to `docker push`. Note + * that a single Artifact ID can have multiple names, for example if two + * tags are applied to one image. + */ + names?: string[]; + } + /** + * Occurrence that represents a single "attestation". The + * authenticity of an attestation can be verified using the attached + * signature. If the verifier trusts the public key of the signer, then + * verifying the signature is sufficient to establish trust. In this + * circumstance, the authority to which this attestation is attached is + * primarily useful for look-up (how to find this attestation if you already + * know the authority and artifact to be verified) and intent (which authority + * was this attestation intended to sign for). + */ + export interface Schema$Attestation { + /** + * A PGP signed attestation. + */ + pgpSignedAttestation?: Schema$PgpSignedAttestation; + } + /** + * Specifies the audit configuration for a service. The configuration + * determines which permission types are logged, and what identities, if any, + * are exempted from logging. An AuditConfig must have one or more + * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a + * specific service, the union of the two AuditConfigs is used for that + * service: the log_types specified in each AuditConfig are enabled, and the + * exempted_members in each AuditLogConfig are exempted. Example Policy with + * multiple AuditConfigs: { "audit_configs": [ { + * "service": "allServices" "audit_log_configs": + * [ { "log_type": "DATA_READ", + * "exempted_members": [ "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", }, { + * "log_type": "ADMIN_READ", } ] }, + * { "service": "fooservice.googleapis.com" + * "audit_log_configs": [ { "log_type": + * "DATA_READ", }, { "log_type": + * "DATA_WRITE", "exempted_members": [ + * "user:bar@gmail.com" ] } ] } + * ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and + * ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, + * and bar@gmail.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, + * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a + * special value that covers all services. + */ + service?: string; + } + /** + * Provides the configuration for logging a type of permissions. Example: { + * "audit_log_configs": [ { "log_type": + * "DATA_READ", "exempted_members": [ + * "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", } ] } This + * enables 'DATA_READ' and 'DATA_WRITE' logging, while + * exempting foo@gmail.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[]; + /** + * The log type that this config enables. + */ + logType?: string; + } + /** + * Note kind that represents a logical attestation "role" or + * "authority". For example, an organization might have one + * `Authority` for "QA" and one for "build". This note is + * intended to act strictly as a grouping mechanism for the attached + * occurrences (Attestations). This grouping mechanism also provides a + * security boundary, since IAM ACLs gate the ability for a principle to + * attach an occurrence to a given note. It also provides a single point of + * lookup to find all attached attestation occurrences, even if they don't + * all live in the same project. + */ + export interface Schema$Authority { + /** + * Hint hints at the purpose of the attestation authority. + */ + hint?: Schema$Hint; + } + /** + * Basis describes the base image portion (Note) of the DockerImage + * relationship. Linked occurrences are derived from this or an equivalent + * image via: FROM <Basis.resource_url> Or an equivalent reference, + * e.g. a tag of the resource_url. + */ + export interface Schema$Basis { + /** + * Required. Immutable. The fingerprint of the base image. + */ + fingerprint?: Schema$Fingerprint; + /** + * Required. Immutable. The resource_url for the resource representing the + * basis of associated occurrence images. + */ + resourceUrl?: string; + } + /** + * Request to create notes in batch. + */ + export interface Schema$BatchCreateNotesRequest { + /** + * The notes to create. Max allowed length is 1000. + */ + notes?: {[key: string]: Schema$Note;}; + } + /** + * Response for creating notes in batch. + */ + export interface Schema$BatchCreateNotesResponse { + /** + * The notes that were created. + */ + notes?: Schema$Note[]; + } + /** + * Request to create occurrences in batch. + */ + export interface Schema$BatchCreateOccurrencesRequest { + /** + * The occurrences to create. Max allowed length is 1000. + */ + occurrences?: Schema$Occurrence[]; + } + /** + * Response for creating occurrences in batch. + */ + export interface Schema$BatchCreateOccurrencesResponse { + /** + * The occurrences that were created. + */ + occurrences?: Schema$Occurrence[]; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: * `allUsers`: A special + * identifier that represents anyone who is on the internet; with or + * without a Google account. * `allAuthenticatedUsers`: A special + * identifier that represents anyone who is authenticated with a Google + * account or a service account. * `user:{emailid}`: An email address that + * represents a specific Google account. For example, `alice@gmail.com` . + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. * + * `group:{emailid}`: An email address that represents a Google group. For + * example, `admins@example.com`. * `domain:{domain}`: A Google Apps + * domain name that represents all the users of that domain. For example, + * `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, + * `roles/editor`, or `roles/owner`. + */ + role?: string; + } + /** + * Note holding the version of the provider's builder and the signature of + * the provenance message in the build details occurrence. + */ + export interface Schema$Build { + /** + * Required. Immutable. Version of the builder which produced this build. + */ + builderVersion?: string; + /** + * Signature of the build in occurrences pointing to this build note + * containing build details. + */ + signature?: Schema$BuildSignature; + } + /** + * Provenance of a build. Contains all information needed to verify the full + * details about the build from source to completion. + */ + export interface Schema$BuildProvenance { + /** + * Version string of the builder at the time this build was executed. + */ + builderVersion?: string; + /** + * Special options applied to this build. This is a catch-all field where + * build providers can enter any desired additional details. + */ + buildOptions?: {[key: string]: string;}; + /** + * Output of the build. + */ + builtArtifacts?: Schema$Artifact[]; + /** + * Commands requested by the build. + */ + commands?: Schema$Command[]; + /** + * Time at which the build was created. + */ + createTime?: string; + /** + * E-mail address of the user who initiated this build. Note that this was + * the user's e-mail address at the time the build was initiated; this + * address may not represent the same end-user for all time. + */ + creator?: string; + /** + * Time at which execution of the build was finished. + */ + endTime?: string; + /** + * Required. Unique identifier of the build. + */ + id?: string; + /** + * URI where any logs for this provenance were written. + */ + logsUri?: string; + /** + * ID of the project. + */ + projectId?: string; + /** + * Details of the Source input to the build. + */ + sourceProvenance?: Schema$Source; + /** + * Time at which execution of the build was started. + */ + startTime?: string; + /** + * Trigger identifier if the build was triggered automatically; empty if + * not. + */ + triggerId?: string; + } + /** + * Message encapsulating the signature of the verified build. + */ + export interface Schema$BuildSignature { + /** + * An ID for the key used to sign. This could be either an ID for the key + * stored in `public_key` (such as the ID or fingerprint for a PGP key, or + * the CN for a cert), or a reference to an external key (such as a + * reference to a key in Cloud Key Management Service). + */ + keyId?: string; + /** + * The type of the key, either stored in `public_key` or referenced in + * `key_id`. + */ + keyType?: string; + /** + * Public key of the builder which can be used to verify that the related + * findings are valid and unchanged. If `key_type` is empty, this defaults + * to PEM encoded public keys. This field may be empty if `key_id` + * references an external key. For Cloud Build based signatures, this is a + * PEM encoded public key. To verify the Cloud Build signature, place the + * contents of this field into a file (public.pem). The signature field is + * base64-decoded into its binary representation in signature.bin, and the + * provenance bytes from `BuildDetails` are base64-decoded into a binary + * representation in signed.bin. OpenSSL can then verify the signature: + * `openssl sha256 -verify public.pem -signature signature.bin signed.bin` + */ + publicKey?: string; + /** + * Required. Signature of the related `BuildProvenance`. In JSON, this is + * base-64 encoded. + */ + signature?: string; + } + /** + * A CloudRepoSourceContext denotes a particular revision in a Google Cloud + * Source Repo. + */ + export interface Schema$CloudRepoSourceContext { + /** + * An alias, which may be a branch or tag. + */ + aliasContext?: Schema$AliasContext; + /** + * The ID of the repo. + */ + repoId?: Schema$RepoId; + /** + * A revision ID. + */ + revisionId?: string; + } + /** + * Command describes a step performed as part of the build pipeline. + */ + export interface Schema$Command { + /** + * Command-line arguments used when executing this command. + */ + args?: string[]; + /** + * Working directory (relative to project source root) used when running + * this command. + */ + dir?: string; + /** + * Environment variables set before running this command. + */ + env?: string[]; + /** + * Optional unique identifier for this command, used in wait_for to + * reference this command as a dependency. + */ + id?: string; + /** + * Required. Name of the command, as presented on the command line, or if + * the command is packaged as a Docker container, as presented to `docker + * pull`. + */ + name?: string; + /** + * The ID(s) of the command(s) that this command depends on. + */ + waitFor?: string[]; + } + /** + * An artifact that can be deployed in some runtime. + */ + export interface Schema$Deployable { + /** + * Required. Resource URI for the artifact being deployed. + */ + resourceUri?: string[]; + } + /** + * The period during which some deployable was active in a runtime. + */ + export interface Schema$Deployment { + /** + * Address of the runtime element hosting this deployment. + */ + address?: string; + /** + * Configuration used to create this deployment. + */ + config?: string; + /** + * Required. Beginning of the lifetime of this deployment. + */ + deployTime?: string; + /** + * Platform hosting this deployment. + */ + platform?: string; + /** + * Output only. Resource URI for the artifact being deployed taken from the + * deployable field with the same name. + */ + resourceUri?: string[]; + /** + * End of the lifetime of this deployment. + */ + undeployTime?: string; + /** + * Identity of the user that triggered this deployment. + */ + userEmail?: string; + } + /** + * Derived describes the derived image portion (Occurrence) of the DockerImage + * relationship. This image would be produced from a Dockerfile with FROM + * <DockerImage.Basis in attached Note>. + */ + export interface Schema$Derived { + /** + * Output only. This contains the base image URL for the derived image + * occurrence. + */ + baseResourceUrl?: string; + /** + * Output only. The number of layers by which this image differs from the + * associated image basis. + */ + distance?: number; + /** + * Required. The fingerprint of the derived image. + */ + fingerprint?: Schema$Fingerprint; + /** + * This contains layer-specific metadata, if populated it has length + * "distance" and is ordered with [distance] being the layer + * immediately following the base image and [1] being the final layer. + */ + layerInfo?: Schema$Layer[]; + } + /** + * Identifies all appearances of this vulnerability in the package for a + * specific distro/location. For example: glibc in + * cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 + */ + export interface Schema$Detail { + /** + * Required. The CPE URI in [cpe + * format](https://cpe.mitre.org/specification/) in which the vulnerability + * manifests. Examples include distro or storage location for vulnerable + * jar. + */ + cpeUri?: string; + /** + * A vendor-specific description of this note. + */ + description?: string; + /** + * The fix for this specific package version. + */ + fixedLocation?: Schema$VulnerabilityLocation; + /** + * Whether this detail is obsolete. Occurrences are expected not to point to + * obsolete details. + */ + isObsolete?: boolean; + /** + * The max version of the package in which the vulnerability exists. + */ + maxAffectedVersion?: Schema$Version; + /** + * The min version of the package in which the vulnerability exists. + */ + minAffectedVersion?: Schema$Version; + /** + * Required. The name of the package where the vulnerability was found. + */ + package?: string; + /** + * The type of package; whether native or non native(ruby gems, node.js + * packages etc). + */ + packageType?: string; + /** + * The severity (eg: distro assigned severity) for this vulnerability. + */ + severityName?: string; + } + /** + * Details of an attestation occurrence. + */ + export interface Schema$Details { + /** + * Required. Attestation for the resource. + */ + attestation?: Schema$Attestation; + } + /** + * Provides information about the analysis status of a discovered resource. + */ + export interface Schema$Discovered { + /** + * The status of discovery for the resource. + */ + analysisStatus?: string; + /** + * When an error is encountered this will contain a LocalizedMessage under + * details to show to the user. The LocalizedMessage is output only and + * populated by the API. + */ + analysisStatusError?: Schema$Status; + /** + * Whether the resource is continuously analyzed. + */ + continuousAnalysis?: string; + /** + * The last time continuous analysis was done for this resource. Deprecated, + * do not use. + */ + lastAnalysisTime?: string; + } + /** + * A note that indicates a type of analysis a provider would perform. This + * note exists in a provider's project. A `Discovery` occurrence is + * created in a consumer's project at the start of analysis. + */ + export interface Schema$Discovery { + /** + * Required. Immutable. The kind of analysis that is handled by this + * discovery. + */ + analysisKind?: string; + } + /** + * This represents a particular channel of distribution for a given package. + * E.g., Debian's jessie-backports dpkg mirror. + */ + export interface Schema$Distribution { + /** + * The CPU architecture for which packages in this distribution channel were + * built. + */ + architecture?: string; + /** + * Required. The cpe_uri in [CPE + * format](https://cpe.mitre.org/specification/) denoting the package + * manager version distributing a package. + */ + cpeUri?: string; + /** + * The distribution channel-specific description of this package. + */ + description?: string; + /** + * The latest available version of this package in this distribution + * channel. + */ + latestVersion?: Schema$Version; + /** + * A freeform string denoting the maintainer of this package. + */ + maintainer?: string; + /** + * The distribution channel-specific homepage for this package. + */ + url?: string; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} + /** + * Represents an expression text. Example: title: "User account + * presence" description: "Determines whether the request has a + * user account" expression: "size(request.user) > 0" + */ + export interface Schema$Expr { + /** + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + */ + description?: string; + /** + * Textual representation of an expression in Common Expression Language + * syntax. The application context of the containing message determines + * which well-known feature set of CEL is supported. + */ + expression?: string; + /** + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + */ + location?: string; + /** + * An optional title for the expression, i.e. a short string describing its + * purpose. This can be used e.g. in UIs which allow to enter the + * expression. + */ + title?: string; + } + /** + * Container message for hashes of byte content of files, used in source + * messages to verify integrity of source input to the build. + */ + export interface Schema$FileHashes { + /** + * Required. Collection of file hashes. + */ + fileHash?: Schema$Hash[]; + } + /** + * A set of properties that uniquely identify a given Docker image. + */ + export interface Schema$Fingerprint { + /** + * Required. The layer ID of the final layer in the Docker image's v1 + * representation. + */ + v1Name?: string; + /** + * Required. The ordered list of v2 blobs that represent a given image. + */ + v2Blob?: string[]; + /** + * Output only. The name of the image's v2 blobs computed via: [bottom] + * := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) + * Only the name of the final blob is kept. + */ + v2Name?: string; + } + /** + * Per resource and severity counts of fixable and total vulnerabilites. + */ + export interface Schema$FixableTotalByDigest { + /** + * The number of fixable vulnerabilities associated with this resource. + */ + fixableCount?: string; + /** + * The affected resource. + */ + resource?: Schema$Resource; + /** + * The severity for this count. SEVERITY_UNSPECIFIED indicates total across + * all severities. + */ + severity?: string; + /** + * The total number of vulnerabilities associated with this resource. + */ + totalCount?: string; + } + /** + * A SourceContext referring to a Gerrit project. + */ + export interface Schema$GerritSourceContext { + /** + * An alias, which may be a branch or tag. + */ + aliasContext?: Schema$AliasContext; + /** + * The full project name within the host. Projects may be nested, so + * "project/subproject" is a valid project name. The "repo + * name" is the hostURI/project. + */ + gerritProject?: string; + /** + * The URI of a running Gerrit instance. + */ + hostUri?: string; + /** + * A revision (commit) ID. + */ + revisionId?: string; + } + /** + * Request message for `GetIamPolicy` method. + */ + export interface Schema$GetIamPolicyRequest {} + /** + * A GitSourceContext denotes a particular revision in a third party Git + * repository (e.g., GitHub). + */ + export interface Schema$GitSourceContext { + /** + * Git commit hash. + */ + revisionId?: string; + /** + * Git repository URL. + */ + url?: string; + } + /** + * Metadata for all operations used and required for all operations that + * created by Container Analysis Providers + */ + export interface Schema$GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata { + /** + * Output only. The time this operation was created. + */ + createTime?: string; + /** + * Output only. The time that this operation was marked completed or failed. + */ + endTime?: string; + } + /** + * Details of a build occurrence. + */ + export interface Schema$GrafeasV1beta1BuildDetails { + /** + * Required. The actual provenance for the build. + */ + provenance?: Schema$BuildProvenance; + /** + * Serialized JSON representation of the provenance, used in generating the + * build signature in the corresponding build note. After verifying the + * signature, `provenance_bytes` can be unmarshalled and compared to the + * provenance to confirm that it is unchanged. A base64-encoded string + * representation of the provenance bytes is used for the signature in order + * to interoperate with openssl which expects this format for signature + * verification. The serialized form is captured both to avoid ambiguity in + * how the provenance is marshalled to json as well to prevent + * incompatibilities with future changes. + */ + provenanceBytes?: string; + } + /** + * Details of a deployment occurrence. + */ + export interface Schema$GrafeasV1beta1DeploymentDetails { + /** + * Required. Deployment history for the resource. + */ + deployment?: Schema$Deployment; + } + /** + * Details of a discovery occurrence. + */ + export interface Schema$GrafeasV1beta1DiscoveryDetails { + /** + * Required. Analysis status for the discovered resource. + */ + discovered?: Schema$Discovered; + } + /** + * Details of an image occurrence. + */ + export interface Schema$GrafeasV1beta1ImageDetails { + /** + * Required. Immutable. The child image derived from the base image. + */ + derivedImage?: Schema$Derived; + } + /** + * Details of a package occurrence. + */ + export interface Schema$GrafeasV1beta1PackageDetails { + /** + * Required. Where the package was installed. + */ + installation?: Schema$Installation; + } + /** + * Details of a vulnerability Occurrence. + */ + export interface Schema$GrafeasV1beta1VulnerabilityDetails { + /** + * Output only. The CVSS score of this vulnerability. CVSS score is on a + * scale of 0-10 where 0 indicates low severity and 10 indicates high + * severity. + */ + cvssScore?: number; + /** + * Output only. A detailed description of this vulnerability. + */ + longDescription?: string; + /** + * Required. The set of affected locations and their fixes (if available) + * within the associated resource. + */ + packageIssue?: Schema$PackageIssue[]; + /** + * Output only. URLs related to this vulnerability. + */ + relatedUrls?: Schema$RelatedUrl[]; + /** + * Output only. The note provider assigned Severity of the vulnerability. + */ + severity?: string; + /** + * Output only. A one sentence description of this vulnerability. + */ + shortDescription?: string; + /** + * The type of package; whether native or non native(ruby gems, node.js + * packages etc) + */ + type?: string; + } + /** + * Container message for hash values. + */ + export interface Schema$Hash { + /** + * Required. The type of hash that was performed. + */ + type?: string; + /** + * Required. The hash value. + */ + value?: string; + } + /** + * This submessage provides human-readable hints about the purpose of the + * authority. Because the name of a note acts as its resource reference, it is + * important to disambiguate the canonical name of the Note (which might be a + * UUID for security purposes) from "readable" names more suitable + * for debug output. Note that these hints should not be used to look up + * authorities in security sensitive contexts, such as when looking up + * attestations to verify. + */ + export interface Schema$Hint { + /** + * Required. The human readable name of this attestation authority, for + * example "qa". + */ + humanReadableName?: string; + } + /** + * This represents how a particular software package may be installed on a + * system. + */ + export interface Schema$Installation { + /** + * Required. All of the places within the filesystem versions of this + * package have been found. + */ + location?: Schema$Location[]; + /** + * Output only. The name of the installed package. + */ + name?: string; + } + /** + * Layer holds metadata specific to a layer of a Docker image. + */ + export interface Schema$Layer { + /** + * The recovered arguments to the Dockerfile directive. + */ + arguments?: string; + /** + * Required. The recovered Dockerfile directive used to construct this + * layer. + */ + directive?: string; + } + /** + * Response for listing occurrences for a note. + */ + export interface Schema$ListNoteOccurrencesResponse { + /** + * Token to provide to skip to a particular spot in the list. + */ + nextPageToken?: string; + /** + * The occurrences attached to the specified note. + */ + occurrences?: Schema$Occurrence[]; + } + /** + * Response for listing notes. + */ + export interface Schema$ListNotesResponse { + /** + * The next pagination token in the list response. It should be used as + * `page_token` for the following request. An empty value means no more + * results. + */ + nextPageToken?: string; + /** + * The notes requested. + */ + notes?: Schema$Note[]; + } + /** + * Response for listing occurrences. + */ + export interface Schema$ListOccurrencesResponse { + /** + * The next pagination token in the list response. It should be used as + * `page_token` for the following request. An empty value means no more + * results. + */ + nextPageToken?: string; + /** + * The occurrences requested. + */ + occurrences?: Schema$Occurrence[]; + } + /** + * Response for listing scan configurations. + */ + export interface Schema$ListScanConfigsResponse { + /** + * The next pagination token in the list response. It should be used as + * `page_token` for the following request. An empty value means no more + * results. + */ + nextPageToken?: string; + /** + * The scan configurations requested. + */ + scanConfigs?: Schema$ScanConfig[]; + } + /** + * An occurrence of a particular package installation found within a + * system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. + */ + export interface Schema$Location { + /** + * Required. The CPE URI in [CPE + * format](https://cpe.mitre.org/specification/) denoting the package + * manager version distributing a package. + */ + cpeUri?: string; + /** + * The path from which we gathered that this package/version is installed. + */ + path?: string; + /** + * The version installed at this location. + */ + version?: Schema$Version; + } + /** + * A type of analysis that can be done for a resource. + */ + export interface Schema$Note { + /** + * A note describing an attestation role. + */ + attestationAuthority?: Schema$Authority; + /** + * A note describing a base image. + */ + baseImage?: Schema$Basis; + /** + * A note describing build provenance for a verifiable build. + */ + build?: Schema$Build; + /** + * Output only. The time this note was created. This field can be used as a + * filter in list requests. + */ + createTime?: string; + /** + * A note describing something that can be deployed. + */ + deployable?: Schema$Deployable; + /** + * A note describing the initial analysis of a resource. + */ + discovery?: Schema$Discovery; + /** + * Time of expiration for this note. Empty if note does not expire. + */ + expirationTime?: string; + /** + * Output only. The type of analysis. This field can be used as a filter in + * list requests. + */ + kind?: string; + /** + * A detailed description of this note. + */ + longDescription?: string; + /** + * Output only. The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + */ + name?: string; + /** + * A note describing a package hosted by various package managers. + */ + package?: Schema$Package; + /** + * Other notes related to this note. + */ + relatedNoteNames?: string[]; + /** + * URLs associated with this note. + */ + relatedUrl?: Schema$RelatedUrl[]; + /** + * A one sentence description of this note. + */ + shortDescription?: string; + /** + * Output only. The time this note was last updated. This field can be used + * as a filter in list requests. + */ + updateTime?: string; + /** + * A note describing a package vulnerability. + */ + vulnerability?: Schema$Vulnerability; + } + /** + * An instance of an analysis type that has been found on a resource. + */ + export interface Schema$Occurrence { + /** + * Describes an attestation of an artifact. + */ + attestation?: Schema$Details; + /** + * Describes a verifiable build. + */ + build?: Schema$GrafeasV1beta1BuildDetails; + /** + * Output only. The time this occurrence was created. + */ + createTime?: string; + /** + * Describes the deployment of an artifact on a runtime. + */ + deployment?: Schema$GrafeasV1beta1DeploymentDetails; + /** + * Describes how this resource derives from the basis in the associated + * note. + */ + derivedImage?: Schema$GrafeasV1beta1ImageDetails; + /** + * Describes when a resource was discovered. + */ + discovered?: Schema$GrafeasV1beta1DiscoveryDetails; + /** + * Describes the installation of a package on the linked resource. + */ + installation?: Schema$GrafeasV1beta1PackageDetails; + /** + * Output only. This explicitly denotes which of the occurrence details are + * specified. This field can be used as a filter in list requests. + */ + kind?: string; + /** + * Output only. The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + */ + name?: string; + /** + * Required. Immutable. The analysis note associated with this occurrence, + * in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can + * be used as a filter in list requests. + */ + noteName?: string; + /** + * A description of actions that can be taken to remedy the note. + */ + remediation?: string; + /** + * Required. Immutable. The resource for which the occurrence applies. + */ + resource?: Schema$Resource; + /** + * Output only. The time this occurrence was last updated. + */ + updateTime?: string; + /** + * Describes a security vulnerability. + */ + vulnerability?: Schema$GrafeasV1beta1VulnerabilityDetails; + } + /** + * This represents a particular package that is distributed over various + * channels. E.g., glibc (aka libc6) is distributed by many, at various + * versions. + */ + export interface Schema$Package { + /** + * The various channels by which a package is distributed. + */ + distribution?: Schema$Distribution[]; + /** + * Required. Immutable. The name of the package. + */ + name?: string; + } + /** + * This message wraps a location affected by a vulnerability and its + * associated fix (if one is available). + */ + export interface Schema$PackageIssue { + /** + * Required. The location of the vulnerability. + */ + affectedLocation?: Schema$VulnerabilityLocation; + /** + * The location of the available fix for vulnerability. + */ + fixedLocation?: Schema$VulnerabilityLocation; + /** + * The severity (e.g., distro assigned severity) for this vulnerability. + */ + severityName?: string; + } + /** + * An attestation wrapper with a PGP-compatible signature. This message only + * supports `ATTACHED` signatures, where the payload that is signed is + * included alongside the signature itself in the same file. + */ + export interface Schema$PgpSignedAttestation { + /** + * Type (for example schema) of the attestation payload that was signed. The + * verifier must ensure that the provided type is one that the verifier + * supports, and that the attestation payload is a valid instantiation of + * that type (for example by validating a JSON schema). + */ + contentType?: string; + /** + * The cryptographic fingerprint of the key used to generate the signature, + * as output by, e.g. `gpg --list-keys`. This should be the version 4, full + * 160-bit fingerprint, expressed as a 40 character hexidecimal string. See + * https://tools.ietf.org/html/rfc4880#section-12.2 for details. + * Implementations may choose to acknowledge "LONG", + * "SHORT", or other abbreviated key IDs, but only the full + * fingerprint is guaranteed to work. In gpg, the full fingerprint can be + * retrieved from the `fpr` field returned when calling --list-keys with + * --with-colons. For example: ``` gpg --with-colons --with-fingerprint + * --force-v4-certs \ --list-keys attester@example.com + * tru::1:1513631572:0:3:1:5 pub:...<SNIP>... + * fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: ``` Above, the + * fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. + */ + pgpKeyId?: string; + /** + * Required. The raw content of the signature, as output by GNU Privacy + * Guard (GPG) or equivalent. Since this message only supports attached + * signatures, the payload that was signed must be attached. While the + * signature format supported is dependent on the verification + * implementation, currently only ASCII-armored (`--armor` to gpg), + * non-clearsigned (`--sign` rather than `--clearsign` to gpg) are + * supported. Concretely, `gpg --sign --armor --output=signature.gpg + * payload.json` will create the signature content expected in this field in + * `signature.gpg` for the `payload.json` attestation payload. + */ + signature?: string; + } + /** + * Defines an Identity and Access Management (IAM) policy. It is used to + * specify access control policies for Cloud Platform resources. A `Policy` + * consists of a list of `bindings`. A `binding` binds a list of `members` to + * a `role`, where the members can be user accounts, Google groups, Google + * domains, and service accounts. A `role` is a named list of permissions + * defined by IAM. **JSON Example** { "bindings": [ { + * "role": "roles/owner", "members": [ + * "user:mike@example.com", "group:admins@example.com", + * "domain:google.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { + * "role": "roles/viewer", "members": + * ["user:sean@example.com"] } ] } **YAML + * Example** bindings: - members: - user:mike@example.com - + * group:admins@example.com - domain:google.com - + * serviceAccount:my-other-app@appspot.gserviceaccount.com role: + * roles/owner - members: - user:sean@example.com role: + * roles/viewer For a description of IAM and its features, see the [IAM + * developer's guide](https://cloud.google.com/iam/docs). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. `bindings` with no members + * will result in an error. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. It + * is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the + * policy. If no `etag` is provided in the call to `setIamPolicy`, then the + * existing policy is overwritten blindly. + */ + etag?: string; + /** + * Deprecated. + */ + version?: number; + } + /** + * Selects a repo using a Google Cloud Platform project ID (e.g., + * winged-cargo-31) and a repo name within that project. + */ + export interface Schema$ProjectRepoId { + /** + * The ID of the project. + */ + projectId?: string; + /** + * The name of the repo. Leave empty for the default repo. + */ + repoName?: string; + } + /** + * Metadata for any related URL information. + */ + export interface Schema$RelatedUrl { + /** + * Label to describe usage of the URL. + */ + label?: string; + /** + * Specific URL associated with the resource. + */ + url?: string; + } + /** + * A unique identifier for a Cloud Repo. + */ + export interface Schema$RepoId { + /** + * A combination of a project ID and a repo name. + */ + projectRepoId?: Schema$ProjectRepoId; + /** + * A server-assigned, globally unique identifier. + */ + uid?: string; + } + /** + * An entity that can have metadata. For example, a Docker image. + */ + export interface Schema$Resource { + /** + * The hash of the resource content. For example, the Docker digest. + */ + contentHash?: Schema$Hash; + /** + * The name of the resource. For example, the name of a Docker image - + * "Debian". + */ + name?: string; + /** + * Required. The unique URI of the resource. For example, + * `https://gcr.io/project/image@sha256:foo` for a Docker image. + */ + uri?: string; + } + /** + * A scan configuration specifies whether Cloud components in a project have a + * particular type of analysis being run. For example, it can configure + * whether vulnerability scanning is being done on Docker images or not. + */ + export interface Schema$ScanConfig { + /** + * Output only. The time this scan config was created. + */ + createTime?: string; + /** + * Output only. A human-readable description of what the scan configuration + * does. + */ + description?: string; + /** + * Whether the scan is enabled. + */ + enabled?: boolean; + /** + * Output only. The name of the scan configuration in the form of + * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + */ + name?: string; + /** + * Output only. The time this scan config was last updated. + */ + updateTime?: string; + } + /** + * 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; + } + /** + * Source describes the location of the source used for the build. + */ + export interface Schema$Source { + /** + * If provided, some of the source code used for the build may be found in + * these locations, in the case where the source repository had multiple + * remotes or submodules. This list will not include the context specified + * in the context field. + */ + additionalContexts?: Schema$SourceContext[]; + /** + * If provided, the input binary artifacts for the build came from this + * location. + */ + artifactStorageSourceUri?: string; + /** + * If provided, the source code used for the build came from this location. + */ + context?: Schema$SourceContext; + /** + * Hash(es) of the build source, which can be used to verify that the + * original source integrity was maintained in the build. The keys to this + * map are file paths used as build source and the values contain the hash + * values for those files. If the build source came in a single package + * such as a gzipped tarfile (.tar.gz), the FileHash will be for the single + * path to that file. + */ + fileHashes?: {[key: string]: Schema$FileHashes;}; + } + /** + * A SourceContext is a reference to a tree of files. A SourceContext together + * with a path point to a unique revision of a single file or directory. + */ + export interface Schema$SourceContext { + /** + * A SourceContext referring to a revision in a Google Cloud Source Repo. + */ + cloudRepo?: Schema$CloudRepoSourceContext; + /** + * A SourceContext referring to a Gerrit project. + */ + gerrit?: Schema$GerritSourceContext; + /** + * A SourceContext referring to any third party Git repo (e.g., GitHub). + */ + git?: Schema$GitSourceContext; + /** + * Labels with user defined metadata. + */ + labels?: {[key: string]: string;}; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + /** + * 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[]; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + /** + * Version contains structured information about the version of a package. + */ + export interface Schema$Version { + /** + * Used to correct mistakes in the version numbering scheme. + */ + epoch?: number; + /** + * Required. Distinguishes between sentinel MIN/MAX versions and normal + * versions. + */ + kind?: string; + /** + * Required only when version kind is NORMAL. The main part of the version + * name. + */ + name?: string; + /** + * The iteration of the package build from the above version. + */ + revision?: string; + } + /** + * Vulnerability provides metadata about a security vulnerability in a Note. + */ + export interface Schema$Vulnerability { + /** + * The CVSS score for this vulnerability. + */ + cvssScore?: number; + /** + * All information about the package to specifically identify this + * vulnerability. One entry per (version range and cpe_uri) the package + * vulnerability has manifested in. + */ + details?: Schema$Detail[]; + /** + * Note provider assigned impact of the vulnerability. + */ + severity?: string; + } + /** + * The location of the vulnerability. + */ + export interface Schema$VulnerabilityLocation { + /** + * Required. The CPE URI in [cpe + * format](https://cpe.mitre.org/specification/) format. Examples include + * distro or storage location for vulnerable jar. + */ + cpeUri?: string; + /** + * Required. The package being described. + */ + package?: string; + /** + * Required. The version of the package being described. + */ + version?: Schema$Version; + } + /** + * A summary of how many vulnerability occurrences there are per resource and + * severity type. + */ + export interface Schema$VulnerabilityOccurrencesSummary { + /** + * A listing by resource of the number of fixable and total vulnerabilities. + */ + counts?: Schema$FixableTotalByDigest[]; + } + + + export class Resource$Projects { + notes: Resource$Projects$Notes; + occurrences: Resource$Projects$Occurrences; + scanConfigs: Resource$Projects$Scanconfigs; + constructor() { + this.notes = new Resource$Projects$Notes(); + this.occurrences = new Resource$Projects$Occurrences(); + this.scanConfigs = new Resource$Projects$Scanconfigs(); + } + } + + + export class Resource$Projects$Notes { + occurrences: Resource$Projects$Notes$Occurrences; + constructor() { + this.occurrences = new Resource$Projects$Notes$Occurrences(); + } + + + /** + * containeranalysis.projects.notes.batchCreate + * @desc Creates new notes in batch. + * @alias containeranalysis.projects.notes.batchCreate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created. + * @param {().BatchCreateNotesRequest} 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 + */ + batchCreate( + params?: Params$Resource$Projects$Notes$Batchcreate, + options?: MethodOptions): AxiosPromise; + batchCreate( + params: Params$Resource$Projects$Notes$Batchcreate, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + batchCreate( + params: Params$Resource$Projects$Notes$Batchcreate, + callback: BodyResponseCallback): void; + batchCreate( + callback: BodyResponseCallback): void; + batchCreate( + paramsOrCallback?: Params$Resource$Projects$Notes$Batchcreate| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Batchcreate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Batchcreate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/notes:batchCreate') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.create + * @desc Creates a new note. + * @alias containeranalysis.projects.notes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.noteId The ID to use for this note. + * @param {string} params.parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created. + * @param {().Note} 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$Notes$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Notes$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Notes$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Notes$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.delete + * @desc Deletes the specified note. + * @alias containeranalysis.projects.notes.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_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$Notes$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Notes$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Notes$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Notes$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.get + * @desc Gets the specified note. + * @alias containeranalysis.projects.notes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_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$Notes$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Notes$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Notes$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Notes$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.getIamPolicy + * @desc Gets the access control policy for a note or an occurrence + * resource. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a note or occurrence, respectively. The resource takes the format + * `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. + * @alias containeranalysis.projects.notes.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Notes$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Notes$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Notes$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Notes$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.list + * @desc Lists notes for the specified project. + * @alias containeranalysis.projects.notes.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {integer=} params.pageSize Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {string} params.parent The name of the project to list notes for in the form of `projects/[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 + */ + list(params?: Params$Resource$Projects$Notes$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Notes$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Notes$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Notes$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.patch + * @desc Updates the specified note. + * @alias containeranalysis.projects.notes.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param {string=} params.updateMask The fields to update. + * @param {().Note} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Notes$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Notes$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Notes$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Notes$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Notes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.setIamPolicy + * @desc Sets the access control policy on the specified note or occurrence. + * Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a note or an occurrence, respectively. The resource takes the format + * `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. + * @alias containeranalysis.projects.notes.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Notes$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Notes$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Notes$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Notes$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.notes.testIamPermissions + * @desc Returns the permissions that a caller has on the specified note or + * occurrence. Requires list permission on the project (for example, + * `containeranalysis.notes.list`). The resource takes the format + * `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. + * @alias containeranalysis.projects.notes.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Notes$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Notes$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Notes$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Projects$Notes$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Notes$Batchcreate extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under + * which the notes are to be created. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchCreateNotesRequest; + } + export interface Params$Resource$Projects$Notes$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID to use for this note. + */ + noteId?: string; + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under + * which the note is to be created. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Note; + } + export interface Params$Resource$Projects$Notes$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Notes$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Notes$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Notes$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * Number of notes to return in the list. Must be positive. Max allowed page + * size is 1000. If not specified, page size defaults to 20. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + /** + * The name of the project to list notes for in the form of + * `projects/[PROJECT_ID]`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Notes$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + */ + name?: string; + /** + * The fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Note; + } + export interface Params$Resource$Projects$Notes$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$Notes$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$Notes$Occurrences { + constructor() {} + + + /** + * containeranalysis.projects.notes.occurrences.list + * @desc Lists occurrences referencing the specified note. Provider projects + * can use this method to get all occurrences across consumer projects + * referencing the specified note. + * @alias containeranalysis.projects.notes.occurrences.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string} params.name The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param {integer=} params.pageSize Number of occurrences to return in the list. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {object} [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$Notes$Occurrences$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Notes$Occurrences$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Projects$Notes$Occurrences$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Projects$Notes$Occurrences$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Notes$Occurrences$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Notes$Occurrences$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/occurrences') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Notes$Occurrences$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + */ + name?: string; + /** + * Number of occurrences to return in the list. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + } + + + + export class Resource$Projects$Occurrences { + constructor() {} + + + /** + * containeranalysis.projects.occurrences.batchCreate + * @desc Creates new occurrences in batch. + * @alias containeranalysis.projects.occurrences.batchCreate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created. + * @param {().BatchCreateOccurrencesRequest} 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 + */ + batchCreate( + params?: Params$Resource$Projects$Occurrences$Batchcreate, + options?: MethodOptions): + AxiosPromise; + batchCreate( + params: Params$Resource$Projects$Occurrences$Batchcreate, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + batchCreate( + params: Params$Resource$Projects$Occurrences$Batchcreate, + callback: BodyResponseCallback): + void; + batchCreate( + callback: BodyResponseCallback): + void; + batchCreate( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Batchcreate| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Batchcreate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Batchcreate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/occurrences:batchCreate') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.create + * @desc Creates a new occurrence. + * @alias containeranalysis.projects.occurrences.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrence is to be created. + * @param {().Occurrence} 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$Occurrences$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Occurrences$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Occurrences$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/occurrences') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.delete + * @desc Deletes the specified occurrence. For example, use this method to + * delete an occurrence when the occurrence is no longer applicable for the + * given resource. + * @alias containeranalysis.projects.occurrences.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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$Occurrences$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Occurrences$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Occurrences$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.get + * @desc Gets the specified occurrence. + * @alias containeranalysis.projects.occurrences.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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$Occurrences$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Occurrences$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Occurrences$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Occurrences$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Occurrences$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.getIamPolicy + * @desc Gets the access control policy for a note or an occurrence + * resource. Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a note or occurrence, respectively. The resource takes the format + * `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. + * @alias containeranalysis.projects.occurrences.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Occurrences$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Occurrences$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Occurrences$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.getNotes + * @desc Gets the note attached to the specified occurrence. Consumer + * projects can use this method to get a note that belongs to a provider + * project. + * @alias containeranalysis.projects.occurrences.getNotes + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 + */ + getNotes( + params?: Params$Resource$Projects$Occurrences$Getnotes, + options?: MethodOptions): AxiosPromise; + getNotes( + params: Params$Resource$Projects$Occurrences$Getnotes, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getNotes( + params: Params$Resource$Projects$Occurrences$Getnotes, + callback: BodyResponseCallback): void; + getNotes(callback: BodyResponseCallback): void; + getNotes( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Getnotes| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Getnotes; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Getnotes; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/notes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.getVulnerabilitySummary + * @desc Gets a summary of the number and severity of occurrences. + * @alias containeranalysis.projects.occurrences.getVulnerabilitySummary + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {string} params.parent The name of the project to get a vulnerability summary for in the form of `projects/[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 + */ + getVulnerabilitySummary( + params?: Params$Resource$Projects$Occurrences$Getvulnerabilitysummary, + options?: MethodOptions): + AxiosPromise; + getVulnerabilitySummary( + params: Params$Resource$Projects$Occurrences$Getvulnerabilitysummary, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + getVulnerabilitySummary( + params: Params$Resource$Projects$Occurrences$Getvulnerabilitysummary, + callback: BodyResponseCallback): + void; + getVulnerabilitySummary( + callback: BodyResponseCallback): + void; + getVulnerabilitySummary( + paramsOrCallback?: + Params$Resource$Projects$Occurrences$Getvulnerabilitysummary| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Getvulnerabilitysummary; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Occurrences$Getvulnerabilitysummary; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v1beta1/{+parent}/occurrences:vulnerabilitySummary') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.list + * @desc Lists occurrences for the specified project. + * @alias containeranalysis.projects.occurrences.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {integer=} params.pageSize Number of occurrences to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {string} params.parent The name of the project to list occurrences for in the form of `projects/[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 + */ + list( + params?: Params$Resource$Projects$Occurrences$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Occurrences$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Occurrences$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Occurrences$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Occurrences$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/occurrences') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.patch + * @desc Updates the specified occurrence. + * @alias containeranalysis.projects.occurrences.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @param {string=} params.updateMask The fields to update. + * @param {().Occurrence} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Occurrences$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Occurrences$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Occurrences$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.setIamPolicy + * @desc Sets the access control policy on the specified note or occurrence. + * Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource + * is a note or an occurrence, respectively. The resource takes the format + * `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. + * @alias containeranalysis.projects.occurrences.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Occurrences$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Occurrences$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Occurrences$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Occurrences$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.occurrences.testIamPermissions + * @desc Returns the permissions that a caller has on the specified note or + * occurrence. Requires list permission on the project (for example, + * `containeranalysis.notes.list`). The resource takes the format + * `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. + * @alias containeranalysis.projects.occurrences.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Occurrences$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Occurrences$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Occurrences$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Occurrences$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Occurrences$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Occurrences$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Occurrences$Batchcreate extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under + * which the occurrences are to be created. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchCreateOccurrencesRequest; + } + export interface Params$Resource$Projects$Occurrences$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under + * which the occurrence is to be created. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Occurrence; + } + export interface Params$Resource$Projects$Occurrences$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Occurrences$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Occurrences$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Occurrences$Getnotes extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Occurrences$Getvulnerabilitysummary + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The name of the project to get a vulnerability summary for in the form of + * `projects/[PROJECT_ID]`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Occurrences$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * Number of occurrences to return in the list. Must be positive. Max + * allowed page size is 1000. If not specified, page size defaults to 20. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + /** + * The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Occurrences$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + */ + name?: string; + /** + * The fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Occurrence; + } + export interface Params$Resource$Projects$Occurrences$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$Occurrences$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$Scanconfigs { + constructor() {} + + + /** + * containeranalysis.projects.scanConfigs.get + * @desc Gets the specified scan configuration. + * @alias containeranalysis.projects.scanConfigs.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the scan configuration in the form of `projects/[PROJECT_ID]/scanConfigs/[SCAN_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$Projects$Scanconfigs$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Scanconfigs$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Scanconfigs$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Scanconfigs$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Scanconfigs$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Scanconfigs$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.scanConfigs.list + * @desc Lists scan configurations for the specified project. + * @alias containeranalysis.projects.scanConfigs.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter expression. + * @param {integer=} params.pageSize The number of scan configs to return in the list. + * @param {string=} params.pageToken Token to provide to skip to a particular spot in the list. + * @param {string} params.parent The name of the project to list scan configurations for in the form of `projects/[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 + */ + list( + params?: Params$Resource$Projects$Scanconfigs$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Scanconfigs$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Scanconfigs$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Scanconfigs$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Scanconfigs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Scanconfigs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/scanConfigs') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * containeranalysis.projects.scanConfigs.update + * @desc Updates the specified scan configuration. + * @alias containeranalysis.projects.scanConfigs.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the scan configuration in the form of `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + * @param {().ScanConfig} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Projects$Scanconfigs$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Projects$Scanconfigs$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Projects$Scanconfigs$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Projects$Scanconfigs$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Scanconfigs$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Scanconfigs$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://containeranalysis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Scanconfigs$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the scan configuration in the form of + * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Scanconfigs$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter expression. + */ + filter?: string; + /** + * The number of scan configs to return in the list. + */ + pageSize?: number; + /** + * Token to provide to skip to a particular spot in the list. + */ + pageToken?: string; + /** + * The name of the project to list scan configurations for in the form of + * `projects/[PROJECT_ID]`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Scanconfigs$Update extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the scan configuration in the form of + * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ScanConfig; + } +} diff --git a/src/apis/content/index.ts b/src/apis/content/index.ts index 44c4bff1205..122e51bc474 100644 --- a/src/apis/content/index.ts +++ b/src/apis/content/index.ts @@ -14,15 +14,21 @@ /*! THIS FILE IS AUTO-GENERATED */ import {getAPI, GoogleConfigurable} from 'googleapis-common'; + import {content_v2} from './v2'; +import {content_v2_1} from './v2.1'; export const VERSIONS = { + 'v2.1': content_v2_1.Content, 'v2': content_v2.Content, }; +export function content(version: 'v2_1'): content_v2_1.Content; +export function content(options: content_v2_1.Options): content_v2_1.Content; export function content(version: 'v2'): content_v2.Content; export function content(options: content_v2.Options): content_v2.Content; -export function content( - this: GoogleConfigurable, versionOrOptions: 'v2'|content_v2.Options) { +export function content( + this: GoogleConfigurable, + versionOrOptions: 'v2_1'|content_v2_1.Options|'v2'|content_v2.Options) { return getAPI('content', versionOrOptions, VERSIONS, this); } diff --git a/src/apis/content/v2.1.ts b/src/apis/content/v2.1.ts new file mode 100644 index 00000000000..29b877245e0 --- /dev/null +++ b/src/apis/content/v2.1.ts @@ -0,0 +1,12966 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace content_v2_1 { + export interface Options extends GlobalOptions { + version: 'v2_1'; + } + + let context: APIRequestContext; + + 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; + } + + /** + * Content API for Shopping + * + * Manages product items, inventory, and Merchant Center accounts for Google + * Shopping. + * + * @example + * const {google} = require('googleapis'); + * const content = google.content('v2.1'); + * + * @namespace content + * @type {Function} + * @version v2.1 + * @variation v2.1 + * @param {object=} options Options for Content + */ + export class Content { + accounts: Resource$Accounts; + accountstatuses: Resource$Accountstatuses; + accounttax: Resource$Accounttax; + datafeeds: Resource$Datafeeds; + datafeedstatuses: Resource$Datafeedstatuses; + liasettings: Resource$Liasettings; + orderinvoices: Resource$Orderinvoices; + orderpayments: Resource$Orderpayments; + orderreports: Resource$Orderreports; + orderreturns: Resource$Orderreturns; + orders: Resource$Orders; + pos: Resource$Pos; + products: Resource$Products; + productstatuses: Resource$Productstatuses; + shippingsettings: Resource$Shippingsettings; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.accounts = new Resource$Accounts(); + this.accountstatuses = new Resource$Accountstatuses(); + this.accounttax = new Resource$Accounttax(); + this.datafeeds = new Resource$Datafeeds(); + this.datafeedstatuses = new Resource$Datafeedstatuses(); + this.liasettings = new Resource$Liasettings(); + this.orderinvoices = new Resource$Orderinvoices(); + this.orderpayments = new Resource$Orderpayments(); + this.orderreports = new Resource$Orderreports(); + this.orderreturns = new Resource$Orderreturns(); + this.orders = new Resource$Orders(); + this.pos = new Resource$Pos(); + this.products = new Resource$Products(); + this.productstatuses = new Resource$Productstatuses(); + this.shippingsettings = new Resource$Shippingsettings(); + } + } + + /** + * Account data. After the creation of a new account it may take a few minutes + * before it is fully operational. The methods delete, insert, patch, and + * update require the admin role. + */ + export interface Schema$Account { + /** + * List of linked Ads accounts that are active or pending approval. To + * create a new link request, add a new link with status active to the list. + * It will remain in a pending state until approved or rejected either in + * the Ads interface or through the AdWords API. To delete an active link, + * or to cancel a link request, remove it from the list. + */ + adsLinks?: Schema$AccountAdsLink[]; + /** + * Indicates whether the merchant sells adult content. + */ + adultContent?: boolean; + /** + * The business information of the account. + */ + businessInformation?: Schema$AccountBusinessInformation; + /** + * The GMB account which is linked or in the process of being linked with + * the Merchant Center account. + */ + googleMyBusinessLink?: Schema$AccountGoogleMyBusinessLink; + /** + * Merchant Center account ID. + */ + id?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#account". + */ + kind?: string; + /** + * Display name for the account. + */ + name?: string; + /** + * Client-specific, locally-unique, internal ID for the child account. + */ + sellerId?: string; + /** + * Users with access to the account. Every account (except for subaccounts) + * must have at least one admin user. + */ + users?: Schema$AccountUser[]; + /** + * The merchant's website. + */ + websiteUrl?: string; + /** + * List of linked YouTube channels that are active or pending approval. To + * create a new link request, add a new link with status active to the list. + * It will remain in a pending state until approved or rejected in the YT + * Creator Studio interface. To delete an active link, or to cancel a link + * request, remove it from the list. + */ + youtubeChannelLinks?: Schema$AccountYouTubeChannelLink[]; + } + export interface Schema$AccountAddress { + /** + * CLDR country code (e.g. "US"). + */ + country?: string; + /** + * City, town or commune. May also include dependent localities or + * sublocalities (e.g. neighborhoods or suburbs). + */ + locality?: string; + /** + * Postal code or ZIP (e.g. "94043"). + */ + postalCode?: string; + /** + * Top-level administrative subdivision of the country. For example, a state + * like California ("CA") or a province like Quebec + * ("QC"). + */ + region?: string; + /** + * Street-level part of the address. + */ + streetAddress?: string; + } + export interface Schema$AccountAdsLink { + /** + * Customer ID of the Ads account. + */ + adsId?: string; + /** + * Status of the link between this Merchant Center account and the Ads + * account. Upon retrieval, it represents the actual status of the link and + * can be either active if it was approved in Google Ads or pending if + * it's pending approval. Upon insertion, it represents the intended + * status of the link. Re-uploading a link with status active when it's + * still pending or with status pending when it's already active will + * have no effect: the status will remain unchanged. Re-uploading a link + * with deprecated status inactive is equivalent to not submitting the link + * at all and will delete the link if it was active or cancel the link + * request if it was pending. + */ + status?: string; + } + export interface Schema$AccountBusinessInformation { + /** + * The address of the business. + */ + address?: Schema$AccountAddress; + /** + * The customer service information of the business. + */ + customerService?: Schema$AccountCustomerService; + /** + * The phone number of the business. + */ + phoneNumber?: string; + } + export interface Schema$AccountCustomerService { + /** + * Customer service email. + */ + email?: string; + /** + * Customer service phone number. + */ + phoneNumber?: string; + /** + * Customer service URL. + */ + url?: string; + } + export interface Schema$AccountGoogleMyBusinessLink { + /** + * The GMB email address of which a specific account within a GMB account. A + * sample account within a GMB account could be a business account with set + * of locations, managed under the GMB account. + */ + gmbEmail?: string; + /** + * Status of the link between this Merchant Center account and the GMB + * account. + */ + status?: string; + } + export interface Schema$AccountIdentifier { + /** + * The aggregator ID, set for aggregators and subaccounts (in that case, it + * represents the aggregator of the subaccount). + */ + aggregatorId?: string; + /** + * The merchant account ID, set for individual accounts and subaccounts. + */ + merchantId?: string; + } + export interface Schema$AccountsAuthInfoResponse { + /** + * The account identifiers corresponding to the authenticated user. - For an + * individual account: only the merchant ID is defined - For an aggregator: + * only the aggregator ID is defined - For a subaccount of an MCA: both the + * merchant ID and the aggregator ID are defined. + */ + accountIdentifiers?: Schema$AccountIdentifier[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountsAuthInfoResponse". + */ + kind?: string; + } + export interface Schema$AccountsClaimWebsiteResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountsClaimWebsiteResponse". + */ + kind?: string; + } + export interface Schema$AccountsCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$AccountsCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch accounts request. + */ + export interface Schema$AccountsCustomBatchRequestEntry { + /** + * The account to create or update. Only defined if the method is insert or + * update. + */ + account?: Schema$Account; + /** + * The ID of the targeted account. Only defined if the method is not insert. + */ + accountId?: string; + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * Whether the account should be deleted if the account has offers. Only + * applicable if the method is delete. + */ + force?: boolean; + /** + * Details about the link request. + */ + linkRequest?: Schema$AccountsCustomBatchRequestEntryLinkRequest; + /** + * The ID of the managing account. + */ + merchantId?: string; + /** + * The method of the batch entry. + */ + method?: string; + /** + * Only applicable if the method is claimwebsite. Indicates whether or not + * to take the claim from another account in case there is a conflict. + */ + overwrite?: boolean; + } + export interface Schema$AccountsCustomBatchRequestEntryLinkRequest { + /** + * Action to perform for this link. The "request" action is only + * available to select merchants. + */ + action?: string; + /** + * The ID of the linked account. + */ + linkedAccountId?: string; + /** + * Type of the link between the two accounts. + */ + linkType?: string; + } + export interface Schema$AccountsCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$AccountsCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountsCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch accounts response. + */ + export interface Schema$AccountsCustomBatchResponseEntry { + /** + * The retrieved, created, or updated account. Not defined if the method was + * delete, claimwebsite or link. + */ + account?: Schema$Account; + /** + * The ID of the request entry this entry responds to. + */ + batchId?: number; + /** + * A list of errors defined if and only if the request failed. + */ + errors?: Schema$Errors; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountsCustomBatchResponseEntry". + */ + kind?: string; + } + export interface Schema$AccountsLinkRequest { + /** + * Action to perform for this link. The "request" action is only + * available to select merchants. + */ + action?: string; + /** + * The ID of the linked account. + */ + linkedAccountId?: string; + /** + * Type of the link between the two accounts. + */ + linkType?: string; + } + export interface Schema$AccountsLinkResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountsLinkResponse". + */ + kind?: string; + } + export interface Schema$AccountsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of accounts. + */ + nextPageToken?: string; + resources?: Schema$Account[]; + } + /** + * The status of an account, i.e., information about its products, which is + * computed offline and not returned immediately at insertion time. + */ + export interface Schema$AccountStatus { + /** + * The ID of the account for which the status is reported. + */ + accountId?: string; + /** + * A list of account level issues. + */ + accountLevelIssues?: Schema$AccountStatusAccountLevelIssue[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountStatus". + */ + kind?: string; + /** + * List of product-related data by channel, destination, and country. Data + * in this field may be delayed by up to 30 minutes. + */ + products?: Schema$AccountStatusProducts[]; + /** + * Whether the account's website is claimed or not. + */ + websiteClaimed?: boolean; + } + export interface Schema$AccountStatusAccountLevelIssue { + /** + * Country for which this issue is reported. + */ + country?: string; + /** + * The destination the issue applies to. + */ + destination?: string; + /** + * Additional details about the issue. + */ + detail?: string; + /** + * The URL of a web page to help resolving this issue. + */ + documentation?: string; + /** + * Issue identifier. + */ + id?: string; + /** + * Severity of the issue. + */ + severity?: string; + /** + * Short description of the issue. + */ + title?: string; + } + export interface Schema$AccountstatusesCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$AccountstatusesCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch accountstatuses request. + */ + export interface Schema$AccountstatusesCustomBatchRequestEntry { + /** + * The ID of the (sub-)account whose status to get. + */ + accountId?: string; + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * If set, only issues for the specified destinations are returned, + * otherwise only issues for the Shopping destination. + */ + destinations?: string[]; + /** + * The ID of the managing account. + */ + merchantId?: string; + /** + * The method (get). + */ + method?: string; + } + export interface Schema$AccountstatusesCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$AccountstatusesCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountstatusesCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch accountstatuses response. + */ + export interface Schema$AccountstatusesCustomBatchResponseEntry { + /** + * The requested account status. Defined if and only if the request was + * successful. + */ + accountStatus?: Schema$AccountStatus; + /** + * The ID of the request entry this entry responds to. + */ + batchId?: number; + /** + * A list of errors defined if and only if the request failed. + */ + errors?: Schema$Errors; + } + export interface Schema$AccountstatusesListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountstatusesListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of account statuses. + */ + nextPageToken?: string; + resources?: Schema$AccountStatus[]; + } + export interface Schema$AccountStatusItemLevelIssue { + /** + * The attribute's name, if the issue is caused by a single attribute. + */ + attributeName?: string; + /** + * The error code of the issue. + */ + code?: string; + /** + * A short issue description in English. + */ + description?: string; + /** + * A detailed issue description in English. + */ + detail?: string; + /** + * The URL of a web page to help with resolving this issue. + */ + documentation?: string; + /** + * Number of items with this issue. + */ + numItems?: string; + /** + * Whether the issue can be resolved by the merchant. + */ + resolution?: string; + /** + * How this issue affects serving of the offer. + */ + servability?: string; + } + export interface Schema$AccountStatusProducts { + /** + * The channel the data applies to. + */ + channel?: string; + /** + * The country the data applies to. + */ + country?: string; + /** + * The destination the data applies to. + */ + destination?: string; + /** + * List of item-level issues. + */ + itemLevelIssues?: Schema$AccountStatusItemLevelIssue[]; + /** + * Aggregated product statistics. + */ + statistics?: Schema$AccountStatusStatistics; + } + export interface Schema$AccountStatusStatistics { + /** + * Number of active offers. + */ + active?: string; + /** + * Number of disapproved offers. + */ + disapproved?: string; + /** + * Number of expiring offers. + */ + expiring?: string; + /** + * Number of pending offers. + */ + pending?: string; + } + /** + * The tax settings of a merchant account. All methods require the admin role. + */ + export interface Schema$AccountTax { + /** + * The ID of the account to which these account tax settings belong. + */ + accountId?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accountTax". + */ + kind?: string; + /** + * Tax rules. Updating the tax rules will enable US taxes (not reversible). + * Defining no rules is equivalent to not charging tax at all. + */ + rules?: Schema$AccountTaxTaxRule[]; + } + export interface Schema$AccounttaxCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$AccounttaxCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch accounttax request. + */ + export interface Schema$AccounttaxCustomBatchRequestEntry { + /** + * The ID of the account for which to get/update account tax settings. + */ + accountId?: string; + /** + * The account tax settings to update. Only defined if the method is update. + */ + accountTax?: Schema$AccountTax; + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * The ID of the managing account. + */ + merchantId?: string; + method?: string; + } + export interface Schema$AccounttaxCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$AccounttaxCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accounttaxCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch accounttax response. + */ + export interface Schema$AccounttaxCustomBatchResponseEntry { + /** + * The retrieved or updated account tax settings. + */ + accountTax?: Schema$AccountTax; + /** + * The ID of the request entry this entry responds to. + */ + batchId?: number; + /** + * A list of errors defined if and only if the request failed. + */ + errors?: Schema$Errors; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accounttaxCustomBatchResponseEntry". + */ + kind?: string; + } + export interface Schema$AccounttaxListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#accounttaxListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of account tax settings. + */ + nextPageToken?: string; + resources?: Schema$AccountTax[]; + } + /** + * Tax calculation rule to apply in a state or province (USA only). + */ + export interface Schema$AccountTaxTaxRule { + /** + * Country code in which tax is applicable. + */ + country?: string; + /** + * State (or province) is which the tax is applicable, described by its + * location id (also called criteria id). + */ + locationId?: string; + /** + * Explicit tax rate in percent, represented as a floating point number + * without the percentage character. Must not be negative. + */ + ratePercent?: string; + /** + * If true, shipping charges are also taxed. + */ + shippingTaxed?: boolean; + /** + * Whether the tax rate is taken from a global tax table or specified + * explicitly. + */ + useGlobalRate?: boolean; + } + export interface Schema$AccountUser { + /** + * Whether user is an admin. + */ + admin?: boolean; + /** + * User's email address. + */ + emailAddress?: string; + /** + * Whether user is an order manager. + */ + orderManager?: boolean; + /** + * Whether user can access payment statements. + */ + paymentsAnalyst?: boolean; + /** + * Whether user can manage payment settings. + */ + paymentsManager?: boolean; + } + export interface Schema$AccountYouTubeChannelLink { + /** + * Channel ID. + */ + channelId?: string; + /** + * Status of the link between this Merchant Center account and the YouTube + * channel. Upon retrieval, it represents the actual status of the link and + * can be either active if it was approved in YT Creator Studio or pending + * if it's pending approval. Upon insertion, it represents the intended + * status of the link. Re-uploading a link with status active when it's + * still pending or with status pending when it's already active will + * have no effect: the status will remain unchanged. Re-uploading a link + * with deprecated status inactive is equivalent to not submitting the link + * at all and will delete the link if it was active or cancel the link + * request if it was pending. + */ + status?: string; + } + export interface Schema$Amount { + /** + * [required] The pre-tax or post-tax price depending on the location of the + * order. + */ + priceAmount?: Schema$Price; + /** + * [required] Tax value. + */ + taxAmount?: Schema$Price; + } + export interface Schema$CarrierRate { + /** + * Carrier service, such as "UPS" or "Fedex". The list + * of supported carriers can be retrieved via the getSupportedCarriers + * method. Required. + */ + carrierName?: string; + /** + * Carrier service, such as "ground" or "2 days". The + * list of supported services for a carrier can be retrieved via the + * getSupportedCarriers method. Required. + */ + carrierService?: string; + /** + * Additive shipping rate modifier. Can be negative. For example { + * "value": "1", "currency" : "USD" + * } adds $1 to the rate, { "value": "-3", + * "currency" : "USD" } removes $3 from the rate. + * Optional. + */ + flatAdjustment?: Schema$Price; + /** + * Name of the carrier rate. Must be unique per rate group. Required. + */ + name?: string; + /** + * Shipping origin for this carrier rate. Required. + */ + originPostalCode?: string; + /** + * Multiplicative shipping rate modifier as a number in decimal notation. + * Can be negative. For example "5.4" increases the rate by 5.4%, + * "-3" decreases the rate by 3%. Optional. + */ + percentageAdjustment?: string; + } + export interface Schema$CarriersCarrier { + /** + * The CLDR country code of the carrier (e.g., "US"). Always + * present. + */ + country?: string; + /** + * The name of the carrier (e.g., "UPS"). Always present. + */ + name?: string; + /** + * A list of supported services (e.g., "ground") for that carrier. + * Contains at least one service. + */ + services?: string[]; + } + export interface Schema$CustomAttribute { + /** + * Subattributes within this attribute group. Exactly one of value or + * groupValues must be provided. + */ + groupValues?: Schema$CustomAttribute[]; + /** + * The name of the attribute. Underscores will be replaced by spaces upon + * insertion. + */ + name?: string; + /** + * The value of the attribute. + */ + value?: string; + } + export interface Schema$CustomerReturnReason { + description?: string; + reasonCode?: string; + } + export interface Schema$CutoffTime { + /** + * Hour of the cutoff time until which an order has to be placed to be + * processed in the same day. Required. + */ + hour?: number; + /** + * Minute of the cutoff time until which an order has to be placed to be + * processed in the same day. Required. + */ + minute?: number; + /** + * Timezone identifier for the cutoff time. A list of identifiers can be + * found in the AdWords API documentation. E.g. "Europe/Zurich". + * Required. + */ + timezone?: string; + } + /** + * Datafeed configuration data. + */ + export interface Schema$Datafeed { + /** + * The two-letter ISO 639-1 language in which the attributes are defined in + * the data feed. + */ + attributeLanguage?: string; + /** + * The type of data feed. For product inventory feeds, only feeds for local + * stores, not online stores, are supported. + */ + contentType?: string; + /** + * Fetch schedule for the feed file. + */ + fetchSchedule?: Schema$DatafeedFetchSchedule; + /** + * The filename of the feed. All feeds must have a unique file name. + */ + fileName?: string; + /** + * Format of the feed file. + */ + format?: Schema$DatafeedFormat; + /** + * The ID of the data feed. + */ + id?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#datafeed". + */ + kind?: string; + /** + * A descriptive name of the data feed. + */ + name?: string; + /** + * The targets this feed should apply to (country, language, destinations). + */ + targets?: Schema$DatafeedTarget[]; + } + /** + * The required fields vary based on the frequency of fetching. For a monthly + * fetch schedule, day_of_month and hour are required. For a weekly fetch + * schedule, weekday and hour are required. For a daily fetch schedule, only + * hour is required. + */ + export interface Schema$DatafeedFetchSchedule { + /** + * The day of the month the feed file should be fetched (1-31). + */ + dayOfMonth?: number; + /** + * The URL where the feed file can be fetched. Google Merchant Center will + * support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP + * protocols, so the value will need to be a valid link using one of those + * four protocols. + */ + fetchUrl?: string; + /** + * The hour of the day the feed file should be fetched (0-23). + */ + hour?: number; + /** + * The minute of the hour the feed file should be fetched (0-59). Read-only. + */ + minuteOfHour?: number; + /** + * An optional password for fetch_url. + */ + password?: string; + /** + * Whether the scheduled fetch is paused or not. + */ + paused?: boolean; + /** + * Time zone used for schedule. UTC by default. E.g., + * "America/Los_Angeles". + */ + timeZone?: string; + /** + * An optional user name for fetch_url. + */ + username?: string; + /** + * The day of the week the feed file should be fetched. + */ + weekday?: string; + } + export interface Schema$DatafeedFormat { + /** + * Delimiter for the separation of values in a delimiter-separated values + * feed. If not specified, the delimiter will be auto-detected. Ignored for + * non-DSV data feeds. + */ + columnDelimiter?: string; + /** + * Character encoding scheme of the data feed. If not specified, the + * encoding will be auto-detected. + */ + fileEncoding?: string; + /** + * Specifies how double quotes are interpreted. If not specified, the mode + * will be auto-detected. Ignored for non-DSV data feeds. + */ + quotingMode?: string; + } + export interface Schema$DatafeedsCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$DatafeedsCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch datafeeds request. + */ + export interface Schema$DatafeedsCustomBatchRequestEntry { + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * The data feed to insert. + */ + datafeed?: Schema$Datafeed; + /** + * The ID of the data feed to get, delete or fetch. + */ + datafeedId?: string; + /** + * The ID of the managing account. + */ + merchantId?: string; + method?: string; + } + export interface Schema$DatafeedsCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$DatafeedsCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#datafeedsCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch datafeeds response. + */ + export interface Schema$DatafeedsCustomBatchResponseEntry { + /** + * The ID of the request entry this entry responds to. + */ + batchId?: number; + /** + * The requested data feed. Defined if and only if the request was + * successful. + */ + datafeed?: Schema$Datafeed; + /** + * A list of errors defined if and only if the request failed. + */ + errors?: Schema$Errors; + } + export interface Schema$DatafeedsFetchNowResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#datafeedsFetchNowResponse". + */ + kind?: string; + } + export interface Schema$DatafeedsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#datafeedsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of datafeeds. + */ + nextPageToken?: string; + resources?: Schema$Datafeed[]; + } + /** + * The status of a datafeed, i.e., the result of the last retrieval of the + * datafeed computed asynchronously when the feed processing is finished. + */ + export interface Schema$DatafeedStatus { + /** + * The country for which the status is reported, represented as a CLDR + * territory code. + */ + country?: string; + /** + * The ID of the feed for which the status is reported. + */ + datafeedId?: string; + /** + * The list of errors occurring in the feed. + */ + errors?: Schema$DatafeedStatusError[]; + /** + * The number of items in the feed that were processed. + */ + itemsTotal?: string; + /** + * The number of items in the feed that were valid. + */ + itemsValid?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#datafeedStatus". + */ + kind?: string; + /** + * The two-letter ISO 639-1 language for which the status is reported. + */ + language?: string; + /** + * The last date at which the feed was uploaded. + */ + lastUploadDate?: string; + /** + * The processing status of the feed. + */ + processingStatus?: string; + /** + * The list of errors occurring in the feed. + */ + warnings?: Schema$DatafeedStatusError[]; + } + /** + * An error occurring in the feed, like "invalid price". + */ + export interface Schema$DatafeedStatusError { + /** + * The code of the error, e.g., "validation/invalid_value". + */ + code?: string; + /** + * The number of occurrences of the error in the feed. + */ + count?: string; + /** + * A list of example occurrences of the error, grouped by product. + */ + examples?: Schema$DatafeedStatusExample[]; + /** + * The error message, e.g., "Invalid price". + */ + message?: string; + } + export interface Schema$DatafeedstatusesCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$DatafeedstatusesCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch datafeedstatuses request. + */ + export interface Schema$DatafeedstatusesCustomBatchRequestEntry { + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * The country for which to get the datafeed status. If this parameter is + * provided then language must also be provided. Note that for multi-target + * datafeeds this parameter is required. + */ + country?: string; + /** + * The ID of the data feed to get. + */ + datafeedId?: string; + /** + * The language for which to get the datafeed status. If this parameter is + * provided then country must also be provided. Note that for multi-target + * datafeeds this parameter is required. + */ + language?: string; + /** + * The ID of the managing account. + */ + merchantId?: string; + method?: string; + } + export interface Schema$DatafeedstatusesCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$DatafeedstatusesCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#datafeedstatusesCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch datafeedstatuses response. + */ + export interface Schema$DatafeedstatusesCustomBatchResponseEntry { + /** + * The ID of the request entry this entry responds to. + */ + batchId?: number; + /** + * The requested data feed status. Defined if and only if the request was + * successful. + */ + datafeedStatus?: Schema$DatafeedStatus; + /** + * A list of errors defined if and only if the request failed. + */ + errors?: Schema$Errors; + } + export interface Schema$DatafeedstatusesListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#datafeedstatusesListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of datafeed statuses. + */ + nextPageToken?: string; + resources?: Schema$DatafeedStatus[]; + } + /** + * An example occurrence for a particular error. + */ + export interface Schema$DatafeedStatusExample { + /** + * The ID of the example item. + */ + itemId?: string; + /** + * Line number in the data feed where the example is found. + */ + lineNumber?: string; + /** + * The problematic value. + */ + value?: string; + } + export interface Schema$DatafeedTarget { + /** + * The country where the items in the feed will be included in the search + * index, represented as a CLDR territory code. + */ + country?: string; + /** + * The list of destinations to exclude for this target (corresponds to + * unchecked check boxes in Merchant Center). + */ + excludedDestinations?: string[]; + /** + * The list of destinations to include for this target (corresponds to + * checked check boxes in Merchant Center). Default destinations are always + * included unless provided in the excluded_destination field. + */ + includedDestinations?: string[]; + /** + * The two-letter ISO 639-1 language of the items in the feed. Must be a + * valid language for targets[].country. + */ + language?: string; + } + export interface Schema$DeliveryTime { + /** + * Business days cutoff time definition. If not configured the cutoff time + * will be defaulted to 8AM PST. + */ + cutoffTime?: Schema$CutoffTime; + /** + * Holiday cutoff definitions. If configured, they specify order cutoff + * times for holiday-specific shipping. + */ + holidayCutoffs?: Schema$HolidayCutoff[]; + /** + * Maximum number of business days spent before an order is shipped. 0 means + * same day shipped, 1 means next day shipped. Must be greater than or equal + * to minHandlingTimeInDays. + */ + maxHandlingTimeInDays?: number; + /** + * Maximum number of business days that is spent in transit. 0 means same + * day delivery, 1 means next day delivery. Must be greater than or equal to + * minTransitTimeInDays. Required. + */ + maxTransitTimeInDays?: number; + /** + * Minimum number of business days spent before an order is shipped. 0 means + * same day shipped, 1 means next day shipped. + */ + minHandlingTimeInDays?: number; + /** + * Minimum number of business days that is spent in transit. 0 means same + * day delivery, 1 means next day delivery. Required. + */ + minTransitTimeInDays?: number; + } + /** + * An error returned by the API. + */ + export interface Schema$Error { + /** + * The domain of the error. + */ + domain?: string; + /** + * A description of the error. + */ + message?: string; + /** + * The error code. + */ + reason?: string; + } + /** + * A list of errors returned by a failed batch entry. + */ + export interface Schema$Errors { + /** + * The HTTP status of the first error in errors. + */ + code?: number; + /** + * A list of errors. + */ + errors?: Schema$Error[]; + /** + * The message of the first error in errors. + */ + message?: string; + } + export interface Schema$GmbAccounts { + /** + * The ID of the account. + */ + accountId?: string; + /** + * A list of GMB accounts which are available to the merchant. + */ + gmbAccounts?: Schema$GmbAccountsGmbAccount[]; + } + export interface Schema$GmbAccountsGmbAccount { + /** + * The email which identifies the GMB account. + */ + email?: string; + /** + * Number of listings under this account. + */ + listingCount?: string; + /** + * The name of the GMB account. + */ + name?: string; + /** + * The type of the GMB account (User or Business). + */ + type?: string; + } + /** + * A non-empty list of row or column headers for a table. Exactly one of + * prices, weights, numItems, postalCodeGroupNames, or locations must be set. + */ + export interface Schema$Headers { + /** + * A list of location ID sets. Must be non-empty. Can only be set if all + * other fields are not set. + */ + locations?: Schema$LocationIdSet[]; + /** + * A list of inclusive number of items upper bounds. The last value can be + * "infinity". For example ["10", "50", + * "infinity"] represents the headers "<= 10 items", + * " 50 items". Must be non-empty. Can only be set if all other + * fields are not set. + */ + numberOfItems?: string[]; + /** + * A list of postal group names. The last value can be "all other + * locations". Example: ["zone 1", "zone 2", + * "all other locations"]. The referred postal code groups must + * match the delivery country of the service. Must be non-empty. Can only be + * set if all other fields are not set. + */ + postalCodeGroupNames?: string[]; + /** + * A list of inclusive order price upper bounds. The last price's value + * can be "infinity". For example [{"value": + * "10", "currency": "USD"}, + * {"value": "500", "currency": + * "USD"}, {"value": "infinity", + * "currency": "USD"}] represents the headers + * "<= $10", " $500". All prices within a service + * must have the same currency. Must be non-empty. Can only be set if all + * other fields are not set. + */ + prices?: Schema$Price[]; + /** + * A list of inclusive order weight upper bounds. The last weight's + * value can be "infinity". For example [{"value": + * "10", "unit": "kg"}, {"value": + * "50", "unit": "kg"}, {"value": + * "infinity", "unit": "kg"}] represents the + * headers "<= 10kg", " 50kg". All weights within a + * service must have the same unit. Must be non-empty. Can only be set if + * all other fields are not set. + */ + weights?: Schema$Weight[]; + } + export interface Schema$HolidayCutoff { + /** + * Date of the order deadline, in ISO 8601 format. E.g. + * "2016-11-29" for 29th November 2016. Required. + */ + deadlineDate?: string; + /** + * Hour of the day on the deadline date until which the order has to be + * placed to qualify for the delivery guarantee. Possible values are: 0 + * (midnight), 1, ..., 12 (noon), 13, ..., 23. Required. + */ + deadlineHour?: number; + /** + * Timezone identifier for the deadline hour. A list of identifiers can be + * found in the AdWords API documentation. E.g. "Europe/Zurich". + * Required. + */ + deadlineTimezone?: string; + /** + * Unique identifier for the holiday. Required. + */ + holidayId?: string; + /** + * Date on which the deadline will become visible to consumers in ISO 8601 + * format. E.g. "2016-10-31" for 31st October 2016. Required. + */ + visibleFromDate?: string; + } + export interface Schema$HolidaysHoliday { + /** + * The CLDR territory code of the country in which the holiday is available. + * E.g. "US", "DE", "GB". A holiday cutoff can + * only be configured in a shipping settings service with matching delivery + * country. Always present. + */ + countryCode?: string; + /** + * Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for + * Christmas 2016. Always present. + */ + date?: string; + /** + * Date on which the order has to arrive at the customer's, in ISO 8601 + * format. E.g. "2016-12-24" for 24th December 2016. Always + * present. + */ + deliveryGuaranteeDate?: string; + /** + * Hour of the day in the delivery location's timezone on the guaranteed + * delivery date by which the order has to arrive at the customer's. + * Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always + * present. + */ + deliveryGuaranteeHour?: string; + /** + * Unique identifier for the holiday to be used when configuring holiday + * cutoffs. Always present. + */ + id?: string; + /** + * The holiday type. Always present. + */ + type?: string; + } + export interface Schema$Installment { + /** + * The amount the buyer has to pay per month. + */ + amount?: Schema$Price; + /** + * The number of installments the buyer has to pay. + */ + months?: string; + } + export interface Schema$InvoiceSummary { + /** + * Summary of the total amounts of the additional charges. + */ + additionalChargeSummaries?: Schema$InvoiceSummaryAdditionalChargeSummary[]; + /** + * [required] Customer balance on this invoice. A negative amount means the + * customer is paying, a positive one means the customer is receiving money. + * Note: the sum of merchant_balance, customer_balance and google_balance + * must always be zero. Furthermore the absolute value of this amount is + * expected to be equal to the sum of product amount and additional charges, + * minus promotions. + */ + customerBalance?: Schema$Amount; + /** + * [required] Google balance on this invoice. A negative amount means Google + * is paying, a positive one means Google is receiving money. Note: the sum + * of merchant_balance, customer_balance and google_balance must always be + * zero. + */ + googleBalance?: Schema$Amount; + /** + * [required] Merchant balance on this invoice. A negative amount means the + * merchant is paying, a positive one means the merchant is receiving money. + * Note: the sum of merchant_balance, customer_balance and google_balance + * must always be zero. + */ + merchantBalance?: Schema$Amount; + /** + * [required] Total price for the product. + */ + productTotal?: Schema$Amount; + /** + * Summary for each promotion. + */ + promotionSummaries?: Schema$Promotion[]; + } + export interface Schema$InvoiceSummaryAdditionalChargeSummary { + /** + * [required] Total additional charge for this type. + */ + totalAmount?: Schema$Amount; + /** + * [required] Type of the additional charge. + */ + type?: string; + } + export interface Schema$LiaAboutPageSettings { + /** + * The status of the verification process for the About page. + */ + status?: string; + /** + * The URL for the About page. + */ + url?: string; + } + export interface Schema$LiaCountrySettings { + /** + * The settings for the About page. + */ + about?: Schema$LiaAboutPageSettings; + /** + * CLDR country code (e.g. "US"). + */ + country?: string; + /** + * The status of the "Merchant hosted local storefront" feature. + */ + hostedLocalStorefrontActive?: boolean; + /** + * LIA inventory verification settings. + */ + inventory?: Schema$LiaInventorySettings; + /** + * LIA "On Display To Order" settings. + */ + onDisplayToOrder?: Schema$LiaOnDisplayToOrderSettings; + /** + * The POS data provider linked with this country. + */ + posDataProvider?: Schema$LiaPosDataProvider; + /** + * The status of the "Store pickup" feature. + */ + storePickupActive?: boolean; + } + export interface Schema$LiaInventorySettings { + /** + * The email of the contact for the inventory verification process. + */ + inventoryVerificationContactEmail?: string; + /** + * The name of the contact for the inventory verification process. + */ + inventoryVerificationContactName?: string; + /** + * The status of the verification contact. + */ + inventoryVerificationContactStatus?: string; + /** + * The status of the inventory verification process. + */ + status?: string; + } + export interface Schema$LiaOnDisplayToOrderSettings { + /** + * Shipping cost and policy URL. + */ + shippingCostPolicyUrl?: string; + /** + * The status of the ?On display to order? feature. + */ + status?: string; + } + export interface Schema$LiaPosDataProvider { + /** + * The ID of the POS data provider. + */ + posDataProviderId?: string; + /** + * The account ID by which this merchant is known to the POS data provider. + */ + posExternalAccountId?: string; + } + /** + * Local Inventory ads (LIA) settings. All methods except listposdataproviders + * require the admin role. + */ + export interface Schema$LiaSettings { + /** + * The ID of the account to which these LIA settings belong. Ignored upon + * update, always present in get request responses. + */ + accountId?: string; + /** + * The LIA settings for each country. + */ + countrySettings?: Schema$LiaCountrySettings[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liaSettings". + */ + kind?: string; + } + export interface Schema$LiasettingsCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$LiasettingsCustomBatchRequestEntry[]; + } + export interface Schema$LiasettingsCustomBatchRequestEntry { + /** + * The ID of the account for which to get/update account shipping settings. + */ + accountId?: string; + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * Inventory validation contact email. Required only for + * SetInventoryValidationContact. + */ + contactEmail?: string; + /** + * Inventory validation contact name. Required only for + * SetInventoryValidationContact. + */ + contactName?: string; + /** + * The country code. Required only for RequestInventoryVerification. + */ + country?: string; + /** + * The GMB account. Required only for RequestGmbAccess. + */ + gmbEmail?: string; + /** + * The account Lia settings to update. Only defined if the method is update. + */ + liaSettings?: Schema$LiaSettings; + /** + * The ID of the managing account. + */ + merchantId?: string; + method?: string; + /** + * The ID of POS data provider. Required only for SetPosProvider. + */ + posDataProviderId?: string; + /** + * The account ID by which this merchant is known to the POS provider. + */ + posExternalAccountId?: string; + } + export interface Schema$LiasettingsCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$LiasettingsCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsCustomBatchResponse". + */ + kind?: string; + } + export interface Schema$LiasettingsCustomBatchResponseEntry { + /** + * The ID of the request entry to which this entry responds. + */ + batchId?: number; + /** + * A list of errors defined if, and only if, the request failed. + */ + errors?: Schema$Errors; + /** + * The the list of accessible GMB accounts. + */ + gmbAccounts?: Schema$GmbAccounts; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsCustomBatchResponseEntry". + */ + kind?: string; + /** + * The retrieved or updated Lia settings. + */ + liaSettings?: Schema$LiaSettings; + /** + * The list of POS data providers. + */ + posDataProviders?: Schema$PosDataProviders[]; + } + export interface Schema$LiasettingsGetAccessibleGmbAccountsResponse { + /** + * The ID of the account. + */ + accountId?: string; + /** + * A list of GMB accounts which are available to the merchant. + */ + gmbAccounts?: Schema$GmbAccountsGmbAccount[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsGetAccessibleGmbAccountsResponse". + */ + kind?: string; + } + export interface Schema$LiasettingsListPosDataProvidersResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsListPosDataProvidersResponse". + */ + kind?: string; + /** + * The list of POS data providers for each eligible country + */ + posDataProviders?: Schema$PosDataProviders[]; + } + export interface Schema$LiasettingsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of LIA settings. + */ + nextPageToken?: string; + resources?: Schema$LiaSettings[]; + } + export interface Schema$LiasettingsRequestGmbAccessResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsRequestGmbAccessResponse". + */ + kind?: string; + } + export interface Schema$LiasettingsRequestInventoryVerificationResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsRequestInventoryVerificationResponse". + */ + kind?: string; + } + export interface Schema$LiasettingsSetInventoryVerificationContactResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsSetInventoryVerificationContactResponse". + */ + kind?: string; + } + export interface Schema$LiasettingsSetPosDataProviderResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#liasettingsSetPosDataProviderResponse". + */ + kind?: string; + } + export interface Schema$LocationIdSet { + /** + * A non-empty list of location IDs. They must all be of the same location + * type (e.g., state). + */ + locationIds?: string[]; + } + export interface Schema$LoyaltyPoints { + /** + * Name of loyalty points program. It is recommended to limit the name to 12 + * full-width characters or 24 Roman characters. + */ + name?: string; + /** + * The retailer's loyalty points in absolute value. + */ + pointsValue?: string; + /** + * The ratio of a point when converted to currency. Google assumes currency + * based on Merchant Center settings. If ratio is left out, it defaults + * to 1.0. + */ + ratio?: number; + } + export interface Schema$MerchantOrderReturn { + creationDate?: string; + merchantOrderId?: string; + orderId?: string; + orderReturnId?: string; + returnItems?: Schema$MerchantOrderReturnItem[]; + returnShipments?: Schema$ReturnShipment[]; + } + export interface Schema$MerchantOrderReturnItem { + customerReturnReason?: Schema$CustomerReturnReason; + itemId?: string; + merchantReturnReason?: Schema$RefundReason; + product?: Schema$OrderLineItemProduct; + returnShipmentIds?: string[]; + state?: string; + } + /** + * Order. All methods require the order manager role. + */ + export interface Schema$Order { + /** + * Whether the order was acknowledged. + */ + acknowledged?: boolean; + /** + * The billing address. + */ + billingAddress?: Schema$OrderAddress; + /** + * The channel type of the order: "purchaseOnGoogle" or + * "googleExpress". + */ + channelType?: string; + /** + * The details of the customer who placed the order. + */ + customer?: Schema$OrderCustomer; + /** + * The details for the delivery. + */ + deliveryDetails?: Schema$OrderDeliveryDetails; + /** + * The REST id of the order. Globally unique. + */ + id?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#order". + */ + kind?: string; + /** + * Line items that are ordered. + */ + lineItems?: Schema$OrderLineItem[]; + merchantId?: string; + /** + * Merchant-provided id of the order. + */ + merchantOrderId?: string; + /** + * The net amount for the order. For example, if an order was originally for + * a grand total of $100 and a refund was issued for $20, the net amount + * will be $80. + */ + netAmount?: Schema$Price; + /** + * The status of the payment. + */ + paymentStatus?: string; + /** + * The date when the order was placed, in ISO 8601 format. + */ + placedDate?: string; + /** + * Promotions associated with the order. + */ + promotions?: Schema$OrderPromotion[]; + /** + * Refunds for the order. + */ + refunds?: Schema$OrderRefund[]; + /** + * Shipments of the order. + */ + shipments?: Schema$OrderShipment[]; + /** + * The total cost of shipping for all items. + */ + shippingCost?: Schema$Price; + /** + * The tax for the total shipping cost. + */ + shippingCostTax?: Schema$Price; + /** + * The requested shipping option. + */ + shippingOption?: string; + /** + * The status of the order. + */ + status?: string; + /** + * The party responsible for collecting and remitting taxes. + */ + taxCollector?: string; + } + export interface Schema$OrderAddress { + /** + * CLDR country code (e.g. "US"). + */ + country?: string; + /** + * Strings representing the lines of the printed label for mailing the + * order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, + * CA, 94043 United States + */ + fullAddress?: string[]; + /** + * Whether the address is a post office box. + */ + isPostOfficeBox?: boolean; + /** + * City, town or commune. May also include dependent localities or + * sublocalities (e.g. neighborhoods or suburbs). + */ + locality?: string; + /** + * Postal Code or ZIP (e.g. "94043"). + */ + postalCode?: string; + /** + * Name of the recipient. + */ + recipientName?: string; + /** + * Top-level administrative subdivision of the country. For example, a state + * like California ("CA") or a province like Quebec + * ("QC"). + */ + region?: string; + /** + * Street-level part of the address. + */ + streetAddress?: string[]; + } + export interface Schema$OrderCancellation { + /** + * The actor that created the cancellation. + */ + actor?: string; + /** + * Date on which the cancellation has been created, in ISO 8601 format. + */ + creationDate?: string; + /** + * The quantity that was canceled. + */ + quantity?: number; + /** + * The reason for the cancellation. Orders that are cancelled with a + * noInventory reason will lead to the removal of the product from Shopping + * Actions until you make an update to that product. This will not affect + * your Shopping ads. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + } + export interface Schema$OrderCustomer { + /** + * Deprecated. + */ + email?: string; + /** + * Full name of the customer. + */ + fullName?: string; + /** + * Customer's marketing preferences. + */ + marketingRightsInfo?: Schema$OrderCustomerMarketingRightsInfo; + } + export interface Schema$OrderCustomerMarketingRightsInfo { + /** + * Last known user selection regarding marketing preferences. In certain + * cases this selection might not be known, so this field would be empty. + */ + explicitMarketingPreference?: string; + /** + * Timestamp when last time marketing preference was updated. Could be + * empty, if user wasn't offered a selection yet. + */ + lastUpdatedTimestamp?: string; + /** + * Email address that can be used for marketing purposes. This field is only + * filled when explicitMarketingPreference is equal to 'granted'. + */ + marketingEmailAddress?: string; + } + export interface Schema$OrderDeliveryDetails { + /** + * The delivery address + */ + address?: Schema$OrderAddress; + /** + * The phone number of the person receiving the delivery. + */ + phoneNumber?: string; + } + export interface Schema$OrderinvoicesCreateChargeInvoiceRequest { + /** + * [required] The ID of the invoice. + */ + invoiceId?: string; + /** + * [required] Invoice summary. + */ + invoiceSummary?: Schema$InvoiceSummary; + /** + * [required] Invoice details per line item. + */ + lineItemInvoices?: Schema$ShipmentInvoiceLineItemInvoice[]; + /** + * [required] The ID of the operation, unique across all operations for a + * given order. + */ + operationId?: string; + /** + * [required] ID of the shipment group. + */ + shipmentGroupId?: string; + } + export interface Schema$OrderinvoicesCreateChargeInvoiceResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderinvoicesCreateChargeInvoiceResponse". + */ + kind?: string; + } + export interface Schema$OrderinvoicesCreateRefundInvoiceRequest { + /** + * [required] The ID of the invoice. + */ + invoiceId?: string; + /** + * [required] The ID of the operation, unique across all operations for a + * given order. + */ + operationId?: string; + /** + * Option to create a refund-only invoice. Exactly one of refundOnlyOption + * or returnOption must be provided. + */ + refundOnlyOption?: + Schema$OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption; + /** + * Option to create an invoice for a refund and mark all items within the + * invoice as returned. Exactly one of refundOnlyOption or returnOption must + * be provided. + */ + returnOption?: + Schema$OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption; + /** + * Invoice details for different shipment groups. + */ + shipmentInvoices?: Schema$ShipmentInvoice[]; + } + export interface Schema$OrderinvoicesCreateRefundInvoiceResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderinvoicesCreateRefundInvoiceResponse". + */ + kind?: string; + } + export interface Schema$OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption { + /** + * Optional description of the refund reason. + */ + description?: string; + /** + * [required] Reason for the refund. + */ + reason?: string; + } + export interface Schema$OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption { + /** + * Optional description of the return reason. + */ + description?: string; + /** + * [required] Reason for the return. + */ + reason?: string; + } + export interface Schema$OrderLineItem { + /** + * Annotations that are attached to the line item. + */ + annotations?: Schema$OrderMerchantProvidedAnnotation[]; + /** + * Cancellations of the line item. + */ + cancellations?: Schema$OrderCancellation[]; + /** + * The id of the line item. + */ + id?: string; + /** + * Total price for the line item. For example, if two items for $10 are + * purchased, the total price will be $20. + */ + price?: Schema$Price; + /** + * Product data as seen by customer from the time of the order placement. + * Note that certain attributes values (e.g. title or gtin) might be + * reformatted and no longer match values submitted via product feed. + */ + product?: Schema$OrderLineItemProduct; + /** + * Number of items canceled. + */ + quantityCanceled?: number; + /** + * Number of items delivered. + */ + quantityDelivered?: number; + /** + * Number of items ordered. + */ + quantityOrdered?: number; + /** + * Number of items pending. + */ + quantityPending?: number; + /** + * Number of items returned. + */ + quantityReturned?: number; + /** + * Number of items shipped. + */ + quantityShipped?: number; + /** + * Details of the return policy for the line item. + */ + returnInfo?: Schema$OrderLineItemReturnInfo; + /** + * Returns of the line item. + */ + returns?: Schema$OrderReturn[]; + /** + * Details of the requested shipping for the line item. + */ + shippingDetails?: Schema$OrderLineItemShippingDetails; + /** + * Total tax amount for the line item. For example, if two items are + * purchased, and each have a cost tax of $2, the total tax amount will be + * $4. + */ + tax?: Schema$Price; + } + export interface Schema$OrderLineItemProduct { + /** + * Brand of the item. + */ + brand?: string; + /** + * The item's channel (online or local). + */ + channel?: string; + /** + * Condition or state of the item. + */ + condition?: string; + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Associated fees at order creation time. + */ + fees?: Schema$OrderLineItemProductFee[]; + /** + * Global Trade Item Number (GTIN) of the item. + */ + gtin?: string; + /** + * The REST id of the product. + */ + id?: string; + /** + * URL of an image of the item. + */ + imageLink?: string; + /** + * Shared identifier for all variants of the same product. + */ + itemGroupId?: string; + /** + * Manufacturer Part Number (MPN) of the item. + */ + mpn?: string; + /** + * An identifier of the item. + */ + offerId?: string; + /** + * Price of the item. + */ + price?: Schema$Price; + /** + * URL to the cached image shown to the user when order was placed. + */ + shownImage?: string; + /** + * The CLDR territory code of the target country of the product. + */ + targetCountry?: string; + /** + * The title of the product. + */ + title?: string; + /** + * Variant attributes for the item. These are dimensions of the product, + * such as color, gender, material, pattern, and size. You can find a + * comprehensive list of variant attributes here. + */ + variantAttributes?: Schema$OrderLineItemProductVariantAttribute[]; + } + export interface Schema$OrderLineItemProductFee { + /** + * Amount of the fee. + */ + amount?: Schema$Price; + /** + * Name of the fee. + */ + name?: string; + } + export interface Schema$OrderLineItemProductVariantAttribute { + /** + * The dimension of the variant. + */ + dimension?: string; + /** + * The value for the dimension. + */ + value?: string; + } + export interface Schema$OrderLineItemReturnInfo { + /** + * How many days later the item can be returned. + */ + daysToReturn?: number; + /** + * Whether the item is returnable. + */ + isReturnable?: boolean; + /** + * URL of the item return policy. + */ + policyUrl?: string; + } + export interface Schema$OrderLineItemShippingDetails { + /** + * The delivery by date, in ISO 8601 format. + */ + deliverByDate?: string; + /** + * Details of the shipping method. + */ + method?: Schema$OrderLineItemShippingDetailsMethod; + /** + * The ship by date, in ISO 8601 format. + */ + shipByDate?: string; + } + export interface Schema$OrderLineItemShippingDetailsMethod { + /** + * The carrier for the shipping. Optional. See shipments[].carrier for a + * list of acceptable values. + */ + carrier?: string; + /** + * Maximum transit time. + */ + maxDaysInTransit?: number; + /** + * The name of the shipping method. + */ + methodName?: string; + /** + * Minimum transit time. + */ + minDaysInTransit?: number; + } + export interface Schema$OrderMerchantProvidedAnnotation { + /** + * Key for additional merchant provided (as key-value pairs) annotation + * about the line item. + */ + key?: string; + /** + * Value for additional merchant provided (as key-value pairs) annotation + * about the line item. + */ + value?: string; + } + export interface Schema$OrderpaymentsNotifyAuthApprovedRequest { + authAmountPretax?: Schema$Price; + authAmountTax?: Schema$Price; + } + export interface Schema$OrderpaymentsNotifyAuthApprovedResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderpaymentsNotifyAuthApprovedResponse". + */ + kind?: string; + } + export interface Schema$OrderpaymentsNotifyAuthDeclinedRequest { + /** + * Reason why payment authorization was declined. + */ + declineReason?: string; + } + export interface Schema$OrderpaymentsNotifyAuthDeclinedResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderpaymentsNotifyAuthDeclinedResponse". + */ + kind?: string; + } + export interface Schema$OrderpaymentsNotifyChargeRequest { + /** + * Whether charge was successful. + */ + chargeState?: string; + /** + * Invoice IDs from the orderinvoices service that correspond to the charge. + */ + invoiceIds?: string[]; + } + export interface Schema$OrderpaymentsNotifyChargeResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderpaymentsNotifyChargeResponse". + */ + kind?: string; + } + export interface Schema$OrderpaymentsNotifyRefundRequest { + /** + * Invoice IDs from the orderinvoices service that correspond to the refund. + */ + invoiceIds?: string[]; + /** + * Whether refund was successful. + */ + refundState?: string; + } + export interface Schema$OrderpaymentsNotifyRefundResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderpaymentsNotifyRefundResponse". + */ + kind?: string; + } + export interface Schema$OrderPromotion { + /** + * Items which this promotion may be applied to. If empty, there are no + * restrictions on applicable items and quantity. + */ + applicableItems?: Schema$OrderPromotionItem[]; + /** + * Items which this promotion have been applied to. + */ + appliedItems?: Schema$OrderPromotionItem[]; + /** + * The party funding the promotion. + */ + funder?: string; + /** + * This field is used to identify promotions within merchants' own + * systems. + */ + merchantPromotionId?: string; + /** + * Estimated discount applied to pre-tax amount. + */ + pretaxValue?: Schema$Price; + /** + * A short title of the promotion to be shown on the checkout page. + */ + shortTitle?: string; + /** + * The category of the promotion. + */ + subtype?: string; + /** + * Estimated discount applied to tax (if allowed by law). + */ + taxValue?: Schema$Price; + /** + * The title of the promotion. + */ + title?: string; + /** + * The scope of the promotion. + */ + type?: string; + } + export interface Schema$OrderPromotionItem { + lineItemId?: string; + productId?: string; + /** + * The quantity of the associated product. + */ + quantity?: number; + } + export interface Schema$OrderRefund { + /** + * The actor that created the refund. + */ + actor?: string; + /** + * The amount that is refunded. + */ + amount?: Schema$Price; + /** + * Date on which the item has been created, in ISO 8601 format. + */ + creationDate?: string; + /** + * The reason for the refund. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + } + /** + * Order disbursement. All methods require the payment analyst role. + */ + export interface Schema$OrderReportDisbursement { + /** + * The disbursement amount. + */ + disbursementAmount?: Schema$Price; + /** + * The disbursement date, in ISO 8601 format. + */ + disbursementCreationDate?: string; + /** + * The date the disbursement was initiated, in ISO 8601 format. + */ + disbursementDate?: string; + /** + * The ID of the disbursement. + */ + disbursementId?: string; + /** + * The ID of the managing account. + */ + merchantId?: string; + } + export interface Schema$OrderreportsListDisbursementsResponse { + /** + * The list of disbursements. + */ + disbursements?: Schema$OrderReportDisbursement[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderreportsListDisbursementsResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of disbursements. + */ + nextPageToken?: string; + } + export interface Schema$OrderreportsListTransactionsResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderreportsListTransactionsResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of transactions. + */ + nextPageToken?: string; + /** + * The list of transactions. + */ + transactions?: Schema$OrderReportTransaction[]; + } + export interface Schema$OrderReportTransaction { + /** + * The disbursement amount. + */ + disbursementAmount?: Schema$Price; + /** + * The date the disbursement was created, in ISO 8601 format. + */ + disbursementCreationDate?: string; + /** + * The date the disbursement was initiated, in ISO 8601 format. + */ + disbursementDate?: string; + /** + * The ID of the disbursement. + */ + disbursementId?: string; + /** + * The ID of the managing account. + */ + merchantId?: string; + /** + * Merchant-provided id of the order. + */ + merchantOrderId?: string; + /** + * The id of the order. + */ + orderId?: string; + /** + * Total amount for the items. + */ + productAmount?: Schema$ProductAmount; + /** + * The date of the transaction, in ISO 8601 format. + */ + transactionDate?: string; + } + export interface Schema$OrderReturn { + /** + * The actor that created the refund. + */ + actor?: string; + /** + * Date on which the item has been created, in ISO 8601 format. + */ + creationDate?: string; + /** + * Quantity that is returned. + */ + quantity?: number; + /** + * The reason for the return. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + } + export interface Schema$OrderreturnsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderreturnsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of returns. + */ + nextPageToken?: string; + resources?: Schema$MerchantOrderReturn[]; + } + export interface Schema$OrdersAcknowledgeRequest { + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + } + export interface Schema$OrdersAcknowledgeResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersAcknowledgeResponse". + */ + kind?: string; + } + export interface Schema$OrdersAdvanceTestOrderResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersAdvanceTestOrderResponse". + */ + kind?: string; + } + export interface Schema$OrdersCancelLineItemRequest { + /** + * The ID of the line item to cancel. Either lineItemId or productId is + * required. + */ + lineItemId?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The ID of the product to cancel. This is the REST ID used in the products + * service. Either lineItemId or productId is required. + */ + productId?: string; + /** + * The quantity to cancel. + */ + quantity?: number; + /** + * The reason for the cancellation. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + } + export interface Schema$OrdersCancelLineItemResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersCancelLineItemResponse". + */ + kind?: string; + } + export interface Schema$OrdersCancelRequest { + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The reason for the cancellation. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + } + export interface Schema$OrdersCancelResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersCancelResponse". + */ + kind?: string; + } + export interface Schema$OrdersCancelTestOrderByCustomerRequest { + /** + * The reason for the cancellation. + */ + reason?: string; + } + export interface Schema$OrdersCancelTestOrderByCustomerResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersCancelTestOrderByCustomerResponse". + */ + kind?: string; + } + export interface Schema$OrdersCreateTestOrderRequest { + /** + * The CLDR territory code of the country of the test order to create. + * Affects the currency and addresses of orders created via template_name, + * or the addresses of orders created via test_order. Acceptable values + * are: - "US" - "FR" Defaults to US. + */ + country?: string; + /** + * The test order template to use. Specify as an alternative to testOrder as + * a shortcut for retrieving a template and then creating an order using + * that template. + */ + templateName?: string; + /** + * The test order to create. + */ + testOrder?: Schema$TestOrder; + } + export interface Schema$OrdersCreateTestOrderResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersCreateTestOrderResponse". + */ + kind?: string; + /** + * The ID of the newly created test order. + */ + orderId?: string; + } + export interface Schema$OrdersCreateTestReturnRequest { + /** + * Returned items. + */ + items?: Schema$OrdersCustomBatchRequestEntryCreateTestReturnReturnItem[]; + } + export interface Schema$OrdersCreateTestReturnResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersCreateTestReturnResponse". + */ + kind?: string; + /** + * The ID of the newly created test order return. + */ + returnId?: string; + } + export interface Schema$OrdersCustomBatchRequestEntryCreateTestReturnReturnItem { + /** + * The ID of the line item to return. + */ + lineItemId?: string; + /** + * Quantity that is returned. + */ + quantity?: number; + } + export interface Schema$OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo { + /** + * The carrier handling the shipment. See shipments[].carrier in the Orders + * resource representation for a list of acceptable values. + */ + carrier?: string; + /** + * The ID of the shipment. + */ + shipmentId?: string; + /** + * The tracking id for the shipment. + */ + trackingId?: string; + } + export interface Schema$OrdersGetByMerchantOrderIdResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersGetByMerchantOrderIdResponse". + */ + kind?: string; + /** + * The requested order. + */ + order?: Schema$Order; + } + export interface Schema$OrdersGetTestOrderTemplateResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersGetTestOrderTemplateResponse". + */ + kind?: string; + /** + * The requested test order template. + */ + template?: Schema$TestOrder; + } + export interface Schema$OrderShipment { + /** + * The carrier handling the shipment. Acceptable values for US are: - + * "gsx" - "ups" - "usps" - + * "fedex" - "dhl" - "ecourier" - + * "cxt" - "google" - "ontrac" - + * "emsy" - "ont" - "deliv" - + * "dynamex" - "lasership" - "mpx" - + * "uds" Acceptable values for FR are: - + * "colissimo" - "chronopost" + */ + carrier?: string; + /** + * Date on which the shipment has been created, in ISO 8601 format. + */ + creationDate?: string; + /** + * Date on which the shipment has been delivered, in ISO 8601 format. + * Present only if status is delivered + */ + deliveryDate?: string; + /** + * The id of the shipment. + */ + id?: string; + /** + * The line items that are shipped. + */ + lineItems?: Schema$OrderShipmentLineItemShipment[]; + /** + * The status of the shipment. + */ + status?: string; + /** + * The tracking id for the shipment. + */ + trackingId?: string; + } + export interface Schema$OrderShipmentLineItemShipment { + /** + * The id of the line item that is shipped. Either lineItemId or productId + * is required. + */ + lineItemId?: string; + /** + * The ID of the product to ship. This is the REST ID used in the products + * service. Either lineItemId or productId is required. + */ + productId?: string; + /** + * The quantity that is shipped. + */ + quantity?: number; + } + export interface Schema$OrdersInStoreRefundLineItemRequest { + /** + * The ID of the line item to return. Either lineItemId or productId is + * required. + */ + lineItemId?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The amount to be refunded. This may be pre-tax or post-tax depending on + * the location of the order. Required. + */ + priceAmount?: Schema$Price; + /** + * The ID of the product to return. This is the REST ID used in the products + * service. Either lineItemId or productId is required. + */ + productId?: string; + /** + * The quantity to return and refund. + */ + quantity?: number; + /** + * The reason for the return. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + /** + * The amount of tax to be refunded. Required. + */ + taxAmount?: Schema$Price; + } + export interface Schema$OrdersInStoreRefundLineItemResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersInStoreRefundLineItemResponse". + */ + kind?: string; + } + export interface Schema$OrdersListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of orders. + */ + nextPageToken?: string; + resources?: Schema$Order[]; + } + export interface Schema$OrdersRejectReturnLineItemRequest { + /** + * The ID of the line item to return. Either lineItemId or productId is + * required. + */ + lineItemId?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The ID of the product to return. This is the REST ID used in the products + * service. Either lineItemId or productId is required. + */ + productId?: string; + /** + * The quantity to return and refund. + */ + quantity?: number; + /** + * The reason for the return. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + } + export interface Schema$OrdersRejectReturnLineItemResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersRejectReturnLineItemResponse". + */ + kind?: string; + } + export interface Schema$OrdersReturnRefundLineItemRequest { + /** + * The ID of the line item to return. Either lineItemId or productId is + * required. + */ + lineItemId?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The amount to be refunded. This may be pre-tax or post-tax depending on + * the location of the order. If omitted, refundless return is assumed. + */ + priceAmount?: Schema$Price; + /** + * The ID of the product to return. This is the REST ID used in the products + * service. Either lineItemId or productId is required. + */ + productId?: string; + /** + * The quantity to return and refund. + */ + quantity?: number; + /** + * The reason for the return. + */ + reason?: string; + /** + * The explanation of the reason. + */ + reasonText?: string; + /** + * The amount of tax to be refunded. Optional, but if filled, then + * priceAmount must be set. Calculated automatically if not provided. + */ + taxAmount?: Schema$Price; + } + export interface Schema$OrdersReturnRefundLineItemResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersReturnRefundLineItemResponse". + */ + kind?: string; + } + export interface Schema$OrdersSetLineItemMetadataRequest { + annotations?: Schema$OrderMerchantProvidedAnnotation[]; + /** + * The ID of the line item to set metadata. Either lineItemId or productId + * is required. + */ + lineItemId?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The ID of the product to set metadata. This is the REST ID used in the + * products service. Either lineItemId or productId is required. + */ + productId?: string; + } + export interface Schema$OrdersSetLineItemMetadataResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersSetLineItemMetadataResponse". + */ + kind?: string; + } + export interface Schema$OrdersShipLineItemsRequest { + /** + * Line items to ship. + */ + lineItems?: Schema$OrderShipmentLineItemShipment[]; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * ID of the shipment group. Required for orders that use the orderinvoices + * service. + */ + shipmentGroupId?: string; + /** + * Shipment information. This field is repeated because a single line item + * can be shipped in several packages (and have several tracking IDs). + */ + shipmentInfos?: + Schema$OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; + } + export interface Schema$OrdersShipLineItemsResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersShipLineItemsResponse". + */ + kind?: string; + } + export interface Schema$OrdersUpdateLineItemShippingDetailsRequest { + /** + * Updated delivery by date, in ISO 8601 format. If not specified only ship + * by date is updated. + */ + deliverByDate?: string; + /** + * The ID of the line item to set metadata. Either lineItemId or productId + * is required. + */ + lineItemId?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The ID of the product to set metadata. This is the REST ID used in the + * products service. Either lineItemId or productId is required. + */ + productId?: string; + /** + * Updated ship by date, in ISO 8601 format. If not specified only deliver + * by date is updated. + */ + shipByDate?: string; + } + export interface Schema$OrdersUpdateLineItemShippingDetailsResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersUpdateLineItemShippingDetailsResponse". + */ + kind?: string; + } + export interface Schema$OrdersUpdateMerchantOrderIdRequest { + /** + * The merchant order id to be assigned to the order. Must be unique per + * merchant. + */ + merchantOrderId?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + } + export interface Schema$OrdersUpdateMerchantOrderIdResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersUpdateMerchantOrderIdResponse". + */ + kind?: string; + } + export interface Schema$OrdersUpdateShipmentRequest { + /** + * The carrier handling the shipment. Not updated if missing. See + * shipments[].carrier in the Orders resource representation for a list of + * acceptable values. + */ + carrier?: string; + /** + * Date on which the shipment has been delivered, in ISO 8601 format. + * Optional and can be provided only if status is delivered. + */ + deliveryDate?: string; + /** + * The ID of the operation. Unique across all operations for a given order. + */ + operationId?: string; + /** + * The ID of the shipment. + */ + shipmentId?: string; + /** + * New status for the shipment. Not updated if missing. + */ + status?: string; + /** + * The tracking id for the shipment. Not updated if missing. + */ + trackingId?: string; + } + export interface Schema$OrdersUpdateShipmentResponse { + /** + * The status of the execution. + */ + executionStatus?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersUpdateShipmentResponse". + */ + kind?: string; + } + export interface Schema$PosCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$PosCustomBatchRequestEntry[]; + } + export interface Schema$PosCustomBatchRequestEntry { + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * The inventory to submit. Set this only if the method is inventory. + */ + inventory?: Schema$PosInventory; + /** + * The ID of the POS data provider. + */ + merchantId?: string; + method?: string; + /** + * The sale information to submit. Set this only if the method is sale. + */ + sale?: Schema$PosSale; + /** + * The store information to submit. Set this only if the method is insert. + */ + store?: Schema$PosStore; + /** + * The store code. Set this only if the method is delete or get. + */ + storeCode?: string; + /** + * The ID of the account for which to get/submit data. + */ + targetMerchantId?: string; + } + export interface Schema$PosCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$PosCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posCustomBatchResponse". + */ + kind?: string; + } + export interface Schema$PosCustomBatchResponseEntry { + /** + * The ID of the request entry to which this entry responds. + */ + batchId?: number; + /** + * A list of errors defined if, and only if, the request failed. + */ + errors?: Schema$Errors; + /** + * The updated inventory information. + */ + inventory?: Schema$PosInventory; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posCustomBatchResponseEntry". + */ + kind?: string; + /** + * The updated sale information. + */ + sale?: Schema$PosSale; + /** + * The retrieved or updated store information. + */ + store?: Schema$PosStore; + } + export interface Schema$PosDataProviders { + /** + * Country code. + */ + country?: string; + /** + * A list of POS data providers. + */ + posDataProviders?: Schema$PosDataProvidersPosDataProvider[]; + } + export interface Schema$PosDataProvidersPosDataProvider { + /** + * The display name of Pos data Provider. + */ + displayName?: string; + /** + * The full name of this POS data Provider. + */ + fullName?: string; + /** + * The ID of the account. + */ + providerId?: string; + } + /** + * The absolute quantity of an item available at the given store. + */ + export interface Schema$PosInventory { + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Global Trade Item Number. + */ + gtin?: string; + /** + * A unique identifier for the item. + */ + itemId?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posInventory". + */ + kind?: string; + /** + * The current price of the item. + */ + price?: Schema$Price; + /** + * The available quantity of the item. + */ + quantity?: string; + /** + * The identifier of the merchant's store. Either a storeCode inserted + * via the API or the code of the store in Google My Business. + */ + storeCode?: string; + /** + * The CLDR territory code for the item. + */ + targetCountry?: string; + /** + * The inventory timestamp, in ISO 8601 format. + */ + timestamp?: string; + } + export interface Schema$PosInventoryRequest { + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Global Trade Item Number. + */ + gtin?: string; + /** + * A unique identifier for the item. + */ + itemId?: string; + /** + * The current price of the item. + */ + price?: Schema$Price; + /** + * The available quantity of the item. + */ + quantity?: string; + /** + * The identifier of the merchant's store. Either a storeCode inserted + * via the API or the code of the store in Google My Business. + */ + storeCode?: string; + /** + * The CLDR territory code for the item. + */ + targetCountry?: string; + /** + * The inventory timestamp, in ISO 8601 format. + */ + timestamp?: string; + } + export interface Schema$PosInventoryResponse { + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Global Trade Item Number. + */ + gtin?: string; + /** + * A unique identifier for the item. + */ + itemId?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posInventoryResponse". + */ + kind?: string; + /** + * The current price of the item. + */ + price?: Schema$Price; + /** + * The available quantity of the item. + */ + quantity?: string; + /** + * The identifier of the merchant's store. Either a storeCode inserted + * via the API or the code of the store in Google My Business. + */ + storeCode?: string; + /** + * The CLDR territory code for the item. + */ + targetCountry?: string; + /** + * The inventory timestamp, in ISO 8601 format. + */ + timestamp?: string; + } + export interface Schema$PosListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posListResponse". + */ + kind?: string; + resources?: Schema$PosStore[]; + } + /** + * The change of the available quantity of an item at the given store. + */ + export interface Schema$PosSale { + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Global Trade Item Number. + */ + gtin?: string; + /** + * A unique identifier for the item. + */ + itemId?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posSale". + */ + kind?: string; + /** + * The price of the item. + */ + price?: Schema$Price; + /** + * The relative change of the available quantity. Negative for items + * returned. + */ + quantity?: string; + /** + * A unique ID to group items from the same sale event. + */ + saleId?: string; + /** + * The identifier of the merchant's store. Either a storeCode inserted + * via the API or the code of the store in Google My Business. + */ + storeCode?: string; + /** + * The CLDR territory code for the item. + */ + targetCountry?: string; + /** + * The inventory timestamp, in ISO 8601 format. + */ + timestamp?: string; + } + export interface Schema$PosSaleRequest { + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Global Trade Item Number. + */ + gtin?: string; + /** + * A unique identifier for the item. + */ + itemId?: string; + /** + * The price of the item. + */ + price?: Schema$Price; + /** + * The relative change of the available quantity. Negative for items + * returned. + */ + quantity?: string; + /** + * A unique ID to group items from the same sale event. + */ + saleId?: string; + /** + * The identifier of the merchant's store. Either a storeCode inserted + * via the API or the code of the store in Google My Business. + */ + storeCode?: string; + /** + * The CLDR territory code for the item. + */ + targetCountry?: string; + /** + * The inventory timestamp, in ISO 8601 format. + */ + timestamp?: string; + } + export interface Schema$PosSaleResponse { + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Global Trade Item Number. + */ + gtin?: string; + /** + * A unique identifier for the item. + */ + itemId?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posSaleResponse". + */ + kind?: string; + /** + * The price of the item. + */ + price?: Schema$Price; + /** + * The relative change of the available quantity. Negative for items + * returned. + */ + quantity?: string; + /** + * A unique ID to group items from the same sale event. + */ + saleId?: string; + /** + * The identifier of the merchant's store. Either a storeCode inserted + * via the API or the code of the store in Google My Business. + */ + storeCode?: string; + /** + * The CLDR territory code for the item. + */ + targetCountry?: string; + /** + * The inventory timestamp, in ISO 8601 format. + */ + timestamp?: string; + } + /** + * Store resource. + */ + export interface Schema$PosStore { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#posStore". + */ + kind?: string; + /** + * The street address of the store. + */ + storeAddress?: string; + /** + * A store identifier that is unique for the given merchant. + */ + storeCode?: string; + } + export interface Schema$PostalCodeGroup { + /** + * The CLDR territory code of the country the postal code group applies to. + * Required. + */ + country?: string; + /** + * The name of the postal code group, referred to in headers. Required. + */ + name?: string; + /** + * A range of postal codes. Required. + */ + postalCodeRanges?: Schema$PostalCodeRange[]; + } + export interface Schema$PostalCodeRange { + /** + * A postal code or a pattern of the form prefix* denoting the inclusive + * lower bound of the range defining the area. Examples values: + * "94108", "9410*", "9*". Required. + */ + postalCodeRangeBegin?: string; + /** + * A postal code or a pattern of the form prefix* denoting the inclusive + * upper bound of the range defining the area. It must have the same length + * as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then + * postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is + * a pattern then postalCodeRangeEnd must be a pattern with the same prefix + * length. Optional: if not set, then the area is defined as being all the + * postal codes matching postalCodeRangeBegin. + */ + postalCodeRangeEnd?: string; + } + export interface Schema$Price { + /** + * The currency of the price. + */ + currency?: string; + /** + * The price represented as a number. + */ + value?: string; + } + /** + * Product data. After inserting, updating, or deleting a product, it may take + * several minutes before changes take effect. + */ + export interface Schema$Product { + /** + * Additional URLs of images of the item. + */ + additionalImageLinks?: string[]; + /** + * Used to group items in an arbitrary way. Only for CPA%, discouraged + * otherwise. + */ + adsGrouping?: string; + /** + * Similar to ads_grouping, but only works on CPC. + */ + adsLabels?: string[]; + /** + * Allows advertisers to override the item URL when the product is shown + * within the context of Product Ads. + */ + adsRedirect?: string; + /** + * Set to true if the item is targeted towards adults. + */ + adult?: boolean; + /** + * Target age group of the item. + */ + ageGroup?: string; + /** + * Availability status of the item. + */ + availability?: string; + /** + * The day a pre-ordered product becomes available for delivery, in ISO 8601 + * format. + */ + availabilityDate?: string; + /** + * Brand of the item. + */ + brand?: string; + /** + * The item's channel (online or local). + */ + channel?: string; + /** + * Color of the item. + */ + color?: string; + /** + * Condition or state of the item. + */ + condition?: string; + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Cost of goods sold. Used for gross profit reporting. + */ + costOfGoodsSold?: Schema$Price; + /** + * A list of custom (merchant-provided) attributes. It can also be used for + * submitting any attribute of the feed specification in its generic form + * (e.g., { "name": "size type", "type": + * "text", "value": "regular" }). This is + * useful for submitting attributes not explicitly exposed by the API. + */ + customAttributes?: Schema$CustomAttribute[]; + /** + * Custom label 0 for custom grouping of items in a Shopping campaign. + */ + customLabel0?: string; + /** + * Custom label 1 for custom grouping of items in a Shopping campaign. + */ + customLabel1?: string; + /** + * Custom label 2 for custom grouping of items in a Shopping campaign. + */ + customLabel2?: string; + /** + * Custom label 3 for custom grouping of items in a Shopping campaign. + */ + customLabel3?: string; + /** + * Custom label 4 for custom grouping of items in a Shopping campaign. + */ + customLabel4?: string; + /** + * Description of the item. + */ + description?: string; + /** + * An identifier for an item for dynamic remarketing campaigns. + */ + displayAdsId?: string; + /** + * URL directly to your item's landing page for dynamic remarketing + * campaigns. + */ + displayAdsLink?: string; + /** + * Advertiser-specified recommendations. + */ + displayAdsSimilarIds?: string[]; + /** + * Title of an item for dynamic remarketing campaigns. + */ + displayAdsTitle?: string; + /** + * Offer margin for dynamic remarketing campaigns. + */ + displayAdsValue?: number; + /** + * The energy efficiency class as defined in EU directive 2010/30/EU. + */ + energyEfficiencyClass?: string; + /** + * The list of destinations to exclude for this target (corresponds to + * unchecked check boxes in Merchant Center). + */ + excludedDestinations?: string[]; + /** + * Date on which the item should expire, as specified upon insertion, in ISO + * 8601 format. The actual expiration date in Google Shopping is exposed in + * productstatuses as googleExpirationDate and might be earlier if + * expirationDate is too far in the future. + */ + expirationDate?: string; + /** + * Target gender of the item. + */ + gender?: string; + /** + * Google's category of the item (see Google product taxonomy). + */ + googleProductCategory?: string; + /** + * Global Trade Item Number (GTIN) of the item. + */ + gtin?: string; + /** + * The REST id of the product. Content API methods that operate on products + * take this as their productId parameter. The REST id for a product is of + * the form channel:contentLanguage:targetCountry:offerId. + */ + id?: string; + /** + * False when the item does not have unique product identifiers appropriate + * to its category, such as GTIN, MPN, and brand. Required according to the + * Unique Product Identifier Rules for all target countries except for + * Canada. + */ + identifierExists?: boolean; + /** + * URL of an image of the item. + */ + imageLink?: string; + /** + * The list of destinations to include for this target (corresponds to + * checked check boxes in Merchant Center). Default destinations are always + * included unless provided in the excluded_destination field. + */ + includedDestinations?: string[]; + /** + * Number and amount of installments to pay for an item. Brazil only. + */ + installment?: Schema$Installment; + /** + * Whether the item is a merchant-defined bundle. A bundle is a custom + * grouping of different products sold by a merchant for a single price. + */ + isBundle?: boolean; + /** + * Shared identifier for all variants of the same product. + */ + itemGroupId?: string; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#product". + */ + kind?: string; + /** + * URL directly linking to your item's page on your website. + */ + link?: string; + /** + * Loyalty points that users receive after purchasing the item. Japan only. + */ + loyaltyPoints?: Schema$LoyaltyPoints; + /** + * The material of which the item is made. + */ + material?: string; + /** + * The energy efficiency class as defined in EU directive 2010/30/EU. + */ + maxEnergyEfficiencyClass?: string; + /** + * Maximal product handling time (in business days). + */ + maxHandlingTime?: string; + /** + * The energy efficiency class as defined in EU directive 2010/30/EU. + */ + minEnergyEfficiencyClass?: string; + /** + * Minimal product handling time (in business days). + */ + minHandlingTime?: string; + /** + * Link to a mobile-optimized version of the landing page. + */ + mobileLink?: string; + /** + * Manufacturer Part Number (MPN) of the item. + */ + mpn?: string; + /** + * The number of identical products in a merchant-defined multipack. + */ + multipack?: string; + /** + * A unique identifier for the item. Leading and trailing whitespaces are + * stripped and multiple whitespaces are replaced by a single whitespace + * upon submission. Only valid unicode characters are accepted. See the + * products feed specification for details. Note: Content API methods that + * operate on products take the REST id of the product, not this identifier. + */ + offerId?: string; + /** + * The item's pattern (e.g. polka dots). + */ + pattern?: string; + /** + * Price of the item. + */ + price?: Schema$Price; + /** + * Categories of the item (formatted as in products feed specification). + */ + productTypes?: string[]; + /** + * The unique ID of a promotion. + */ + promotionIds?: string[]; + /** + * Advertised sale price of the item. + */ + salePrice?: Schema$Price; + /** + * Date range during which the item is on sale (see products feed + * specification). + */ + salePriceEffectiveDate?: string; + /** + * The quantity of the product that is available for selling on Google. + * Supported only for online products. + */ + sellOnGoogleQuantity?: string; + /** + * Shipping rules. + */ + shipping?: Schema$ProductShipping[]; + /** + * Height of the item for shipping. + */ + shippingHeight?: Schema$ProductShippingDimension; + /** + * The shipping label of the product, used to group product in account-level + * shipping rules. + */ + shippingLabel?: string; + /** + * Length of the item for shipping. + */ + shippingLength?: Schema$ProductShippingDimension; + /** + * Weight of the item for shipping. + */ + shippingWeight?: Schema$ProductShippingWeight; + /** + * Width of the item for shipping. + */ + shippingWidth?: Schema$ProductShippingDimension; + /** + * Size of the item. + */ + sizes?: string[]; + /** + * System in which the size is specified. Recommended for apparel items. + */ + sizeSystem?: string; + /** + * The cut of the item. Recommended for apparel items. + */ + sizeType?: string; + /** + * The source of the offer, i.e., how the offer was created. + */ + source?: string; + /** + * The CLDR territory code for the item. + */ + targetCountry?: string; + /** + * Tax information. + */ + taxes?: Schema$ProductTax[]; + /** + * Title of the item. + */ + title?: string; + /** + * The preference of the denominator of the unit price. + */ + unitPricingBaseMeasure?: Schema$ProductUnitPricingBaseMeasure; + /** + * The measure and dimension of an item. + */ + unitPricingMeasure?: Schema$ProductUnitPricingMeasure; + } + export interface Schema$ProductAmount { + /** + * The pre-tax or post-tax price depending on the location of the order. + */ + priceAmount?: Schema$Price; + /** + * Remitted tax value. + */ + remittedTaxAmount?: Schema$Price; + /** + * Tax value. + */ + taxAmount?: Schema$Price; + } + export interface Schema$ProductsCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$ProductsCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch products request. + */ + export interface Schema$ProductsCustomBatchRequestEntry { + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * The ID of the managing account. + */ + merchantId?: string; + method?: string; + /** + * The product to insert. Only required if the method is insert. + */ + product?: Schema$Product; + /** + * The ID of the product to get or delete. Only defined if the method is get + * or delete. + */ + productId?: string; + } + export interface Schema$ProductsCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$ProductsCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#productsCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch products response. + */ + export interface Schema$ProductsCustomBatchResponseEntry { + /** + * The ID of the request entry this entry responds to. + */ + batchId?: number; + /** + * A list of errors defined if and only if the request failed. + */ + errors?: Schema$Errors; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#productsCustomBatchResponseEntry". + */ + kind?: string; + /** + * The inserted product. Only defined if the method is insert and if the + * request was successful. + */ + product?: Schema$Product; + } + export interface Schema$ProductShipping { + /** + * The CLDR territory code of the country to which an item will ship. + */ + country?: string; + /** + * The location where the shipping is applicable, represented by a location + * group name. + */ + locationGroupName?: string; + /** + * The numeric id of a location that the shipping rate applies to as defined + * in the AdWords API. + */ + locationId?: string; + /** + * The postal code range that the shipping rate applies to, represented by a + * postal code, a postal code prefix followed by a * wildcard, a range + * between two postal codes or two postal code prefixes of equal length. + */ + postalCode?: string; + /** + * Fixed shipping price, represented as a number. + */ + price?: Schema$Price; + /** + * The geographic region to which a shipping rate applies. + */ + region?: string; + /** + * A free-form description of the service class or delivery speed. + */ + service?: string; + } + export interface Schema$ProductShippingDimension { + /** + * The unit of value. + */ + unit?: string; + /** + * The dimension of the product used to calculate the shipping cost of the + * item. + */ + value?: number; + } + export interface Schema$ProductShippingWeight { + /** + * The unit of value. + */ + unit?: string; + /** + * The weight of the product used to calculate the shipping cost of the + * item. + */ + value?: number; + } + export interface Schema$ProductsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#productsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of products. + */ + nextPageToken?: string; + resources?: Schema$Product[]; + } + /** + * The status of a product, i.e., information about a product computed + * asynchronously by the data quality analysis. + */ + export interface Schema$ProductStatus { + /** + * Date on which the item has been created, in ISO 8601 format. + */ + creationDate?: string; + /** + * The intended destinations for the product. + */ + destinationStatuses?: Schema$ProductStatusDestinationStatus[]; + /** + * Date on which the item expires in Google Shopping, in ISO 8601 format. + */ + googleExpirationDate?: string; + /** + * A list of all issues associated with the product. + */ + itemLevelIssues?: Schema$ProductStatusItemLevelIssue[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#productStatus". + */ + kind?: string; + /** + * Date on which the item has been last updated, in ISO 8601 format. + */ + lastUpdateDate?: string; + /** + * The link to the product. + */ + link?: string; + /** + * The id of the product for which status is reported. + */ + productId?: string; + /** + * The title of the product. + */ + title?: string; + } + export interface Schema$ProductStatusDestinationStatus { + /** + * The name of the destination + */ + destination?: string; + status?: string; + } + export interface Schema$ProductstatusesCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$ProductstatusesCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch productstatuses request. + */ + export interface Schema$ProductstatusesCustomBatchRequestEntry { + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * If set, only issues for the specified destinations are returned, + * otherwise only issues for the Shopping destination. + */ + destinations?: string[]; + includeAttributes?: boolean; + /** + * The ID of the managing account. + */ + merchantId?: string; + method?: string; + /** + * The ID of the product whose status to get. + */ + productId?: string; + } + export interface Schema$ProductstatusesCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$ProductstatusesCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#productstatusesCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch productstatuses response. + */ + export interface Schema$ProductstatusesCustomBatchResponseEntry { + /** + * The ID of the request entry this entry responds to. + */ + batchId?: number; + /** + * A list of errors, if the request failed. + */ + errors?: Schema$Errors; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#productstatusesCustomBatchResponseEntry". + */ + kind?: string; + /** + * The requested product status. Only defined if the request was successful. + */ + productStatus?: Schema$ProductStatus; + } + export interface Schema$ProductstatusesListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#productstatusesListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of products statuses. + */ + nextPageToken?: string; + resources?: Schema$ProductStatus[]; + } + export interface Schema$ProductStatusItemLevelIssue { + /** + * The attribute's name, if the issue is caused by a single attribute. + */ + attributeName?: string; + /** + * The error code of the issue. + */ + code?: string; + /** + * A short issue description in English. + */ + description?: string; + /** + * The destination the issue applies to. + */ + destination?: string; + /** + * A detailed issue description in English. + */ + detail?: string; + /** + * The URL of a web page to help with resolving this issue. + */ + documentation?: string; + /** + * Whether the issue can be resolved by the merchant. + */ + resolution?: string; + /** + * How this issue affects serving of the offer. + */ + servability?: string; + } + export interface Schema$ProductTax { + /** + * The country within which the item is taxed, specified as a CLDR territory + * code. + */ + country?: string; + /** + * The numeric id of a location that the tax rate applies to as defined in + * the AdWords API. + */ + locationId?: string; + /** + * The postal code range that the tax rate applies to, represented by a ZIP + * code, a ZIP code prefix using * wildcard, a range between two ZIP codes + * or two ZIP code prefixes of equal length. Examples: 94114, 94*, + * 94002-95460, 94*-95*. + */ + postalCode?: string; + /** + * The percentage of tax rate that applies to the item price. + */ + rate?: number; + /** + * The geographic region to which the tax rate applies. + */ + region?: string; + /** + * Set to true if tax is charged on shipping. + */ + taxShip?: boolean; + } + export interface Schema$ProductUnitPricingBaseMeasure { + /** + * The unit of the denominator. + */ + unit?: string; + /** + * The denominator of the unit price. + */ + value?: string; + } + export interface Schema$ProductUnitPricingMeasure { + /** + * The unit of the measure. + */ + unit?: string; + /** + * The measure of an item. + */ + value?: number; + } + export interface Schema$Promotion { + /** + * [required] Amount of the promotion. The values here are the promotion + * applied to the unit price pretax and to the total of the tax amounts. + */ + promotionAmount?: Schema$Amount; + /** + * [required] ID of the promotion. + */ + promotionId?: string; + } + 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. + */ + applicableShippingLabels?: string[]; + /** + * A list of carrier rates that can be referred to by mainTable or + * singleValue. + */ + carrierRates?: Schema$CarrierRate[]; + /** + * A table defining the rate group, when singleValue is not expressive + * enough. Can only be set if singleValue is not set. + */ + mainTable?: Schema$Table; + /** + * Name of the rate group. Optional. If set has to be unique within shipping + * service. + */ + name?: string; + /** + * The value of the rate group (e.g. flat rate $10). Can only be set if + * mainTable and subtables are not set. + */ + singleValue?: Schema$Value; + /** + * A list of subtables referred to by mainTable. Can only be set if + * mainTable is set. + */ + subtables?: Schema$Table[]; + } + export interface Schema$RefundReason { + description?: string; + reasonCode?: string; + } + export interface Schema$ReturnShipment { + creationDate?: string; + returnMethodType?: string; + shipmentId?: string; + shipmentTrackingInfos?: Schema$ShipmentTrackingInfo[]; + } + export interface Schema$Row { + /** + * The list of cells that constitute the row. Must have the same length as + * columnHeaders for two-dimensional tables, a length of 1 for + * one-dimensional tables. Required. + */ + cells?: Schema$Value[]; + } + export interface Schema$Service { + /** + * A boolean exposing the active status of the shipping service. Required. + */ + active?: boolean; + /** + * The CLDR code of the currency to which this service applies. Must match + * that of the prices in rate groups. + */ + currency?: string; + /** + * The CLDR territory code of the country to which the service applies. + * Required. + */ + deliveryCountry?: string; + /** + * Time spent in various aspects from order to the delivery of the product. + * Required. + */ + deliveryTime?: Schema$DeliveryTime; + /** + * Eligibility for this service. + */ + eligibility?: string; + /** + * Minimum order value for this service. If set, indicates that customers + * will have to spend at least this amount. All prices within a service must + * have the same currency. + */ + minimumOrderValue?: Schema$Price; + /** + * Free-form name of the service. Must be unique within target account. + * Required. + */ + name?: string; + /** + * Shipping rate group definitions. Only the last one is allowed to have an + * empty applicableShippingLabels, which means "everything else". + * The other applicableShippingLabels must not overlap. + */ + rateGroups?: Schema$RateGroup[]; + } + export interface Schema$ShipmentInvoice { + /** + * [required] Invoice summary. + */ + invoiceSummary?: Schema$InvoiceSummary; + /** + * [required] Invoice details per line item. + */ + lineItemInvoices?: Schema$ShipmentInvoiceLineItemInvoice[]; + /** + * [required] ID of the shipment group. + */ + shipmentGroupId?: string; + } + export interface Schema$ShipmentInvoiceLineItemInvoice { + /** + * ID of the line item. Either lineItemId or productId must be set. + */ + lineItemId?: string; + /** + * ID of the product. This is the REST ID used in the products service. + * Either lineItemId or productId must be set. + */ + productId?: string; + /** + * [required] Unit IDs to define specific units within the line item. + */ + shipmentUnitIds?: string[]; + /** + * [required] Invoice details for a single unit. + */ + unitInvoice?: Schema$UnitInvoice; + } + export interface Schema$ShipmentTrackingInfo { + carrier?: string; + trackingNumber?: string; + } + /** + * The merchant account's shipping settings. All methods except + * getsupportedcarriers and getsupportedholidays require the admin role. + */ + export interface Schema$ShippingSettings { + /** + * The ID of the account to which these account shipping settings belong. + * Ignored upon update, always present in get request responses. + */ + accountId?: string; + /** + * A list of postal code groups that can be referred to in services. + * Optional. + */ + postalCodeGroups?: Schema$PostalCodeGroup[]; + /** + * The target account's list of services. Optional. + */ + services?: Schema$Service[]; + } + export interface Schema$ShippingsettingsCustomBatchRequest { + /** + * The request entries to be processed in the batch. + */ + entries?: Schema$ShippingsettingsCustomBatchRequestEntry[]; + } + /** + * A batch entry encoding a single non-batch shippingsettings request. + */ + export interface Schema$ShippingsettingsCustomBatchRequestEntry { + /** + * The ID of the account for which to get/update account shipping settings. + */ + accountId?: string; + /** + * An entry ID, unique within the batch request. + */ + batchId?: number; + /** + * The ID of the managing account. + */ + merchantId?: string; + method?: string; + /** + * The account shipping settings to update. Only defined if the method is + * update. + */ + shippingSettings?: Schema$ShippingSettings; + } + export interface Schema$ShippingsettingsCustomBatchResponse { + /** + * The result of the execution of the batch requests. + */ + entries?: Schema$ShippingsettingsCustomBatchResponseEntry[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#shippingsettingsCustomBatchResponse". + */ + kind?: string; + } + /** + * A batch entry encoding a single non-batch shipping settings response. + */ + export interface Schema$ShippingsettingsCustomBatchResponseEntry { + /** + * The ID of the request entry to which this entry responds. + */ + batchId?: number; + /** + * A list of errors defined if, and only if, the request failed. + */ + errors?: Schema$Errors; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#shippingsettingsCustomBatchResponseEntry". + */ + kind?: string; + /** + * The retrieved or updated account shipping settings. + */ + shippingSettings?: Schema$ShippingSettings; + } + export interface Schema$ShippingsettingsGetSupportedCarriersResponse { + /** + * A list of supported carriers. May be empty. + */ + carriers?: Schema$CarriersCarrier[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#shippingsettingsGetSupportedCarriersResponse". + */ + kind?: string; + } + export interface Schema$ShippingsettingsGetSupportedHolidaysResponse { + /** + * A list of holidays applicable for delivery guarantees. May be empty. + */ + holidays?: Schema$HolidaysHoliday[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#shippingsettingsGetSupportedHolidaysResponse". + */ + kind?: string; + } + export interface Schema$ShippingsettingsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#shippingsettingsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of shipping settings. + */ + nextPageToken?: string; + resources?: Schema$ShippingSettings[]; + } + export interface Schema$Table { + /** + * Headers of the table's columns. Optional: if not set then the table + * has only one dimension. + */ + columnHeaders?: Schema$Headers; + /** + * Name of the table. Required for subtables, ignored for the main table. + */ + name?: string; + /** + * Headers of the table's rows. Required. + */ + rowHeaders?: Schema$Headers; + /** + * The list of rows that constitute the table. Must have the same length as + * rowHeaders. Required. + */ + rows?: Schema$Row[]; + } + export interface Schema$TestOrder { + /** + * The details of the customer who placed the order. + */ + customer?: Schema$TestOrderCustomer; + /** + * Whether the orderinvoices service should support this order. + */ + enableOrderinvoices?: boolean; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#testOrder". + */ + kind?: string; + /** + * Line items that are ordered. At least one line item must be provided. + */ + lineItems?: Schema$TestOrderLineItem[]; + /** + * Determines if test order must be pulled by merchant or pushed to merchant + * via push integration. + */ + notificationMode?: string; + /** + * The billing address. + */ + predefinedBillingAddress?: string; + /** + * Identifier of one of the predefined delivery addresses for the delivery. + */ + predefinedDeliveryAddress?: string; + /** + * Promotions associated with the order. + */ + promotions?: Schema$OrderPromotion[]; + /** + * The total cost of shipping for all items. + */ + shippingCost?: Schema$Price; + /** + * The tax for the total shipping cost. + */ + shippingCostTax?: Schema$Price; + /** + * The requested shipping option. + */ + shippingOption?: string; + } + export interface Schema$TestOrderCustomer { + /** + * Deprecated. + */ + email?: string; + /** + * Full name of the customer. + */ + fullName?: string; + /** + * Customer's marketing preferences. + */ + marketingRightsInfo?: Schema$TestOrderCustomerMarketingRightsInfo; + } + export interface Schema$TestOrderCustomerMarketingRightsInfo { + /** + * Last know user use selection regards marketing preferences. In certain + * cases selection might not be known, so this field would be empty. + */ + explicitMarketingPreference?: string; + /** + * Timestamp when last time marketing preference was updated. Could be + * empty, if user wasn't offered a selection yet. + */ + lastUpdatedTimestamp?: string; + } + export interface Schema$TestOrderLineItem { + /** + * Product data from the time of the order placement. + */ + product?: Schema$TestOrderLineItemProduct; + /** + * Number of items ordered. + */ + quantityOrdered?: number; + /** + * Details of the return policy for the line item. + */ + returnInfo?: Schema$OrderLineItemReturnInfo; + /** + * Details of the requested shipping for the line item. + */ + shippingDetails?: Schema$OrderLineItemShippingDetails; + /** + * Unit tax for the line item. + */ + unitTax?: Schema$Price; + } + export interface Schema$TestOrderLineItemProduct { + /** + * Brand of the item. + */ + brand?: string; + /** + * The item's channel. + */ + channel?: string; + /** + * Condition or state of the item. + */ + condition?: string; + /** + * The two-letter ISO 639-1 language code for the item. + */ + contentLanguage?: string; + /** + * Global Trade Item Number (GTIN) of the item. Optional. + */ + gtin?: string; + /** + * URL of an image of the item. + */ + imageLink?: string; + /** + * Shared identifier for all variants of the same product. Optional. + */ + itemGroupId?: string; + /** + * Manufacturer Part Number (MPN) of the item. Optional. + */ + mpn?: string; + /** + * An identifier of the item. + */ + offerId?: string; + /** + * The price for the product. + */ + price?: Schema$Price; + /** + * The CLDR territory code of the target country of the product. + */ + targetCountry?: string; + /** + * The title of the product. + */ + title?: string; + /** + * Variant attributes for the item. Optional. + */ + variantAttributes?: Schema$OrderLineItemProductVariantAttribute[]; + } + export interface Schema$UnitInvoice { + /** + * Additional charges for a unit, e.g. shipping costs. + */ + additionalCharges?: Schema$UnitInvoiceAdditionalCharge[]; + /** + * Promotions applied to a unit. + */ + promotions?: Schema$Promotion[]; + /** + * [required] Price of the unit, before applying taxes. + */ + unitPricePretax?: Schema$Price; + /** + * Tax amounts to apply to the unit price. + */ + unitPriceTaxes?: Schema$UnitInvoiceTaxLine[]; + } + export interface Schema$UnitInvoiceAdditionalCharge { + /** + * [required] Amount of the additional charge. + */ + additionalChargeAmount?: Schema$Amount; + /** + * Promotions applied to the additional charge. + */ + additionalChargePromotions?: Schema$Promotion[]; + /** + * [required] Type of the additional charge. + */ + type?: string; + } + export interface Schema$UnitInvoiceTaxLine { + /** + * [required] Tax amount for the tax type. + */ + taxAmount?: Schema$Price; + /** + * Optional name of the tax type. This should only be provided if taxType is + * otherFeeTax. + */ + taxName?: string; + /** + * [required] Type of the tax. + */ + taxType?: string; + } + /** + * The single value of a rate group or the value of a rate group table's + * cell. Exactly one of noShipping, flatRate, pricePercentage, + * carrierRateName, subtableName must be set. + */ + export interface Schema$Value { + /** + * The name of a carrier rate referring to a carrier rate defined in the + * same rate group. Can only be set if all other fields are not set. + */ + carrierRateName?: string; + /** + * A flat rate. Can only be set if all other fields are not set. + */ + flatRate?: Schema$Price; + /** + * If true, then the product can't ship. Must be true when set, can only + * be set if all other fields are not set. + */ + noShipping?: boolean; + /** + * A percentage of the price represented as a number in decimal notation + * (e.g., "5.4"). Can only be set if all other fields are not set. + */ + pricePercentage?: string; + /** + * The name of a subtable. Can only be set in table cells (i.e., not for + * single values), and only if all other fields are not set. + */ + subtableName?: string; + } + export interface Schema$Weight { + /** + * The weight unit. + */ + unit?: string; + /** + * The weight represented as a number. + */ + value?: string; + } + + + export class Resource$Accounts { + constructor() {} + + + /** + * content.accounts.authinfo + * @desc Returns information about the authenticated user. + * @alias content.accounts.authinfo + * @memberOf! () + * + * @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 + */ + authinfo( + params?: Params$Resource$Accounts$Authinfo, + options?: MethodOptions): AxiosPromise; + authinfo( + params: Params$Resource$Accounts$Authinfo, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + authinfo( + params: Params$Resource$Accounts$Authinfo, + callback: BodyResponseCallback): void; + authinfo(callback: BodyResponseCallback): + void; + authinfo( + paramsOrCallback?: Params$Resource$Accounts$Authinfo| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Authinfo; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Authinfo; + 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/accounts/authinfo') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounts.claimwebsite + * @desc Claims the website of a Merchant Center sub-account. + * @alias content.accounts.claimwebsite + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account whose website is claimed. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {boolean=} params.overwrite Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + claimwebsite( + params?: Params$Resource$Accounts$Claimwebsite, + options?: MethodOptions): + AxiosPromise; + claimwebsite( + params: Params$Resource$Accounts$Claimwebsite, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + claimwebsite( + params: Params$Resource$Accounts$Claimwebsite, + callback: BodyResponseCallback): + void; + claimwebsite(callback: + BodyResponseCallback): + void; + claimwebsite( + paramsOrCallback?: Params$Resource$Accounts$Claimwebsite| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Claimwebsite; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Claimwebsite; + 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}/accounts/{accountId}/claimwebsite') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.accounts.custombatch + * @desc Retrieves, inserts, updates, and deletes multiple Merchant Center + * (sub-)accounts in a single request. + * @alias content.accounts.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().AccountsCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Accounts$Custombatch, options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Accounts$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Accounts$Custombatch, + callback: BodyResponseCallback): + void; + custombatch(callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Accounts$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Custombatch; + 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/accounts/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounts.delete + * @desc Deletes a Merchant Center sub-account. + * @alias content.accounts.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account. + * @param {boolean=} params.force Flag to delete sub-accounts with products. The default value is false. + * @param {string} params.merchantId The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account. + * @param {object} [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$Accounts$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Accounts$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Accounts$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Accounts$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Delete; + 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}/accounts/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounts.get + * @desc Retrieves a Merchant Center account. + * @alias content.accounts.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [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$Accounts$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accounts$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accounts$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accounts$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$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}/accounts/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounts.insert + * @desc Creates a Merchant Center sub-account. + * @alias content.accounts.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the managing account. This must be a multi-client account. + * @param {().Account} 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 + */ + insert(params?: Params$Resource$Accounts$Insert, options?: MethodOptions): + AxiosPromise; + insert( + params: Params$Resource$Accounts$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Accounts$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Accounts$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Insert; + 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}/accounts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounts.link + * @desc Performs an action on a link between a Merchant Center account and + * another account. + * @alias content.accounts.link + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account that should be linked. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {().AccountsLinkRequest} 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 + */ + link(params?: Params$Resource$Accounts$Link, options?: MethodOptions): + AxiosPromise; + link( + params: Params$Resource$Accounts$Link, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + link( + params: Params$Resource$Accounts$Link, + callback: BodyResponseCallback): void; + link(callback: BodyResponseCallback): void; + link( + paramsOrCallback?: Params$Resource$Accounts$Link| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Link; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Link; + 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}/accounts/{accountId}/link') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounts.list + * @desc Lists the sub-accounts in your Merchant Center account. + * @alias content.accounts.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults The maximum number of accounts to return in the response, used for paging. + * @param {string} params.merchantId The ID of the managing account. This must be a multi-client account. + * @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$Accounts$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Accounts$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Accounts$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Accounts$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$List; + 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}/accounts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounts.update + * @desc Updates a Merchant Center account. + * @alias content.accounts.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {().Account} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update(params?: Params$Resource$Accounts$Update, options?: MethodOptions): + AxiosPromise; + update( + params: Params$Resource$Accounts$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Accounts$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Accounts$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$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}/accounts/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accounts$Authinfo extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + } + export interface Params$Resource$Accounts$Claimwebsite extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account whose website is claimed. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + /** + * Only available to selected merchants. When set to True, this flag removes + * any existing claim on the requested website by another account and + * replaces it with a claim from this account. + */ + overwrite?: boolean; + } + export interface Params$Resource$Accounts$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$AccountsCustomBatchRequest; + } + export interface Params$Resource$Accounts$Delete extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account. + */ + accountId?: string; + /** + * Flag to delete sub-accounts with products. The default value is false. + */ + force?: boolean; + /** + * The ID of the managing account. This must be a multi-client account, and + * accountId must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Accounts$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Accounts$Insert extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the managing account. This must be a multi-client account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Account; + } + export interface Params$Resource$Accounts$Link extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that should be linked. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccountsLinkRequest; + } + export interface Params$Resource$Accounts$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The maximum number of accounts to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the managing account. This must be a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Accounts$Update extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Account; + } + + + export class Resource$Accountstatuses { + constructor() {} + + + /** + * content.accountstatuses.custombatch + * @alias content.accountstatuses.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().AccountstatusesCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Accountstatuses$Custombatch, + options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Accountstatuses$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Accountstatuses$Custombatch, + callback: + BodyResponseCallback): + void; + custombatch( + callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Accountstatuses$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accountstatuses$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accountstatuses$Custombatch; + 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/accountstatuses/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.accountstatuses.get + * @desc Retrieves the status of a Merchant Center account. Multi-client + * accounts can only call this method for sub-accounts. + * @alias content.accountstatuses.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account. + * @param {string=} params.destinations If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [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$Accountstatuses$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accountstatuses$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accountstatuses$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accountstatuses$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accountstatuses$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accountstatuses$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}/accountstatuses/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accountstatuses.list + * @desc Lists the statuses of the sub-accounts in your Merchant Center + * account. + * @alias content.accountstatuses.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.destinations If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination. + * @param {integer=} params.maxResults The maximum number of account statuses to return in the response, used for paging. + * @param {string} params.merchantId The ID of the managing account. This must be a multi-client account. + * @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$Accountstatuses$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Accountstatuses$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Accountstatuses$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Accountstatuses$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accountstatuses$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accountstatuses$List; + 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}/accountstatuses') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accountstatuses$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$AccountstatusesCustomBatchRequest; + } + export interface Params$Resource$Accountstatuses$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account. + */ + accountId?: string; + /** + * If set, only issues for the specified destinations are returned, + * otherwise only issues for the Shopping destination. + */ + destinations?: string[]; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Accountstatuses$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If set, only issues for the specified destinations are returned, + * otherwise only issues for the Shopping destination. + */ + destinations?: string[]; + /** + * The maximum number of account statuses to return in the response, used + * for paging. + */ + maxResults?: number; + /** + * The ID of the managing account. This must be a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + + + export class Resource$Accounttax { + constructor() {} + + + /** + * content.accounttax.custombatch + * @desc Retrieves and updates tax settings of multiple accounts in a single + * request. + * @alias content.accounttax.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().AccounttaxCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Accounttax$Custombatch, + options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Accounttax$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Accounttax$Custombatch, + callback: BodyResponseCallback): + void; + custombatch(callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Accounttax$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounttax$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounttax$Custombatch; + 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/accounttax/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.accounttax.get + * @desc Retrieves the tax settings of the account. + * @alias content.accounttax.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to get/update account tax settings. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [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$Accounttax$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accounttax$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accounttax$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accounttax$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounttax$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounttax$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}/accounttax/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounttax.list + * @desc Lists the tax settings of the sub-accounts in your Merchant Center + * account. + * @alias content.accounttax.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults The maximum number of tax settings to return in the response, used for paging. + * @param {string} params.merchantId The ID of the managing account. This must be a multi-client account. + * @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$Accounttax$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Accounttax$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Accounttax$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Accounttax$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Accounttax$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounttax$List; + 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}/accounttax') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.accounttax.update + * @desc Updates the tax settings of the account. + * @alias content.accounttax.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to get/update account tax settings. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {().AccountTax} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update(params?: Params$Resource$Accounttax$Update, options?: MethodOptions): + AxiosPromise; + update( + params: Params$Resource$Accounttax$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Accounttax$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Accounttax$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounttax$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounttax$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}/accounttax/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accounttax$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$AccounttaxCustomBatchRequest; + } + export interface Params$Resource$Accounttax$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/update account tax settings. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Accounttax$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The maximum number of tax settings to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the managing account. This must be a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Accounttax$Update 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/update account tax settings. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccountTax; + } + + + export class Resource$Datafeeds { + constructor() {} + + + /** + * content.datafeeds.custombatch + * @alias content.datafeeds.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().DatafeedsCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Datafeeds$Custombatch, + options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Datafeeds$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Datafeeds$Custombatch, + callback: BodyResponseCallback): + void; + custombatch(callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Datafeeds$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Datafeeds$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeeds$Custombatch; + 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/datafeeds/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.datafeeds.delete + * @desc Deletes a datafeed configuration from your Merchant Center account. + * @alias content.datafeeds.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.datafeedId The ID of the datafeed. + * @param {string} params.merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. + * @param {object} [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$Datafeeds$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Datafeeds$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Datafeeds$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Datafeeds$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Datafeeds$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeeds$Delete; + 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}/datafeeds/{datafeedId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['merchantId', 'datafeedId'], + pathParams: ['datafeedId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.datafeeds.fetchnow + * @desc Invokes a fetch for the datafeed in your Merchant Center account. + * @alias content.datafeeds.fetchnow + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.datafeedId The ID of the datafeed to be fetched. + * @param {string} params.merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + fetchnow( + params?: Params$Resource$Datafeeds$Fetchnow, options?: MethodOptions): + AxiosPromise; + fetchnow( + params: Params$Resource$Datafeeds$Fetchnow, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + fetchnow( + params: Params$Resource$Datafeeds$Fetchnow, + callback: BodyResponseCallback): void; + fetchnow(callback: BodyResponseCallback): + void; + fetchnow( + paramsOrCallback?: Params$Resource$Datafeeds$Fetchnow| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Datafeeds$Fetchnow; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeeds$Fetchnow; + 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}/datafeeds/{datafeedId}/fetchNow') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'datafeedId'], + pathParams: ['datafeedId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.datafeeds.get + * @desc Retrieves a datafeed configuration from your Merchant Center + * account. + * @alias content.datafeeds.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.datafeedId The ID of the datafeed. + * @param {string} params.merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. + * @param {object} [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$Datafeeds$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Datafeeds$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Datafeeds$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Datafeeds$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Datafeeds$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeeds$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}/datafeeds/{datafeedId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'datafeedId'], + pathParams: ['datafeedId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.datafeeds.insert + * @desc Registers a datafeed configuration with your Merchant Center + * account. + * @alias content.datafeeds.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. + * @param {().Datafeed} 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 + */ + insert(params?: Params$Resource$Datafeeds$Insert, options?: MethodOptions): + AxiosPromise; + insert( + params: Params$Resource$Datafeeds$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Datafeeds$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Datafeeds$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Datafeeds$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeeds$Insert; + 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}/datafeeds') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.datafeeds.list + * @desc Lists the configurations for datafeeds in your Merchant Center + * account. + * @alias content.datafeeds.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults The maximum number of products to return in the response, used for paging. + * @param {string} params.merchantId The ID of the account that manages the datafeeds. This account cannot be a multi-client account. + * @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$Datafeeds$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Datafeeds$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Datafeeds$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Datafeeds$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Datafeeds$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeeds$List; + 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}/datafeeds') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.datafeeds.update + * @desc Updates a datafeed configuration of your Merchant Center account. + * @alias content.datafeeds.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.datafeedId The ID of the datafeed. + * @param {string} params.merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. + * @param {().Datafeed} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update(params?: Params$Resource$Datafeeds$Update, options?: MethodOptions): + AxiosPromise; + update( + params: Params$Resource$Datafeeds$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Datafeeds$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Datafeeds$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Datafeeds$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeeds$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}/datafeeds/{datafeedId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['merchantId', 'datafeedId'], + pathParams: ['datafeedId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Datafeeds$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$DatafeedsCustomBatchRequest; + } + export interface Params$Resource$Datafeeds$Delete extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the datafeed. + */ + datafeedId?: string; + /** + * The ID of the account that manages the datafeed. This account cannot be a + * multi-client account. + */ + merchantId?: string; + } + export interface Params$Resource$Datafeeds$Fetchnow extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the datafeed to be fetched. + */ + datafeedId?: string; + /** + * The ID of the account that manages the datafeed. This account cannot be a + * multi-client account. + */ + merchantId?: string; + } + export interface Params$Resource$Datafeeds$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the datafeed. + */ + datafeedId?: string; + /** + * The ID of the account that manages the datafeed. This account cannot be a + * multi-client account. + */ + merchantId?: string; + } + export interface Params$Resource$Datafeeds$Insert extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the datafeed. This account cannot be a + * multi-client account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Datafeed; + } + export interface Params$Resource$Datafeeds$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The maximum number of products to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the account that manages the datafeeds. This account cannot be + * a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Datafeeds$Update extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the datafeed. + */ + datafeedId?: string; + /** + * The ID of the account that manages the datafeed. This account cannot be a + * multi-client account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Datafeed; + } + + + export class Resource$Datafeedstatuses { + constructor() {} + + + /** + * content.datafeedstatuses.custombatch + * @alias content.datafeedstatuses.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().DatafeedstatusesCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Datafeedstatuses$Custombatch, + options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Datafeedstatuses$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Datafeedstatuses$Custombatch, + callback: + BodyResponseCallback): + void; + custombatch( + callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Datafeedstatuses$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Datafeedstatuses$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeedstatuses$Custombatch; + 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/datafeedstatuses/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.datafeedstatuses.get + * @desc Retrieves the status of a datafeed from your Merchant Center + * account. + * @alias content.datafeedstatuses.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.country The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target. + * @param {string} params.datafeedId The ID of the datafeed. + * @param {string=} params.language The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target. + * @param {string} params.merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. + * @param {object} [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$Datafeedstatuses$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Datafeedstatuses$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Datafeedstatuses$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Datafeedstatuses$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Datafeedstatuses$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeedstatuses$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}/datafeedstatuses/{datafeedId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'datafeedId'], + pathParams: ['datafeedId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.datafeedstatuses.list + * @desc Lists the statuses of the datafeeds in your Merchant Center + * account. + * @alias content.datafeedstatuses.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults The maximum number of products to return in the response, used for paging. + * @param {string} params.merchantId The ID of the account that manages the datafeeds. This account cannot be a multi-client account. + * @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$Datafeedstatuses$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Datafeedstatuses$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Datafeedstatuses$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Datafeedstatuses$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Datafeedstatuses$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Datafeedstatuses$List; + 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}/datafeedstatuses') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Datafeedstatuses$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$DatafeedstatusesCustomBatchRequest; + } + export interface Params$Resource$Datafeedstatuses$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The country for which to get the datafeed status. If this parameter is + * provided then language must also be provided. Note that this parameter is + * required for feeds targeting multiple countries and languages, since a + * feed may have a different status for each target. + */ + country?: string; + /** + * The ID of the datafeed. + */ + datafeedId?: string; + /** + * The language for which to get the datafeed status. If this parameter is + * provided then country must also be provided. Note that this parameter is + * required for feeds targeting multiple countries and languages, since a + * feed may have a different status for each target. + */ + language?: string; + /** + * The ID of the account that manages the datafeed. This account cannot be a + * multi-client account. + */ + merchantId?: string; + } + export interface Params$Resource$Datafeedstatuses$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The maximum number of products to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the account that manages the datafeeds. This account cannot be + * a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + + + export class Resource$Liasettings { + constructor() {} + + + /** + * content.liasettings.custombatch + * @desc Retrieves and/or updates the LIA settings of multiple accounts in a + * single request. + * @alias content.liasettings.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().LiasettingsCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Liasettings$Custombatch, + options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Liasettings$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Liasettings$Custombatch, + callback: BodyResponseCallback): + void; + custombatch( + callback: BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Liasettings$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Liasettings$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$Custombatch; + 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/liasettings/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.liasettings.get + * @desc Retrieves the LIA settings of the account. + * @alias content.liasettings.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to get or update LIA settings. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [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$Liasettings$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Liasettings$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Liasettings$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Liasettings$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Liasettings$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$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}/liasettings/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.liasettings.getaccessiblegmbaccounts + * @desc Retrieves the list of accessible Google My Business accounts. + * @alias content.liasettings.getaccessiblegmbaccounts + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to retrieve accessible Google My Business accounts. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getaccessiblegmbaccounts( + params?: Params$Resource$Liasettings$Getaccessiblegmbaccounts, + options?: MethodOptions): + AxiosPromise; + getaccessiblegmbaccounts( + params: Params$Resource$Liasettings$Getaccessiblegmbaccounts, + options: MethodOptions|BodyResponseCallback< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>, + callback: BodyResponseCallback< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>): void; + getaccessiblegmbaccounts( + params: Params$Resource$Liasettings$Getaccessiblegmbaccounts, + callback: BodyResponseCallback< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>): void; + getaccessiblegmbaccounts( + callback: BodyResponseCallback< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>): void; + getaccessiblegmbaccounts( + paramsOrCallback?: Params$Resource$Liasettings$Getaccessiblegmbaccounts| + BodyResponseCallback< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>, + callback?: BodyResponseCallback< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Liasettings$Getaccessiblegmbaccounts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$Getaccessiblegmbaccounts; + 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}/liasettings/{accountId}/accessiblegmbaccounts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$LiasettingsGetAccessibleGmbAccountsResponse>(parameters); + } + } + + + /** + * content.liasettings.list + * @desc Lists the LIA settings of the sub-accounts in your Merchant Center + * account. + * @alias content.liasettings.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults The maximum number of LIA settings to return in the response, used for paging. + * @param {string} params.merchantId The ID of the managing account. This must be a multi-client account. + * @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$Liasettings$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Liasettings$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Liasettings$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Liasettings$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Liasettings$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$List; + 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}/liasettings') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.liasettings.listposdataproviders + * @desc Retrieves the list of POS data providers that have active settings + * for the all eiligible countries. + * @alias content.liasettings.listposdataproviders + * @memberOf! () + * + * @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 + */ + listposdataproviders( + params?: Params$Resource$Liasettings$Listposdataproviders, + options?: MethodOptions): + AxiosPromise; + listposdataproviders( + params: Params$Resource$Liasettings$Listposdataproviders, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$LiasettingsListPosDataProvidersResponse>): void; + listposdataproviders( + params: Params$Resource$Liasettings$Listposdataproviders, + callback: BodyResponseCallback< + Schema$LiasettingsListPosDataProvidersResponse>): void; + listposdataproviders(callback: BodyResponseCallback< + Schema$LiasettingsListPosDataProvidersResponse>): void; + listposdataproviders( + paramsOrCallback?: Params$Resource$Liasettings$Listposdataproviders| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$LiasettingsListPosDataProvidersResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Liasettings$Listposdataproviders; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$Listposdataproviders; + 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/liasettings/posdataproviders') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.liasettings.requestgmbaccess + * @desc Requests access to a specified Google My Business account. + * @alias content.liasettings.requestgmbaccess + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which GMB access is requested. + * @param {string} params.gmbEmail The email of the Google My Business account. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + requestgmbaccess( + params?: Params$Resource$Liasettings$Requestgmbaccess, + options?: MethodOptions): + AxiosPromise; + requestgmbaccess( + params: Params$Resource$Liasettings$Requestgmbaccess, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + requestgmbaccess( + params: Params$Resource$Liasettings$Requestgmbaccess, + callback: + BodyResponseCallback): + void; + requestgmbaccess( + callback: + BodyResponseCallback): + void; + requestgmbaccess( + paramsOrCallback?: Params$Resource$Liasettings$Requestgmbaccess| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Liasettings$Requestgmbaccess; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$Requestgmbaccess; + 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}/liasettings/{accountId}/requestgmbaccess') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'accountId', 'gmbEmail'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.liasettings.requestinventoryverification + * @desc Requests inventory validation for the specified country. + * @alias content.liasettings.requestinventoryverification + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.country The country for which inventory validation is requested. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + requestinventoryverification( + params?: Params$Resource$Liasettings$Requestinventoryverification, + options?: MethodOptions): + AxiosPromise; + requestinventoryverification( + params: Params$Resource$Liasettings$Requestinventoryverification, + options: MethodOptions|BodyResponseCallback< + Schema$LiasettingsRequestInventoryVerificationResponse>, + callback: BodyResponseCallback< + Schema$LiasettingsRequestInventoryVerificationResponse>): void; + requestinventoryverification( + params: Params$Resource$Liasettings$Requestinventoryverification, + callback: BodyResponseCallback< + Schema$LiasettingsRequestInventoryVerificationResponse>): void; + requestinventoryverification( + callback: BodyResponseCallback< + Schema$LiasettingsRequestInventoryVerificationResponse>): void; + requestinventoryverification( + paramsOrCallback?: + Params$Resource$Liasettings$Requestinventoryverification| + BodyResponseCallback< + Schema$LiasettingsRequestInventoryVerificationResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$LiasettingsRequestInventoryVerificationResponse>, + callback?: BodyResponseCallback< + Schema$LiasettingsRequestInventoryVerificationResponse>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Liasettings$Requestinventoryverification; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$Requestinventoryverification; + 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}/liasettings/{accountId}/requestinventoryverification/{country}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'accountId', 'country'], + pathParams: ['accountId', 'country', 'merchantId'], + context + }; + if (callback) { + createAPIRequest< + Schema$LiasettingsRequestInventoryVerificationResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$LiasettingsRequestInventoryVerificationResponse>(parameters); + } + } + + + /** + * content.liasettings.setinventoryverificationcontact + * @desc Sets the inventory verification contract for the specified country. + * @alias content.liasettings.setinventoryverificationcontact + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.contactEmail The email of the inventory verification contact. + * @param {string} params.contactName The name of the inventory verification contact. + * @param {string} params.country The country for which inventory verification is requested. + * @param {string} params.language The language for which inventory verification is requested. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + setinventoryverificationcontact( + params?: Params$Resource$Liasettings$Setinventoryverificationcontact, + options?: MethodOptions): + AxiosPromise; + setinventoryverificationcontact( + params: Params$Resource$Liasettings$Setinventoryverificationcontact, + options: MethodOptions|BodyResponseCallback< + Schema$LiasettingsSetInventoryVerificationContactResponse>, + callback: BodyResponseCallback< + Schema$LiasettingsSetInventoryVerificationContactResponse>): void; + setinventoryverificationcontact( + params: Params$Resource$Liasettings$Setinventoryverificationcontact, + callback: BodyResponseCallback< + Schema$LiasettingsSetInventoryVerificationContactResponse>): void; + setinventoryverificationcontact( + callback: BodyResponseCallback< + Schema$LiasettingsSetInventoryVerificationContactResponse>): void; + setinventoryverificationcontact( + paramsOrCallback?: + Params$Resource$Liasettings$Setinventoryverificationcontact| + BodyResponseCallback< + Schema$LiasettingsSetInventoryVerificationContactResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$LiasettingsSetInventoryVerificationContactResponse>, + callback?: BodyResponseCallback< + Schema$LiasettingsSetInventoryVerificationContactResponse>): + void|AxiosPromise< + Schema$LiasettingsSetInventoryVerificationContactResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Liasettings$Setinventoryverificationcontact; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Liasettings$Setinventoryverificationcontact; + 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}/liasettings/{accountId}/setinventoryverificationcontact') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [ + 'merchantId', 'accountId', 'contactEmail', 'contactName', 'country', + 'language' + ], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest< + Schema$LiasettingsSetInventoryVerificationContactResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$LiasettingsSetInventoryVerificationContactResponse>( + parameters); + } + } + + + /** + * content.liasettings.setposdataprovider + * @desc Sets the POS data provider for the specified country. + * @alias content.liasettings.setposdataprovider + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to retrieve accessible Google My Business accounts. + * @param {string} params.country The country for which the POS data provider is selected. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {string=} params.posDataProviderId The ID of POS data provider. + * @param {string=} params.posExternalAccountId The account ID by which this merchant is known to the POS data provider. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + setposdataprovider( + params?: Params$Resource$Liasettings$Setposdataprovider, + options?: MethodOptions): + AxiosPromise; + setposdataprovider( + params: Params$Resource$Liasettings$Setposdataprovider, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + setposdataprovider( + params: Params$Resource$Liasettings$Setposdataprovider, + callback: + BodyResponseCallback): + void; + setposdataprovider( + callback: + BodyResponseCallback): + void; + setposdataprovider( + paramsOrCallback?: Params$Resource$Liasettings$Setposdataprovider| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Liasettings$Setposdataprovider; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$Setposdataprovider; + 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}/liasettings/{accountId}/setposdataprovider') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'accountId', 'country'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.liasettings.update + * @desc Updates the LIA settings of the account. + * @alias content.liasettings.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to get or update LIA settings. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {().LiaSettings} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Liasettings$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Liasettings$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Liasettings$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Liasettings$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Liasettings$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liasettings$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}/liasettings/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Liasettings$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$LiasettingsCustomBatchRequest; + } + export interface Params$Resource$Liasettings$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 or update LIA settings. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Liasettings$Getaccessiblegmbaccounts extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account for which to retrieve accessible Google My Business + * accounts. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Liasettings$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The maximum number of LIA settings to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the managing account. This must be a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Liasettings$Listposdataproviders extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + } + export interface Params$Resource$Liasettings$Requestgmbaccess extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account for which GMB access is requested. + */ + accountId?: string; + /** + * The email of the Google My Business account. + */ + gmbEmail?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Liasettings$Requestinventoryverification + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + accountId?: string; + /** + * The country for which inventory validation is requested. + */ + country?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Liasettings$Setinventoryverificationcontact + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + accountId?: string; + /** + * The email of the inventory verification contact. + */ + contactEmail?: string; + /** + * The name of the inventory verification contact. + */ + contactName?: string; + /** + * The country for which inventory verification is requested. + */ + country?: string; + /** + * The language for which inventory verification is requested. + */ + language?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Liasettings$Setposdataprovider extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account for which to retrieve accessible Google My Business + * accounts. + */ + accountId?: string; + /** + * The country for which the POS data provider is selected. + */ + country?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + /** + * The ID of POS data provider. + */ + posDataProviderId?: string; + /** + * The account ID by which this merchant is known to the POS data provider. + */ + posExternalAccountId?: string; + } + export interface Params$Resource$Liasettings$Update 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 or update LIA settings. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$LiaSettings; + } + + + export class Resource$Orderinvoices { + constructor() {} + + + /** + * content.orderinvoices.createchargeinvoice + * @desc Creates a charge invoice for a shipment group, and triggers a + * charge capture for non-facilitated payment orders. + * @alias content.orderinvoices.createchargeinvoice + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrderinvoicesCreateChargeInvoiceRequest} 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 + */ + createchargeinvoice( + params?: Params$Resource$Orderinvoices$Createchargeinvoice, + options?: MethodOptions): + AxiosPromise; + createchargeinvoice( + params: Params$Resource$Orderinvoices$Createchargeinvoice, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$OrderinvoicesCreateChargeInvoiceResponse>): void; + createchargeinvoice( + params: Params$Resource$Orderinvoices$Createchargeinvoice, + callback: BodyResponseCallback< + Schema$OrderinvoicesCreateChargeInvoiceResponse>): void; + createchargeinvoice(callback: BodyResponseCallback< + Schema$OrderinvoicesCreateChargeInvoiceResponse>): void; + createchargeinvoice( + paramsOrCallback?: Params$Resource$Orderinvoices$Createchargeinvoice| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$OrderinvoicesCreateChargeInvoiceResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderinvoices$Createchargeinvoice; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderinvoices$Createchargeinvoice; + 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}/orderinvoices/{orderId}/createChargeInvoice') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$OrderinvoicesCreateChargeInvoiceResponse>(parameters); + } + } + + + /** + * content.orderinvoices.createrefundinvoice + * @desc Creates a refund invoice for one or more shipment groups, and + * triggers a refund for non-facilitated payment orders. This can only be + * used for line items that have previously been charged using + * createChargeInvoice. All amounts (except for the summary) are incremental + * with respect to the previous invoice. + * @alias content.orderinvoices.createrefundinvoice + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrderinvoicesCreateRefundInvoiceRequest} 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 + */ + createrefundinvoice( + params?: Params$Resource$Orderinvoices$Createrefundinvoice, + options?: MethodOptions): + AxiosPromise; + createrefundinvoice( + params: Params$Resource$Orderinvoices$Createrefundinvoice, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$OrderinvoicesCreateRefundInvoiceResponse>): void; + createrefundinvoice( + params: Params$Resource$Orderinvoices$Createrefundinvoice, + callback: BodyResponseCallback< + Schema$OrderinvoicesCreateRefundInvoiceResponse>): void; + createrefundinvoice(callback: BodyResponseCallback< + Schema$OrderinvoicesCreateRefundInvoiceResponse>): void; + createrefundinvoice( + paramsOrCallback?: Params$Resource$Orderinvoices$Createrefundinvoice| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$OrderinvoicesCreateRefundInvoiceResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderinvoices$Createrefundinvoice; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderinvoices$Createrefundinvoice; + 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}/orderinvoices/{orderId}/createRefundInvoice') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$OrderinvoicesCreateRefundInvoiceResponse>(parameters); + } + } + } + + export interface Params$Resource$Orderinvoices$Createchargeinvoice extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrderinvoicesCreateChargeInvoiceRequest; + } + export interface Params$Resource$Orderinvoices$Createrefundinvoice extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrderinvoicesCreateRefundInvoiceRequest; + } + + + export class Resource$Orderpayments { + constructor() {} + + + /** + * content.orderpayments.notifyauthapproved + * @desc Notify about successfully authorizing user's payment method for a + * given amount. + * @alias content.orderpayments.notifyauthapproved + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order for for which payment authorization is happening. + * @param {().OrderpaymentsNotifyAuthApprovedRequest} 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 + */ + notifyauthapproved( + params?: Params$Resource$Orderpayments$Notifyauthapproved, + options?: MethodOptions): + AxiosPromise; + notifyauthapproved( + params: Params$Resource$Orderpayments$Notifyauthapproved, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthApprovedResponse>): void; + notifyauthapproved( + params: Params$Resource$Orderpayments$Notifyauthapproved, + callback: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthApprovedResponse>): void; + notifyauthapproved(callback: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthApprovedResponse>): void; + notifyauthapproved( + paramsOrCallback?: Params$Resource$Orderpayments$Notifyauthapproved| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthApprovedResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderpayments$Notifyauthapproved; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderpayments$Notifyauthapproved; + 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}/orderpayments/{orderId}/notifyAuthApproved') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orderpayments.notifyauthdeclined + * @desc Notify about failure to authorize user's payment method. + * @alias content.orderpayments.notifyauthdeclined + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order for which payment authorization was declined. + * @param {().OrderpaymentsNotifyAuthDeclinedRequest} 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 + */ + notifyauthdeclined( + params?: Params$Resource$Orderpayments$Notifyauthdeclined, + options?: MethodOptions): + AxiosPromise; + notifyauthdeclined( + params: Params$Resource$Orderpayments$Notifyauthdeclined, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthDeclinedResponse>): void; + notifyauthdeclined( + params: Params$Resource$Orderpayments$Notifyauthdeclined, + callback: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthDeclinedResponse>): void; + notifyauthdeclined(callback: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthDeclinedResponse>): void; + notifyauthdeclined( + paramsOrCallback?: Params$Resource$Orderpayments$Notifyauthdeclined| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$OrderpaymentsNotifyAuthDeclinedResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderpayments$Notifyauthdeclined; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderpayments$Notifyauthdeclined; + 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}/orderpayments/{orderId}/notifyAuthDeclined') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orderpayments.notifycharge + * @desc Notify about charge on user's selected payments method. + * @alias content.orderpayments.notifycharge + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order for which charge is happening. + * @param {().OrderpaymentsNotifyChargeRequest} 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 + */ + notifycharge( + params?: Params$Resource$Orderpayments$Notifycharge, + options?: MethodOptions): + AxiosPromise; + notifycharge( + params: Params$Resource$Orderpayments$Notifycharge, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + notifycharge( + params: Params$Resource$Orderpayments$Notifycharge, + callback: + BodyResponseCallback): + void; + notifycharge( + callback: + BodyResponseCallback): + void; + notifycharge( + paramsOrCallback?: Params$Resource$Orderpayments$Notifycharge| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderpayments$Notifycharge; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderpayments$Notifycharge; + 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}/orderpayments/{orderId}/notifyCharge') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orderpayments.notifyrefund + * @desc Notify about refund on user's selected payments method. + * @alias content.orderpayments.notifyrefund + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order for which charge is happening. + * @param {().OrderpaymentsNotifyRefundRequest} 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 + */ + notifyrefund( + params?: Params$Resource$Orderpayments$Notifyrefund, + options?: MethodOptions): + AxiosPromise; + notifyrefund( + params: Params$Resource$Orderpayments$Notifyrefund, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + notifyrefund( + params: Params$Resource$Orderpayments$Notifyrefund, + callback: + BodyResponseCallback): + void; + notifyrefund( + callback: + BodyResponseCallback): + void; + notifyrefund( + paramsOrCallback?: Params$Resource$Orderpayments$Notifyrefund| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderpayments$Notifyrefund; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderpayments$Notifyrefund; + 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}/orderpayments/{orderId}/notifyRefund') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Orderpayments$Notifyauthapproved extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order for for which payment authorization is happening. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrderpaymentsNotifyAuthApprovedRequest; + } + export interface Params$Resource$Orderpayments$Notifyauthdeclined extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order for which payment authorization was declined. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrderpaymentsNotifyAuthDeclinedRequest; + } + export interface Params$Resource$Orderpayments$Notifycharge extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order for which charge is happening. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrderpaymentsNotifyChargeRequest; + } + export interface Params$Resource$Orderpayments$Notifyrefund extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order for which charge is happening. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrderpaymentsNotifyRefundRequest; + } + + + export class Resource$Orderreports { + constructor() {} + + + /** + * content.orderreports.listdisbursements + * @desc Retrieves a report for disbursements from your Merchant Center + * account. + * @alias content.orderreports.listdisbursements + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.disbursementEndDate The last date which disbursements occurred. In ISO 8601 format. Default: current date. + * @param {string} params.disbursementStartDate The first date which disbursements occurred. In ISO 8601 format. + * @param {integer=} params.maxResults The maximum number of disbursements to return in the response, used for paging. + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string=} params.pageToken The token returned by the previous request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + listdisbursements( + params?: Params$Resource$Orderreports$Listdisbursements, + options?: MethodOptions): + AxiosPromise; + listdisbursements( + params: Params$Resource$Orderreports$Listdisbursements, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + listdisbursements( + params: Params$Resource$Orderreports$Listdisbursements, + callback: + BodyResponseCallback): + void; + listdisbursements( + callback: + BodyResponseCallback): + void; + listdisbursements( + paramsOrCallback?: Params$Resource$Orderreports$Listdisbursements| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderreports$Listdisbursements; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreports$Listdisbursements; + 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}/orderreports/disbursements') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'disbursementStartDate'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orderreports.listtransactions + * @desc Retrieves a list of transactions for a disbursement from your + * Merchant Center account. + * @alias content.orderreports.listtransactions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.disbursementId The Google-provided ID of the disbursement (found in Wallet). + * @param {integer=} params.maxResults The maximum number of disbursements to return in the response, used for paging. + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string=} params.pageToken The token returned by the previous request. + * @param {string=} params.transactionEndDate The last date in which transaction occurred. In ISO 8601 format. Default: current date. + * @param {string} params.transactionStartDate The first date in which transaction occurred. In ISO 8601 format. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + listtransactions( + params?: Params$Resource$Orderreports$Listtransactions, + options?: MethodOptions): + AxiosPromise; + listtransactions( + params: Params$Resource$Orderreports$Listtransactions, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + listtransactions( + params: Params$Resource$Orderreports$Listtransactions, + callback: + BodyResponseCallback): + void; + listtransactions( + callback: + BodyResponseCallback): + void; + listtransactions( + paramsOrCallback?: Params$Resource$Orderreports$Listtransactions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orderreports$Listtransactions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreports$Listtransactions; + 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}/orderreports/disbursements/{disbursementId}/transactions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: + ['merchantId', 'disbursementId', 'transactionStartDate'], + pathParams: ['disbursementId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Orderreports$Listdisbursements extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The last date which disbursements occurred. In ISO 8601 format. Default: + * current date. + */ + disbursementEndDate?: string; + /** + * The first date which disbursements occurred. In ISO 8601 format. + */ + disbursementStartDate?: string; + /** + * The maximum number of disbursements to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Orderreports$Listtransactions extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The Google-provided ID of the disbursement (found in Wallet). + */ + disbursementId?: string; + /** + * The maximum number of disbursements to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + /** + * The last date in which transaction occurred. In ISO 8601 format. Default: + * current date. + */ + transactionEndDate?: string; + /** + * The first date in which transaction occurred. In ISO 8601 format. + */ + transactionStartDate?: string; + } + + + export class Resource$Orderreturns { + constructor() {} + + + /** + * content.orderreturns.get + * @desc Retrieves an order return from your Merchant Center account. + * @alias content.orderreturns.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.returnId Merchant order return ID generated by Google. + * @param {object} [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$Orderreturns$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Orderreturns$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Orderreturns$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Orderreturns$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Orderreturns$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreturns$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}/orderreturns/{returnId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'returnId'], + pathParams: ['merchantId', 'returnId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orderreturns.list + * @desc Lists order returns in your Merchant Center account. + * @alias content.orderreturns.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.createdEndDate Obtains order returns created before this date (inclusively), in ISO 8601 format. + * @param {string=} params.createdStartDate Obtains order returns created after this date (inclusively), in ISO 8601 format. + * @param {integer=} params.maxResults The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page. + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string=} params.orderBy Return the results in the specified order. + * @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$Orderreturns$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Orderreturns$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Orderreturns$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Orderreturns$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orderreturns$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreturns$List; + 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}/orderreturns') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Orderreturns$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * Merchant order return ID generated by Google. + */ + returnId?: string; + } + export interface Params$Resource$Orderreturns$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Obtains order returns created before this date (inclusively), in ISO 8601 + * format. + */ + createdEndDate?: string; + /** + * Obtains order returns created after this date (inclusively), in ISO 8601 + * format. + */ + createdStartDate?: string; + /** + * The maximum number of order returns to return in the response, used for + * paging. The default value is 25 returns per page, and the maximum allowed + * value is 250 returns per page. + */ + maxResults?: number; + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * Return the results in the specified order. + */ + orderBy?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + + + export class Resource$Orders { + constructor() {} + + + /** + * content.orders.acknowledge + * @desc Marks an order as acknowledged. + * @alias content.orders.acknowledge + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersAcknowledgeRequest} 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 + */ + acknowledge( + params?: Params$Resource$Orders$Acknowledge, options?: MethodOptions): + AxiosPromise; + acknowledge( + params: Params$Resource$Orders$Acknowledge, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + acknowledge( + params: Params$Resource$Orders$Acknowledge, + callback: BodyResponseCallback): void; + acknowledge( + callback: BodyResponseCallback): void; + acknowledge( + paramsOrCallback?: Params$Resource$Orders$Acknowledge| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Acknowledge; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Acknowledge; + 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}/orders/{orderId}/acknowledge') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orders.advancetestorder + * @desc Sandbox only. Moves a test order from state "inProgress" to state + * "pendingShipment". + * @alias content.orders.advancetestorder + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the test order to modify. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + advancetestorder( + params?: Params$Resource$Orders$Advancetestorder, + options?: MethodOptions): + AxiosPromise; + advancetestorder( + params: Params$Resource$Orders$Advancetestorder, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + advancetestorder( + params: Params$Resource$Orders$Advancetestorder, + callback: BodyResponseCallback): + void; + advancetestorder( + callback: BodyResponseCallback): + void; + advancetestorder( + paramsOrCallback?: Params$Resource$Orders$Advancetestorder| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Advancetestorder; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Advancetestorder; + 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}/testorders/{orderId}/advance') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.cancel + * @desc Cancels all line items in an order, making a full refund. + * @alias content.orders.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order to cancel. + * @param {().OrdersCancelRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + cancel(params?: Params$Resource$Orders$Cancel, options?: MethodOptions): + AxiosPromise; + cancel( + params: Params$Resource$Orders$Cancel, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + cancel( + params: Params$Resource$Orders$Cancel, + callback: BodyResponseCallback): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Orders$Cancel| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Orders$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Cancel; + 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}/orders/{orderId}/cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orders.cancellineitem + * @desc Cancels a line item, making a full refund. + * @alias content.orders.cancellineitem + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersCancelLineItemRequest} 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 + */ + cancellineitem( + params?: Params$Resource$Orders$Cancellineitem, + options?: MethodOptions): + AxiosPromise; + cancellineitem( + params: Params$Resource$Orders$Cancellineitem, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + cancellineitem( + params: Params$Resource$Orders$Cancellineitem, + callback: BodyResponseCallback): + void; + cancellineitem( + callback: BodyResponseCallback): + void; + cancellineitem( + paramsOrCallback?: Params$Resource$Orders$Cancellineitem| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Cancellineitem; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Cancellineitem; + 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}/orders/{orderId}/cancelLineItem') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.canceltestorderbycustomer + * @desc Sandbox only. Cancels a test order for customer-initiated + * cancellation. + * @alias content.orders.canceltestorderbycustomer + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the test order to cancel. + * @param {().OrdersCancelTestOrderByCustomerRequest} 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 + */ + canceltestorderbycustomer( + params?: Params$Resource$Orders$Canceltestorderbycustomer, + options?: MethodOptions): + AxiosPromise; + canceltestorderbycustomer( + params: Params$Resource$Orders$Canceltestorderbycustomer, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$OrdersCancelTestOrderByCustomerResponse>): void; + canceltestorderbycustomer( + params: Params$Resource$Orders$Canceltestorderbycustomer, + callback: BodyResponseCallback< + Schema$OrdersCancelTestOrderByCustomerResponse>): void; + canceltestorderbycustomer(callback: BodyResponseCallback< + Schema$OrdersCancelTestOrderByCustomerResponse>): + void; + canceltestorderbycustomer( + paramsOrCallback?: Params$Resource$Orders$Canceltestorderbycustomer| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$OrdersCancelTestOrderByCustomerResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Canceltestorderbycustomer; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Canceltestorderbycustomer; + 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}/testorders/{orderId}/cancelByCustomer') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.createtestorder + * @desc Sandbox only. Creates a test order. + * @alias content.orders.createtestorder + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that should manage the order. This cannot be a multi-client account. + * @param {().OrdersCreateTestOrderRequest} 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 + */ + createtestorder( + params?: Params$Resource$Orders$Createtestorder, + options?: MethodOptions): + AxiosPromise; + createtestorder( + params: Params$Resource$Orders$Createtestorder, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + createtestorder( + params: Params$Resource$Orders$Createtestorder, + callback: BodyResponseCallback): + void; + createtestorder( + callback: BodyResponseCallback): + void; + createtestorder( + paramsOrCallback?: Params$Resource$Orders$Createtestorder| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Createtestorder; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Createtestorder; + 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}/testorders') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.createtestreturn + * @desc Sandbox only. Creates a test return. + * @alias content.orders.createtestreturn + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersCreateTestReturnRequest} 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 + */ + createtestreturn( + params?: Params$Resource$Orders$Createtestreturn, + options?: MethodOptions): + AxiosPromise; + createtestreturn( + params: Params$Resource$Orders$Createtestreturn, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + createtestreturn( + params: Params$Resource$Orders$Createtestreturn, + callback: BodyResponseCallback): + void; + createtestreturn( + callback: BodyResponseCallback): + void; + createtestreturn( + paramsOrCallback?: Params$Resource$Orders$Createtestreturn| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Createtestreturn; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Createtestreturn; + 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}/orders/{orderId}/testreturn') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.get + * @desc Retrieves an order from your Merchant Center account. + * @alias content.orders.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {object} [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$Orders$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Orders$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Orders$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Orders$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Orders$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$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}/orders/{orderId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orders.getbymerchantorderid + * @desc Retrieves an order using merchant order id. + * @alias content.orders.getbymerchantorderid + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.merchantOrderId The merchant order id to be looked for. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getbymerchantorderid( + params?: Params$Resource$Orders$Getbymerchantorderid, + options?: MethodOptions): + AxiosPromise; + getbymerchantorderid( + params: Params$Resource$Orders$Getbymerchantorderid, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + getbymerchantorderid( + params: Params$Resource$Orders$Getbymerchantorderid, + callback: + BodyResponseCallback): + void; + getbymerchantorderid( + callback: + BodyResponseCallback): + void; + getbymerchantorderid( + paramsOrCallback?: Params$Resource$Orders$Getbymerchantorderid| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Getbymerchantorderid; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Getbymerchantorderid; + 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}/ordersbymerchantid/{merchantOrderId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'merchantOrderId'], + pathParams: ['merchantId', 'merchantOrderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.gettestordertemplate + * @desc Sandbox only. Retrieves an order template that can be used to + * quickly create a new order in sandbox. + * @alias content.orders.gettestordertemplate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.country The country of the template to retrieve. Defaults to US. + * @param {string} params.merchantId The ID of the account that should manage the order. This cannot be a multi-client account. + * @param {string} params.templateName The name of the template to retrieve. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + gettestordertemplate( + params?: Params$Resource$Orders$Gettestordertemplate, + options?: MethodOptions): + AxiosPromise; + gettestordertemplate( + params: Params$Resource$Orders$Gettestordertemplate, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + gettestordertemplate( + params: Params$Resource$Orders$Gettestordertemplate, + callback: + BodyResponseCallback): + void; + gettestordertemplate( + callback: + BodyResponseCallback): + void; + gettestordertemplate( + paramsOrCallback?: Params$Resource$Orders$Gettestordertemplate| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Gettestordertemplate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Gettestordertemplate; + 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}/testordertemplates/{templateName}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'templateName'], + pathParams: ['merchantId', 'templateName'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.instorerefundlineitem + * @desc Notifies that item return and refund was handled directly by + * merchant outside of Google payments processing (e.g. cash refund done in + * store). + * @alias content.orders.instorerefundlineitem + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersInStoreRefundLineItemRequest} 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 + */ + instorerefundlineitem( + params?: Params$Resource$Orders$Instorerefundlineitem, + options?: MethodOptions): + AxiosPromise; + instorerefundlineitem( + params: Params$Resource$Orders$Instorerefundlineitem, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + instorerefundlineitem( + params: Params$Resource$Orders$Instorerefundlineitem, + callback: + BodyResponseCallback): + void; + instorerefundlineitem( + callback: + BodyResponseCallback): + void; + instorerefundlineitem( + paramsOrCallback?: Params$Resource$Orders$Instorerefundlineitem| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Instorerefundlineitem; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Instorerefundlineitem; + 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}/orders/{orderId}/inStoreRefundLineItem') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.list + * @desc Lists the orders in your Merchant Center account. + * @alias content.orders.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.acknowledged Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged. We recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned. + * @param {integer=} params.maxResults The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page. Known issue: All List calls will return all Orders without limit regardless of the value of this field. + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string=} params.orderBy The ordering of the returned list. The only supported value are placedDate desc and placedDate asc for now, which returns orders sorted by placement date. "placedDate desc" stands for listing orders by placement date, from oldest to most recent. "placedDate asc" stands for listing orders by placement date, from most recent to oldest. In future releases we'll support other sorting criteria. + * @param {string=} params.pageToken The token returned by the previous request. + * @param {string=} params.placedDateEnd Obtains orders placed before this date (exclusively), in ISO 8601 format. + * @param {string=} params.placedDateStart Obtains orders placed after this date (inclusively), in ISO 8601 format. + * @param {string=} params.statuses Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, please note that active is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered, partiallyReturned, returned, and canceled. + * @param {object} [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$Orders$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Orders$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Orders$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Orders$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Orders$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$List; + 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}/orders') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orders.rejectreturnlineitem + * @desc Rejects return on an line item. + * @alias content.orders.rejectreturnlineitem + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersRejectReturnLineItemRequest} 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 + */ + rejectreturnlineitem( + params?: Params$Resource$Orders$Rejectreturnlineitem, + options?: MethodOptions): + AxiosPromise; + rejectreturnlineitem( + params: Params$Resource$Orders$Rejectreturnlineitem, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + rejectreturnlineitem( + params: Params$Resource$Orders$Rejectreturnlineitem, + callback: + BodyResponseCallback): + void; + rejectreturnlineitem( + callback: + BodyResponseCallback): + void; + rejectreturnlineitem( + paramsOrCallback?: Params$Resource$Orders$Rejectreturnlineitem| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Rejectreturnlineitem; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Rejectreturnlineitem; + 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}/orders/{orderId}/rejectReturnLineItem') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.returnrefundlineitem + * @desc Returns and refunds a line item. Note that this method can only be + * called on fully shipped orders. + * @alias content.orders.returnrefundlineitem + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersReturnRefundLineItemRequest} 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 + */ + returnrefundlineitem( + params?: Params$Resource$Orders$Returnrefundlineitem, + options?: MethodOptions): + AxiosPromise; + returnrefundlineitem( + params: Params$Resource$Orders$Returnrefundlineitem, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + returnrefundlineitem( + params: Params$Resource$Orders$Returnrefundlineitem, + callback: + BodyResponseCallback): + void; + returnrefundlineitem( + callback: + BodyResponseCallback): + void; + returnrefundlineitem( + paramsOrCallback?: Params$Resource$Orders$Returnrefundlineitem| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Returnrefundlineitem; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Returnrefundlineitem; + 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}/orders/{orderId}/returnRefundLineItem') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.setlineitemmetadata + * @desc Sets (overrides) merchant provided annotations on the line item. + * @alias content.orders.setlineitemmetadata + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersSetLineItemMetadataRequest} 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 + */ + setlineitemmetadata( + params?: Params$Resource$Orders$Setlineitemmetadata, + options?: MethodOptions): + AxiosPromise; + setlineitemmetadata( + params: Params$Resource$Orders$Setlineitemmetadata, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + setlineitemmetadata( + params: Params$Resource$Orders$Setlineitemmetadata, + callback: + BodyResponseCallback): + void; + setlineitemmetadata( + callback: + BodyResponseCallback): + void; + setlineitemmetadata( + paramsOrCallback?: Params$Resource$Orders$Setlineitemmetadata| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Setlineitemmetadata; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Setlineitemmetadata; + 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}/orders/{orderId}/setLineItemMetadata') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.shiplineitems + * @desc Marks line item(s) as shipped. + * @alias content.orders.shiplineitems + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersShipLineItemsRequest} 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 + */ + shiplineitems( + params?: Params$Resource$Orders$Shiplineitems, options?: MethodOptions): + AxiosPromise; + shiplineitems( + params: Params$Resource$Orders$Shiplineitems, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + shiplineitems( + params: Params$Resource$Orders$Shiplineitems, + callback: BodyResponseCallback): + void; + shiplineitems(callback: + BodyResponseCallback): + void; + shiplineitems( + paramsOrCallback?: Params$Resource$Orders$Shiplineitems| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Shiplineitems; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Shiplineitems; + 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}/orders/{orderId}/shipLineItems') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orders.updatelineitemshippingdetails + * @desc Updates ship by and delivery by dates for a line item. + * @alias content.orders.updatelineitemshippingdetails + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersUpdateLineItemShippingDetailsRequest} 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 + */ + updatelineitemshippingdetails( + params?: Params$Resource$Orders$Updatelineitemshippingdetails, + options?: MethodOptions): + AxiosPromise; + updatelineitemshippingdetails( + params: Params$Resource$Orders$Updatelineitemshippingdetails, + options: MethodOptions|BodyResponseCallback< + Schema$OrdersUpdateLineItemShippingDetailsResponse>, + callback: BodyResponseCallback< + Schema$OrdersUpdateLineItemShippingDetailsResponse>): void; + updatelineitemshippingdetails( + params: Params$Resource$Orders$Updatelineitemshippingdetails, + callback: BodyResponseCallback< + Schema$OrdersUpdateLineItemShippingDetailsResponse>): void; + updatelineitemshippingdetails( + callback: BodyResponseCallback< + Schema$OrdersUpdateLineItemShippingDetailsResponse>): void; + updatelineitemshippingdetails( + paramsOrCallback?: Params$Resource$Orders$Updatelineitemshippingdetails| + BodyResponseCallback< + Schema$OrdersUpdateLineItemShippingDetailsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$OrdersUpdateLineItemShippingDetailsResponse>, + callback?: BodyResponseCallback< + Schema$OrdersUpdateLineItemShippingDetailsResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Updatelineitemshippingdetails; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Updatelineitemshippingdetails; + 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}/orders/{orderId}/updateLineItemShippingDetails') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$OrdersUpdateLineItemShippingDetailsResponse>(parameters); + } + } + + + /** + * content.orders.updatemerchantorderid + * @desc Updates the merchant order ID for a given order. + * @alias content.orders.updatemerchantorderid + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersUpdateMerchantOrderIdRequest} 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 + */ + updatemerchantorderid( + params?: Params$Resource$Orders$Updatemerchantorderid, + options?: MethodOptions): + AxiosPromise; + updatemerchantorderid( + params: Params$Resource$Orders$Updatemerchantorderid, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + updatemerchantorderid( + params: Params$Resource$Orders$Updatemerchantorderid, + callback: + BodyResponseCallback): + void; + updatemerchantorderid( + callback: + BodyResponseCallback): + void; + updatemerchantorderid( + paramsOrCallback?: Params$Resource$Orders$Updatemerchantorderid| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Orders$Updatemerchantorderid; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Updatemerchantorderid; + 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}/orders/{orderId}/updateMerchantOrderId') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.orders.updateshipment + * @desc Updates a shipment's status, carrier, and/or tracking ID. + * @alias content.orders.updateshipment + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersUpdateShipmentRequest} 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 + */ + updateshipment( + params?: Params$Resource$Orders$Updateshipment, + options?: MethodOptions): + AxiosPromise; + updateshipment( + params: Params$Resource$Orders$Updateshipment, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + updateshipment( + params: Params$Resource$Orders$Updateshipment, + callback: BodyResponseCallback): + void; + updateshipment( + callback: BodyResponseCallback): + void; + updateshipment( + paramsOrCallback?: Params$Resource$Orders$Updateshipment| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Updateshipment; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Updateshipment; + 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}/orders/{orderId}/updateShipment') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Orders$Acknowledge extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersAcknowledgeRequest; + } + export interface Params$Resource$Orders$Advancetestorder extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the test order to modify. + */ + orderId?: string; + } + export interface Params$Resource$Orders$Cancel extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order to cancel. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersCancelRequest; + } + export interface Params$Resource$Orders$Cancellineitem extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersCancelLineItemRequest; + } + export interface Params$Resource$Orders$Canceltestorderbycustomer extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the test order to cancel. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersCancelTestOrderByCustomerRequest; + } + export interface Params$Resource$Orders$Createtestorder extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that should manage the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersCreateTestOrderRequest; + } + export interface Params$Resource$Orders$Createtestreturn extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersCreateTestReturnRequest; + } + export interface Params$Resource$Orders$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + } + export interface Params$Resource$Orders$Getbymerchantorderid extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The merchant order id to be looked for. + */ + merchantOrderId?: string; + } + export interface Params$Resource$Orders$Gettestordertemplate extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The country of the template to retrieve. Defaults to US. + */ + country?: string; + /** + * The ID of the account that should manage the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The name of the template to retrieve. + */ + templateName?: string; + } + export interface Params$Resource$Orders$Instorerefundlineitem extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersInStoreRefundLineItemRequest; + } + export interface Params$Resource$Orders$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Obtains orders that match the acknowledgement status. When set to true, + * obtains orders that have been acknowledged. When false, obtains orders + * that have not been acknowledged. We recommend using this filter set to + * false, in conjunction with the acknowledge call, such that only + * un-acknowledged orders are returned. + */ + acknowledged?: boolean; + /** + * The maximum number of orders to return in the response, used for paging. + * The default value is 25 orders per page, and the maximum allowed value is + * 250 orders per page. Known issue: All List calls will return all Orders + * without limit regardless of the value of this field. + */ + maxResults?: number; + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ordering of the returned list. The only supported value are + * placedDate desc and placedDate asc for now, which returns orders sorted + * by placement date. "placedDate desc" stands for listing orders by + * placement date, from oldest to most recent. "placedDate asc" stands for + * listing orders by placement date, from most recent to oldest. In future + * releases we'll support other sorting criteria. + */ + orderBy?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + /** + * Obtains orders placed before this date (exclusively), in ISO 8601 format. + */ + placedDateEnd?: string; + /** + * Obtains orders placed after this date (inclusively), in ISO 8601 format. + */ + placedDateStart?: string; + /** + * Obtains orders that match any of the specified statuses. Multiple values + * can be specified with comma separation. Additionally, please note that + * active is a shortcut for pendingShipment and partiallyShipped, and + * completed is a shortcut for shipped , partiallyDelivered, delivered, + * partiallyReturned, returned, and canceled. + */ + statuses?: string[]; + } + export interface Params$Resource$Orders$Rejectreturnlineitem extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersRejectReturnLineItemRequest; + } + export interface Params$Resource$Orders$Returnrefundlineitem extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersReturnRefundLineItemRequest; + } + export interface Params$Resource$Orders$Setlineitemmetadata extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersSetLineItemMetadataRequest; + } + export interface Params$Resource$Orders$Shiplineitems extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersShipLineItemsRequest; + } + export interface Params$Resource$Orders$Updatelineitemshippingdetails extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersUpdateLineItemShippingDetailsRequest; + } + export interface Params$Resource$Orders$Updatemerchantorderid extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersUpdateMerchantOrderIdRequest; + } + export interface Params$Resource$Orders$Updateshipment extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersUpdateShipmentRequest; + } + + + export class Resource$Pos { + constructor() {} + + + /** + * content.pos.custombatch + * @desc Batches multiple POS-related calls in a single request. + * @alias content.pos.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().PosCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Pos$Custombatch, + options?: MethodOptions): AxiosPromise; + custombatch( + params: Params$Resource$Pos$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + custombatch( + params: Params$Resource$Pos$Custombatch, + callback: BodyResponseCallback): void; + custombatch(callback: BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Pos$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Pos$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pos$Custombatch; + 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/pos/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.pos.delete + * @desc Deletes a store for the given merchant. + * @alias content.pos.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the POS or inventory data provider. + * @param {string} params.storeCode A store code that is unique per merchant. + * @param {string} params.targetMerchantId The ID of the target merchant. + * @param {object} [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$Pos$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Pos$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Pos$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Pos$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Pos$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pos$Delete; + 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}/pos/{targetMerchantId}/store/{storeCode}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['merchantId', 'targetMerchantId', 'storeCode'], + pathParams: ['merchantId', 'storeCode', 'targetMerchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.pos.get + * @desc Retrieves information about the given store. + * @alias content.pos.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the POS or inventory data provider. + * @param {string} params.storeCode A store code that is unique per merchant. + * @param {string} params.targetMerchantId The ID of the target merchant. + * @param {object} [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$Pos$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Pos$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Pos$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Pos$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Pos$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pos$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}/pos/{targetMerchantId}/store/{storeCode}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'targetMerchantId', 'storeCode'], + pathParams: ['merchantId', 'storeCode', 'targetMerchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.pos.insert + * @desc Creates a store for the given merchant. + * @alias content.pos.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the POS or inventory data provider. + * @param {string} params.targetMerchantId The ID of the target merchant. + * @param {().PosStore} 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 + */ + insert(params?: Params$Resource$Pos$Insert, options?: MethodOptions): + AxiosPromise; + insert( + params: Params$Resource$Pos$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Pos$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Pos$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Pos$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pos$Insert; + 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}/pos/{targetMerchantId}/store') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'targetMerchantId'], + pathParams: ['merchantId', 'targetMerchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.pos.inventory + * @desc Submit inventory for the given merchant. + * @alias content.pos.inventory + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the POS or inventory data provider. + * @param {string} params.targetMerchantId The ID of the target merchant. + * @param {().PosInventoryRequest} 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 + */ + inventory(params?: Params$Resource$Pos$Inventory, options?: MethodOptions): + AxiosPromise; + inventory( + params: Params$Resource$Pos$Inventory, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + inventory( + params: Params$Resource$Pos$Inventory, + callback: BodyResponseCallback): void; + inventory(callback: BodyResponseCallback): + void; + inventory( + paramsOrCallback?: Params$Resource$Pos$Inventory| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Pos$Inventory; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pos$Inventory; + 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}/pos/{targetMerchantId}/inventory') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'targetMerchantId'], + pathParams: ['merchantId', 'targetMerchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.pos.list + * @desc Lists the stores of the target merchant. + * @alias content.pos.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the POS or inventory data provider. + * @param {string} params.targetMerchantId The ID of the target merchant. + * @param {object} [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$Pos$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Pos$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Pos$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Pos$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Pos$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pos$List; + 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}/pos/{targetMerchantId}/store') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'targetMerchantId'], + pathParams: ['merchantId', 'targetMerchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.pos.sale + * @desc Submit a sale event for the given merchant. + * @alias content.pos.sale + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the POS or inventory data provider. + * @param {string} params.targetMerchantId The ID of the target merchant. + * @param {().PosSaleRequest} 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 + */ + sale(params?: Params$Resource$Pos$Sale, options?: MethodOptions): + AxiosPromise; + sale( + params: Params$Resource$Pos$Sale, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + sale( + params: Params$Resource$Pos$Sale, + callback: BodyResponseCallback): void; + sale(callback: BodyResponseCallback): void; + sale( + paramsOrCallback?: Params$Resource$Pos$Sale| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Pos$Sale; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pos$Sale; + 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}/pos/{targetMerchantId}/sale') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'targetMerchantId'], + pathParams: ['merchantId', 'targetMerchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Pos$Custombatch extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$PosCustomBatchRequest; + } + export interface Params$Resource$Pos$Delete extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the POS or inventory data provider. + */ + merchantId?: string; + /** + * A store code that is unique per merchant. + */ + storeCode?: string; + /** + * The ID of the target merchant. + */ + targetMerchantId?: string; + } + export interface Params$Resource$Pos$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the POS or inventory data provider. + */ + merchantId?: string; + /** + * A store code that is unique per merchant. + */ + storeCode?: string; + /** + * The ID of the target merchant. + */ + targetMerchantId?: string; + } + export interface Params$Resource$Pos$Insert extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the POS or inventory data provider. + */ + merchantId?: string; + /** + * The ID of the target merchant. + */ + targetMerchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PosStore; + } + export interface Params$Resource$Pos$Inventory extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the POS or inventory data provider. + */ + merchantId?: string; + /** + * The ID of the target merchant. + */ + targetMerchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PosInventoryRequest; + } + export interface Params$Resource$Pos$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the POS or inventory data provider. + */ + merchantId?: string; + /** + * The ID of the target merchant. + */ + targetMerchantId?: string; + } + export interface Params$Resource$Pos$Sale extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the POS or inventory data provider. + */ + merchantId?: string; + /** + * The ID of the target merchant. + */ + targetMerchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PosSaleRequest; + } + + + export class Resource$Products { + constructor() {} + + + /** + * content.products.custombatch + * @desc Retrieves, inserts, and deletes multiple products in a single + * request. + * @alias content.products.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().ProductsCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Products$Custombatch, options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Products$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Products$Custombatch, + callback: BodyResponseCallback): + void; + custombatch(callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Products$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Products$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Products$Custombatch; + 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/products/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.products.delete + * @desc Deletes a product from your Merchant Center account. + * @alias content.products.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that contains the product. This account cannot be a multi-client account. + * @param {string} params.productId The REST id of the product. + * @param {object} [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$Products$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Products$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Products$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Products$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Products$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Products$Delete; + 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}/products/{productId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['merchantId', 'productId'], + pathParams: ['merchantId', 'productId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.products.get + * @desc Retrieves a product from your Merchant Center account. + * @alias content.products.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that contains the product. This account cannot be a multi-client account. + * @param {string} params.productId The REST id of the product. + * @param {object} [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$Products$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Products$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Products$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Products$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Products$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Products$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}/products/{productId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'productId'], + pathParams: ['merchantId', 'productId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.products.insert + * @desc Uploads a product to your Merchant Center account. If an item with + * the same channel, contentLanguage, offerId, and targetCountry already + * exists, this method updates that entry. + * @alias content.products.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that contains the product. This account cannot be a multi-client account. + * @param {().Product} 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 + */ + insert(params?: Params$Resource$Products$Insert, options?: MethodOptions): + AxiosPromise; + insert( + params: Params$Resource$Products$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Products$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Products$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Products$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Products$Insert; + 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}/products') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.products.list + * @desc Lists the products in your Merchant Center account. + * @alias content.products.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults The maximum number of products to return in the response, used for paging. + * @param {string} params.merchantId The ID of the account that contains the products. This account cannot be a multi-client account. + * @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$Products$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Products$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Products$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Products$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Products$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Products$List; + 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}/products') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Products$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$ProductsCustomBatchRequest; + } + export interface Params$Resource$Products$Delete extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that contains the product. This account cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The REST id of the product. + */ + productId?: string; + } + export interface Params$Resource$Products$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that contains the product. This account cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The REST id of the product. + */ + productId?: string; + } + export interface Params$Resource$Products$Insert extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that contains the product. This account cannot be a + * multi-client account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Product; + } + export interface Params$Resource$Products$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The maximum number of products to return in the response, used for + * paging. + */ + maxResults?: number; + /** + * The ID of the account that contains the products. This account cannot be + * a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + + + export class Resource$Productstatuses { + constructor() {} + + + /** + * content.productstatuses.custombatch + * @desc Gets the statuses of multiple products in a single request. + * @alias content.productstatuses.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().ProductstatusesCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Productstatuses$Custombatch, + options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Productstatuses$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Productstatuses$Custombatch, + callback: + BodyResponseCallback): + void; + custombatch( + callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Productstatuses$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Productstatuses$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Productstatuses$Custombatch; + 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/productstatuses/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.productstatuses.get + * @desc Gets the status of a product from your Merchant Center account. + * @alias content.productstatuses.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.destinations If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination. + * @param {string} params.merchantId The ID of the account that contains the product. This account cannot be a multi-client account. + * @param {string} params.productId The REST id of the product. + * @param {object} [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$Productstatuses$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Productstatuses$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Productstatuses$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Productstatuses$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Productstatuses$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Productstatuses$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}/productstatuses/{productId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'productId'], + pathParams: ['merchantId', 'productId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.productstatuses.list + * @desc Lists the statuses of the products in your Merchant Center account. + * @alias content.productstatuses.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.destinations If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination. + * @param {integer=} params.maxResults The maximum number of product statuses to return in the response, used for paging. + * @param {string} params.merchantId The ID of the account that contains the products. This account cannot be a multi-client account. + * @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$Productstatuses$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Productstatuses$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Productstatuses$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Productstatuses$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Productstatuses$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Productstatuses$List; + 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}/productstatuses') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Productstatuses$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$ProductstatusesCustomBatchRequest; + } + export interface Params$Resource$Productstatuses$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If set, only issues for the specified destinations are returned, + * otherwise only issues for the Shopping destination. + */ + destinations?: string[]; + /** + * The ID of the account that contains the product. This account cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The REST id of the product. + */ + productId?: string; + } + export interface Params$Resource$Productstatuses$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If set, only issues for the specified destinations are returned, + * otherwise only issues for the Shopping destination. + */ + destinations?: string[]; + /** + * The maximum number of product statuses to return in the response, used + * for paging. + */ + maxResults?: number; + /** + * The ID of the account that contains the products. This account cannot be + * a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + + + export class Resource$Shippingsettings { + constructor() {} + + + /** + * content.shippingsettings.custombatch + * @desc Retrieves and updates the shipping settings of multiple accounts in + * a single request. + * @alias content.shippingsettings.custombatch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().ShippingsettingsCustomBatchRequest} 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 + */ + custombatch( + params?: Params$Resource$Shippingsettings$Custombatch, + options?: MethodOptions): + AxiosPromise; + custombatch( + params: Params$Resource$Shippingsettings$Custombatch, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + custombatch( + params: Params$Resource$Shippingsettings$Custombatch, + callback: + BodyResponseCallback): + void; + custombatch( + callback: + BodyResponseCallback): + void; + custombatch( + paramsOrCallback?: Params$Resource$Shippingsettings$Custombatch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Shippingsettings$Custombatch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shippingsettings$Custombatch; + 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/shippingsettings/batch') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.shippingsettings.get + * @desc Retrieves the shipping settings of the account. + * @alias content.shippingsettings.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to get/update shipping settings. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {object} [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$Shippingsettings$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Shippingsettings$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Shippingsettings$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Shippingsettings$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Shippingsettings$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shippingsettings$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}/shippingsettings/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.shippingsettings.getsupportedcarriers + * @desc Retrieves supported carriers and carrier services for an account. + * @alias content.shippingsettings.getsupportedcarriers + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account for which to retrieve the supported carriers. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getsupportedcarriers( + params?: Params$Resource$Shippingsettings$Getsupportedcarriers, + options?: MethodOptions): + AxiosPromise; + getsupportedcarriers( + params: Params$Resource$Shippingsettings$Getsupportedcarriers, + options: MethodOptions|BodyResponseCallback< + Schema$ShippingsettingsGetSupportedCarriersResponse>, + callback: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedCarriersResponse>): void; + getsupportedcarriers( + params: Params$Resource$Shippingsettings$Getsupportedcarriers, + callback: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedCarriersResponse>): void; + getsupportedcarriers(callback: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedCarriersResponse>): + void; + getsupportedcarriers( + paramsOrCallback?: + Params$Resource$Shippingsettings$Getsupportedcarriers| + BodyResponseCallback< + Schema$ShippingsettingsGetSupportedCarriersResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$ShippingsettingsGetSupportedCarriersResponse>, + callback?: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedCarriersResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Shippingsettings$Getsupportedcarriers; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shippingsettings$Getsupportedcarriers; + 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}/supportedCarriers') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$ShippingsettingsGetSupportedCarriersResponse>(parameters); + } + } + + + /** + * content.shippingsettings.getsupportedholidays + * @desc Retrieves supported holidays for an account. + * @alias content.shippingsettings.getsupportedholidays + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account for which to retrieve the supported holidays. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getsupportedholidays( + params?: Params$Resource$Shippingsettings$Getsupportedholidays, + options?: MethodOptions): + AxiosPromise; + getsupportedholidays( + params: Params$Resource$Shippingsettings$Getsupportedholidays, + options: MethodOptions|BodyResponseCallback< + Schema$ShippingsettingsGetSupportedHolidaysResponse>, + callback: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedHolidaysResponse>): void; + getsupportedholidays( + params: Params$Resource$Shippingsettings$Getsupportedholidays, + callback: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedHolidaysResponse>): void; + getsupportedholidays(callback: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedHolidaysResponse>): + void; + getsupportedholidays( + paramsOrCallback?: + Params$Resource$Shippingsettings$Getsupportedholidays| + BodyResponseCallback< + Schema$ShippingsettingsGetSupportedHolidaysResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$ShippingsettingsGetSupportedHolidaysResponse>, + callback?: BodyResponseCallback< + Schema$ShippingsettingsGetSupportedHolidaysResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Shippingsettings$Getsupportedholidays; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shippingsettings$Getsupportedholidays; + 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}/supportedHolidays') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$ShippingsettingsGetSupportedHolidaysResponse>(parameters); + } + } + + + /** + * content.shippingsettings.list + * @desc Lists the shipping settings of the sub-accounts in your Merchant + * Center account. + * @alias content.shippingsettings.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults The maximum number of shipping settings to return in the response, used for paging. + * @param {string} params.merchantId The ID of the managing account. This must be a multi-client account. + * @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$Shippingsettings$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Shippingsettings$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Shippingsettings$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Shippingsettings$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Shippingsettings$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shippingsettings$List; + 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}/shippingsettings') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * content.shippingsettings.update + * @desc Updates the shipping settings of the account. + * @alias content.shippingsettings.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId The ID of the account for which to get/update shipping settings. + * @param {string} params.merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. + * @param {().ShippingSettings} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Shippingsettings$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Shippingsettings$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Shippingsettings$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Shippingsettings$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Shippingsettings$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shippingsettings$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}/shippingsettings/{accountId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['merchantId', 'accountId'], + pathParams: ['accountId', 'merchantId'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Shippingsettings$Custombatch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$ShippingsettingsCustomBatchRequest; + } + export interface Params$Resource$Shippingsettings$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/update shipping settings. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + } + export interface Params$Resource$Shippingsettings$Getsupportedcarriers extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account for which to retrieve the supported carriers. + */ + merchantId?: string; + } + export interface Params$Resource$Shippingsettings$Getsupportedholidays extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account for which to retrieve the supported holidays. + */ + merchantId?: string; + } + export interface Params$Resource$Shippingsettings$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The maximum number of shipping settings to return in the response, used + * for paging. + */ + maxResults?: number; + /** + * The ID of the managing account. This must be a multi-client account. + */ + merchantId?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Shippingsettings$Update 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/update shipping settings. + */ + accountId?: string; + /** + * The ID of the managing account. If this parameter is not the same as + * accountId, then this account must be a multi-client account and accountId + * must be the ID of a sub-account of this account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ShippingSettings; + } +} diff --git a/src/apis/content/v2.ts b/src/apis/content/v2.ts index bf45571aac2..d1311a3196a 100644 --- a/src/apis/content/v2.ts +++ b/src/apis/content/v2.ts @@ -123,7 +123,8 @@ export namespace content_v2 { /** * Account data. After the creation of a new account it may take a few minutes - * before it is fully operational. + * before it is fully operational. The methods delete, insert, patch, and + * update require the admin role. */ export interface Schema$Account { /** @@ -719,7 +720,7 @@ export namespace content_v2 { pending?: string; } /** - * The tax settings of a merchant account. + * The tax settings of a merchant account. All methods require the admin role. */ export interface Schema$AccountTax { /** @@ -847,6 +848,18 @@ export namespace content_v2 { * User's email address. */ emailAddress?: string; + /** + * Whether user is an order manager. + */ + orderManager?: boolean; + /** + * Whether user can access payment statements. + */ + paymentsAnalyst?: boolean; + /** + * Whether user can manage payment settings. + */ + paymentsManager?: boolean; } export interface Schema$AccountYouTubeChannelLink { /** @@ -1957,6 +1970,10 @@ export namespace content_v2 { */ posExternalAccountId?: string; } + /** + * Local Inventory ads (LIA) settings. All methods except listposdataproviders + * require the admin role. + */ export interface Schema$LiaSettings { /** * The ID of the account to which these LIA settings belong. Ignored upon @@ -2168,6 +2185,9 @@ export namespace content_v2 { returnShipmentIds?: string[]; state?: string; } + /** + * Order. All methods require the order manager role. + */ export interface Schema$Order { /** * Whether the order was acknowledged. @@ -2251,6 +2271,10 @@ export namespace content_v2 { * The status of the order. */ status?: string; + /** + * The party responsible for collecting and remitting taxes. + */ + taxCollector?: string; } export interface Schema$OrderAddress { /** @@ -2860,6 +2884,9 @@ export namespace content_v2 { */ reasonText?: string; } + /** + * Order disbursement. All methods require the payment analyst role. + */ export interface Schema$OrderReportDisbursement { /** * The disbursement amount. @@ -2945,6 +2972,10 @@ export namespace content_v2 { * Total amount for the items. */ productAmount?: Schema$Amount; + /** + * Total amount with remitted tax for the items. + */ + productAmountWithRemittedTax?: Schema$ProductAmount; /** * The date of the transaction, in ISO 8601 format. */ @@ -3020,7 +3051,9 @@ export namespace content_v2 { */ amountPretax?: Schema$Price; /** - * Tax amount that correspond to cancellation amount in amountPretax. + * Tax amount that corresponds to cancellation amount in amountPretax. + * Optional, but if filled, then amountPretax must be set. Calculated + * automatically if not provided. */ amountTax?: Schema$Price; /** @@ -3252,7 +3285,9 @@ export namespace content_v2 { */ amountPretax?: Schema$Price; /** - * Tax amount that correspond to cancellation amount in amountPretax. + * Tax amount that corresponds to cancellation amount in amountPretax. + * Optional, but if filled, then amountPretax must be set. Calculated + * automatically if not provided. */ amountTax?: Schema$Price; /** @@ -3326,12 +3361,14 @@ export namespace content_v2 { */ amount?: Schema$Price; /** - * The amount that is refunded. Either amount or amountPretax and amountTax - * should be filled. + * The amount that is refunded. Either amount or amountPretax should be + * filled. */ amountPretax?: Schema$Price; /** - * Tax amount that correspond to refund amount in amountPretax. + * Tax amount that corresponds to refund amount in amountPretax. Optional, + * but if filled, amountPretax must be set. Calculated automatically if not + * provided. */ amountTax?: Schema$Price; /** @@ -3394,12 +3431,13 @@ export namespace content_v2 { export interface Schema$OrdersCustomBatchRequestEntryReturnRefundLineItem { /** * The amount that is refunded. If omitted, refundless return is assumed - * (same as calling returnLineItem method). Optional, but if filled then - * both amountPretax and amountTax must be set. + * (same as calling returnLineItem method). */ amountPretax?: Schema$Price; /** - * Tax amount that correspond to refund amount in amountPretax. + * Tax amount that corresponds to refund amount in amountPretax. Optional, + * but if filled, then amountPretax must be set. Calculated automatically if + * not provided. */ amountTax?: Schema$Price; /** @@ -3710,12 +3748,14 @@ export namespace content_v2 { */ amount?: Schema$Price; /** - * The amount that is refunded. Either amount or amountPretax and amountTax - * should be filled. + * The amount that is refunded. Either amount or amountPretax should be + * filled. */ amountPretax?: Schema$Price; /** - * Tax amount that correspond to refund amount in amountPretax. + * Tax amount that corresponds to refund amount in amountPretax. Optional, + * but if filled, amountPretax must be set. Calculated automatically if not + * provided. */ amountTax?: Schema$Price; /** @@ -3823,12 +3863,13 @@ export namespace content_v2 { export interface Schema$OrdersReturnRefundLineItemRequest { /** * The amount that is refunded. If omitted, refundless return is assumed - * (same as calling returnLineItem method). Optional, but if filled then - * both amountPretax and amountTax must be set. + * (same as calling returnLineItem method). */ amountPretax?: Schema$Price; /** - * Tax amount that correspond to refund amount in amountPretax. + * Tax amount that corresponds to refund amount in amountPretax. Optional, + * but if filled, then amountPretax must be set. Calculated automatically if + * not provided. */ amountTax?: Schema$Price; /** @@ -4463,7 +4504,8 @@ export namespace content_v2 { value?: string; } /** - * Product data. + * Product data. After inserting, updating, or deleting a product, it may take + * several minutes before changes take effect. */ export interface Schema$Product { /** @@ -4806,6 +4848,20 @@ export namespace content_v2 { */ warnings?: Schema$Error[]; } + export interface Schema$ProductAmount { + /** + * The pre-tax or post-tax price depending on the location of the order. + */ + priceAmount?: Schema$Price; + /** + * Remitted tax value. + */ + remittedTaxAmount?: Schema$Price; + /** + * Tax value. + */ + taxAmount?: Schema$Price; + } export interface Schema$ProductAspect { /** * The name of the aspect. @@ -5372,7 +5428,8 @@ export namespace content_v2 { trackingNumber?: string; } /** - * The merchant account's shipping settings. + * The merchant account's shipping settings. All methods except + * getsupportedcarriers and getsupportedholidays require the admin role. */ export interface Schema$ShippingSettings { /** diff --git a/src/apis/dataflow/v1b3.ts b/src/apis/dataflow/v1b3.ts index bceae58006c..19cc981e653 100644 --- a/src/apis/dataflow/v1b3.ts +++ b/src/apis/dataflow/v1b3.ts @@ -180,6 +180,11 @@ export namespace dataflow_v1b3 { * input) to 1.0 (end of the input). */ fractionConsumed?: number; + /** + * The fraction of the remainder of work to split the work item at, from 0.0 + * (split at the current position) to 1.0 (end of the input). + */ + fractionOfRemainder?: number; /** * A Position at which to split the work item. */ @@ -1982,6 +1987,10 @@ export namespace dataflow_v1b3 { * Additional experiment flags for the job. */ additionalExperiments?: string[]; + /** + * Additional user labels attached to the job. + */ + additionalUserLabels?: {[key: string]: string;}; /** * Whether to bypass the safety checks for the job's temporary * directory. Use with caution. @@ -2002,6 +2011,10 @@ export namespace dataflow_v1b3 { * service will use the network "default". */ network?: string; + /** + * The initial number of Google Compute Engine instnaces for the job. + */ + numWorkers?: number; /** * The email address of the service account to run the job as. */ diff --git a/src/apis/dataproc/v1.ts b/src/apis/dataproc/v1.ts index db47bd6fa89..ec0b8995f17 100644 --- a/src/apis/dataproc/v1.ts +++ b/src/apis/dataproc/v1.ts @@ -1565,9 +1565,13 @@ export namespace dataproc_v1 { */ export interface Schema$WorkflowMetadata { /** - * Output only. The name of the managed cluster. + * Output only. The name of the target cluster. */ clusterName?: string; + /** + * Output only. The UUID of target cluster. + */ + clusterUuid?: string; /** * Output only. The create cluster operation metadata. */ diff --git a/src/apis/dataproc/v1beta2.ts b/src/apis/dataproc/v1beta2.ts index cb70f279bf5..328674ee9e3 100644 --- a/src/apis/dataproc/v1beta2.ts +++ b/src/apis/dataproc/v1beta2.ts @@ -1673,9 +1673,13 @@ export namespace dataproc_v1beta2 { */ export interface Schema$WorkflowMetadata { /** - * Output only. The name of the managed cluster. + * Output only. The name of the target cluster. */ clusterName?: string; + /** + * Output only. The UUID of target cluster. + */ + clusterUuid?: string; /** * Output only. The create cluster operation metadata. */ @@ -1750,7 +1754,7 @@ export namespace dataproc_v1beta2 { /** * Required. The template id.The id must contain only letters (a-z, A-Z), * numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with - * underscore or hyphen. Must consist of between 3 and 50 characters. + * underscore or hyphen. Must consist of between 3 and 50 characters.. */ id?: string; /** diff --git a/src/apis/datastore/v1.ts b/src/apis/datastore/v1.ts index c833d91b37b..bc8c1d2ae7f 100644 --- a/src/apis/datastore/v1.ts +++ b/src/apis/datastore/v1.ts @@ -591,7 +591,7 @@ export namespace datastore_v1 { labels?: {[key: string]: string;}; } /** - * A minimal index definition. Next tag: 8 + * A minimal index definition. */ export interface Schema$GoogleDatastoreAdminV1Index { /** @@ -622,7 +622,7 @@ export namespace datastore_v1 { state?: string; } /** - * Next tag: 3 + * A property of an index. */ export interface Schema$GoogleDatastoreAdminV1IndexedProperty { /** diff --git a/src/apis/deploymentmanager/alpha.ts b/src/apis/deploymentmanager/alpha.ts index 7f30ad0ee91..c02f55ebaef 100644 --- a/src/apis/deploymentmanager/alpha.ts +++ b/src/apis/deploymentmanager/alpha.ts @@ -194,10 +194,10 @@ export namespace deploymentmanager_alpha { */ 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. This - * field is only visible as GOOGLE_INTERNAL or CONDITION_TRUSTED_TESTER. + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. */ condition?: Schema$Expr; /** @@ -249,13 +249,9 @@ export namespace deploymentmanager_alpha { * when the resource is created. */ description?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the composite type was created, in RFC3339 - * text format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -278,7 +274,7 @@ export namespace deploymentmanager_alpha { */ operation?: Schema$Operation; /** - * Output only. Self link for the type provider. + * Output only. Server defined URL for the resource. */ selfLink?: string; status?: string; @@ -402,13 +398,9 @@ export namespace deploymentmanager_alpha { * perform a get() request to a deployment. */ fingerprint?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the deployment was created, in RFC3339 text - * format . + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -446,7 +438,7 @@ export namespace deploymentmanager_alpha { */ outputs?: Schema$DeploymentOutputsEntry[]; /** - * Output only. Self link for the deployment. + * Output only. Server defined URL for the resource. */ selfLink?: string; /** @@ -459,6 +451,10 @@ export namespace deploymentmanager_alpha { * update to this deployment, the updated configuration appears here. */ update?: Schema$DeploymentUpdate; + /** + * Output only. Update timestamp in RFC3339 text format. + */ + updateTime?: string; } export interface Schema$DeploymentLabelEntry { key?: string; @@ -582,7 +578,7 @@ export namespace deploymentmanager_alpha { } export interface Schema$GlobalSetPolicyRequest { /** - * Flatten Policy to create a backwacd compatible wire-format. Deprecated. + * Flatten Policy to create a backward compatible wire-format. Deprecated. * Use 'policy' to specify bindings. */ bindings?: Schema$Binding[]; @@ -667,16 +663,17 @@ export namespace deploymentmanager_alpha { * and end in "_count". Field names should not contain an initial * slash. The actual exported metric names will have "/iam/policy" * prepended. Field names correspond to IAM request parameters and field - * values are their respective values. At present the only supported field - * names are - "iam_principal", corresponding to - * IAMContext.principal; - "" (empty string), resulting in one - * aggretated counter with no field. Examples: counter { metric: + * values are their respective values. Supported field names: - + * "authority", which is "[token]" if IAMContext.token is + * present, otherwise the value of IAMContext.authority_selector if present, + * and otherwise a representation of IAMContext.principal; or - + * "iam_principal", a representation of IAMContext.principal even if + * a token or authority selector is present; or - "" (empty string), + * resulting in a counter with no fields. Examples: counter { metric: * "/debug_access_count" field: "iam_principal" } ==> * increment counter /iam/policy/backend_debug_access_count * {iam_principal=[value of IAMContext.principal]} At this time we do not - * support: * multiple field names (though this may be supported in the - * future) * decrementing the counter * incrementing it by anything other than - * 1 + * support multiple field names (though this may be supported in the future). */ export interface Schema$LogConfigCounterOptions { /** @@ -694,7 +691,11 @@ export namespace deploymentmanager_alpha { export interface Schema$LogConfigDataAccessOptions { /** * Whether Gin logging should happen in a fail-closed manner at the caller. - * This is relevant only in the LocalIAM implementation, for now. + * This is relevant only in the LocalIAM implementation, for now. NOTE: + * Logging to Gin in a fail-closed manner is currently unsupported while + * work is being done to satisfy the requirements of go/345. Currently, + * setting LOG_FAIL_CLOSED mode will have no effect, but still exists + * because there is active work being done to support it (b/115874152). */ logMode?: string; } @@ -708,17 +709,13 @@ export namespace deploymentmanager_alpha { * templates and references. */ expandedConfig?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** * Output only. The imported files for this manifest. */ imports?: Schema$ImportFile[]; /** - * Output only. Timestamp when the manifest was created, in RFC3339 text - * format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -1042,13 +1039,9 @@ export namespace deploymentmanager_alpha { * expanded. Returned as serialized YAML. */ finalProperties?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the resource was created or acquired, in - * RFC3339 text format . + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -1086,8 +1079,7 @@ export namespace deploymentmanager_alpha { */ update?: Schema$ResourceUpdate; /** - * Output only. Timestamp when the resource was updated, in RFC3339 text - * format . + * Output only. Update timestamp in RFC3339 text format. */ updateTime?: string; /** @@ -1298,12 +1290,9 @@ export namespace deploymentmanager_alpha { * when the resource is created. */ description?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the type was created, in RFC3339 text format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -1325,13 +1314,13 @@ export namespace deploymentmanager_alpha { */ operation?: Schema$Operation; /** - * Output only. Self link for the type. + * Output only. Server defined URL for the resource. */ selfLink?: string; } /** - * Contains detailed information about a composite type, base type, or base - * type with specific collection. + * Type Information. Contains detailed information about a composite type, + * base type, or base type with specific collection. */ export interface Schema$TypeInfo { /** @@ -1358,7 +1347,7 @@ export namespace deploymentmanager_alpha { */ schema?: Schema$TypeInfoSchemaInfo; /** - * Output only. Server-defined URL for the resource. + * Output only. Self link for the type provider. */ selfLink?: string; /** @@ -1405,12 +1394,11 @@ export namespace deploymentmanager_alpha { */ descriptorUrl?: string; /** - * Output only. Unique identifier for the resource; defined by the server. + * Output only. Unique identifier for the resource defined by the server. */ id?: string; /** - * Output only. Timestamp when the type provider was created, in RFC3339 - * text format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -2301,7 +2289,7 @@ export namespace deploymentmanager_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -2590,7 +2578,7 @@ export namespace deploymentmanager_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetPolicyRequest} 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. @@ -2730,7 +2718,7 @@ export namespace deploymentmanager_alpha { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().TestPermissionsRequest} 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. @@ -2938,7 +2926,7 @@ export namespace deploymentmanager_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; } @@ -3081,7 +3069,7 @@ export namespace deploymentmanager_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -3122,7 +3110,7 @@ export namespace deploymentmanager_alpha { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; diff --git a/src/apis/deploymentmanager/v2.ts b/src/apis/deploymentmanager/v2.ts index 473edde9f18..b73856cb8db 100644 --- a/src/apis/deploymentmanager/v2.ts +++ b/src/apis/deploymentmanager/v2.ts @@ -168,10 +168,10 @@ export namespace deploymentmanager_v2 { */ 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. This - * field is only visible as GOOGLE_INTERNAL or CONDITION_TRUSTED_TESTER. + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. */ condition?: Schema$Expr; /** @@ -249,13 +249,9 @@ export namespace deploymentmanager_v2 { * perform a get() request to a deployment. */ fingerprint?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the deployment was created, in RFC3339 text - * format . + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -288,7 +284,7 @@ export namespace deploymentmanager_v2 { */ operation?: Schema$Operation; /** - * Output only. Self link for the deployment. + * Output only. Server defined URL for the resource. */ selfLink?: string; /** @@ -301,6 +297,10 @@ export namespace deploymentmanager_v2 { * update to this deployment, the updated configuration appears here. */ update?: Schema$DeploymentUpdate; + /** + * Output only. Update timestamp in RFC3339 text format. + */ + updateTime?: string; } export interface Schema$DeploymentLabelEntry { key?: string; @@ -404,7 +404,7 @@ export namespace deploymentmanager_v2 { } export interface Schema$GlobalSetPolicyRequest { /** - * Flatten Policy to create a backwacd compatible wire-format. Deprecated. + * Flatten Policy to create a backward compatible wire-format. Deprecated. * Use 'policy' to specify bindings. */ bindings?: Schema$Binding[]; @@ -467,16 +467,17 @@ export namespace deploymentmanager_v2 { * and end in "_count". Field names should not contain an initial * slash. The actual exported metric names will have "/iam/policy" * prepended. Field names correspond to IAM request parameters and field - * values are their respective values. At present the only supported field - * names are - "iam_principal", corresponding to - * IAMContext.principal; - "" (empty string), resulting in one - * aggretated counter with no field. Examples: counter { metric: + * values are their respective values. Supported field names: - + * "authority", which is "[token]" if IAMContext.token is + * present, otherwise the value of IAMContext.authority_selector if present, + * and otherwise a representation of IAMContext.principal; or - + * "iam_principal", a representation of IAMContext.principal even if + * a token or authority selector is present; or - "" (empty string), + * resulting in a counter with no fields. Examples: counter { metric: * "/debug_access_count" field: "iam_principal" } ==> * increment counter /iam/policy/backend_debug_access_count * {iam_principal=[value of IAMContext.principal]} At this time we do not - * support: * multiple field names (though this may be supported in the - * future) * decrementing the counter * incrementing it by anything other than - * 1 + * support multiple field names (though this may be supported in the future). */ export interface Schema$LogConfigCounterOptions { /** @@ -494,7 +495,11 @@ export namespace deploymentmanager_v2 { export interface Schema$LogConfigDataAccessOptions { /** * Whether Gin logging should happen in a fail-closed manner at the caller. - * This is relevant only in the LocalIAM implementation, for now. + * This is relevant only in the LocalIAM implementation, for now. NOTE: + * Logging to Gin in a fail-closed manner is currently unsupported while + * work is being done to satisfy the requirements of go/345. Currently, + * setting LOG_FAIL_CLOSED mode will have no effect, but still exists + * because there is active work being done to support it (b/115874152). */ logMode?: string; } @@ -508,17 +513,13 @@ export namespace deploymentmanager_v2 { * templates and references. */ expandedConfig?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** * Output only. The imported files for this manifest. */ imports?: Schema$ImportFile[]; /** - * Output only. Timestamp when the manifest was created, in RFC3339 text - * format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -765,13 +766,9 @@ export namespace deploymentmanager_v2 { * expanded. Returned as serialized YAML. */ finalProperties?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the resource was created or acquired, in - * RFC3339 text format . + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -799,8 +796,7 @@ export namespace deploymentmanager_v2 { */ update?: Schema$ResourceUpdate; /** - * Output only. Timestamp when the resource was updated, in RFC3339 text - * format . + * Output only. Update timestamp in RFC3339 text format. */ updateTime?: string; /** @@ -957,12 +953,9 @@ export namespace deploymentmanager_v2 { * A resource type supported by Deployment Manager. */ export interface Schema$Type { - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the type was created, in RFC3339 text format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -975,7 +968,7 @@ export namespace deploymentmanager_v2 { */ operation?: Schema$Operation; /** - * Output only. Self link for the type. + * Output only. Server defined URL for the resource. */ selfLink?: string; } @@ -1439,7 +1432,7 @@ export namespace deploymentmanager_v2 { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1972,7 +1965,7 @@ export namespace deploymentmanager_v2 { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetPolicyRequest} 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. @@ -2230,7 +2223,7 @@ export namespace deploymentmanager_v2 { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().TestPermissionsRequest} 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. @@ -2500,7 +2493,7 @@ export namespace deploymentmanager_v2 { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; } @@ -2643,7 +2636,7 @@ export namespace deploymentmanager_v2 { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -2684,7 +2677,7 @@ export namespace deploymentmanager_v2 { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; diff --git a/src/apis/deploymentmanager/v2beta.ts b/src/apis/deploymentmanager/v2beta.ts index 540e59abe4a..82345e744a6 100644 --- a/src/apis/deploymentmanager/v2beta.ts +++ b/src/apis/deploymentmanager/v2beta.ts @@ -215,10 +215,10 @@ export namespace deploymentmanager_v2beta { */ 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. This - * field is only visible as GOOGLE_INTERNAL or CONDITION_TRUSTED_TESTER. + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. */ condition?: Schema$Expr; /** @@ -266,13 +266,9 @@ export namespace deploymentmanager_v2beta { * when the resource is created. */ description?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the composite type was created, in RFC3339 - * text format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -295,7 +291,7 @@ export namespace deploymentmanager_v2beta { */ operation?: Schema$Operation; /** - * Output only. Self link for the type provider. + * Output only. Server defined URL for the resource. */ selfLink?: string; status?: string; @@ -394,13 +390,9 @@ export namespace deploymentmanager_v2beta { * perform a get() request to a deployment. */ fingerprint?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the deployment was created, in RFC3339 text - * format . + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -433,7 +425,7 @@ export namespace deploymentmanager_v2beta { */ operation?: Schema$Operation; /** - * Output only. Self link for the deployment. + * Output only. Server defined URL for the resource. */ selfLink?: string; /** @@ -446,6 +438,10 @@ export namespace deploymentmanager_v2beta { * update to this deployment, the updated configuration appears here. */ update?: Schema$DeploymentUpdate; + /** + * Output only. Update timestamp in RFC3339 text format. + */ + updateTime?: string; } export interface Schema$DeploymentLabelEntry { key?: string; @@ -560,7 +556,7 @@ export namespace deploymentmanager_v2beta { } export interface Schema$GlobalSetPolicyRequest { /** - * Flatten Policy to create a backwacd compatible wire-format. Deprecated. + * Flatten Policy to create a backward compatible wire-format. Deprecated. * Use 'policy' to specify bindings. */ bindings?: Schema$Binding[]; @@ -645,16 +641,17 @@ export namespace deploymentmanager_v2beta { * and end in "_count". Field names should not contain an initial * slash. The actual exported metric names will have "/iam/policy" * prepended. Field names correspond to IAM request parameters and field - * values are their respective values. At present the only supported field - * names are - "iam_principal", corresponding to - * IAMContext.principal; - "" (empty string), resulting in one - * aggretated counter with no field. Examples: counter { metric: + * values are their respective values. Supported field names: - + * "authority", which is "[token]" if IAMContext.token is + * present, otherwise the value of IAMContext.authority_selector if present, + * and otherwise a representation of IAMContext.principal; or - + * "iam_principal", a representation of IAMContext.principal even if + * a token or authority selector is present; or - "" (empty string), + * resulting in a counter with no fields. Examples: counter { metric: * "/debug_access_count" field: "iam_principal" } ==> * increment counter /iam/policy/backend_debug_access_count * {iam_principal=[value of IAMContext.principal]} At this time we do not - * support: * multiple field names (though this may be supported in the - * future) * decrementing the counter * incrementing it by anything other than - * 1 + * support multiple field names (though this may be supported in the future). */ export interface Schema$LogConfigCounterOptions { /** @@ -672,7 +669,11 @@ export namespace deploymentmanager_v2beta { export interface Schema$LogConfigDataAccessOptions { /** * Whether Gin logging should happen in a fail-closed manner at the caller. - * This is relevant only in the LocalIAM implementation, for now. + * This is relevant only in the LocalIAM implementation, for now. NOTE: + * Logging to Gin in a fail-closed manner is currently unsupported while + * work is being done to satisfy the requirements of go/345. Currently, + * setting LOG_FAIL_CLOSED mode will have no effect, but still exists + * because there is active work being done to support it (b/115874152). */ logMode?: string; } @@ -686,17 +687,13 @@ export namespace deploymentmanager_v2beta { * templates and references. */ expandedConfig?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** * Output only. The imported files for this manifest. */ imports?: Schema$ImportFile[]; /** - * Output only. Timestamp when the manifest was created, in RFC3339 text - * format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -994,13 +991,9 @@ export namespace deploymentmanager_v2beta { * expanded. Returned as serialized YAML. */ finalProperties?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the resource was created or acquired, in - * RFC3339 text format . + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -1028,8 +1021,7 @@ export namespace deploymentmanager_v2beta { */ update?: Schema$ResourceUpdate; /** - * Output only. Timestamp when the resource was updated, in RFC3339 text - * format . + * Output only. Update timestamp in RFC3339 text format. */ updateTime?: string; /** @@ -1230,12 +1222,9 @@ export namespace deploymentmanager_v2beta { * when the resource is created. */ description?: string; - /** - * Output only. Unique identifier for the resource; defined by the server. - */ id?: string; /** - * Output only. Timestamp when the type was created, in RFC3339 text format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -1257,13 +1246,13 @@ export namespace deploymentmanager_v2beta { */ operation?: Schema$Operation; /** - * Output only. Self link for the type. + * Output only. Server defined URL for the resource. */ selfLink?: string; } /** - * Contains detailed information about a composite type, base type, or base - * type with specific collection. + * Type Information. Contains detailed information about a composite type, + * base type, or base type with specific collection. */ export interface Schema$TypeInfo { /** @@ -1290,7 +1279,7 @@ export namespace deploymentmanager_v2beta { */ schema?: Schema$TypeInfoSchemaInfo; /** - * Output only. Server-defined URL for the resource. + * Output only. Self link for the type provider. */ selfLink?: string; /** @@ -1337,12 +1326,11 @@ export namespace deploymentmanager_v2beta { */ descriptorUrl?: string; /** - * Output only. Unique identifier for the resource; defined by the server. + * Output only. Unique identifier for the resource defined by the server. */ id?: string; /** - * Output only. Timestamp when the type provider was created, in RFC3339 - * text format. + * Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** @@ -2233,7 +2221,7 @@ export namespace deploymentmanager_v2beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -2522,7 +2510,7 @@ export namespace deploymentmanager_v2beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().GlobalSetPolicyRequest} 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. @@ -2662,7 +2650,7 @@ export namespace deploymentmanager_v2beta { * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. - * @param {string} params.resource_ Name of the resource for this request. + * @param {string} params.resource_ Name or id of the resource for this request. * @param {().TestPermissionsRequest} 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. @@ -2870,7 +2858,7 @@ export namespace deploymentmanager_v2beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; } @@ -3013,7 +3001,7 @@ export namespace deploymentmanager_v2beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; @@ -3054,7 +3042,7 @@ export namespace deploymentmanager_v2beta { */ project?: string; /** - * Name of the resource for this request. + * Name or id of the resource for this request. */ resource?: string; diff --git a/src/apis/dialogflow/v2.ts b/src/apis/dialogflow/v2.ts index 02945df95d7..10b79ed7306 100644 --- a/src/apis/dialogflow/v2.ts +++ b/src/apis/dialogflow/v2.ts @@ -369,27 +369,6 @@ export namespace dialogflow_v2 { */ parameters?: {[key: string]: any;}; } - /** - * Represents a notification sent to Cloud Pub/Sub subscribers for - * conversation lifecycle events. - */ - export interface Schema$GoogleCloudDialogflowV2beta1ConversationEvent { - /** - * Required. The unique identifier of the conversation this notification - * refers to. Format: `projects/<Project - * ID>/conversations/<Conversation ID>`. - */ - conversation?: string; - /** - * Optional. More detailed information about an error. Only set for type - * UNRECOVERABLE_ERROR_IN_PHONE_CALL. - */ - errorStatus?: Schema$GoogleRpcStatus; - /** - * Required. The type of the event that this notification refers to. - */ - type?: string; - } /** * Represents an entity type. Entity types serve as a tool for extracting * parameter values from natural language queries. @@ -482,21 +461,6 @@ export namespace dialogflow_v2 { */ agentUri?: string; } - /** - * Represents a notification sent to Cloud Pub/Sub subscribers for agent - * assistant events in a specific conversation. - */ - export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent { - /** - * Required. The conversation this notification refers to. Format: - * `projects/<Project ID>/conversations/<Conversation ID>`. - */ - conversation?: string; - /** - * Required. The type of the event that this notification refers to. - */ - type?: string; - } /** * Represents an intent. Intents convert a number of user expressions or * patterns into an action. An action is an extraction of a user command or @@ -1147,10 +1111,10 @@ export namespace dialogflow_v2 { faqQuestion?: string; /** * The system's confidence score that this Knowledge answer is a good - * match for this converstational query, range from 0.0 (completely + * 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, we may deprecate it in + * 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. */ @@ -1225,7 +1189,8 @@ export namespace dialogflow_v2 { allRequiredParamsPresent?: boolean; /** * The free-form diagnostic info. For example, this field could contain - * webhook call latency. + * webhook call latency. The string keys of the Struct's fields map can + * change without notice. */ diagnosticInfo?: {[key: string]: any;}; /** @@ -2364,7 +2329,8 @@ export namespace dialogflow_v2 { allRequiredParamsPresent?: boolean; /** * The free-form diagnostic info. For example, this field could contain - * webhook call latency. + * webhook call latency. The string keys of the Struct's fields map can + * change without notice. */ diagnosticInfo?: {[key: string]: any;}; /** @@ -2511,7 +2477,7 @@ export namespace dialogflow_v2 { languageCode?: string; /** * Required. The UTF-8 encoded natural language text to be processed. Text - * length must not exceed 256 bytes. + * length must not exceed 256 characters. */ text?: string; } diff --git a/src/apis/dialogflow/v2beta1.ts b/src/apis/dialogflow/v2beta1.ts index 8b0d51eb127..1cde69ff750 100644 --- a/src/apis/dialogflow/v2beta1.ts +++ b/src/apis/dialogflow/v2beta1.ts @@ -369,27 +369,6 @@ export namespace dialogflow_v2beta1 { */ parameters?: {[key: string]: any;}; } - /** - * Represents a notification sent to Cloud Pub/Sub subscribers for - * conversation lifecycle events. - */ - export interface Schema$GoogleCloudDialogflowV2beta1ConversationEvent { - /** - * Required. The unique identifier of the conversation this notification - * refers to. Format: `projects/<Project - * ID>/conversations/<Conversation ID>`. - */ - conversation?: string; - /** - * Optional. More detailed information about an error. Only set for type - * UNRECOVERABLE_ERROR_IN_PHONE_CALL. - */ - errorStatus?: Schema$GoogleRpcStatus; - /** - * Required. The type of the event that this notification refers to. - */ - type?: string; - } /** * The request to detect user's intent. */ @@ -620,21 +599,6 @@ export namespace dialogflow_v2beta1 { */ agentUri?: string; } - /** - * Represents a notification sent to Cloud Pub/Sub subscribers for agent - * assistant events in a specific conversation. - */ - export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent { - /** - * Required. The conversation this notification refers to. Format: - * `projects/<Project ID>/conversations/<Conversation ID>`. - */ - conversation?: string; - /** - * Required. The type of the event that this notification refers to. - */ - type?: string; - } /** * The request message for Agents.ImportAgent. */ @@ -1359,10 +1323,10 @@ export namespace dialogflow_v2beta1 { faqQuestion?: string; /** * The system's confidence score that this Knowledge answer is a good - * match for this converstational query, range from 0.0 (completely + * 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, we may deprecate it in + * 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. */ @@ -1635,7 +1599,8 @@ export namespace dialogflow_v2beta1 { allRequiredParamsPresent?: boolean; /** * The free-form diagnostic info. For example, this field could contain - * webhook call latency. + * webhook call latency. The string keys of the Struct's fields map can + * change without notice. */ diagnosticInfo?: {[key: string]: any;}; /** @@ -1879,7 +1844,7 @@ export namespace dialogflow_v2beta1 { languageCode?: string; /** * Required. The UTF-8 encoded natural language text to be processed. Text - * length must not exceed 256 bytes. + * length must not exceed 256 characters. */ text?: string; } @@ -2694,7 +2659,8 @@ export namespace dialogflow_v2beta1 { allRequiredParamsPresent?: boolean; /** * The free-form diagnostic info. For example, this field could contain - * webhook call latency. + * webhook call latency. The string keys of the Struct's fields map can + * change without notice. */ diagnosticInfo?: {[key: string]: any;}; /** @@ -2958,12 +2924,10 @@ export namespace dialogflow_v2beta1 { export class Resource$Projects { agent: Resource$Projects$Agent; - environments: Resource$Projects$Environments; knowledgeBases: Resource$Projects$Knowledgebases; operations: Resource$Projects$Operations; constructor() { this.agent = new Resource$Projects$Agent(); - this.environments = new Resource$Projects$Environments(); this.knowledgeBases = new Resource$Projects$Knowledgebases(); this.operations = new Resource$Projects$Operations(); } @@ -8781,645 +8745,6 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall - export class Resource$Projects$Environments { - users: Resource$Projects$Environments$Users; - constructor() { - this.users = new Resource$Projects$Environments$Users(); - } - } - - - export class Resource$Projects$Environments$Users { - conversations: Resource$Projects$Environments$Users$Conversations; - constructor() { - this.conversations = - new Resource$Projects$Environments$Users$Conversations(); - } - } - - - export class Resource$Projects$Environments$Users$Conversations { - contexts: Resource$Projects$Environments$Users$Conversations$Contexts; - constructor() { - this.contexts = - new Resource$Projects$Environments$Users$Conversations$Contexts(); - } - - - /** - * dialogflow.projects.environments.users.conversations.deleteContexts - * @desc Deletes all active contexts in the specified session. - * @alias - * dialogflow.projects.environments.users.conversations.deleteContexts - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - deleteContexts( - params?: - Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts, - options?: MethodOptions): AxiosPromise; - deleteContexts( - params: - Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - deleteContexts( - params: - Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts, - callback: BodyResponseCallback): void; - deleteContexts(callback: BodyResponseCallback): - void; - deleteContexts( - paramsOrCallback?: - Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+parent}/contexts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Projects$Environments$Users$Conversations$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 class Resource$Projects$Environments$Users$Conversations$Contexts { - constructor() {} - - - /** - * dialogflow.projects.environments.users.conversations.contexts.create - * @desc Creates a context. If the specified context already exists, - * overrides the context. - * @alias - * dialogflow.projects.environments.users.conversations.contexts.create - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.parent Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {().GoogleCloudDialogflowV2beta1Context} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - create( - params?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create, - options?: MethodOptions): - AxiosPromise; - create( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create, - options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; - create( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create, - callback: - BodyResponseCallback): - void; - create( - callback: - BodyResponseCallback): - void; - create( - paramsOrCallback?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+parent}/contexts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - - - /** - * dialogflow.projects.environments.users.conversations.contexts.delete - * @desc Deletes the specified context. - * @alias - * dialogflow.projects.environments.users.conversations.contexts.delete - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - delete( - params?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete, - options?: MethodOptions): AxiosPromise; - delete( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * dialogflow.projects.environments.users.conversations.contexts.get - * @desc Retrieves the specified context. - * @alias dialogflow.projects.environments.users.conversations.contexts.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get, - options?: MethodOptions): - AxiosPromise; - get(params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get, - options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; - get(params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get, - callback: - BodyResponseCallback): - void; - get(callback: - BodyResponseCallback): - void; - get(paramsOrCallback?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - - - /** - * dialogflow.projects.environments.users.conversations.contexts.list - * @desc Returns the list of all contexts in the specified session. - * @alias dialogflow.projects.environments.users.conversations.contexts.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. - * @param {string} params.parent Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$List, - options?: MethodOptions): - AxiosPromise; - list( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$List, - options: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; - list( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$List, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; - list(callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; - list( - paramsOrCallback?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$List| - BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, - optionsOrCallback?: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void| - AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+parent}/contexts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context - }; - if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>( - parameters, callback); - } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>( - parameters); - } - } - - - /** - * dialogflow.projects.environments.users.conversations.contexts.patch - * @desc Updates the specified context. - * @alias - * dialogflow.projects.environments.users.conversations.contexts.patch - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, 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 {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - patch( - params?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch, - options?: MethodOptions): - AxiosPromise; - patch( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch, - options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; - patch( - params: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch, - callback: - BodyResponseCallback): - void; - patch(callback: - BodyResponseCallback): - void; - patch( - paramsOrCallback?: - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - } - - export interface Params$Resource$Projects$Environments$Users$Conversations$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$Environments$Users$Conversations$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$Environments$Users$Conversations$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$Environments$Users$Conversations$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$Environments$Users$Conversations$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$Knowledgebases { documents: Resource$Projects$Knowledgebases$Documents; constructor() { diff --git a/src/apis/dlp/v2.ts b/src/apis/dlp/v2.ts index 2eef3f5db76..8f2facdaa71 100644 --- a/src/apis/dlp/v2.ts +++ b/src/apis/dlp/v2.ts @@ -718,9 +718,10 @@ export namespace dlp_v2 { /** * Pseudonymization method that generates surrogates via cryptographic * hashing. Uses SHA-256. The key size must be either 32 or 64 bytes. Outputs - * a 32 byte digest as an uppercase hex string (for example, - * 41D1567F7F99F1DC2A5FAB886DEE5BEE). Currently, only string and integer - * values can be hashed. + * a base64 encoded representation of the hashed output (for example, + * L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string and + * integer values can be hashed. See + * https://cloud.google.com/dlp/docs/pseudonymization to learn more. */ export interface Schema$GooglePrivacyDlpV2CryptoHashConfig { /** @@ -1334,7 +1335,12 @@ export namespace dlp_v2 { /** * The Cloud Storage url of the file(s) to scan, in the format * `gs://<bucket>/<path>`. Trailing wildcard in the path is - * allowed. Exactly one of `url` or `regex_file_set` must be set. + * allowed. If the url ends in a trailing slash, the bucket or directory + * represented by the url will be scanned non-recursively (content in + * sub-directories will not be scanned). This means that `gs://mybucket/` is + * equivalent to `gs://mybucket/x, and `gs://mybucket/directory/` is + * equivalent to `gs://mybucket/directory/x. Exactly one of `url` or + * `regex_file_set` must be set. */ url?: string; } @@ -2495,6 +2501,11 @@ export namespace dlp_v2 { export interface Schema$GooglePrivacyDlpV2RecordKey { bigQueryKey?: Schema$GooglePrivacyDlpV2BigQueryKey; datastoreKey?: Schema$GooglePrivacyDlpV2DatastoreKey; + /** + * Values of identifying columns in the given row. Order of values matches + * the order of field identifiers specified in the scanning request. + */ + idValues?: string[]; } /** * Location of a finding within a row or record. diff --git a/src/apis/dns/v1.ts b/src/apis/dns/v1.ts index b4b8c860e0e..cfb6bf4b03e 100644 --- a/src/apis/dns/v1.ts +++ b/src/apis/dns/v1.ts @@ -101,7 +101,13 @@ export namespace dns_v1 { } /** - * An atomic update to a collection of ResourceRecordSets. + * A Change represents a set of ResourceRecordSet additions and deletions + * applied atomically to a ManagedZone. ResourceRecordSets within a + * ManagedZone are modified by creating a new Change element in the Changes + * collection. In turn the Changes collection also records the past + * modifications to the ResourceRecordSets in a ManagedZone. The current state + * of the ManagedZone is the sum effect of applying all Change elements in the + * Changes collection in sequence. */ export interface Schema$Change { /** @@ -131,7 +137,9 @@ export namespace dns_v1 { */ startTime?: string; /** - * Status of the operation (output only). + * Status of the operation (output only). A status of "done" means + * that the request to update the authoritative servers has been sent, but + * the servers might not be updated yet. */ status?: string; } @@ -281,11 +289,11 @@ export namespace dns_v1 { */ keyLength?: number; /** - * One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type - * KEY_SIGNING have the Secure Entry Point flag set and, when active, will - * be used to sign only resource record sets of type DNSKEY. Otherwise, the - * Secure Entry Point flag will be cleared and this key will be used to sign - * only resource record sets of other types. + * Specifies whether this is a key signing key (KSK) or a zone signing key + * (ZSK). Key signing keys have the Secure Entry Point flag set and, when + * active, will only be used to sign resource record sets of type DNSKEY. + * Zone signing keys do not have the Secure Entry Point flag set and will be + * used to sign all other types of resource record sets. */ keyType?: string; /** @@ -447,7 +455,9 @@ export namespace dns_v1 { startTime?: string; /** * Status of the operation. Can be one of the following: "PENDING" - * or "DONE" (output only). + * or "DONE" (output only). A status of "DONE" means + * that the request to update the authoritative servers has been sent, but + * the servers might not be updated yet. */ status?: string; /** @@ -582,8 +592,8 @@ export namespace dns_v1 { */ ttl?: number; /** - * The identifier of a supported record type, for example, A, AAAA, MX, TXT, - * and so on. + * The identifier of a supported record type. See the list of Supported DNS + * record types. */ type?: string; } diff --git a/src/apis/dns/v1beta2.ts b/src/apis/dns/v1beta2.ts index c68fc23fe81..d434f63a214 100644 --- a/src/apis/dns/v1beta2.ts +++ b/src/apis/dns/v1beta2.ts @@ -103,7 +103,13 @@ export namespace dns_v1beta2 { } /** - * An atomic update to a collection of ResourceRecordSets. + * A Change represents a set of ResourceRecordSet additions and deletions + * applied atomically to a ManagedZone. ResourceRecordSets within a + * ManagedZone are modified by creating a new Change element in the Changes + * collection. In turn the Changes collection also records the past + * modifications to the ResourceRecordSets in a ManagedZone. The current state + * of the ManagedZone is the sum effect of applying all Change elements in the + * Changes collection in sequence. */ export interface Schema$Change { /** @@ -133,7 +139,9 @@ export namespace dns_v1beta2 { */ startTime?: string; /** - * Status of the operation (output only). + * Status of the operation (output only). A status of "done" means + * that the request to update the authoritative servers has been sent, but + * the servers might not be updated yet. */ status?: string; } @@ -283,11 +291,11 @@ export namespace dns_v1beta2 { */ keyLength?: number; /** - * One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type - * KEY_SIGNING have the Secure Entry Point flag set and, when active, will - * be used to sign only resource record sets of type DNSKEY. Otherwise, the - * Secure Entry Point flag will be cleared and this key will be used to sign - * only resource record sets of other types. + * Specifies whether this is a key signing key (KSK) or a zone signing key + * (ZSK). Key signing keys have the Secure Entry Point flag set and, when + * active, will only be used to sign resource record sets of type DNSKEY. + * Zone signing keys do not have the Secure Entry Point flag set and will be + * used to sign all other types of resource record sets. */ keyType?: string; /** @@ -358,13 +366,13 @@ export namespace dns_v1beta2 { */ nameServerSet?: string; /** - * For privately visible zones, the set of GCP resources that the zone is - * visible from. + * For privately visible zones, the set of Virtual Private Cloud resources + * that the zone is visible from. */ privateVisibilityConfig?: Schema$ManagedZonePrivateVisibilityConfig; /** * The zone's visibility: public zones are exposed to the Internet, - * while private zones are visible only to GCP resources. + * while private zones are visible only to Virtual Private Cloud resources. */ visibility?: string; } @@ -442,7 +450,7 @@ export namespace dns_v1beta2 { */ kind?: string; /** - * The list of GCE private network IDs that can see this zone. + * The list of VPC networks that can see this zone. */ networks?: Schema$ManagedZonePrivateVisibilityConfigNetwork[]; } @@ -453,8 +461,8 @@ export namespace dns_v1beta2 { */ kind?: string; /** - * The fully qualified URL of the GCE private network to bind to. This - * should be formatted like + * The fully qualified URL of the VPC network to bind to. This should be + * formatted like * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} */ networkUrl?: string; @@ -512,7 +520,9 @@ export namespace dns_v1beta2 { startTime?: string; /** * Status of the operation. Can be one of the following: "PENDING" - * or "DONE" (output only). + * or "DONE" (output only). A status of "DONE" means + * that the request to update the authoritative servers has been sent, but + * the servers might not be updated yet. */ status?: string; /** @@ -583,8 +593,8 @@ export namespace dns_v1beta2 { policy?: Schema$Policy; } /** - * A policy is a collection of rules applied to one or more networks that - * specify forwarding behavior for that network. + * A policy is a collection of DNS rules applied to one or more Virtual + * Private Cloud resources. */ export interface Schema$Policy { /** @@ -659,8 +669,8 @@ export namespace dns_v1beta2 { */ kind?: string; /** - * The fully qualified URL of the GCE private network to bind to. This - * should be formatted like + * The fully qualified URL of the VPC network to bind to. This should be + * formatted like * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} */ networkUrl?: string; @@ -788,8 +798,8 @@ export namespace dns_v1beta2 { */ ttl?: number; /** - * The identifier of a supported record type, for example, A, AAAA, MX, TXT, - * and so on. + * The identifier of a supported record type. See the list of Supported DNS + * record types. */ type?: string; } diff --git a/src/apis/dns/v2beta1.ts b/src/apis/dns/v2beta1.ts index 91eba353ae5..6ffef2bad9c 100644 --- a/src/apis/dns/v2beta1.ts +++ b/src/apis/dns/v2beta1.ts @@ -101,7 +101,13 @@ export namespace dns_v2beta1 { } /** - * An atomic update to a collection of ResourceRecordSets. + * A Change represents a set of ResourceRecordSet additions and deletions + * applied atomically to a ManagedZone. ResourceRecordSets within a + * ManagedZone are modified by creating a new Change element in the Changes + * collection. In turn the Changes collection also records the past + * modifications to the ResourceRecordSets in a ManagedZone. The current state + * of the ManagedZone is the sum effect of applying all Change elements in the + * Changes collection in sequence. */ export interface Schema$Change { /** @@ -131,7 +137,9 @@ export namespace dns_v2beta1 { */ startTime?: string; /** - * Status of the operation (output only). + * Status of the operation (output only). A status of "done" means + * that the request to update the authoritative servers has been sent, but + * the servers might not be updated yet. */ status?: string; } @@ -281,11 +289,11 @@ export namespace dns_v2beta1 { */ keyLength?: number; /** - * One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type - * KEY_SIGNING have the Secure Entry Point flag set and, when active, will - * be used to sign only resource record sets of type DNSKEY. Otherwise, the - * Secure Entry Point flag will be cleared and this key will be used to sign - * only resource record sets of other types. + * Specifies whether this is a key signing key (KSK) or a zone signing key + * (ZSK). Key signing keys have the Secure Entry Point flag set and, when + * active, will only be used to sign resource record sets of type DNSKEY. + * Zone signing keys do not have the Secure Entry Point flag set and will be + * used to sign all other types of resource record sets. */ keyType?: string; /** @@ -447,7 +455,9 @@ export namespace dns_v2beta1 { startTime?: string; /** * Status of the operation. Can be one of the following: "PENDING" - * or "DONE" (output only). + * or "DONE" (output only). A status of "DONE" means + * that the request to update the authoritative servers has been sent, but + * the servers might not be updated yet. */ status?: string; /** @@ -582,8 +592,8 @@ export namespace dns_v2beta1 { */ ttl?: number; /** - * The identifier of a supported record type, for example, A, AAAA, MX, TXT, - * and so on. + * The identifier of a supported record type. See the list of Supported DNS + * record types. */ type?: string; } diff --git a/src/apis/doubleclickbidmanager/v1.ts b/src/apis/doubleclickbidmanager/v1.ts index 99b169c4803..ba55ecece82 100644 --- a/src/apis/doubleclickbidmanager/v1.ts +++ b/src/apis/doubleclickbidmanager/v1.ts @@ -130,14 +130,15 @@ export namespace doubleclickbidmanager_v1 { lineItems?: string; } /** - * Request to fetch stored campaigns, insertion orders, line items, TrueView - * ad groups and ads. + * Request to fetch stored inventory sources, campaigns, insertion orders, + * line items, TrueView ad groups and ads. */ export interface Schema$DownloadRequest { /** * File types that will be returned. Acceptable values are: - * "AD" - "AD_GROUP" - "CAMPAIGN" - - * "INSERTION_ORDER" - "LINE_ITEM" + * "INSERTION_ORDER" - "LINE_ITEM" - + * "INVENTORY_SOURCE" */ fileTypes?: string[]; /** @@ -175,6 +176,7 @@ export namespace doubleclickbidmanager_v1 { * Retrieved insertion orders in SDF format. */ insertionOrders?: string; + inventorySources?: string; /** * Retrieved line items in SDF format. */ diff --git a/src/apis/drive/v3.ts b/src/apis/drive/v3.ts index bd220dc5a44..4319a0edce1 100644 --- a/src/apis/drive/v3.ts +++ b/src/apis/drive/v3.ts @@ -430,6 +430,10 @@ export namespace drive_v3 { * trashed from a parent folder. */ explicitlyTrashed?: boolean; + /** + * Links for exporting Google Docs to specific formats. + */ + exportLinks?: {[key: string]: string;}; /** * The final component of fullFileExtension. This is only available for * files with binary content in Drive. @@ -901,6 +905,10 @@ export namespace drive_v3 { * The metadata for a revision to a file. */ export interface Schema$Revision { + /** + * Links for exporting Google Docs to specific formats. + */ + exportLinks?: {[key: string]: string;}; /** * The ID of the revision. */ diff --git a/src/apis/firebasedynamiclinks/v1.ts b/src/apis/firebasedynamiclinks/v1.ts index 579678f92c5..1563e438151 100644 --- a/src/apis/firebasedynamiclinks/v1.ts +++ b/src/apis/firebasedynamiclinks/v1.ts @@ -548,6 +548,11 @@ export namespace firebasedynamiclinks_v1 { * Optional invitation ID, for only invite typed requested FDL links. */ invitationId?: string; + /** + * FDL input value of the "&imv=" parameter, minimum app + * version to be returned to Google Firebase SDK running on iOS-9. + */ + iosMinAppVersion?: string; /** * The entire FDL, expanded from a short link. It is the same as the * requested_link, if it is long. diff --git a/src/apis/firebasehosting/README.md b/src/apis/firebasehosting/README.md index 90c3446bad1..c6c2fec6d75 100644 --- a/src/apis/firebasehosting/README.md +++ b/src/apis/firebasehosting/README.md @@ -2,7 +2,7 @@ # @google/firebasehosting -> +> ## Installation diff --git a/src/apis/firestore/v1.ts b/src/apis/firestore/v1.ts index 31293f2549d..35b6c7ed3d4 100644 --- a/src/apis/firestore/v1.ts +++ b/src/apis/firestore/v1.ts @@ -108,6 +108,310 @@ export namespace firestore_v1 { } } + /** + * An array value. + */ + export interface Schema$ArrayValue { + /** + * Values in the array. + */ + values?: Schema$Value[]; + } + /** + * The request for Firestore.BatchGetDocuments. + */ + export interface Schema$BatchGetDocumentsRequest { + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + */ + documents?: string[]; + /** + * The fields to return. If not set, returns all fields. If a document has + * a field that is not present in this mask, that field will not be returned + * in the response. + */ + mask?: Schema$DocumentMask; + /** + * Starts a new transaction and reads the documents. Defaults to a read-only + * transaction. The new transaction ID will be returned as the first + * response in the stream. + */ + newTransaction?: Schema$TransactionOptions; + /** + * Reads documents as they were at the given time. This may not be older + * than 60 seconds. + */ + readTime?: string; + /** + * Reads documents in a transaction. + */ + transaction?: string; + } + /** + * The streamed response for Firestore.BatchGetDocuments. + */ + export interface Schema$BatchGetDocumentsResponse { + /** + * A document that was requested. + */ + found?: Schema$Document; + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + missing?: string; + /** + * The time at which the document was read. This may be monotically + * increasing, in this case the previous documents in the result stream are + * guaranteed not to have changed between their read_time and this one. + */ + readTime?: string; + /** + * The transaction that was started as part of this request. Will only be + * set in the first response, and only if + * BatchGetDocumentsRequest.new_transaction was set in the request. + */ + transaction?: string; + } + /** + * The request for Firestore.BeginTransaction. + */ + export interface Schema$BeginTransactionRequest { + /** + * The options for the transaction. Defaults to a read-write transaction. + */ + options?: Schema$TransactionOptions; + } + /** + * The response for Firestore.BeginTransaction. + */ + export interface Schema$BeginTransactionResponse { + /** + * The transaction that was started. + */ + transaction?: string; + } + /** + * A selection of a collection, such as `messages as m1`. + */ + export interface Schema$CollectionSelector { + /** + * When false, selects only collections that are immediate children of the + * `parent` specified in the containing `RunQueryRequest`. When true, + * selects all descendant collections. + */ + allDescendants?: boolean; + /** + * The collection ID. When set, selects only collections with this ID. + */ + collectionId?: string; + } + /** + * The request for Firestore.Commit. + */ + export interface Schema$CommitRequest { + /** + * If set, applies all writes in this transaction, and commits it. + */ + transaction?: string; + /** + * The writes to apply. Always executed atomically and in order. + */ + writes?: Schema$Write[]; + } + /** + * The response for Firestore.Commit. + */ + export interface Schema$CommitResponse { + /** + * The time at which the commit occurred. + */ + commitTime?: string; + /** + * The result of applying the writes. This i-th write result corresponds to + * the i-th write in the request. + */ + writeResults?: Schema$WriteResult[]; + } + /** + * A filter that merges multiple other filters using the given operator. + */ + export interface Schema$CompositeFilter { + /** + * The list of filters to combine. Must contain at least one filter. + */ + filters?: Schema$Filter[]; + /** + * The operator for combining multiple filters. + */ + op?: string; + } + /** + * A position in a query result set. + */ + export interface Schema$Cursor { + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + */ + before?: boolean; + /** + * The values that represent a position, in the order they appear in the + * order by clause of a query. Can contain fewer values than specified in + * the order by clause. + */ + values?: Schema$Value[]; + } + /** + * A Firestore document. Must not exceed 1 MiB - 4 bytes. + */ + export interface Schema$Document { + /** + * Output only. The time at which the document was created. This value + * increases monotonically when a document is deleted then recreated. It can + * also be compared to values from other documents and the `read_time` of a + * query. + */ + createTime?: string; + /** + * The document's fields. The map keys represent field names. A simple + * field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, + * or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. + * Field names matching the regular expression `__.*__` are reserved. + * Reserved field names are forbidden except in certain documented contexts. + * The map keys, represented as UTF-8, must not exceed 1,500 bytes and + * cannot be empty. Field paths may be used in other contexts to refer to + * structured fields defined here. For `map_value`, the field path is + * represented by the simple or quoted field names of the containing fields, + * delimited by `.`. For example, the structured field `"foo" : { + * map_value: { "x&y" : { string_value: "hello" }}}` + * would be represented by the field path `foo.x&y`. Within a field + * path, a quoted field name starts and ends with `` ` `` and may contain + * any character. Some characters, including `` ` ``, must be escaped using + * a `\`. For example, `` `x&y` `` represents `x&y` and `` + * `bak\`tik` `` represents `` bak`tik ``. + */ + fields?: {[key: string]: Schema$Value;}; + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name?: string; + /** + * Output only. The time at which the document was last changed. This value + * is initially set to the `create_time` then increases monotonically with + * each change to the document. It can also be compared to values from other + * documents and the `read_time` of a query. + */ + updateTime?: string; + } + /** + * A Document has changed. May be the result of multiple writes, including + * deletes, that ultimately resulted in a new value for the Document. Multiple + * DocumentChange messages may be returned for the same logical change, if + * multiple targets are affected. + */ + export interface Schema$DocumentChange { + /** + * The new state of the Document. If `mask` is set, contains only fields + * that were updated or added. + */ + document?: Schema$Document; + /** + * A set of target IDs for targets that no longer match this document. + */ + removedTargetIds?: number[]; + /** + * A set of target IDs of targets that match this document. + */ + targetIds?: number[]; + } + /** + * A Document has been deleted. May be the result of multiple writes, + * including updates, the last of which deleted the Document. Multiple + * DocumentDelete messages may be returned for the same logical delete, if + * multiple targets are affected. + */ + export interface Schema$DocumentDelete { + /** + * The resource name of the Document that was deleted. + */ + document?: string; + /** + * The read timestamp at which the delete was observed. Greater or equal to + * the `commit_time` of the delete. + */ + readTime?: string; + /** + * A set of target IDs for targets that previously matched this entity. + */ + removedTargetIds?: number[]; + } + /** + * A set of field paths on a document. Used to restrict a get or update + * operation on a document to a subset of its fields. This is different from + * standard field masks, as this is always scoped to a Document, and takes in + * account the dynamic nature of Value. + */ + export interface Schema$DocumentMask { + /** + * The list of field paths in the mask. See Document.fields for a field path + * syntax reference. + */ + fieldPaths?: string[]; + } + /** + * A Document has been removed from the view of the targets. Sent if the + * document is no longer relevant to a target and is out of view. Can be sent + * instead of a DocumentDelete or a DocumentChange if the server can not send + * the new value of the document. Multiple DocumentRemove messages may be + * returned for the same logical write or delete, if multiple targets are + * affected. + */ + export interface Schema$DocumentRemove { + /** + * The resource name of the Document that has gone out of view. + */ + document?: string; + /** + * The read timestamp at which the remove was observed. Greater or equal to + * the `commit_time` of the change/delete/remove. + */ + readTime?: string; + /** + * A set of target IDs for targets that previously matched this document. + */ + removedTargetIds?: number[]; + } + /** + * A target specified by a set of documents names. + */ + export interface Schema$DocumentsTarget { + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + */ + documents?: string[]; + } + /** + * A transformation of a document. + */ + export interface Schema$DocumentTransform { + /** + * The name of the document to transform. + */ + document?: string; + /** + * The list of transformations to apply to the fields of the document, in + * order. This must not be empty. + */ + fieldTransforms?: Schema$FieldTransform[]; + } /** * 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 @@ -116,6 +420,132 @@ export namespace firestore_v1 { * representation for `Empty` is empty JSON object `{}`. */ export interface Schema$Empty {} + /** + * A digest of all the documents that match a given target. + */ + export interface Schema$ExistenceFilter { + /** + * The total count of documents that match target_id. If different from the + * count of documents in the client that match, the client must manually + * determine which documents no longer match the target. + */ + count?: number; + /** + * The target ID to which this filter applies. + */ + targetId?: number; + } + /** + * A filter on a specific field. + */ + export interface Schema$FieldFilter { + /** + * The field to filter by. + */ + field?: Schema$FieldReference; + /** + * The operator to filter by. + */ + op?: string; + /** + * The value to compare to. + */ + value?: Schema$Value; + } + /** + * A reference to a field, such as `max(messages.time) as max_time`. + */ + export interface Schema$FieldReference { + fieldPath?: string; + } + /** + * A transformation of a field of the document. + */ + export interface Schema$FieldTransform { + /** + * Append the given elements in order if they are not already present in the + * current field value. If the field is not an array, or if the field does + * not yet exist, it is first set to the empty array. Equivalent numbers of + * different types (e.g. 3L and 3.0) are considered equal when checking if a + * value is missing. NaN is equal to NaN, and Null is equal to Null. If the + * input contains multiple equivalent values, only the first will be + * considered. The corresponding transform_result will be the null value. + */ + appendMissingElements?: Schema$ArrayValue; + /** + * The path of the field. See Document.fields for the field path syntax + * reference. + */ + fieldPath?: string; + /** + * Adds the given value to the field's current value. This must be an + * integer or a double value. If the field is not an integer or double, or + * if the field does not yet exist, the transformation will set the field to + * the given value. If either of the given value or the current field value + * are doubles, both values will be interpreted as doubles. Double + * arithmetic and representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved to + * the largest magnitude positive/negative integer. + */ + increment?: Schema$Value; + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. If the field is not an integer + * or double, or if the field does not yet exist, the transformation will + * set the field to the given value. If a maximum operation is applied where + * the field and the input value are of mixed types (that is - one is an + * integer and one is a double) the field takes on the type of the larger + * operand. If the operands are equivalent (e.g. 3 and 3.0), the field does + * not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored + * value and zero input value is always the stored value. The maximum of any + * numeric value x and NaN is NaN. + */ + maximum?: Schema$Value; + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. If the field is not an integer + * or double, or if the field does not yet exist, the transformation will + * set the field to the input value. If a minimum operation is applied where + * the field and the input value are of mixed types (that is - one is an + * integer and one is a double) the field takes on the type of the smaller + * operand. If the operands are equivalent (e.g. 3 and 3.0), the field does + * not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored + * value and zero input value is always the stored value. The minimum of any + * numeric value x and NaN is NaN. + */ + minimum?: Schema$Value; + /** + * Remove all of the given elements from the array in the field. If the + * field is not an array, or if the field does not yet exist, it is set to + * the empty array. Equivalent numbers of the different types (e.g. 3L + * and 3.0) are considered equal when deciding whether an element should be + * removed. NaN is equal to NaN, and Null is equal to Null. This will remove + * all equivalent values if there are duplicates. The corresponding + * transform_result will be the null value. + */ + removeAllFromArray?: Schema$ArrayValue; + /** + * Sets the field to the given server value. + */ + setToServerValue?: string; + } + /** + * A filter. + */ + export interface Schema$Filter { + /** + * A composite filter. + */ + compositeFilter?: Schema$CompositeFilter; + /** + * A filter on a document field. + */ + fieldFilter?: Schema$FieldFilter; + /** + * A filter that takes exactly one argument. + */ + unaryFilter?: Schema$UnaryFilter; + } /** * Metadata for google.longrunning.Operation results from * FirestoreAdmin.ExportDocuments. @@ -541,6 +971,107 @@ export namespace firestore_v1 { */ response?: {[key: string]: any;}; } + /** + * 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. + */ + export interface Schema$LatLng { + /** + * The latitude in degrees. It must be in the range [-90.0, +90.0]. + */ + latitude?: number; + /** + * The longitude in degrees. It must be in the range [-180.0, +180.0]. + */ + longitude?: number; + } + /** + * The request for Firestore.ListCollectionIds. + */ + export interface Schema$ListCollectionIdsRequest { + /** + * The maximum number of results to return. + */ + pageSize?: number; + /** + * A page token. Must be a value from ListCollectionIdsResponse. + */ + pageToken?: string; + } + /** + * The response from Firestore.ListCollectionIds. + */ + export interface Schema$ListCollectionIdsResponse { + /** + * The collection ids. + */ + collectionIds?: string[]; + /** + * A page token that may be used to continue the list. + */ + nextPageToken?: string; + } + /** + * The response for Firestore.ListDocuments. + */ + export interface Schema$ListDocumentsResponse { + /** + * The Documents found. + */ + documents?: Schema$Document[]; + /** + * The next page token. + */ + nextPageToken?: string; + } + /** + * A request for Firestore.Listen + */ + export interface Schema$ListenRequest { + /** + * A target to add to this stream. + */ + addTarget?: Schema$Target; + /** + * Labels associated with this target change. + */ + labels?: {[key: string]: string;}; + /** + * The ID of a target to remove from this stream. + */ + removeTarget?: number; + } + /** + * The response for Firestore.Listen. + */ + export interface Schema$ListenResponse { + /** + * A Document has changed. + */ + documentChange?: Schema$DocumentChange; + /** + * A Document has been deleted. + */ + documentDelete?: Schema$DocumentDelete; + /** + * A Document has been removed from a target (because it is no longer + * relevant to that target). + */ + documentRemove?: Schema$DocumentRemove; + /** + * A filter to apply to the set of documents previously returned for the + * given target. Returned when documents may have been removed from the + * given target, but the exact documents are unknown. + */ + filter?: Schema$ExistenceFilter; + /** + * Targets have changed. + */ + targetChange?: Schema$TargetChange; + } /** * The response message for Locations.ListLocations. */ @@ -584,46 +1115,193 @@ export namespace firestore_v1 { name?: string; } /** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). The error model is designed to be: - * - Simple to use and understand for most users - Flexible enough to meet - * unexpected needs # Overview The `Status` message contains three pieces of - * data: error code, error message, and error details. The error code should - * be an enum value of google.rpc.Code, but it may accept additional error - * codes if needed. The error message should be a developer-facing English - * message that helps developers *understand* and *resolve* the error. If a - * localized user-facing error message is needed, put the localized message in - * the error details or localize it in the client. The optional error details - * may contain arbitrary information about the error. There is a predefined - * set of error detail types in the package `google.rpc` that can be used for - * common error conditions. # Language mapping The `Status` message is the - * logical representation of the error model, but it is not necessarily the - * actual wire format. When the `Status` message is exposed in different - * client libraries and different wire protocols, it can be mapped - * differently. For example, it will likely be mapped to some exceptions in - * Java, but more likely mapped to some error codes in C. # Other uses The - * error model and the `Status` message can be used in a variety of - * environments, either with or without APIs, to provide a consistent - * developer experience across different environments. Example uses of this - * error model include: - Partial errors. If a service needs to return - * partial errors to the client, it may embed the `Status` in the normal - * response to indicate the partial errors. - Workflow errors. A typical - * workflow has multiple steps. Each step may have a `Status` message for - * error reporting. - Batch operations. If a client uses batch request and - * batch response, the `Status` message should be used directly inside - * batch response, one for each error sub-response. - Asynchronous - * operations. If an API call embeds asynchronous operation results in its - * response, the status of those operations should be represented directly - * using the `Status` message. - Logging. If some API errors are stored in - * logs, the message `Status` could be used directly after any stripping - * needed for security/privacy reasons. + * A map value. */ - export interface Schema$Status { + export interface Schema$MapValue { /** - * The status code, which should be an enum value of google.rpc.Code. + * The map's fields. The map keys represent field names. Field names + * matching the regular expression `__.*__` are reserved. Reserved field + * names are forbidden except in certain documented contexts. The map keys, + * represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. */ - code?: number; + fields?: {[key: string]: Schema$Value;}; + } + /** + * An order on a field. + */ + export interface Schema$Order { + /** + * The direction to order by. Defaults to `ASCENDING`. + */ + direction?: string; + /** + * The field to order by. + */ + field?: Schema$FieldReference; + } + /** + * A precondition on a document, used for conditional operations. + */ + export interface Schema$Precondition { + /** + * When set to `true`, the target document must exist. When set to `false`, + * the target document must not exist. + */ + exists?: boolean; + /** + * When set, the target document must exist and have been last updated at + * that time. + */ + updateTime?: string; + } + /** + * The projection of document's fields to return. + */ + export interface Schema$Projection { + /** + * The fields to return. If empty, all fields are returned. To only return + * the name of the document, use `['__name__']`. + */ + fields?: Schema$FieldReference[]; + } + /** + * A target specified by a query. + */ + export interface Schema$QueryTarget { + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent?: string; + /** + * A structured query. + */ + structuredQuery?: Schema$StructuredQuery; + } + /** + * Options for a transaction that can only be used to read documents. + */ + export interface Schema$ReadOnly { + /** + * Reads documents at the given time. This may not be older than 60 seconds. + */ + readTime?: string; + } + /** + * Options for a transaction that can be used to read and write documents. + */ + export interface Schema$ReadWrite { + /** + * An optional transaction to retry. + */ + retryTransaction?: string; + } + /** + * The request for Firestore.Rollback. + */ + export interface Schema$RollbackRequest { + /** + * The transaction to roll back. + */ + transaction?: string; + } + /** + * The request for Firestore.RunQuery. + */ + export interface Schema$RunQueryRequest { + /** + * Starts a new transaction and reads the documents. Defaults to a read-only + * transaction. The new transaction ID will be returned as the first + * response in the stream. + */ + newTransaction?: Schema$TransactionOptions; + /** + * Reads documents as they were at the given time. This may not be older + * than 60 seconds. + */ + readTime?: string; + /** + * A structured query. + */ + structuredQuery?: Schema$StructuredQuery; + /** + * Reads documents in a transaction. + */ + transaction?: string; + } + /** + * The response for Firestore.RunQuery. + */ + export interface Schema$RunQueryResponse { + /** + * A query result. Not set when reporting partial progress. + */ + document?: Schema$Document; + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. If + * the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + */ + readTime?: string; + /** + * The number of results that have been skipped due to an offset between the + * last response and the current response. + */ + skippedResults?: number; + /** + * The transaction that was started as part of this request. Can only be set + * in the first response, and only if RunQueryRequest.new_transaction was + * set in the request. If set, no other fields will be set in this response. + */ + transaction?: string; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; /** * A list of messages that carry the error details. There is a common set * of message types for APIs to use. @@ -636,6 +1314,320 @@ export namespace firestore_v1 { */ message?: string; } + /** + * A Firestore query. + */ + export interface Schema$StructuredQuery { + /** + * A end point for the query results. + */ + endAt?: Schema$Cursor; + /** + * The collections to query. + */ + from?: Schema$CollectionSelector[]; + /** + * The maximum number of results to return. Applies after all other + * constraints. Must be >= 0 if specified. + */ + limit?: number; + /** + * The number of results to skip. Applies before limit, but after all other + * constraints. Must be >= 0 if specified. + */ + offset?: number; + /** + * The order to apply to the query results. Firestore guarantees a stable + * ordering through the following rules: * Any field required to appear in + * `order_by`, that is not already specified in `order_by`, is appended + * to the order in field name order by default. * If an order on + * `__name__` is not specified, it is appended by default. Fields are + * appended with the same sort direction as the last order specified, or + * 'ASCENDING' if no order was specified. For example: * `SELECT * + * FROM Foo ORDER BY A` becomes `SELECT * FROM Foo ORDER BY A, __name__` + * * `SELECT * FROM Foo ORDER BY A DESC` becomes `SELECT * FROM Foo ORDER + * BY A DESC, __name__ DESC` * `SELECT * FROM Foo WHERE A > 1` becomes + * `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__` + */ + orderBy?: Schema$Order[]; + /** + * The projection to return. + */ + select?: Schema$Projection; + /** + * A starting point for the query results. + */ + startAt?: Schema$Cursor; + /** + * The filter to apply. + */ + where?: Schema$Filter; + } + /** + * A specification of a set of documents to listen to. + */ + export interface Schema$Target { + /** + * A target specified by a set of document names. + */ + documents?: Schema$DocumentsTarget; + /** + * If the target should be removed once it is current and consistent. + */ + once?: boolean; + /** + * A target specified by a query. + */ + query?: Schema$QueryTarget; + /** + * Start listening after a specific `read_time`. The client must know the + * state of matching documents at this time. + */ + readTime?: string; + /** + * A resume token from a prior TargetChange for an identical target. Using + * a resume token with a different target is unsupported and may fail. + */ + resumeToken?: string; + /** + * A client provided target ID. If not set, the server will assign an ID + * for the target. Used for resuming a target without changing IDs. The IDs + * can either be client-assigned or be server-assigned in a previous stream. + * All targets with client provided IDs must be added before adding a target + * that needs a server-assigned id. + */ + targetId?: number; + } + /** + * Targets being watched have changed. + */ + export interface Schema$TargetChange { + /** + * The error that resulted in this change, if applicable. + */ + cause?: Schema$Status; + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). The stream is guaranteed + * to send a `read_time` with `target_ids` empty whenever the entire stream + * reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are + * guaranteed to (eventually) result in a new consistent snapshot (while + * NO_CHANGE and REMOVE messages are not). For a given stream, `read_time` + * is guaranteed to be monotonically increasing. + */ + readTime?: string; + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. Not set on every target change. + */ + resumeToken?: string; + /** + * The type of change that occurred. + */ + targetChangeType?: string; + /** + * The target IDs of targets that have changed. If empty, the change + * applies to all targets. For `target_change_type=ADD`, the order of the + * target IDs matches the order of the requests to add the targets. This + * allows clients to unambiguously associate server-assigned target IDs with + * added targets. For other states, the order of the target IDs is not + * defined. + */ + targetIds?: number[]; + } + /** + * Options for creating a new transaction. + */ + export interface Schema$TransactionOptions { + /** + * The transaction can only be used for read operations. + */ + readOnly?: Schema$ReadOnly; + /** + * The transaction can be used for both read and write operations. + */ + readWrite?: Schema$ReadWrite; + } + /** + * A filter with a single operand. + */ + export interface Schema$UnaryFilter { + /** + * The field to which to apply the operator. + */ + field?: Schema$FieldReference; + /** + * The unary operator to apply. + */ + op?: string; + } + /** + * A message that can hold any of the supported value types. + */ + export interface Schema$Value { + /** + * An array value. Cannot directly contain another array value, though can + * contain an map which contains another array. + */ + arrayValue?: Schema$ArrayValue; + /** + * A boolean value. + */ + booleanValue?: boolean; + /** + * A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 + * bytes are considered by queries. + */ + bytesValue?: string; + /** + * A double value. + */ + doubleValue?: number; + /** + * A geo point value representing a point on the surface of Earth. + */ + geoPointValue?: Schema$LatLng; + /** + * An integer value. + */ + integerValue?: string; + /** + * A map value. + */ + mapValue?: Schema$MapValue; + /** + * A null value. + */ + nullValue?: string; + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + referenceValue?: string; + /** + * A string value. The string, represented as UTF-8, must not exceed 1 MiB + * - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are + * considered by queries. + */ + stringValue?: string; + /** + * A timestamp value. Precise only to microseconds. When stored, any + * additional precision is rounded down. + */ + timestampValue?: string; + } + /** + * A write on a document. + */ + export interface Schema$Write { + /** + * An optional precondition on the document. The write will fail if this is + * set and not met by the target document. + */ + currentDocument?: Schema$Precondition; + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + delete?: string; + /** + * Applies a tranformation to a document. At most one `transform` per + * document is allowed in a given request. An `update` cannot follow a + * `transform` on the same document in a given request. + */ + transform?: Schema$DocumentTransform; + /** + * A document to write. + */ + update?: Schema$Document; + /** + * The fields to update in this write. This field can be set only when the + * operation is `update`. If the mask is not set for an `update` and the + * document exists, any existing data will be overwritten. If the mask is + * set and the document on the server has fields not covered by the mask, + * they are left unchanged. Fields referenced in the mask, but not present + * in the input document, are deleted from the document on the server. The + * field paths in this mask must not contain a reserved field name. + */ + updateMask?: Schema$DocumentMask; + } + /** + * The request for Firestore.Write. The first request creates a stream, or + * resumes an existing one from a token. When creating a new stream, the + * server replies with a response containing only an ID and a token, to use in + * the next request. When resuming a stream, the server first streams any + * responses later than the given token, then a response containing only an + * up-to-date token, to use in the next request. + */ + export interface Schema$WriteRequest { + /** + * Labels associated with this write request. + */ + labels?: {[key: string]: string;}; + /** + * The ID of the write stream to resume. This may only be set in the first + * message. When left empty, a new write stream will be created. + */ + streamId?: string; + /** + * A stream token that was previously sent by the server. The client should + * set this field to the token from the most recent WriteResponse it has + * received. This acknowledges that the client has received responses up to + * this token. After sending this token, earlier tokens may not be used + * anymore. The server may close the stream if there are too many + * unacknowledged responses. Leave this field unset when creating a new + * stream. To resume a stream at a specific point, set this field and the + * `stream_id` field. Leave this field unset when creating a new stream. + */ + streamToken?: string; + /** + * The writes to apply. Always executed atomically and in order. This must + * be empty on the first request. This may be empty on the last request. + * This must not be empty on all other requests. + */ + writes?: Schema$Write[]; + } + /** + * The response for Firestore.Write. + */ + export interface Schema$WriteResponse { + /** + * The time at which the commit occurred. + */ + commitTime?: string; + /** + * The ID of the stream. Only set on the first message, when a new stream + * was created. + */ + streamId?: string; + /** + * A token that represents the position of this response in the stream. This + * can be used by a client to resume the stream at this point. This field + * is always set. + */ + streamToken?: string; + /** + * The result of applying the writes. This i-th write result corresponds to + * the i-th write in the request. + */ + writeResults?: Schema$WriteResult[]; + } + /** + * The result of applying a write. + */ + export interface Schema$WriteResult { + /** + * The results of applying each DocumentTransform.FieldTransform, in the + * same order. + */ + transformResults?: Schema$Value[]; + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. If the write did not actually change the document, + * this will be the previous update_time. + */ + updateTime?: string; + } export class Resource$Projects { @@ -650,10 +1642,12 @@ export namespace firestore_v1 { export class Resource$Projects$Databases { collectionGroups: Resource$Projects$Databases$Collectiongroups; + documents: Resource$Projects$Databases$Documents; operations: Resource$Projects$Databases$Operations; constructor() { this.collectionGroups = new Resource$Projects$Databases$Collectiongroups(); + this.documents = new Resource$Projects$Databases$Documents(); this.operations = new Resource$Projects$Databases$Operations(); } @@ -1582,6 +2576,1250 @@ export namespace firestore_v1 { + export class Resource$Projects$Databases$Documents { + constructor() {} + + + /** + * firestore.projects.databases.documents.batchGet + * @desc Gets multiple documents. Documents returned by this method are not + * guaranteed to be returned in the same order that they were requested. + * @alias firestore.projects.databases.documents.batchGet + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.database The database name. In the format: `projects/{project_id}/databases/{database_id}`. + * @param {().BatchGetDocumentsRequest} 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 + */ + batchGet( + params?: Params$Resource$Projects$Databases$Documents$Batchget, + options?: MethodOptions): + AxiosPromise; + batchGet( + params: Params$Resource$Projects$Databases$Documents$Batchget, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + batchGet( + params: Params$Resource$Projects$Databases$Documents$Batchget, + callback: BodyResponseCallback): void; + batchGet(callback: BodyResponseCallback): + void; + batchGet( + paramsOrCallback?: + Params$Resource$Projects$Databases$Documents$Batchget| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Batchget; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Batchget; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+database}/documents:batchGet') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['database'], + pathParams: ['database'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.beginTransaction + * @desc Starts a new transaction. + * @alias firestore.projects.databases.documents.beginTransaction + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.database The database name. In the format: `projects/{project_id}/databases/{database_id}`. + * @param {().BeginTransactionRequest} 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 + */ + beginTransaction( + params?: Params$Resource$Projects$Databases$Documents$Begintransaction, + options?: MethodOptions): AxiosPromise; + beginTransaction( + params: Params$Resource$Projects$Databases$Documents$Begintransaction, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + beginTransaction( + params: Params$Resource$Projects$Databases$Documents$Begintransaction, + callback: BodyResponseCallback): void; + beginTransaction( + callback: BodyResponseCallback): void; + beginTransaction( + paramsOrCallback?: + Params$Resource$Projects$Databases$Documents$Begintransaction| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Begintransaction; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Documents$Begintransaction; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+database}/documents:beginTransaction') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['database'], + pathParams: ['database'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.commit + * @desc Commits a transaction, while optionally updating documents. + * @alias firestore.projects.databases.documents.commit + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.database The database name. In the format: `projects/{project_id}/databases/{database_id}`. + * @param {().CommitRequest} 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 + */ + commit( + params?: Params$Resource$Projects$Databases$Documents$Commit, + options?: MethodOptions): AxiosPromise; + commit( + params: Params$Resource$Projects$Databases$Documents$Commit, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + commit( + params: Params$Resource$Projects$Databases$Documents$Commit, + callback: BodyResponseCallback): void; + commit(callback: BodyResponseCallback): void; + commit( + paramsOrCallback?: Params$Resource$Projects$Databases$Documents$Commit| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Commit; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Commit; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+database}/documents:commit') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['database'], + pathParams: ['database'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.createDocument + * @desc Creates a new document. + * @alias firestore.projects.databases.documents.createDocument + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.collectionId The collection ID, relative to `parent`, to list. For example: `chatrooms`. + * @param {string=} params.documentId The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service. + * @param {string=} params.mask.fieldPaths The list of field paths in the mask. See Document.fields for a field path syntax reference. + * @param {string} params.parent The parent resource. For example: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * @param {().Document} 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 + */ + createDocument( + params?: Params$Resource$Projects$Databases$Documents$Createdocument, + options?: MethodOptions): AxiosPromise; + createDocument( + params: Params$Resource$Projects$Databases$Documents$Createdocument, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + createDocument( + params: Params$Resource$Projects$Databases$Documents$Createdocument, + callback: BodyResponseCallback): void; + createDocument(callback: BodyResponseCallback): void; + createDocument( + paramsOrCallback?: + Params$Resource$Projects$Databases$Documents$Createdocument| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Createdocument; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Documents$Createdocument; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/{collectionId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent', 'collectionId'], + pathParams: ['collectionId', 'parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.delete + * @desc Deletes a document. + * @alias firestore.projects.databases.documents.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.currentDocument.exists When set to `true`, the target document must exist. When set to `false`, the target document must not exist. + * @param {string=} params.currentDocument.updateTime When set, the target document must exist and have been last updated at that time. + * @param {string} params.name The resource name of the Document to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @param {object} [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$Databases$Documents$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Databases$Documents$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Databases$Documents$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Databases$Documents$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.get + * @desc Gets a single document. + * @alias firestore.projects.databases.documents.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.mask.fieldPaths The list of field paths in the mask. See Document.fields for a field path syntax reference. + * @param {string} params.name The resource name of the Document to get. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @param {string=} params.readTime Reads the version of the document at the given time. This may not be older than 60 seconds. + * @param {string=} params.transaction Reads the document in a transaction. + * @param {object} [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$Databases$Documents$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Databases$Documents$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Databases$Documents$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Databases$Documents$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.list + * @desc Lists documents. + * @alias firestore.projects.databases.documents.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.collectionId The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. + * @param {string=} params.mask.fieldPaths The list of field paths in the mask. See Document.fields for a field path syntax reference. + * @param {string=} params.orderBy The order to sort results by. For example: `priority desc, name`. + * @param {integer=} params.pageSize The maximum number of documents to return. + * @param {string=} params.pageToken The `next_page_token` value returned from a previous List request, if any. + * @param {string} params.parent The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @param {string=} params.readTime Reads documents as they were at the given time. This may not be older than 60 seconds. + * @param {boolean=} params.showMissing If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`. + * @param {string=} params.transaction Reads documents in a transaction. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Databases$Documents$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Databases$Documents$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Databases$Documents$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Databases$Documents$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/{collectionId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent', 'collectionId'], + pathParams: ['collectionId', 'parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.listCollectionIds + * @desc Lists all the collection IDs underneath a document. + * @alias firestore.projects.databases.documents.listCollectionIds + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @param {().ListCollectionIdsRequest} 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 + */ + listCollectionIds( + params?: Params$Resource$Projects$Databases$Documents$Listcollectionids, + options?: MethodOptions): + AxiosPromise; + listCollectionIds( + params: Params$Resource$Projects$Databases$Documents$Listcollectionids, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + listCollectionIds( + params: Params$Resource$Projects$Databases$Documents$Listcollectionids, + callback: BodyResponseCallback): void; + listCollectionIds( + callback: BodyResponseCallback): void; + listCollectionIds( + paramsOrCallback?: + Params$Resource$Projects$Databases$Documents$Listcollectionids| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Listcollectionids; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Documents$Listcollectionids; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}:listCollectionIds') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.listen + * @desc Listens to changes. + * @alias firestore.projects.databases.documents.listen + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.database The database name. In the format: `projects/{project_id}/databases/{database_id}`. + * @param {().ListenRequest} 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 + */ + listen( + params?: Params$Resource$Projects$Databases$Documents$Listen, + options?: MethodOptions): AxiosPromise; + listen( + params: Params$Resource$Projects$Databases$Documents$Listen, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + listen( + params: Params$Resource$Projects$Databases$Documents$Listen, + callback: BodyResponseCallback): void; + listen(callback: BodyResponseCallback): void; + listen( + paramsOrCallback?: Params$Resource$Projects$Databases$Documents$Listen| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Listen; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Listen; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+database}/documents:listen') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['database'], + pathParams: ['database'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.patch + * @desc Updates or inserts a document. + * @alias firestore.projects.databases.documents.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.currentDocument.exists When set to `true`, the target document must exist. When set to `false`, the target document must not exist. + * @param {string=} params.currentDocument.updateTime When set, the target document must exist and have been last updated at that time. + * @param {string=} params.mask.fieldPaths The list of field paths in the mask. See Document.fields for a field path syntax reference. + * @param {string} params.name The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @param {string=} params.updateMask.fieldPaths The list of field paths in the mask. See Document.fields for a field path syntax reference. + * @param {().Document} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Databases$Documents$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Databases$Documents$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Databases$Documents$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Databases$Documents$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.rollback + * @desc Rolls back a transaction. + * @alias firestore.projects.databases.documents.rollback + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.database The database name. In the format: `projects/{project_id}/databases/{database_id}`. + * @param {().RollbackRequest} 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 + */ + rollback( + params?: Params$Resource$Projects$Databases$Documents$Rollback, + options?: MethodOptions): AxiosPromise; + rollback( + params: Params$Resource$Projects$Databases$Documents$Rollback, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + rollback( + params: Params$Resource$Projects$Databases$Documents$Rollback, + callback: BodyResponseCallback): void; + rollback(callback: BodyResponseCallback): void; + rollback( + paramsOrCallback?: + Params$Resource$Projects$Databases$Documents$Rollback| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Rollback; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Rollback; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+database}/documents:rollback') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['database'], + pathParams: ['database'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.runQuery + * @desc Runs a query. + * @alias firestore.projects.databases.documents.runQuery + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @param {().RunQueryRequest} 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 + */ + runQuery( + params?: Params$Resource$Projects$Databases$Documents$Runquery, + options?: MethodOptions): AxiosPromise; + runQuery( + params: Params$Resource$Projects$Databases$Documents$Runquery, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + runQuery( + params: Params$Resource$Projects$Databases$Documents$Runquery, + callback: BodyResponseCallback): void; + runQuery(callback: BodyResponseCallback): void; + runQuery( + paramsOrCallback?: + Params$Resource$Projects$Databases$Documents$Runquery| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Runquery; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Runquery; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}:runQuery') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.documents.write + * @desc Streams batches of document updates and deletes, in order. + * @alias firestore.projects.databases.documents.write + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.database The database name. In the format: `projects/{project_id}/databases/{database_id}`. This is only required in the first message. + * @param {().WriteRequest} 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 + */ + write( + params?: Params$Resource$Projects$Databases$Documents$Write, + options?: MethodOptions): AxiosPromise; + write( + params: Params$Resource$Projects$Databases$Documents$Write, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + write( + params: Params$Resource$Projects$Databases$Documents$Write, + callback: BodyResponseCallback): void; + write(callback: BodyResponseCallback): void; + write( + paramsOrCallback?: Params$Resource$Projects$Databases$Documents$Write| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Documents$Write; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Databases$Documents$Write; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+database}/documents:write') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['database'], + pathParams: ['database'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Databases$Documents$Batchget extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchGetDocumentsRequest; + } + export interface Params$Resource$Projects$Databases$Documents$Begintransaction + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BeginTransactionRequest; + } + export interface Params$Resource$Projects$Databases$Documents$Commit extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CommitRequest; + } + export interface Params$Resource$Projects$Databases$Documents$Createdocument + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + */ + collectionId?: string; + /** + * The client-assigned document ID to use for this document. Optional. If + * not specified, an ID will be assigned by the service. + */ + documentId?: string; + /** + * The list of field paths in the mask. See Document.fields for a field path + * syntax reference. + */ + 'mask.fieldPaths'?: string[]; + /** + * The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Document; + } + export interface Params$Resource$Projects$Databases$Documents$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * When set to `true`, the target document must exist. When set to `false`, + * the target document must not exist. + */ + 'currentDocument.exists'?: boolean; + /** + * When set, the target document must exist and have been last updated at + * that time. + */ + 'currentDocument.updateTime'?: string; + /** + * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name?: string; + } + export interface Params$Resource$Projects$Databases$Documents$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The list of field paths in the mask. See Document.fields for a field path + * syntax reference. + */ + 'mask.fieldPaths'?: string[]; + /** + * The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name?: string; + /** + * Reads the version of the document at the given time. This may not be + * older than 60 seconds. + */ + readTime?: string; + /** + * Reads the document in a transaction. + */ + transaction?: string; + } + export interface Params$Resource$Projects$Databases$Documents$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The collection ID, relative to `parent`, to list. For example: + * `chatrooms` or `messages`. + */ + collectionId?: string; + /** + * The list of field paths in the mask. See Document.fields for a field path + * syntax reference. + */ + 'mask.fieldPaths'?: string[]; + /** + * The order to sort results by. For example: `priority desc, name`. + */ + orderBy?: string; + /** + * The maximum number of documents to return. + */ + pageSize?: number; + /** + * The `next_page_token` value returned from a previous List request, if + * any. + */ + pageToken?: string; + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent?: string; + /** + * Reads documents as they were at the given time. This may not be older + * than 60 seconds. + */ + readTime?: string; + /** + * If the list should show missing documents. A missing document is a + * document that does not exist but has sub-documents. These documents will + * be returned with a key but will not have fields, Document.create_time, or + * Document.update_time set. Requests with `show_missing` may not specify + * `where` or `order_by`. + */ + showMissing?: boolean; + /** + * Reads documents in a transaction. + */ + transaction?: string; + } + export interface Params$Resource$Projects$Databases$Documents$Listcollectionids + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ListCollectionIdsRequest; + } + export interface Params$Resource$Projects$Databases$Documents$Listen extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ListenRequest; + } + export interface Params$Resource$Projects$Databases$Documents$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * When set to `true`, the target document must exist. When set to `false`, + * the target document must not exist. + */ + 'currentDocument.exists'?: boolean; + /** + * When set, the target document must exist and have been last updated at + * that time. + */ + 'currentDocument.updateTime'?: string; + /** + * The list of field paths in the mask. See Document.fields for a field path + * syntax reference. + */ + 'mask.fieldPaths'?: string[]; + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name?: string; + /** + * The list of field paths in the mask. See Document.fields for a field path + * syntax reference. + */ + 'updateMask.fieldPaths'?: string[]; + + /** + * Request body metadata + */ + requestBody?: Schema$Document; + } + export interface Params$Resource$Projects$Databases$Documents$Rollback extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RollbackRequest; + } + export interface Params$Resource$Projects$Databases$Documents$Runquery extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RunQueryRequest; + } + export interface Params$Resource$Projects$Databases$Documents$Write extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. This is only required in + * the first message. + */ + database?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WriteRequest; + } + + export class Resource$Projects$Databases$Operations { constructor() {} diff --git a/src/apis/firestore/v1beta1.ts b/src/apis/firestore/v1beta1.ts index 5ae31a149db..4094f20e83f 100644 --- a/src/apis/firestore/v1beta1.ts +++ b/src/apis/firestore/v1beta1.ts @@ -477,6 +477,43 @@ export namespace firestore_v1beta1 { * reference. */ fieldPath?: string; + /** + * Adds the given value to the field's current value. This must be an + * integer or a double value. If the field is not an integer or double, or + * if the field does not yet exist, the transformation will set the field to + * the given value. If either of the given value or the current field value + * are doubles, both values will be interpreted as doubles. Double + * arithmetic and representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved to + * the largest magnitude positive/negative integer. + */ + increment?: Schema$Value; + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. If the field is not an integer + * or double, or if the field does not yet exist, the transformation will + * set the field to the given value. If a maximum operation is applied where + * the field and the input value are of mixed types (that is - one is an + * integer and one is a double) the field takes on the type of the larger + * operand. If the operands are equivalent (e.g. 3 and 3.0), the field does + * not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored + * value and zero input value is always the stored value. The maximum of any + * numeric value x and NaN is NaN. + */ + maximum?: Schema$Value; + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. If the field is not an integer + * or double, or if the field does not yet exist, the transformation will + * set the field to the input value. If a minimum operation is applied where + * the field and the input value are of mixed types (that is - one is an + * integer and one is a double) the field takes on the type of the smaller + * operand. If the operands are equivalent (e.g. 3 and 3.0), the field does + * not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored + * value and zero input value is always the stored value. The minimum of any + * numeric value x and NaN is NaN. + */ + minimum?: Schema$Value; /** * Remove all of the given elements from the array in the field. If the * field is not an array, or if the field does not yet exist, it is set to diff --git a/src/apis/fitness/v1.ts b/src/apis/fitness/v1.ts index 155d5fd1e98..18c12981527 100644 --- a/src/apis/fitness/v1.ts +++ b/src/apis/fitness/v1.ts @@ -375,6 +375,10 @@ export namespace fitness_v1 { * platform. */ application?: Schema$Application; + /** + * DO NOT USE THIS FIELD. It is never populated in responses from the + * platform, and is ignored in queries. + */ dataQualityStandard?: string[]; /** * A unique identifier for the data stream produced by this data source. The diff --git a/src/apis/gmail/v1.ts b/src/apis/gmail/v1.ts index c1a7048bb62..bb59fa07955 100644 --- a/src/apis/gmail/v1.ts +++ b/src/apis/gmail/v1.ts @@ -131,8 +131,8 @@ export namespace gmail_v1 { } /** * Settings for a delegate. Delegates can read, send, and delete messages, as - * well as manage contacts, for the delegator's account. See "Set up - * mail delegation" for more information about delegates. + * well as view and add contacts, for the delegator's account. See + * "Set up mail delegation" for more information about delegates. */ export interface Schema$Delegate { /** diff --git a/src/apis/iap/index.ts b/src/apis/iap/index.ts index c24ea448e9c..d777435f8c6 100644 --- a/src/apis/iap/index.ts +++ b/src/apis/iap/index.ts @@ -14,15 +14,20 @@ /*! THIS FILE IS AUTO-GENERATED */ import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {iap_v1} from './v1'; import {iap_v1beta1} from './v1beta1'; export const VERSIONS = { + 'v1': iap_v1.Iap, 'v1beta1': iap_v1beta1.Iap, }; +export function iap(version: 'v1'): iap_v1.Iap; +export function iap(options: iap_v1.Options): iap_v1.Iap; export function iap(version: 'v1beta1'): iap_v1beta1.Iap; export function iap(options: iap_v1beta1.Options): iap_v1beta1.Iap; -export function iap( - this: GoogleConfigurable, versionOrOptions: 'v1beta1'|iap_v1beta1.Options) { +export function iap( + this: GoogleConfigurable, + versionOrOptions: 'v1'|iap_v1.Options|'v1beta1'|iap_v1beta1.Options) { return getAPI('iap', versionOrOptions, VERSIONS, this); } diff --git a/src/apis/iap/v1.ts b/src/apis/iap/v1.ts new file mode 100644 index 00000000000..0b53bee4928 --- /dev/null +++ b/src/apis/iap/v1.ts @@ -0,0 +1,1975 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace iap_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + let context: APIRequestContext; + + 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 Identity-Aware Proxy API + * + * Controls access to cloud applications running on Google Cloud Platform. + * + * @example + * const {google} = require('googleapis'); + * const iap = google.iap('v1'); + * + * @namespace iap + * @type {Function} + * @version v1 + * @variation v1 + * @param {object=} options Options for Iap + */ + export class Iap { + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.projects = new Resource$Projects(); + } + } + + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * Unimplemented. The condition that is associated with this binding. NOTE: + * an unsatisfied condition will not allow user access via current binding. + * Different bindings, including their conditions, are examined + * independently. + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: * `allUsers`: A special + * identifier that represents anyone who is on the internet; with or + * without a Google account. * `allAuthenticatedUsers`: A special + * identifier that represents anyone who is authenticated with a Google + * account or a service account. * `user:{emailid}`: An email address that + * represents a specific Google account. For example, `alice@gmail.com` . + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. * + * `group:{emailid}`: An email address that represents a Google group. For + * example, `admins@example.com`. * `domain:{domain}`: A Google Apps + * domain name that represents all the users of that domain. For example, + * `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, + * `roles/editor`, or `roles/owner`. + */ + role?: string; + } + /** + * Represents an expression text. Example: title: "User account + * presence" description: "Determines whether the request has a + * user account" expression: "size(request.user) > 0" + */ + export interface Schema$Expr { + /** + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + */ + description?: string; + /** + * Textual representation of an expression in Common Expression Language + * syntax. The application context of the containing message determines + * which well-known feature set of CEL is supported. + */ + expression?: string; + /** + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + */ + location?: string; + /** + * An optional title for the expression, i.e. a short string describing its + * purpose. This can be used e.g. in UIs which allow to enter the + * expression. + */ + title?: string; + } + /** + * Request message for `GetIamPolicy` method. + */ + export interface Schema$GetIamPolicyRequest {} + /** + * Defines an Identity and Access Management (IAM) policy. It is used to + * specify access control policies for Cloud Platform resources. A `Policy` + * consists of a list of `bindings`. A `binding` binds a list of `members` to + * a `role`, where the members can be user accounts, Google groups, Google + * domains, and service accounts. A `role` is a named list of permissions + * defined by IAM. **JSON Example** { "bindings": [ { + * "role": "roles/owner", "members": [ + * "user:mike@example.com", "group:admins@example.com", + * "domain:google.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { + * "role": "roles/viewer", "members": + * ["user:sean@example.com"] } ] } **YAML + * Example** bindings: - members: - user:mike@example.com - + * group:admins@example.com - domain:google.com - + * serviceAccount:my-other-app@appspot.gserviceaccount.com role: + * roles/owner - members: - user:sean@example.com role: + * roles/viewer For a description of IAM and its features, see the [IAM + * developer's guide](https://cloud.google.com/iam/docs). + */ + export interface Schema$Policy { + /** + * Associates a list of `members` to a `role`. `bindings` with no members + * will result in an error. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. It + * is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the + * policy. If no `etag` is provided in the call to `setIamPolicy`, then the + * existing policy is overwritten blindly. + */ + etag?: string; + /** + * Deprecated. + */ + version?: number; + } + /** + * 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; + } + /** + * 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[]; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + + + export class Resource$Projects { + iap_tunnel: Resource$Projects$Iap_tunnel; + iap_web: Resource$Projects$Iap_web; + constructor() { + this.iap_tunnel = new Resource$Projects$Iap_tunnel(); + this.iap_web = new Resource$Projects$Iap_web(); + } + } + + + export class Resource$Projects$Iap_tunnel { + zones: Resource$Projects$Iap_tunnel$Zones; + constructor() { + this.zones = new Resource$Projects$Iap_tunnel$Zones(); + } + + + /** + * iap.projects.iap_tunnel.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Iap_tunnel$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Iap_tunnel$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Iap_tunnel$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_tunnel$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$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$Iap_tunnel$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$Iap_tunnel$Zones { + instances: Resource$Projects$Iap_tunnel$Zones$Instances; + constructor() { + this.instances = new Resource$Projects$Iap_tunnel$Zones$Instances(); + } + + + /** + * iap.projects.iap_tunnel.zones.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy + 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Zones$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$Iap_tunnel$Zones$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$Iap_tunnel$Zones$Instances { + constructor() {} + + + /** + * iap.projects.iap_tunnel.zones.instances.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.instances.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.instances.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.instances.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.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 + */ + setIamPolicy( + params?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.instances.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.instances.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.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 + */ + testIamPermissions( + params?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy + 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Zones$Instances$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$Iap_tunnel$Zones$Instances$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$Iap_web { + services: Resource$Projects$Iap_web$Services; + constructor() { + this.services = new Resource$Projects$Iap_web$Services(); + } + + + /** + * iap.projects.iap_web.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Iap_web$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Iap_web$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Iap_web$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Iap_web$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_web$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_web.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Iap_web$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Iap_web$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Iap_web$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Iap_web$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_web$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_web.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Iap_web$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Iap_web$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Iap_web$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Projects$Iap_web$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_web$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_web$Getiampolicy 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_web$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$Iap_web$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$Iap_web$Services { + versions: Resource$Projects$Iap_web$Services$Versions; + constructor() { + this.versions = new Resource$Projects$Iap_web$Services$Versions(); + } + + + /** + * iap.projects.iap_web.services.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.services.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Iap_web$Services$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_web$Services$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Services$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_web$Services$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_web.services.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.services.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.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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Iap_web$Services$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_web$Services$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Services$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_web$Services$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_web.services.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.services.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.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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Iap_web$Services$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Iap_web$Services$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Iap_web$Services$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_web$Services$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Services$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_web$Services$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_web$Services$Getiampolicy + 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_web$Services$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$Iap_web$Services$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$Iap_web$Services$Versions { + constructor() {} + + + /** + * iap.projects.iap_web.services.versions.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.services.versions.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().GetIamPolicyRequest} 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 + */ + getIamPolicy( + params?: + Params$Resource$Projects$Iap_web$Services$Versions$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Versions$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Versions$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_web$Services$Versions$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Services$Versions$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_web$Services$Versions$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_web.services.versions.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.services.versions.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.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 + */ + setIamPolicy( + params?: + Params$Resource$Projects$Iap_web$Services$Versions$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Versions$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Iap_web$Services$Versions$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_web$Services$Versions$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Services$Versions$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_web$Services$Versions$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_web.services.versions.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_web.services.versions.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.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 + */ + testIamPermissions( + params?: + Params$Resource$Projects$Iap_web$Services$Versions$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: + Params$Resource$Projects$Iap_web$Services$Versions$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: + Params$Resource$Projects$Iap_web$Services$Versions$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_web$Services$Versions$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_web$Services$Versions$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_web$Services$Versions$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_web$Services$Versions$Getiampolicy + 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 requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_web$Services$Versions$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$Iap_web$Services$Versions$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; + } +} diff --git a/src/apis/iap/v1beta1.ts b/src/apis/iap/v1beta1.ts index 448896928ec..39b8f68653e 100644 --- a/src/apis/iap/v1beta1.ts +++ b/src/apis/iap/v1beta1.ts @@ -107,61 +107,6 @@ export namespace iap_v1beta1 { } } - /** - * Specifies the audit configuration for a service. The configuration - * determines which permission types are logged, and what identities, if any, - * are exempted from logging. An AuditConfig must have one or more - * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a - * specific service, the union of the two AuditConfigs is used for that - * service: the log_types specified in each AuditConfig are enabled, and the - * exempted_members in each AuditLogConfig are exempted. Example Policy with - * multiple AuditConfigs: { "audit_configs": [ { - * "service": "allServices" "audit_log_configs": - * [ { "log_type": "DATA_READ", - * "exempted_members": [ "user:foo@gmail.com" ] }, { - * "log_type": "DATA_WRITE", }, { - * "log_type": "ADMIN_READ", } ] }, - * { "service": "fooservice.googleapis.com" - * "audit_log_configs": [ { "log_type": - * "DATA_READ", }, { "log_type": - * "DATA_WRITE", "exempted_members": [ - * "user:bar@gmail.com" ] } ] } - * ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and - * ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, - * and bar@gmail.com from DATA_WRITE logging. - */ - export interface Schema$AuditConfig { - /** - * The configuration for logging of each type of permission. - */ - auditLogConfigs?: Schema$AuditLogConfig[]; - /** - * Specifies a service that will be enabled for audit logging. For example, - * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a - * special value that covers all services. - */ - service?: string; - } - /** - * Provides the configuration for logging a type of permissions. Example: { - * "audit_log_configs": [ { "log_type": - * "DATA_READ", "exempted_members": [ - * "user:foo@gmail.com" ] }, { - * "log_type": "DATA_WRITE", } ] } This - * enables 'DATA_READ' and 'DATA_WRITE' logging, while - * exempting foo@gmail.com from DATA_READ logging. - */ - export interface Schema$AuditLogConfig { - /** - * Specifies the identities that do not cause logging for this type of - * permission. Follows the same format of Binding.members. - */ - exemptedMembers?: string[]; - /** - * The log type that this config enables. - */ - logType?: string; - } /** * Associates `members` with a `role`. */ @@ -249,10 +194,6 @@ export namespace iap_v1beta1 { * developer's guide](https://cloud.google.com/iam/docs). */ export interface Schema$Policy { - /** - * Specifies cloud audit logging configuration for this policy. - */ - auditConfigs?: Schema$AuditConfig[]; /** * Associates a list of `members` to a `role`. `bindings` with no members * will result in an error. @@ -286,13 +227,6 @@ export namespace iap_v1beta1 { * 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; } /** * Request message for `TestIamPermissions` method. diff --git a/src/apis/index.ts b/src/apis/index.ts index f51e572afd0..f6756eaa575 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -34,6 +34,7 @@ import * as appsactivity from './appsactivity'; import * as appstate from './appstate'; import * as bigquery from './bigquery'; import * as bigquerydatatransfer from './bigquerydatatransfer'; +import * as bigtableadmin from './bigtableadmin'; import * as binaryauthorization from './binaryauthorization'; import * as blogger from './blogger'; import * as books from './books'; @@ -47,6 +48,7 @@ import * as cloudbuild from './cloudbuild'; import * as clouddebugger from './clouddebugger'; import * as clouderrorreporting from './clouderrorreporting'; import * as cloudfunctions from './cloudfunctions'; +import * as cloudidentity from './cloudidentity'; import * as cloudiot from './cloudiot'; import * as cloudkms from './cloudkms'; import * as cloudprofiler from './cloudprofiler'; @@ -59,6 +61,7 @@ import * as cloudtrace from './cloudtrace'; import * as composer from './composer'; import * as compute from './compute'; import * as container from './container'; +import * as containeranalysis from './containeranalysis'; import * as content from './content'; import * as customsearch from './customsearch'; import * as dataflow from './dataflow'; @@ -97,6 +100,7 @@ import * as indexing from './indexing'; import * as jobs from './jobs'; import * as kgsearch from './kgsearch'; import * as language from './language'; +import * as libraryagent from './libraryagent'; import * as licensing from './licensing'; import * as logging from './logging'; import * as manufacturers from './manufacturers'; @@ -114,8 +118,8 @@ import * as poly from './poly'; import * as proximitybeacon from './proximitybeacon'; import * as pubsub from './pubsub'; import * as redis from './redis'; +import * as remotebuildexecution from './remotebuildexecution'; import * as replicapool from './replicapool'; -import * as replicapoolupdater from './replicapoolupdater'; import * as reseller from './reseller'; import * as runtimeconfig from './runtimeconfig'; import * as safebrowsing from './safebrowsing'; @@ -183,6 +187,7 @@ export const APIS: APIList = { appstate: appstate.VERSIONS, bigquery: bigquery.VERSIONS, bigquerydatatransfer: bigquerydatatransfer.VERSIONS, + bigtableadmin: bigtableadmin.VERSIONS, binaryauthorization: binaryauthorization.VERSIONS, blogger: blogger.VERSIONS, books: books.VERSIONS, @@ -196,6 +201,7 @@ export const APIS: APIList = { clouddebugger: clouddebugger.VERSIONS, clouderrorreporting: clouderrorreporting.VERSIONS, cloudfunctions: cloudfunctions.VERSIONS, + cloudidentity: cloudidentity.VERSIONS, cloudiot: cloudiot.VERSIONS, cloudkms: cloudkms.VERSIONS, cloudprofiler: cloudprofiler.VERSIONS, @@ -208,6 +214,7 @@ export const APIS: APIList = { composer: composer.VERSIONS, compute: compute.VERSIONS, container: container.VERSIONS, + containeranalysis: containeranalysis.VERSIONS, content: content.VERSIONS, customsearch: customsearch.VERSIONS, dataflow: dataflow.VERSIONS, @@ -246,6 +253,7 @@ export const APIS: APIList = { jobs: jobs.VERSIONS, kgsearch: kgsearch.VERSIONS, language: language.VERSIONS, + libraryagent: libraryagent.VERSIONS, licensing: licensing.VERSIONS, logging: logging.VERSIONS, manufacturers: manufacturers.VERSIONS, @@ -263,8 +271,8 @@ export const APIS: APIList = { proximitybeacon: proximitybeacon.VERSIONS, pubsub: pubsub.VERSIONS, redis: redis.VERSIONS, + remotebuildexecution: remotebuildexecution.VERSIONS, replicapool: replicapool.VERSIONS, - replicapoolupdater: replicapoolupdater.VERSIONS, reseller: reseller.VERSIONS, runtimeconfig: runtimeconfig.VERSIONS, safebrowsing: safebrowsing.VERSIONS, @@ -329,6 +337,7 @@ export class GeneratedAPIs { appstate = appstate.appstate; bigquery = bigquery.bigquery; bigquerydatatransfer = bigquerydatatransfer.bigquerydatatransfer; + bigtableadmin = bigtableadmin.bigtableadmin; binaryauthorization = binaryauthorization.binaryauthorization; blogger = blogger.blogger; books = books.books; @@ -342,6 +351,7 @@ export class GeneratedAPIs { clouddebugger = clouddebugger.clouddebugger; clouderrorreporting = clouderrorreporting.clouderrorreporting; cloudfunctions = cloudfunctions.cloudfunctions; + cloudidentity = cloudidentity.cloudidentity; cloudiot = cloudiot.cloudiot; cloudkms = cloudkms.cloudkms; cloudprofiler = cloudprofiler.cloudprofiler; @@ -354,6 +364,7 @@ export class GeneratedAPIs { composer = composer.composer; compute = compute.compute; container = container.container; + containeranalysis = containeranalysis.containeranalysis; content = content.content; customsearch = customsearch.customsearch; dataflow = dataflow.dataflow; @@ -392,6 +403,7 @@ export class GeneratedAPIs { jobs = jobs.jobs; kgsearch = kgsearch.kgsearch; language = language.language; + libraryagent = libraryagent.libraryagent; licensing = licensing.licensing; logging = logging.logging; manufacturers = manufacturers.manufacturers; @@ -409,8 +421,8 @@ export class GeneratedAPIs { proximitybeacon = proximitybeacon.proximitybeacon; pubsub = pubsub.pubsub; redis = redis.redis; + remotebuildexecution = remotebuildexecution.remotebuildexecution; replicapool = replicapool.replicapool; - replicapoolupdater = replicapoolupdater.replicapoolupdater; reseller = reseller.reseller; runtimeconfig = runtimeconfig.runtimeconfig; safebrowsing = safebrowsing.safebrowsing; diff --git a/src/apis/jobs/v3.ts b/src/apis/jobs/v3.ts index 067f3fc3dbb..263802ee3e0 100644 --- a/src/apis/jobs/v3.ts +++ b/src/apis/jobs/v3.ts @@ -1444,6 +1444,16 @@ export namespace jobs_v3 { * match improves recall of subsequent search requests. Defaults to false. */ disableKeywordMatch?: boolean; + /** + * Optional. Controls whether highly similar jobs are returned next to each + * other in the search results. Jobs are identified as highly similar based + * on their titles, job categories, and locations. Highly similar results + * are clustered so that only one representative job of the cluster is + * displayed to the job seeker higher up in the results, with the other jobs + * being displayed lower down in the results. Defaults to + * DiversificationLevel.SIMPLE if no value is specified. + */ + diversificationLevel?: string; /** * Optional. Controls whether to broaden the search when it produces sparse * results. Broadened queries append results to the end of the matching diff --git a/src/apis/libraryagent/README.md b/src/apis/libraryagent/README.md new file mode 100644 index 00000000000..d5a63878b7b --- /dev/null +++ b/src/apis/libraryagent/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/libraryagent + +> A simple Google Example Library API. + +## Installation + +```sh +$ npm install @google/libraryagent +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/google/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/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/libraryagent/index.ts b/src/apis/libraryagent/index.ts new file mode 100644 index 00000000000..d3967658d63 --- /dev/null +++ b/src/apis/libraryagent/index.ts @@ -0,0 +1,29 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {libraryagent_v1} from './v1'; + +export const VERSIONS = { + 'v1': libraryagent_v1.Libraryagent, +}; + +export function libraryagent(version: 'v1'): libraryagent_v1.Libraryagent; +export function libraryagent(options: libraryagent_v1.Options): + libraryagent_v1.Libraryagent; +export function libraryagent( + this: GoogleConfigurable, versionOrOptions: 'v1'|libraryagent_v1.Options) { + return getAPI('libraryagent', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/libraryagent/package.json b/src/apis/libraryagent/package.json new file mode 100644 index 00000000000..8e03a320a2a --- /dev/null +++ b/src/apis/libraryagent/package.json @@ -0,0 +1,36 @@ +{ + "name": "@google/libraryagent", + "version": "0.1.0", + "description": "libraryagent", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/" + }, + "dependencies": { + "googleapis-common": "^0.4.0" + }, + "devDependencies": { + "gts": "^0.9.0", + "typescript": "~3.2.0", + "typedoc": "^0.14.0" + } +} diff --git a/src/apis/libraryagent/tsconfig.json b/src/apis/libraryagent/tsconfig.json new file mode 100644 index 00000000000..e0810904968 --- /dev/null +++ b/src/apis/libraryagent/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/libraryagent/v1.ts b/src/apis/libraryagent/v1.ts new file mode 100644 index 00000000000..efd068230c9 --- /dev/null +++ b/src/apis/libraryagent/v1.ts @@ -0,0 +1,725 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace libraryagent_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + let context: APIRequestContext; + + 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; + } + + /** + * Library Agent API + * + * A simple Google Example Library API. + * + * @example + * const {google} = require('googleapis'); + * const libraryagent = google.libraryagent('v1'); + * + * @namespace libraryagent + * @type {Function} + * @version v1 + * @variation v1 + * @param {object=} options Options for Libraryagent + */ + export class Libraryagent { + shelves: Resource$Shelves; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.shelves = new Resource$Shelves(); + } + } + + /** + * A single book in the library. + */ + export interface Schema$GoogleExampleLibraryagentV1Book { + /** + * The name of the book author. + */ + author?: string; + /** + * The resource name of the book. Book names have the form + * `shelves/{shelf_id}/books/{book_id}`. The name is ignored when creating a + * book. + */ + name?: string; + /** + * Value indicating whether the book has been read. + */ + read?: boolean; + /** + * The title of the book. + */ + title?: string; + } + /** + * Response message for LibraryAgent.ListBooks. + */ + export interface Schema$GoogleExampleLibraryagentV1ListBooksResponse { + /** + * The list of books. + */ + books?: Schema$GoogleExampleLibraryagentV1Book[]; + /** + * A token to retrieve next page of results. Pass this value in the + * ListBooksRequest.page_token field in the subsequent call to `ListBooks` + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + /** + * Response message for LibraryAgent.ListShelves. + */ + export interface Schema$GoogleExampleLibraryagentV1ListShelvesResponse { + /** + * A token to retrieve next page of results. Pass this value in the + * ListShelvesRequest.page_token field in the subsequent call to + * `ListShelves` method to retrieve the next page of results. + */ + nextPageToken?: string; + /** + * The list of shelves. + */ + shelves?: Schema$GoogleExampleLibraryagentV1Shelf[]; + } + /** + * A Shelf contains a collection of books with a theme. + */ + export interface Schema$GoogleExampleLibraryagentV1Shelf { + /** + * Output only. The resource name of the shelf. Shelf names have the form + * `shelves/{shelf_id}`. The name is ignored when creating a shelf. + */ + name?: string; + /** + * The theme of the shelf + */ + theme?: string; + } + + + export class Resource$Shelves { + books: Resource$Shelves$Books; + constructor() { + this.books = new Resource$Shelves$Books(); + } + + + /** + * libraryagent.shelves.get + * @desc Gets a shelf. Returns NOT_FOUND if the shelf does not exist. + * @alias libraryagent.shelves.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the shelf to retrieve. + * @param {object} [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$Shelves$Get, options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Shelves$Get, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + get(params: Params$Resource$Shelves$Get, + callback: + BodyResponseCallback): + void; + get(callback: + BodyResponseCallback): + void; + get(paramsOrCallback?: Params$Resource$Shelves$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Shelves$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shelves$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://libraryagent.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * libraryagent.shelves.list + * @desc Lists shelves. The order is unspecified but deterministic. Newly + * created shelves will not necessarily be added to the end of this list. + * @alias libraryagent.shelves.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Requested page size. Server may return fewer shelves than requested. If unspecified, server will pick an appropriate default. + * @param {string=} params.pageToken A token identifying a page of results the server should return. Typically, this is the value of ListShelvesResponse.next_page_token returned from the previous call to `ListShelves` 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 + */ + list(params?: Params$Resource$Shelves$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Shelves$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>, + callback: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>): void; + list( + params: Params$Resource$Shelves$List, + callback: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>): void; + list( + paramsOrCallback?: Params$Resource$Shelves$List|BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>, + callback?: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Shelves$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shelves$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://libraryagent.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/shelves').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleExampleLibraryagentV1ListShelvesResponse>(parameters); + } + } + } + + export interface Params$Resource$Shelves$Get extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the shelf to retrieve. + */ + name?: string; + } + export interface Params$Resource$Shelves$List extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Requested page size. Server may return fewer shelves than requested. If + * unspecified, server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of ListShelvesResponse.next_page_token + * returned from the previous call to `ListShelves` method. + */ + pageToken?: string; + } + + export class Resource$Shelves$Books { + constructor() {} + + + /** + * libraryagent.shelves.books.borrow + * @desc Borrow a book from the library. Returns the book if it is borrowed + * successfully. Returns NOT_FOUND if the book does not exist in the + * library. Returns quota exceeded error if the amount of books borrowed + * exceeds allocation quota in any dimensions. + * @alias libraryagent.shelves.books.borrow + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the book to borrow. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + borrow( + params?: Params$Resource$Shelves$Books$Borrow, options?: MethodOptions): + AxiosPromise; + borrow( + params: Params$Resource$Shelves$Books$Borrow, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + borrow( + params: Params$Resource$Shelves$Books$Borrow, + callback: BodyResponseCallback): + void; + borrow(callback: + BodyResponseCallback): + void; + borrow( + paramsOrCallback?: Params$Resource$Shelves$Books$Borrow| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Shelves$Books$Borrow; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shelves$Books$Borrow; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://libraryagent.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:borrow') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * libraryagent.shelves.books.get + * @desc Gets a book. Returns NOT_FOUND if the book does not exist. + * @alias libraryagent.shelves.books.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the book to retrieve. + * @param {object} [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$Shelves$Books$Get, options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Shelves$Books$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + get(params: Params$Resource$Shelves$Books$Get, + callback: BodyResponseCallback): + void; + get(callback: BodyResponseCallback): + void; + get(paramsOrCallback?: Params$Resource$Shelves$Books$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Shelves$Books$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shelves$Books$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://libraryagent.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * libraryagent.shelves.books.list + * @desc Lists books in a shelf. The order is unspecified but deterministic. + * Newly created books will not necessarily be added to the end of this + * list. Returns NOT_FOUND if the shelf does not exist. + * @alias libraryagent.shelves.books.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Requested page size. Server may return fewer books than requested. If unspecified, server will pick an appropriate default. + * @param {string=} params.pageToken A token identifying a page of results the server should return. Typically, this is the value of ListBooksResponse.next_page_token. returned from the previous call to `ListBooks` method. + * @param {string} params.parent The name of the shelf whose books we'd like to list. + * @param {object} [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$Shelves$Books$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Shelves$Books$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>, + callback: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>): void; + list( + params: Params$Resource$Shelves$Books$List, + callback: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>): void; + list( + paramsOrCallback?: Params$Resource$Shelves$Books$List| + BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>, + callback?: BodyResponseCallback< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Shelves$Books$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shelves$Books$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://libraryagent.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/books') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleExampleLibraryagentV1ListBooksResponse>(parameters); + } + } + + + /** + * libraryagent.shelves.books.return + * @desc Return a book to the library. Returns the book if it is returned to + * the library successfully. Returns error if the book does not belong to + * the library or the users didn't borrow before. + * @alias libraryagent.shelves.books.return + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the book to return. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + return( + params?: Params$Resource$Shelves$Books$Return, options?: MethodOptions): + AxiosPromise; + return( + params: Params$Resource$Shelves$Books$Return, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + return( + params: Params$Resource$Shelves$Books$Return, + callback: BodyResponseCallback): + void; + return( + callback: BodyResponseCallback): + void; + return( + paramsOrCallback?: Params$Resource$Shelves$Books$Return| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): void| + AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Shelves$Books$Return; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Shelves$Books$Return; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://libraryagent.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:return') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Shelves$Books$Borrow extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the book to borrow. + */ + name?: string; + } + export interface Params$Resource$Shelves$Books$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the book to retrieve. + */ + name?: string; + } + export interface Params$Resource$Shelves$Books$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Requested page size. Server may return fewer books than requested. If + * unspecified, server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of ListBooksResponse.next_page_token. + * returned from the previous call to `ListBooks` method. + */ + pageToken?: string; + /** + * The name of the shelf whose books we'd like to list. + */ + parent?: string; + } + export interface Params$Resource$Shelves$Books$Return extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the book to return. + */ + name?: string; + } +} diff --git a/src/apis/logging/v2.ts b/src/apis/logging/v2.ts index c461f8422f2..afe11eb6c53 100644 --- a/src/apis/logging/v2.ts +++ b/src/apis/logging/v2.ts @@ -2606,8 +2606,9 @@ export namespace logging_v2 { /** * logging.entries.list - * @desc Lists log entries. Use this method to retrieve log entries from - * Logging. For ways to export log entries, see Exporting Logs. + * @desc Lists log entries. Use this method to retrieve log entries that + * originated from a project/folder/organization/billing account. For ways + * to export log entries, see Exporting Logs. * @alias logging.entries.list * @memberOf! () * diff --git a/src/apis/logging/v2beta1.ts b/src/apis/logging/v2beta1.ts index 5bf2e8e6487..507806182e6 100644 --- a/src/apis/logging/v2beta1.ts +++ b/src/apis/logging/v2beta1.ts @@ -1268,8 +1268,9 @@ export namespace logging_v2beta1 { /** * logging.entries.list - * @desc Lists log entries. Use this method to retrieve log entries from - * Logging. For ways to export log entries, see Exporting Logs. + * @desc Lists log entries. Use this method to retrieve log entries that + * originated from a project/folder/organization/billing account. For ways + * to export log entries, see Exporting Logs. * @example * * // BEFORE RUNNING: * // --------------- diff --git a/src/apis/ml/v1.ts b/src/apis/ml/v1.ts index df863b3a804..7c90e54a419 100644 --- a/src/apis/ml/v1.ts +++ b/src/apis/ml/v1.ts @@ -593,7 +593,7 @@ export namespace ml_v1 { type?: string; } /** - * Represents input parameters for a prediction job. Next field: 19 + * Represents input parameters for a prediction job. Next field: 20 */ export interface Schema$GoogleCloudMlV1__PredictionInput { /** @@ -644,8 +644,8 @@ export namespace ml_v1 { */ region?: string; /** - * Optional. The Google Cloud ML runtime version to use for this batch - * prediction. If not set, Google Cloud ML will pick the runtime version + * Optional. The Cloud ML Engine runtime version to use for this batch + * prediction. If not set, Cloud ML Engine will pick the runtime version * used during the CreateVersion request for this model version, or choose * the latest stable version when model version information is not available * such as when the model is specified by uri. @@ -820,7 +820,9 @@ export namespace ml_v1 { * Optional. The version of Python used in training. If not set, the default * version is '2.7'. Python '3.5' is available when * `runtime_version` is set to '1.4' and above. Python '2.7' - * works with all supported runtime versions. + * works with all supported <a + * href="/ml-engine/docs/runtime-version-list">runtime + * versions</a>. */ pythonVersion?: string; /** @@ -831,9 +833,13 @@ export namespace ml_v1 { */ region?: string; /** - * Optional. The Google Cloud ML runtime version to use for training. If - * not set, Google Cloud ML will choose a stable version, which is defined - * in the documentation of runtime version list. + * Optional. The Cloud ML Engine runtime version to use for training. If not + * set, Cloud ML Engine uses the default stable version, 1.0. For more + * information, see the <a + * href="/ml-engine/docs/runtime-version-list">runtime version + * list</a> and <a + * href="/ml-engine/docs/versioning">how to manage runtime + * versions</a>. */ runtimeVersion?: string; /** @@ -988,8 +994,11 @@ export namespace ml_v1 { */ pythonVersion?: string; /** - * Optional. The Google Cloud ML runtime version to use for this deployment. - * If not set, Google Cloud ML will choose a version. + * Optional. The Cloud ML Engine runtime version to use for this deployment. + * If not set, Cloud ML Engine uses the default stable version, 1.0. For + * more information, see the [runtime version + * list](/ml-engine/docs/runtime-version-list) and [how to manage runtime + * versions](/ml-engine/docs/versioning). */ runtimeVersion?: string; /** diff --git a/src/apis/monitoring/v3.ts b/src/apis/monitoring/v3.ts index 435892a48b3..9d99aa47451 100644 --- a/src/apis/monitoring/v3.ts +++ b/src/apis/monitoring/v3.ts @@ -866,6 +866,10 @@ export namespace monitoring_v3 { * same as the workspace project. */ peerProjectId?: string; + /** + * The current operational state of the internal checker. + */ + state?: string; } /** * A description of a label. diff --git a/src/apis/pagespeedonline/v5.ts b/src/apis/pagespeedonline/v5.ts index 5c33f8833ec..e0e4db692f4 100644 --- a/src/apis/pagespeedonline/v5.ts +++ b/src/apis/pagespeedonline/v5.ts @@ -159,7 +159,13 @@ export namespace pagespeedonline_v5 { /** * Map of categories in the LHR. */ - categories?: {[key: string]: Schema$LighthouseCategoryV5;}; + categories?: { + accessibility?: Schema$LighthouseCategoryV5; + 'best-practices'?: Schema$LighthouseCategoryV5; + performance?: Schema$LighthouseCategoryV5; + pwa?: Schema$LighthouseCategoryV5; + seo?: Schema$LighthouseCategoryV5; + }; /** * Map of category groups in the LHR. */ diff --git a/src/apis/pubsub/v1.ts b/src/apis/pubsub/v1.ts index a5ce0440251..a93f9d8dbdd 100644 --- a/src/apis/pubsub/v1.ts +++ b/src/apis/pubsub/v1.ts @@ -315,9 +315,11 @@ export namespace pubsub_v1 { * The new ack deadline with respect to the time this request was sent to * the Pub/Sub system. For example, if the value is 10, the new ack deadline * will expire 10 seconds after the `ModifyAckDeadline` call was made. - * Specifying zero may immediately make the message available for another - * pull request. The minimum deadline you can specify is 0 seconds. The - * maximum deadline you can specify is 600 seconds (10 minutes). + * Specifying zero might immediately make the message available for delivery + * to another subscriber client. This typically results in an increase in + * the rate of message redeliveries (that is, duplicates). The minimum + * deadline you can specify is 0 seconds. The maximum deadline you can + * specify is 600 seconds (10 minutes). */ ackDeadlineSeconds?: number; /** diff --git a/src/apis/redis/v1.ts b/src/apis/redis/v1.ts index ae21b44d11c..2ea9ca42976 100644 --- a/src/apis/redis/v1.ts +++ b/src/apis/redis/v1.ts @@ -85,8 +85,7 @@ export namespace redis_v1 { /** * Google Cloud Memorystore for Redis API * - * The Google Cloud Memorystore for Redis API is used for creating and - * managing Redis instances on the Google Cloud Platform. + * Creates and manages Redis instances on the Google Cloud Platform. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/redis/v1beta1.ts b/src/apis/redis/v1beta1.ts index 6c187f6a866..4b09128f0a5 100644 --- a/src/apis/redis/v1beta1.ts +++ b/src/apis/redis/v1beta1.ts @@ -85,8 +85,7 @@ export namespace redis_v1beta1 { /** * Google Cloud Memorystore for Redis API * - * The Google Cloud Memorystore for Redis API is used for creating and - * managing Redis instances on the Google Cloud Platform. + * Creates and manages Redis instances on the Google Cloud Platform. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/remotebuildexecution/README.md b/src/apis/remotebuildexecution/README.md new file mode 100644 index 00000000000..3354950c701 --- /dev/null +++ b/src/apis/remotebuildexecution/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/remotebuildexecution + +> Supplies a Remote Execution API service for tools such as bazel. + +## Installation + +```sh +$ npm install @google/remotebuildexecution +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/google/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/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/remotebuildexecution/index.ts b/src/apis/remotebuildexecution/index.ts new file mode 100644 index 00000000000..517bd4282ef --- /dev/null +++ b/src/apis/remotebuildexecution/index.ts @@ -0,0 +1,49 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {remotebuildexecution_v1} from './v1'; +import {remotebuildexecution_v1alpha} from './v1alpha'; +import {remotebuildexecution_v2} from './v2'; + +export const VERSIONS = { + 'v1': remotebuildexecution_v1.Remotebuildexecution, + 'v1alpha': remotebuildexecution_v1alpha.Remotebuildexecution, + 'v2': remotebuildexecution_v2.Remotebuildexecution, +}; + +export function remotebuildexecution(version: 'v1'): + remotebuildexecution_v1.Remotebuildexecution; +export function remotebuildexecution(options: remotebuildexecution_v1.Options): + remotebuildexecution_v1.Remotebuildexecution; +export function remotebuildexecution(version: 'v1alpha'): + remotebuildexecution_v1alpha.Remotebuildexecution; +export function remotebuildexecution( + options: remotebuildexecution_v1alpha.Options): + remotebuildexecution_v1alpha.Remotebuildexecution; +export function remotebuildexecution(version: 'v2'): + remotebuildexecution_v2.Remotebuildexecution; +export function remotebuildexecution(options: remotebuildexecution_v2.Options): + remotebuildexecution_v2.Remotebuildexecution; +export function remotebuildexecution< + T = remotebuildexecution_v1.Remotebuildexecution | + remotebuildexecution_v1alpha.Remotebuildexecution | + remotebuildexecution_v2.Remotebuildexecution>( + this: GoogleConfigurable, + versionOrOptions: 'v1'| + remotebuildexecution_v1.Options|'v1alpha'| + remotebuildexecution_v1alpha.Options|'v2'|remotebuildexecution_v2.Options) { + return getAPI('remotebuildexecution', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/remotebuildexecution/package.json b/src/apis/remotebuildexecution/package.json new file mode 100644 index 00000000000..5684e1c39e7 --- /dev/null +++ b/src/apis/remotebuildexecution/package.json @@ -0,0 +1,36 @@ +{ + "name": "@google/remotebuildexecution", + "version": "0.1.0", + "description": "remotebuildexecution", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/" + }, + "dependencies": { + "googleapis-common": "^0.4.0" + }, + "devDependencies": { + "gts": "^0.9.0", + "typescript": "~3.2.0", + "typedoc": "^0.14.0" + } +} diff --git a/src/apis/remotebuildexecution/tsconfig.json b/src/apis/remotebuildexecution/tsconfig.json new file mode 100644 index 00000000000..e0810904968 --- /dev/null +++ b/src/apis/remotebuildexecution/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/remotebuildexecution/v1.ts b/src/apis/remotebuildexecution/v1.ts new file mode 100644 index 00000000000..609e621e074 --- /dev/null +++ b/src/apis/remotebuildexecution/v1.ts @@ -0,0 +1,2660 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace remotebuildexecution_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + let context: APIRequestContext; + + 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; + } + + /** + * Remote Build Execution API + * + * Supplies a Remote Execution API service for tools such as bazel. + * + * @example + * const {google} = require('googleapis'); + * const remotebuildexecution = google.remotebuildexecution('v1'); + * + * @namespace remotebuildexecution + * @type {Function} + * @version v1 + * @variation v1 + * @param {object=} options Options for Remotebuildexecution + */ + export class Remotebuildexecution { + media: Resource$Media; + operations: Resource$Operations; + projects: Resource$Projects; + v1: Resource$V1; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.media = new Resource$Media(); + this.operations = new Resource$Operations(); + this.projects = new Resource$Projects(); + this.v1 = new Resource$V1(); + } + } + + /** + * An `Action` captures all the information about an execution which is + * required to reproduce it. `Action`s are the core component of the + * [Execution] service. A single `Action` represents a repeatable action that + * can be performed by the execution service. `Action`s can be succinctly + * identified by the digest of their wire format encoding and, once an + * `Action` has been executed, will be cached in the action cache. Future + * requests can then use the cached result rather than needing to run afresh. + * When a server completes execution of an Action, it MAY choose to cache the + * result in the ActionCache unless `do_not_cache` is `true`. Clients SHOULD + * expect the server to do so. By default, future calls to Execute the same + * `Action` will also serve their results from the cache. Clients must take + * care to understand the caching behaviour. Ideally, all `Action`s will be + * reproducible so that serving a result from cache is always desirable and + * correct. + */ + export interface Schema$BuildBazelRemoteExecutionV2Action { + /** + * The digest of the Command to run, which MUST be present in the + * ContentAddressableStorage. + */ + commandDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * If true, then the `Action`'s result cannot be cached. + */ + doNotCache?: boolean; + /** + * 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; + /** + * 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. + */ + timeout?: string; + } + /** + * An ActionResult represents the result of an Action being run. + */ + export interface Schema$BuildBazelRemoteExecutionV2ActionResult { + /** + * The details of the execution that originally produced this result. + */ + executionMetadata?: + Schema$BuildBazelRemoteExecutionV2ExecutedActionMetadata; + /** + * The exit code of the command. + */ + exitCode?: number; + /** + * 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 } ] } } ``` + */ + 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 file 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 the action does not + * produce the requested output, or produces a file where a directory is + * expected or vice versa, 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. + */ + 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 in the output_file_symlinks field, if the file was a symbolic + * link to another file. If the action does not produce the requested + * output, or produces a directory where a regular file is expected or vice + * versa, 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 the action does not produce the requested output, or produces a + * directory where a regular file is expected or vice versa, 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. + */ + outputFileSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; + /** + * The digest for a blob containing the standard error of the action, which + * can be retrieved from the ContentAddressableStorage. See `stderr_raw` for + * when this will be set. + */ + stderrDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The standard error buffer of the action. The server will determine, based + * on the size of the buffer, whether to return it in raw form or to return + * a digest in `stderr_digest` that points to the buffer. If neither is set, + * then the buffer is empty. The client SHOULD NOT assume it will get one of + * the raw buffer or a digest on any given request and should be prepared to + * handle either. + */ + stderrRaw?: string; + /** + * The digest for a blob containing the standard output of the action, which + * can be retrieved from the ContentAddressableStorage. See `stdout_raw` for + * when this will be set. + */ + stdoutDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The standard output buffer of the action. The server will determine, + * based on the size of the buffer, whether to return it in raw form or to + * return a digest in `stdout_digest` that points to the buffer. If neither + * is set, then the buffer is empty. The client SHOULD NOT assume it will + * get one of the raw buffer or a digest on any given request and should be + * prepared to handle either. + */ + stdoutRaw?: string; + } + /** + * A `Command` is the actual command executed by a worker running an Action + * and specifications of its environment. Except as otherwise required, the + * environment (such as which system libraries or binaries are available, and + * what filesystems are mounted where) is defined by and specific to the + * implementation of the remote execution API. + */ + export interface Schema$BuildBazelRemoteExecutionV2Command { + /** + * The arguments to the command. The first argument must be the path to the + * executable, which must be either a relative path, in which case it is + * evaluated with respect to the input root, or an absolute path. + */ + arguments?: string[]; + /** + * The environment variables to set when running the program. The worker may + * provide its own default environment variables; these defaults can be + * overridden using this field. Additional variables can also be specified. + * In order to ensure that equivalent `Command`s always hash to the same + * value, the environment variables MUST be lexicographically sorted by + * name. Sorting of strings is done by code point, equivalently, by the + * UTF-8 bytes. + */ + environmentVariables?: + Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]; + /** + * A list of the output directories that the client expects to retrieve from + * the action. Only the contents of the indicated directories (recursively + * including the contents of their subdirectories) will be returned, as well + * as files listed in `output_files`. Other files 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, be a parent of another + * output directory, be a parent of a listed output file, or have the same + * path as any of the listed output files. + */ + outputDirectories?: string[]; + /** + * 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 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, be a child of a listed + * output directory, or have the same path as any of the listed output + * directories. + */ + outputFiles?: string[]; + /** + * 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. + */ + platform?: Schema$BuildBazelRemoteExecutionV2Platform; + /** + * The working directory, relative to the input root, for the command to run + * in. It must be a directory which exists in the input tree. If it is left + * empty, then the action is run in the input root. + */ + workingDirectory?: string; + } + /** + * An `EnvironmentVariable` is one variable to set in the running + * program's environment. + */ + export interface Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable { + /** + * The variable name. + */ + name?: string; + /** + * The variable value. + */ + value?: string; + } + /** + * 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. + */ + export interface Schema$BuildBazelRemoteExecutionV2Digest { + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + /** + * 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). - 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 + * } ] } ``` + */ + export interface Schema$BuildBazelRemoteExecutionV2Directory { + /** + * The subdirectories in the directory. + */ + directories?: Schema$BuildBazelRemoteExecutionV2DirectoryNode[]; + /** + * The files in the directory. + */ + files?: Schema$BuildBazelRemoteExecutionV2FileNode[]; + /** + * The symlinks in the directory. + */ + symlinks?: Schema$BuildBazelRemoteExecutionV2SymlinkNode[]; + } + /** + * A `DirectoryNode` represents a child of a Directory which is itself a + * `Directory` and its associated metadata. + */ + export interface Schema$BuildBazelRemoteExecutionV2DirectoryNode { + /** + * The digest of the Directory object represented. See Digest for + * information about how to take the digest of a proto message. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The name of the directory. + */ + name?: string; + } + /** + * ExecutedActionMetadata contains details about a completed execution. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecutedActionMetadata { + /** + * When the worker completed executing the action command. + */ + executionCompletedTimestamp?: string; + /** + * When the worker started executing the action command. + */ + executionStartTimestamp?: string; + /** + * When the worker finished fetching action inputs. + */ + inputFetchCompletedTimestamp?: string; + /** + * When the worker started fetching action inputs. + */ + inputFetchStartTimestamp?: string; + /** + * When the worker finished uploading action outputs. + */ + outputUploadCompletedTimestamp?: string; + /** + * When the worker started uploading action outputs. + */ + outputUploadStartTimestamp?: string; + /** + * When was the action added to the queue. + */ + queuedTimestamp?: string; + /** + * The name of the worker which ran the execution. + */ + worker?: string; + /** + * When the worker completed the action, including all stages. + */ + workerCompletedTimestamp?: string; + /** + * When the worker received the action. + */ + workerStartTimestamp?: string; + } + /** + * Metadata about an ongoing execution, which will be contained in the + * metadata field of the Operation. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecuteOperationMetadata { + /** + * The digest of the Action being executed. + */ + actionDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + stage?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard error. + */ + stderrStreamName?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard output. + */ + stdoutStreamName?: string; + } + /** + * The response message for Execution.Execute, which will be contained in the + * response field of the Operation. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecuteResponse { + /** + * True if the result was served from cache, false if it was executed. + */ + cachedResult?: boolean; + /** + * The result of the action. + */ + result?: Schema$BuildBazelRemoteExecutionV2ActionResult; + /** + * An optional list of additional log outputs the server wishes to provide. + * A server can use this to return execution-specific logs however it + * wishes. This is intended primarily to make it easier for users to debug + * issues that may be outside of the actual job execution, such as by + * identifying the worker executing the action or by providing logs from the + * worker's setup phase. The keys SHOULD be human readable so that a + * client can display them to a user. + */ + serverLogs?: {[key: string]: Schema$BuildBazelRemoteExecutionV2LogFile;}; + /** + * If the status has a code other than `OK`, it indicates that the action + * did not finish execution. For example, if the operation times out during + * execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST + * use this field for errors in execution, rather than the error field on + * the `Operation` object. If the status code is other than `OK`, then the + * result MUST NOT be cached. For an error status, the `result` field is + * optional; the server may populate the output-, stdout-, and + * stderr-related fields if it has any information available, such as the + * stdout and stderr of a timed-out action. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * A `FileNode` represents a single file and associated metadata. + */ + export interface Schema$BuildBazelRemoteExecutionV2FileNode { + /** + * The digest of the file's content. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The name of the file. + */ + name?: string; + } + /** + * A `LogFile` is a log stored in the CAS. + */ + export interface Schema$BuildBazelRemoteExecutionV2LogFile { + /** + * The digest of the log contents. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * This is a hint as to the purpose of the log, and is set to true if the + * log is human-readable text that can be usefully displayed to a user, and + * false otherwise. For instance, if a command-line client wishes to print + * the server logs to the terminal for a failed action, this allows it to + * avoid displaying a binary file. + */ + humanReadable?: boolean; + } + /** + * An `OutputDirectory` is the output in an `ActionResult` corresponding to a + * directory's full contents rather than a single file. + */ + export interface Schema$BuildBazelRemoteExecutionV2OutputDirectory { + /** + * The full path of the directory relative to the working directory. The + * path separator is a forward slash `/`. Since this is a relative path, it + * MUST NOT begin with a leading forward slash. The empty string value is + * allowed, and it denotes the entire working directory. + */ + path?: string; + /** + * The digest of the encoded Tree proto containing the directory's + * contents. + */ + treeDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + } + /** + * An `OutputFile` is similar to a FileNode, but it is used as an output in an + * `ActionResult`. It allows a full file path rather than only a name. + * `OutputFile` is binary-compatible with `FileNode`. + */ + export interface Schema$BuildBazelRemoteExecutionV2OutputFile { + /** + * The digest of the file's content. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * 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. + */ + path?: string; + } + /** + * 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 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. + */ + path?: string; + /** + * 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. + */ + target?: string; + } + /** + * A `Platform` is a set of requirements, such as hardware, operating system, + * or compiler toolchain, for an Action's execution environment. A + * `Platform` is represented as a series of key-value pairs representing the + * properties that are required of the platform. + */ + export interface Schema$BuildBazelRemoteExecutionV2Platform { + /** + * The properties that make up this platform. In order to ensure that + * equivalent `Platform`s always hash to the same value, the properties MUST + * be lexicographically sorted by name, and then by value. Sorting of + * strings is done by code point, equivalently, by the UTF-8 bytes. + */ + properties?: Schema$BuildBazelRemoteExecutionV2PlatformProperty[]; + } + /** + * A single property for the environment. The server is responsible for + * specifying the property `name`s that it accepts. If an unknown `name` is + * provided in the requirements for an Action, the server SHOULD reject the + * execution request. If permitted by the server, the same `name` may occur + * multiple times. The server is also responsible for specifying the + * interpretation of property `value`s. For instance, a property describing + * how much RAM must be available may be interpreted as allowing a worker with + * 16GB to fulfill a request for 8GB, while a property describing the OS + * environment on which the action must be performed may require an exact + * match with the worker's OS. The server MAY use the `value` of one or + * more properties to determine how it sets up the execution environment, such + * as by making specific system files available to the worker. + */ + export interface Schema$BuildBazelRemoteExecutionV2PlatformProperty { + /** + * The property name. + */ + name?: string; + /** + * The property value. + */ + value?: string; + } + /** + * An optional Metadata to attach to any RPC request to tell the server about + * an external context of the request. The server may use this for logging or + * other purposes. To use it, the client attaches the header to the call using + * the canonical proto serialization: name: + * build.bazel.remote.execution.v2.requestmetadata-bin contents: the base64 + * encoded binary RequestMetadata message. + */ + export interface Schema$BuildBazelRemoteExecutionV2RequestMetadata { + /** + * An identifier that ties multiple requests to the same action. For + * example, multiple requests to the CAS, Action Cache, and Execution API + * are used in order to compile foo.cc. + */ + actionId?: string; + /** + * An identifier to tie multiple tool invocations together. For example, + * runs of foo_test, bar_test and baz_test on a post-submit of a given + * patch. + */ + correlatedInvocationsId?: string; + /** + * The details for the tool invoking the requests. + */ + toolDetails?: Schema$BuildBazelRemoteExecutionV2ToolDetails; + /** + * An identifier that ties multiple actions together to a final result. For + * example, multiple actions are required to build and run foo_test. + */ + toolInvocationId?: string; + } + /** + * A `SymlinkNode` represents a symbolic link. + */ + export interface Schema$BuildBazelRemoteExecutionV2SymlinkNode { + /** + * The name of the symlink. + */ + name?: string; + /** + * 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. + */ + target?: string; + } + /** + * Details for the tool used to call the API. + */ + export interface Schema$BuildBazelRemoteExecutionV2ToolDetails { + /** + * Name of the tool, e.g. bazel. + */ + toolName?: string; + /** + * Version of the tool used for the request, e.g. 5.0.3. + */ + toolVersion?: string; + } + /** + * A `Tree` contains all the Directory protos in a single directory Merkle + * tree, compressed into one message. + */ + export interface Schema$BuildBazelRemoteExecutionV2Tree { + /** + * All the child directories: the directories referred to by the root and, + * recursively, all its children. In order to reconstruct the directory + * tree, the client must take the digests of each of the child directories + * and then build up a tree starting from the `root`. + */ + children?: Schema$BuildBazelRemoteExecutionV2Directory[]; + /** + * The root directory in the tree. + */ + root?: Schema$BuildBazelRemoteExecutionV2Directory; + } + /** + * Media resource. + */ + export interface Schema$GoogleBytestreamMedia { + /** + * Name of the media resource. + */ + resourceName?: string; + } + /** + * CommandDuration contains the various duration metrics tracked when a bot + * performs a command. + */ + export interface Schema$GoogleDevtoolsRemotebuildbotCommandDurations { + /** + * The time spent preparing the command to be run in a Docker container + * (includes pulling the Docker image, if necessary). + */ + dockerPrep?: string; + /** + * The time spent downloading the input files and constructing the working + * directory. + */ + download?: string; + /** + * The time spent executing the command (i.e., doing useful work). + */ + execution?: string; + /** + * The timestamp when preparation is done and bot starts downloading files. + */ + isoPrepDone?: string; + /** + * The time spent completing the command, in total. + */ + overall?: string; + /** + * The time spent uploading the stdout logs. + */ + stdout?: string; + /** + * The time spent uploading the output files. + */ + upload?: string; + } + /** + * CommandEvents contains counters for the number of warnings and errors that + * occurred during the execution of a command. + */ + export interface Schema$GoogleDevtoolsRemotebuildbotCommandEvents { + /** + * Indicates whether we are using a cached Docker image (true) or had to + * pull the Docker image (false) for this command. + */ + dockerCacheHit?: boolean; + /** + * The number of errors reported. + */ + numErrors?: string; + /** + * The number of warnings reported. + */ + numWarnings?: string; + } + /** + * The request used for `CreateInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest { + /** + * Specifies the instance to create. The name in the instance, if specified + * in the instance, is ignored. + */ + instance?: Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance; + /** + * ID of the created instance. A valid `instance_id` must: be 6-50 + * characters long, contains only lowercase letters, digits, hyphens and + * underscores, start with a lowercase letter, and end with a lowercase + * letter or a digit. + */ + instanceId?: string; + /** + * Resource name of the project containing the instance. Format: + * `projects/[PROJECT_ID]`. + */ + parent?: string; + } + /** + * The request used for `CreateWorkerPool`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest { + /** + * Resource name of the instance in which to create the new worker pool. + * Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + /** + * ID of the created worker pool. A valid pool ID must: be 6-50 characters + * long, contain only lowercase letters, digits, hyphens and underscores, + * start with a lowercase letter, and end with a lowercase letter or a + * digit. + */ + poolId?: string; + /** + * Specifies the worker pool to create. The name in the worker pool, if + * specified, is ignored. + */ + workerPool?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool; + } + /** + * The request used for `DeleteInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest { + /** + * Name of the instance to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + /** + * The request used for DeleteWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest { + /** + * Name of the worker pool to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + /** + * The request used for `GetInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest { + /** + * Name of the instance to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + /** + * The request used for GetWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest { + /** + * Name of the worker pool to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + /** + * Instance conceptually encapsulates all Remote Build Execution resources for + * remote builds. An instance consists of storage and compute resources (for + * example, `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used + * for running remote builds. All Remote Build Execution API calls are scoped + * to an instance. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance { + /** + * The location is a GCP region. Currently only `us-central1` is supported. + */ + location?: string; + /** + * Output only. Instance resource name formatted as: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be + * populated when creating an instance since it is provided in the + * `instance_id` field. + */ + name?: string; + /** + * Output only. State of the instance. + */ + state?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest { + /** + * Resource name of the project. Format: `projects/[PROJECT_ID]`. + */ + parent?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse { + /** + * The list of instances in a given project. + */ + instances?: Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance[]; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest { + /** + * Resource name of the instance. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse { + /** + * The list of worker pools in a given instance. + */ + workerPools?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool[]; + } + /** + * The request used for UpdateWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest { + /** + * The update mask applies to worker_pool. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If an empty update_mask is provided, only the non-default valued field in + * the worker pool field will be updated. Note that in order to update a + * field to the default value (zero, false, empty string) an explicit + * update_mask must be provided. + */ + updateMask?: string; + /** + * Specifies the worker pool to update. + */ + workerPool?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool; + } + /** + * Defines the configuration to be used for a creating workers in the worker + * pool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig { + /** + * Required. Size of the disk attached to the worker, in GB. See + * https://cloud.google.com/compute/docs/disks/ + */ + diskSizeGb?: string; + /** + * Required. Disk Type to use for the worker. See [Storage + * options](https://cloud.google.com/compute/docs/disks/#introduction). + * Currently only `pd-standard` is supported. + */ + diskType?: string; + /** + * Required. Machine type of the worker, such as n1-standard-2. See + * https://cloud.google.com/compute/docs/machine-types for a list of + * supported machine types. + */ + machineType?: string; + /** + * Minimum CPU platform to use when creating the worker. See [CPU + * Platforms](https://cloud.google.com/compute/docs/cpu-platforms). + */ + minCpuPlatform?: string; + /** + * Output only. `reserved=true` means the worker is reserved and won't + * be preempted. + */ + reserved?: boolean; + } + /** + * A worker pool resource in the Remote Build Execution API. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool { + /** + * WorkerPool resource name formatted as: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + * name should not be populated when creating a worker pool since it is + * provided in the `poolId` field. + */ + name?: string; + /** + * Output only. State of the worker pool. + */ + state?: string; + /** + * Specifies the properties, such as machine type and disk size, used for + * creating workers in a worker pool. + */ + workerConfig?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig; + /** + * The desired number of workers in the worker pool. Must be a value between + * 0 and 1000. + */ + workerCount?: string; + } + /** + * An ActionResult represents the result of an Action being run. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testActionResult { + /** + * The exit code of the command. + */ + exitCode?: number; + /** + * 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 } ] } } ``` + */ + outputDirectories?: + Schema$GoogleDevtoolsRemoteexecutionV1testOutputDirectory[]; + /** + * 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 in the output + * list. If the action does not produce the requested output, or produces a + * directory where a regular file is expected or vice versa, 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$GoogleDevtoolsRemoteexecutionV1testOutputFile[]; + /** + * The digest for a blob containing the standard error of the action, which + * can be retrieved from the ContentAddressableStorage. See `stderr_raw` for + * when this will be set. + */ + stderrDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The standard error buffer of the action. The server will determine, based + * on the size of the buffer, whether to return it in raw form or to return + * a digest in `stderr_digest` that points to the buffer. If neither is set, + * then the buffer is empty. The client SHOULD NOT assume it will get one of + * the raw buffer or a digest on any given request and should be prepared to + * handle either. + */ + stderrRaw?: string; + /** + * The digest for a blob containing the standard output of the action, which + * can be retrieved from the ContentAddressableStorage. See `stdout_raw` for + * when this will be set. + */ + stdoutDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The standard output buffer of the action. The server will determine, + * based on the size of the buffer, whether to return it in raw form or to + * return a digest in `stdout_digest` that points to the buffer. If neither + * is set, then the buffer is empty. The client SHOULD NOT assume it will + * get one of the raw buffer or a digest on any given request and should be + * prepared to handle either. + */ + stdoutRaw?: string; + } + /** + * A `Command` is the actual command executed by a worker running an Action. + * Except as otherwise required, the environment (such as which system + * libraries or binaries are available, and what filesystems are mounted + * where) is defined by and specific to the implementation of the remote + * execution API. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testCommand { + /** + * The arguments to the command. The first argument must be the path to the + * executable, which must be either a relative path, in which case it is + * evaluated with respect to the input root, or an absolute path. The + * working directory will always be the input root. + */ + arguments?: string[]; + /** + * The environment variables to set when running the program. The worker may + * provide its own default environment variables; these defaults can be + * overridden using this field. Additional variables can also be specified. + * In order to ensure that equivalent `Command`s always hash to the same + * value, the environment variables MUST be lexicographically sorted by + * name. Sorting of strings is done by code point, equivalently, by the + * UTF-8 bytes. + */ + environmentVariables?: + Schema$GoogleDevtoolsRemoteexecutionV1testCommandEnvironmentVariable[]; + } + /** + * An `EnvironmentVariable` is one variable to set in the running + * program's environment. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testCommandEnvironmentVariable { + /** + * The variable name. + */ + name?: string; + /** + * The variable value. + */ + value?: string; + } + /** + * 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. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDigest { + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + /** + * A `Directory` represents a directory node in a file tree, containing zero + * or more children FileNodes and DirectoryNodes. Each `Node` contains its + * name in the directory, the digest of its content (either a file blob or a + * `Directory` proto), 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). - The files and directories 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 } ] } ``` + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDirectory { + /** + * The subdirectories in the directory. + */ + directories?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectoryNode[]; + /** + * The files in the directory. + */ + files?: Schema$GoogleDevtoolsRemoteexecutionV1testFileNode[]; + } + /** + * A `DirectoryNode` represents a child of a Directory which is itself a + * `Directory` and its associated metadata. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDirectoryNode { + /** + * The digest of the Directory object represented. See Digest for + * information about how to take the digest of a proto message. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The name of the directory. + */ + name?: string; + } + /** + * Metadata about an ongoing execution, which will be contained in the + * metadata field of the Operation. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadata { + /** + * The digest of the Action being executed. + */ + actionDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + stage?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard error. + */ + stderrStreamName?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard output. + */ + stdoutStreamName?: string; + } + /** + * The response message for Execution.Execute, which will be contained in the + * response field of the Operation. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testExecuteResponse { + /** + * True if the result was served from cache, false if it was executed. + */ + cachedResult?: boolean; + /** + * The result of the action. + */ + result?: Schema$GoogleDevtoolsRemoteexecutionV1testActionResult; + /** + * An optional list of additional log outputs the server wishes to provide. + * A server can use this to return execution-specific logs however it + * wishes. This is intended primarily to make it easier for users to debug + * issues that may be outside of the actual job execution, such as by + * identifying the worker executing the action or by providing logs from the + * worker's setup phase. The keys SHOULD be human readable so that a + * client can display them to a user. + */ + serverLogs?: + {[key: string]: Schema$GoogleDevtoolsRemoteexecutionV1testLogFile;}; + /** + * If the status has a code other than `OK`, it indicates that the action + * did not finish execution. For example, if the operation times out during + * execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST + * use this field for errors in execution, rather than the error field on + * the `Operation` object. If the status code is other than `OK`, then the + * result MUST NOT be cached. For an error status, the `result` field is + * optional; the server may populate the output-, stdout-, and + * stderr-related fields if it has any information available, such as the + * stdout and stderr of a timed-out action. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * A `FileNode` represents a single file and associated metadata. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testFileNode { + /** + * The digest of the file's content. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The name of the file. + */ + name?: string; + } + /** + * A `LogFile` is a log stored in the CAS. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testLogFile { + /** + * The digest of the log contents. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * This is a hint as to the purpose of the log, and is set to true if the + * log is human-readable text that can be usefully displayed to a user, and + * false otherwise. For instance, if a command-line client wishes to print + * the server logs to the terminal for a failed action, this allows it to + * avoid displaying a binary file. + */ + humanReadable?: boolean; + } + /** + * An `OutputDirectory` is the output in an `ActionResult` corresponding to a + * directory's full contents rather than a single file. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testOutputDirectory { + /** + * DEPRECATED: This field is deprecated and should no longer be used. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The full path of the directory relative to the working directory. The + * path separator is a forward slash `/`. Since this is a relative path, it + * MUST NOT begin with a leading forward slash. The empty string value is + * allowed, and it denotes the entire working directory. + */ + path?: string; + /** + * The digest of the encoded Tree proto containing the directory's + * contents. + */ + treeDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + } + /** + * An `OutputFile` is similar to a FileNode, but it is tailored for output as + * part of an `ActionResult`. It allows a full file path rather than only a + * name, and allows the server to include content inline. `OutputFile` is + * binary-compatible with `FileNode`. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testOutputFile { + /** + * The raw content of the file. This field may be used by the server to + * provide the content of a file inline in an ActionResult and avoid + * requiring that the client make a separate call to + * [ContentAddressableStorage.GetBlob] to retrieve it. The client SHOULD + * NOT assume that it will get raw content with any request, and always be + * prepared to retrieve it via `digest`. + */ + content?: string; + /** + * The digest of the file's content. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The full path of the file relative to the input root, 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. + */ + path?: string; + } + /** + * An optional Metadata to attach to any RPC request to tell the server about + * an external context of the request. The server may use this for logging or + * other purposes. To use it, the client attaches the header to the call using + * the canonical proto serialization: name: + * google.devtools.remoteexecution.v1test.requestmetadata-bin contents: the + * base64 encoded binary RequestMetadata message. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testRequestMetadata { + /** + * An identifier that ties multiple requests to the same action. For + * example, multiple requests to the CAS, Action Cache, and Execution API + * are used in order to compile foo.cc. + */ + actionId?: string; + /** + * An identifier to tie multiple tool invocations together. For example, + * runs of foo_test, bar_test and baz_test on a post-submit of a given + * patch. + */ + correlatedInvocationsId?: string; + /** + * The details for the tool invoking the requests. + */ + toolDetails?: Schema$GoogleDevtoolsRemoteexecutionV1testToolDetails; + /** + * An identifier that ties multiple actions together to a final result. For + * example, multiple actions are required to build and run foo_test. + */ + toolInvocationId?: string; + } + /** + * Details for the tool used to call the API. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testToolDetails { + /** + * Name of the tool, e.g. bazel. + */ + toolName?: string; + /** + * Version of the tool used for the request, e.g. 5.0.3. + */ + toolVersion?: string; + } + /** + * A `Tree` contains all the Directory protos in a single directory Merkle + * tree, compressed into one message. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testTree { + /** + * All the child directories: the directories referred to by the root and, + * recursively, all its children. In order to reconstruct the directory + * tree, the client must take the digests of each of the child directories + * and then build up a tree starting from the `root`. + */ + children?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectory[]; + /** + * The root directory in the tree. + */ + root?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectory; + } + /** + * AdminTemp is a prelimiary set of administration tasks. It's called + * "Temp" because we do not yet know the best way to represent admin + * tasks; it's possible that this will be entirely replaced in later + * versions of this API. If this message proves to be sufficient, it will be + * renamed in the alpha or beta release of this API. This message (suitably + * marshalled into a protobuf.Any) can be used as the inline_assignment field + * in a lease; the lease assignment field should simply be `"admin"` + * in these cases. This message is heavily based on Swarming administration + * tasks from the LUCI project + * (http://github.com/luci/luci-py/appengine/swarming). + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2AdminTemp { + /** + * The argument to the admin action; see `Command` for semantics. + */ + arg?: string; + /** + * The admin action; see `Command` for legal values. + */ + command?: string; + } + /** + * Describes a blob of binary content with its digest. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Blob { + /** + * The contents of the blob. + */ + contents?: string; + /** + * The digest of the blob. This should be verified by the receiver. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + } + /** + * DEPRECATED - use CommandResult instead. Describes the actual outputs from + * the task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandOutputs { + /** + * exit_code is only fully reliable if the status' code is OK. If the + * task exceeded its deadline or was cancelled, the process may still + * produce an exit code as it is cancelled, and this will be populated, but + * a successful (zero) is unlikely to be correct unless the status code is + * OK. + */ + exitCode?: number; + /** + * The output files. The blob referenced by the digest should contain one of + * the following (implementation-dependent): * A marshalled + * DirectoryMetadata of the returned filesystem * A LUCI-style .isolated + * file + */ + outputs?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + } + /** + * DEPRECATED - use CommandResult instead. Can be used as part of + * CompleteRequest.metadata, or are part of a more sophisticated message. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandOverhead { + /** + * The elapsed time between calling Accept and Complete. The server will + * also have its own idea of what this should be, but this excludes the + * overhead of the RPCs and the bot response time. + */ + duration?: string; + /** + * The amount of time *not* spent executing the command (ie + * uploading/downloading files). + */ + overhead?: string; + } + /** + * All information about the execution of a command, suitable for providing as + * the Bots interface's `Lease.result` field. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandResult { + /** + * The elapsed time between calling Accept and Complete. The server will + * also have its own idea of what this should be, but this excludes the + * overhead of the RPCs and the bot response time. + */ + duration?: string; + /** + * The exit code of the process. An exit code of "0" should only + * be trusted if `status` has a code of OK (otherwise it may simply be + * unset). + */ + exitCode?: number; + /** + * The output files. The blob referenced by the digest should contain one of + * the following (implementation-dependent): * A marshalled + * DirectoryMetadata of the returned filesystem * A LUCI-style .isolated + * file + */ + outputs?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * The amount of time *not* spent executing the command (ie + * uploading/downloading files). + */ + overhead?: string; + /** + * Implementation-dependent statistics about the task. Both servers and bots + * may define messages which can be encoded here; bots are free to provide + * statistics in multiple formats, and servers are free to choose one or + * more of the values to process and ignore others. In particular, it is + * *not* considered an error for the bot to provide the server with a field + * that it doesn't know about. + */ + statistics?: Array<{[key: string]: any;}>; + /** + * An overall status for the command. For example, if the command timed out, + * this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS + * for memory exhaustion, it might have a code of RESOURCE_EXHAUSTED. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * Describes a shell-style task to execute, suitable for providing as the Bots + * interface's `Lease.payload` field. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTask { + /** + * The expected outputs from the task. + */ + expectedOutputs?: + Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs; + /** + * The inputs to the task. + */ + inputs?: Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs; + /** + * The timeouts of this task. + */ + timeouts?: Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts; + } + /** + * Describes the inputs to a shell-style task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs { + /** + * The command itself to run (e.g., argv). This field should be passed + * directly to the underlying operating system, and so it must be sensible + * to that operating system. For example, on Windows, the first argument + * might be "C:\Windows\System32\ping.exe" - that is, using drive + * letters and backslashes. A command for a *nix system, on the other hand, + * would use forward slashes. All other fields in the RWAPI must + * consistently use forward slashes, since those fields may be interpretted + * by both the service and the bot. + */ + arguments?: string[]; + /** + * All environment variables required by the task. + */ + environmentVariables?: + Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable[]; + /** + * The input filesystem to be set up prior to the task beginning. The + * contents should be a repeated set of FileMetadata messages though other + * formats are allowed if better for the implementation (eg, a LUCI-style + * .isolated file). This field is repeated since implementations might want + * to cache the metadata, in which case it may be useful to break up + * portions of the filesystem that change frequently (eg, specific input + * files) from those that don't (eg, standard header files). + */ + files?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest[]; + /** + * Inline contents for blobs expected to be needed by the bot to execute the + * task. For example, contents of entries in `files` or blobs that are + * indirectly referenced by an entry there. The bot should check against + * this list before downloading required task inputs to reduce the number of + * communications between itself and the remote CAS server. + */ + inlineBlobs?: Schema$GoogleDevtoolsRemoteworkersV1test2Blob[]; + } + /** + * An environment variable required by this task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable { + /** + * The envvar name. + */ + name?: string; + /** + * The envvar value. + */ + value?: string; + } + /** + * Describes the expected outputs of the command. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs { + /** + * A list of expected directories, relative to the execution root. All paths + * MUST be delimited by forward slashes. + */ + directories?: string[]; + /** + * A list of expected files, relative to the execution root. All paths MUST + * be delimited by forward slashes. + */ + files?: string[]; + /** + * The destination to which any stderr should be sent. The method by which + * the bot should send the stream contents to that destination is not + * defined in this API. As examples, the destination could be a file + * referenced in the `files` field in this message, or it could be a URI + * that must be written via the ByteStream API. + */ + stderrDestination?: string; + /** + * The destination to which any stdout should be sent. The method by which + * the bot should send the stream contents to that destination is not + * defined in this API. As examples, the destination could be a file + * referenced in the `files` field in this message, or it could be a URI + * that must be written via the ByteStream API. + */ + stdoutDestination?: string; + } + /** + * Describes the timeouts associated with this task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts { + /** + * This specifies the maximum time that the task can run, excluding the time + * required to download inputs or upload outputs. That is, the worker will + * terminate the task if it runs longer than this. + */ + execution?: string; + /** + * This specifies the maximum amount of time the task can be idle - that is, + * go without generating some output in either stdout or stderr. If the + * process is silent for more than the specified time, the worker will + * terminate the task. + */ + idle?: string; + /** + * If the execution or IO timeouts are exceeded, the worker will try to + * gracefully terminate the task and return any existing logs. However, + * tasks may be hard-frozen in which case this process will fail. This + * timeout specifies how long to wait for a terminated task to shut down + * gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g. + * SIGKILL on *nix, CTRL_BREAK_EVENT on Windows). + */ + shutdown?: string; + } + /** + * The CommandTask and CommandResult messages assume the existence of a + * service that can serve blobs of content, identified by a hash and size + * known as a "digest." The method by which these blobs may be + * retrieved is not specified here, but a model implementation is in the + * Remote Execution API's "ContentAddressibleStorage" interface. + * In the context of the RWAPI, a Digest will virtually always refer to the + * contents of a file or a directory. The latter is represented by the + * byte-encoded Directory message. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Digest { + /** + * A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, + * 0x2b, 0x3c]) using an implementation-defined hash algorithm (eg SHA-256). + */ + hash?: string; + /** + * The size of the contents. While this is not strictly required as part of + * an identifier (after all, any given hash will have exactly one canonical + * size), it's useful in almost all cases when one might want to send or + * retrieve blobs of content and is included here for this reason. + */ + sizeBytes?: string; + } + /** + * The contents of a directory. Similar to the equivalent message in the + * Remote Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Directory { + /** + * Any subdirectories + */ + directories?: Schema$GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata[]; + /** + * The files in this directory + */ + files?: Schema$GoogleDevtoolsRemoteworkersV1test2FileMetadata[]; + } + /** + * The metadata for a directory. Similar to the equivalent message in the + * Remote Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata { + /** + * A pointer to the contents of the directory, in the form of a marshalled + * Directory message. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * The path of the directory, as in FileMetadata.path. + */ + path?: string; + } + /** + * The metadata for a file. Similar to the equivalent message in the Remote + * Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2FileMetadata { + /** + * If the file is small enough, its contents may also or alternatively be + * listed here. + */ + contents?: string; + /** + * A pointer to the contents of the file. The method by which a client + * retrieves the contents from a CAS system is not defined here. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * Properties of the file + */ + isExecutable?: boolean; + /** + * The path of this file. If this message is part of the + * CommandOutputs.outputs fields, the path is relative to the execution root + * and must correspond to an entry in CommandTask.outputs.files. If this + * message is part of a Directory message, then the path is relative to the + * root of that directory. All paths MUST be delimited by forward slashes. + */ + path?: string; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$GoogleLongrunningCancelOperationRequest {} + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$GoogleLongrunningListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string; + /** + * 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. + */ + export interface Schema$GoogleLongrunningOperation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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;}; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any;}; + } + /** + * 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. + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + /** + * A Change indicates the most recent state of an element. + */ + export interface Schema$GoogleWatcherV1Change { + /** + * If true, this Change is followed by more Changes that are in the same + * group as this Change. + */ + continued?: boolean; + /** + * The actual change data. This field is present only when `state() == + * EXISTS` or `state() == ERROR`. Please see google.protobuf.Any about how + * to use the Any type. + */ + data?: {[key: string]: any;}; + /** + * Name of the element, interpreted relative to the entity's actual + * name. "" refers to the entity itself. The element name is a + * valid UTF-8 string. + */ + element?: string; + /** + * If present, provides a compact representation of all the messages that + * have been received by the caller for the given entity, e.g., it could be + * a sequence number or a multi-part timestamp/version vector. This marker + * can be provided in the Request message, allowing the caller to resume the + * stream watching at a specific point without fetching the initial state. + */ + resumeMarker?: string; + /** + * The state of the `element`. + */ + state?: string; + } + /** + * A batch of Change messages. + */ + export interface Schema$GoogleWatcherV1ChangeBatch { + /** + * A list of Change messages. + */ + changes?: Schema$GoogleWatcherV1Change[]; + } + + + export class Resource$Media { + constructor() {} + + + /** + * remotebuildexecution.media.download + * @desc Downloads media. Download is supported on the URI + * `/v1/media/{+name}?alt=media`. + * @alias remotebuildexecution.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): + AxiosPromise; + 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|AxiosPromise { + 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://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/media/{+resourceName}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['resourceName'], + pathParams: ['resourceName'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * remotebuildexecution.media.upload + * @desc Uploads media. Upload is supported on the URI + * `/upload/v1/media/{+name}`. + * @alias remotebuildexecution.media.upload + * @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} params.resource Media resource metadata + * @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$Media$Upload, options?: MethodOptions): + AxiosPromise; + upload( + params: Params$Resource$Media$Upload, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + upload( + params: Params$Resource$Media$Upload, + callback: BodyResponseCallback): void; + upload(callback: BodyResponseCallback): void; + upload( + paramsOrCallback?: Params$Resource$Media$Upload| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Media$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Media$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/media/{+resourceName}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + mediaUrl: (rootUrl + '/upload/v1/media/{+resourceName}') + .replace(/([^:]\/)\/+/g, '$1'), + requiredParams: ['resourceName'], + pathParams: ['resourceName'], + 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 interface Params$Resource$Media$Upload 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; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleBytestreamMedia; + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mediaType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + + export class Resource$Operations { + constructor() {} + + + /** + * remotebuildexecution.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 remotebuildexecution.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @param {().GoogleLongrunningCancelOperationRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + cancel(params?: Params$Resource$Operations$Cancel, options?: MethodOptions): + AxiosPromise; + cancel( + params: Params$Resource$Operations$Cancel, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + cancel( + params: Params$Resource$Operations$Cancel, + callback: BodyResponseCallback): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Operations$Cancel| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * remotebuildexecution.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 remotebuildexecution.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$Operations$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Operations$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Operations$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Operations$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * remotebuildexecution.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 remotebuildexecution.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$Operations$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Operations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse>): void; + list( + params: Params$Resource$Operations$List, + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse>): void; + list( + paramsOrCallback?: Params$Resource$Operations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$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$GoogleLongrunningCancelOperationRequest; + } + export interface Params$Resource$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$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; + } + + + export class Resource$Projects { + operations: Resource$Projects$Operations; + constructor() { + this.operations = new Resource$Projects$Operations(); + } + } + + + export class Resource$Projects$Operations { + constructor() {} + + + /** + * remotebuildexecution.projects.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias remotebuildexecution.projects.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Operations$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Operations$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + get(params: Params$Resource$Projects$Operations$Get, + callback: BodyResponseCallback): + void; + get(callback: BodyResponseCallback): + void; + get(paramsOrCallback?: Params$Resource$Projects$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$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$V1 { + constructor() {} + + + /** + * remotebuildexecution.watch + * @desc Start a streaming RPC to get watch information from the server. + * @alias remotebuildexecution.watch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.resumeMarker The `resume_marker` specifies how much of the existing underlying state is delivered to the client when the watch request is received by the system. The client can set this marker in one of the following ways to get different semantics: * Parameter is not specified or has the value "". Semantics: Fetch initial state. The client wants the entity's initial state to be delivered. See the description in "Initial State". * Parameter is set to the string "now" (UTF-8 encoding). Semantics: Fetch new changes only. The client just wants to get the changes received by the system after the watch point. The system may deliver changes from before the watch point as well. * Parameter is set to a value received in an earlier `Change.resume_marker` field while watching the same entity. Semantics: Resume from a specific point. The client wants to receive the changes from a specific point; this value must correspond to a value received in the `Change.resume_marker` field. The system may deliver changes from before the `resume_marker` as well. If the system cannot resume the stream from this point (e.g., if it is too far behind in the stream), it can raise the `FAILED_PRECONDITION` error. An implementation MUST support an unspecified parameter and the empty string "" marker (initial state fetching) and the "now" marker. It need not support resuming from a specific point. + * @param {string=} params.target The `target` value **must** be a valid URL path pointing to an entity to watch. Note that the service name **must** be removed from the target field (e.g., the target field must say "/foo/bar", not "myservice.googleapis.com/foo/bar"). A client is also allowed to pass system-specific parameters in the URL that are only obeyed by some implementations. Some parameters will be implementation-specific. However, some have predefined meaning and are listed here: * recursive = true|false [default=false] If set to true, indicates that the client wants to watch all elements of entities in the subtree rooted at the entity's name in `target`. For descendants that are not the immediate children of the target, the `Change.element` will contain slashes. Note that some namespaces and entities will not support recursive watching. When watching such an entity, a client must not set recursive to true. Otherwise, it will receive an `UNIMPLEMENTED` error. Normal URL encoding must be used inside `target`. For example, if a query parameter name or value, or the non-query parameter portion of `target` contains a special character, it must be %-encoded. We recommend that clients and servers use their runtime's URL library to produce and consume target values. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + watch(params?: Params$Resource$V1$Watch, options?: MethodOptions): + AxiosPromise; + watch( + params: Params$Resource$V1$Watch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + watch( + params: Params$Resource$V1$Watch, + callback: BodyResponseCallback): + void; + watch(callback: BodyResponseCallback): + void; + watch( + paramsOrCallback?: Params$Resource$V1$Watch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$V1$Watch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$V1$Watch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1:watch').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$V1$Watch extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The `resume_marker` specifies how much of the existing underlying state + * is delivered to the client when the watch request is received by the + * system. The client can set this marker in one of the following ways to + * get different semantics: * Parameter is not specified or has the value + * "". Semantics: Fetch initial state. The client wants the entity's + * initial state to be delivered. See the description in "Initial + * State". * Parameter is set to the string "now" (UTF-8 encoding). + * Semantics: Fetch new changes only. The client just wants to get the + * changes received by the system after the watch point. The system may + * deliver changes from before the watch point as well. * Parameter + * is set to a value received in an earlier `Change.resume_marker` field + * while watching the same entity. Semantics: Resume from a specific + * point. The client wants to receive the changes from a specific point; + * this value must correspond to a value received in the + * `Change.resume_marker` field. The system may deliver changes from + * before the `resume_marker` as well. If the system cannot resume the + * stream from this point (e.g., if it is too far behind in the stream), + * it can raise the `FAILED_PRECONDITION` error. An implementation MUST + * support an unspecified parameter and the empty string "" marker (initial + * state fetching) and the "now" marker. It need not support resuming from a + * specific point. + */ + resumeMarker?: string; + /** + * The `target` value **must** be a valid URL path pointing to an entity to + * watch. Note that the service name **must** be removed from the target + * field (e.g., the target field must say "/foo/bar", not + * "myservice.googleapis.com/foo/bar"). A client is also allowed to pass + * system-specific parameters in the URL that are only obeyed by some + * implementations. Some parameters will be implementation-specific. + * However, some have predefined meaning and are listed here: * recursive + * = true|false [default=false] If set to true, indicates that the client + * wants to watch all elements of entities in the subtree rooted at the + * entity's name in `target`. For descendants that are not the immediate + * children of the target, the `Change.element` will contain slashes. + * Note that some namespaces and entities will not support recursive + * watching. When watching such an entity, a client must not set recursive + * to true. Otherwise, it will receive an `UNIMPLEMENTED` error. Normal URL + * encoding must be used inside `target`. For example, if a query parameter + * name or value, or the non-query parameter portion of `target` contains a + * special character, it must be %-encoded. We recommend that clients and + * servers use their runtime's URL library to produce and consume target + * values. + */ + target?: string; + } +} diff --git a/src/apis/remotebuildexecution/v1alpha.ts b/src/apis/remotebuildexecution/v1alpha.ts new file mode 100644 index 00000000000..3ba497fb9df --- /dev/null +++ b/src/apis/remotebuildexecution/v1alpha.ts @@ -0,0 +1,2830 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace remotebuildexecution_v1alpha { + export interface Options extends GlobalOptions { + version: 'v1alpha'; + } + + let context: APIRequestContext; + + 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; + } + + /** + * Remote Build Execution API + * + * Supplies a Remote Execution API service for tools such as bazel. + * + * @example + * const {google} = require('googleapis'); + * const remotebuildexecution = google.remotebuildexecution('v1alpha'); + * + * @namespace remotebuildexecution + * @type {Function} + * @version v1alpha + * @variation v1alpha + * @param {object=} options Options for Remotebuildexecution + */ + export class Remotebuildexecution { + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.projects = new Resource$Projects(); + } + } + + /** + * An `Action` captures all the information about an execution which is + * required to reproduce it. `Action`s are the core component of the + * [Execution] service. A single `Action` represents a repeatable action that + * can be performed by the execution service. `Action`s can be succinctly + * identified by the digest of their wire format encoding and, once an + * `Action` has been executed, will be cached in the action cache. Future + * requests can then use the cached result rather than needing to run afresh. + * When a server completes execution of an Action, it MAY choose to cache the + * result in the ActionCache unless `do_not_cache` is `true`. Clients SHOULD + * expect the server to do so. By default, future calls to Execute the same + * `Action` will also serve their results from the cache. Clients must take + * care to understand the caching behaviour. Ideally, all `Action`s will be + * reproducible so that serving a result from cache is always desirable and + * correct. + */ + export interface Schema$BuildBazelRemoteExecutionV2Action { + /** + * The digest of the Command to run, which MUST be present in the + * ContentAddressableStorage. + */ + commandDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * If true, then the `Action`'s result cannot be cached. + */ + doNotCache?: boolean; + /** + * 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; + /** + * 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. + */ + timeout?: string; + } + /** + * An ActionResult represents the result of an Action being run. + */ + export interface Schema$BuildBazelRemoteExecutionV2ActionResult { + /** + * The details of the execution that originally produced this result. + */ + executionMetadata?: + Schema$BuildBazelRemoteExecutionV2ExecutedActionMetadata; + /** + * The exit code of the command. + */ + exitCode?: number; + /** + * 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 } ] } } ``` + */ + 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 file 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 the action does not + * produce the requested output, or produces a file where a directory is + * expected or vice versa, 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. + */ + 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 in the output_file_symlinks field, if the file was a symbolic + * link to another file. If the action does not produce the requested + * output, or produces a directory where a regular file is expected or vice + * versa, 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 the action does not produce the requested output, or produces a + * directory where a regular file is expected or vice versa, 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. + */ + outputFileSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; + /** + * The digest for a blob containing the standard error of the action, which + * can be retrieved from the ContentAddressableStorage. See `stderr_raw` for + * when this will be set. + */ + stderrDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The standard error buffer of the action. The server will determine, based + * on the size of the buffer, whether to return it in raw form or to return + * a digest in `stderr_digest` that points to the buffer. If neither is set, + * then the buffer is empty. The client SHOULD NOT assume it will get one of + * the raw buffer or a digest on any given request and should be prepared to + * handle either. + */ + stderrRaw?: string; + /** + * The digest for a blob containing the standard output of the action, which + * can be retrieved from the ContentAddressableStorage. See `stdout_raw` for + * when this will be set. + */ + stdoutDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The standard output buffer of the action. The server will determine, + * based on the size of the buffer, whether to return it in raw form or to + * return a digest in `stdout_digest` that points to the buffer. If neither + * is set, then the buffer is empty. The client SHOULD NOT assume it will + * get one of the raw buffer or a digest on any given request and should be + * prepared to handle either. + */ + stdoutRaw?: string; + } + /** + * A `Command` is the actual command executed by a worker running an Action + * and specifications of its environment. Except as otherwise required, the + * environment (such as which system libraries or binaries are available, and + * what filesystems are mounted where) is defined by and specific to the + * implementation of the remote execution API. + */ + export interface Schema$BuildBazelRemoteExecutionV2Command { + /** + * The arguments to the command. The first argument must be the path to the + * executable, which must be either a relative path, in which case it is + * evaluated with respect to the input root, or an absolute path. + */ + arguments?: string[]; + /** + * The environment variables to set when running the program. The worker may + * provide its own default environment variables; these defaults can be + * overridden using this field. Additional variables can also be specified. + * In order to ensure that equivalent `Command`s always hash to the same + * value, the environment variables MUST be lexicographically sorted by + * name. Sorting of strings is done by code point, equivalently, by the + * UTF-8 bytes. + */ + environmentVariables?: + Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]; + /** + * A list of the output directories that the client expects to retrieve from + * the action. Only the contents of the indicated directories (recursively + * including the contents of their subdirectories) will be returned, as well + * as files listed in `output_files`. Other files 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, be a parent of another + * output directory, be a parent of a listed output file, or have the same + * path as any of the listed output files. + */ + outputDirectories?: string[]; + /** + * 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 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, be a child of a listed + * output directory, or have the same path as any of the listed output + * directories. + */ + outputFiles?: string[]; + /** + * 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. + */ + platform?: Schema$BuildBazelRemoteExecutionV2Platform; + /** + * The working directory, relative to the input root, for the command to run + * in. It must be a directory which exists in the input tree. If it is left + * empty, then the action is run in the input root. + */ + workingDirectory?: string; + } + /** + * An `EnvironmentVariable` is one variable to set in the running + * program's environment. + */ + export interface Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable { + /** + * The variable name. + */ + name?: string; + /** + * The variable value. + */ + value?: string; + } + /** + * 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. + */ + export interface Schema$BuildBazelRemoteExecutionV2Digest { + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + /** + * 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). - 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 + * } ] } ``` + */ + export interface Schema$BuildBazelRemoteExecutionV2Directory { + /** + * The subdirectories in the directory. + */ + directories?: Schema$BuildBazelRemoteExecutionV2DirectoryNode[]; + /** + * The files in the directory. + */ + files?: Schema$BuildBazelRemoteExecutionV2FileNode[]; + /** + * The symlinks in the directory. + */ + symlinks?: Schema$BuildBazelRemoteExecutionV2SymlinkNode[]; + } + /** + * A `DirectoryNode` represents a child of a Directory which is itself a + * `Directory` and its associated metadata. + */ + export interface Schema$BuildBazelRemoteExecutionV2DirectoryNode { + /** + * The digest of the Directory object represented. See Digest for + * information about how to take the digest of a proto message. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The name of the directory. + */ + name?: string; + } + /** + * ExecutedActionMetadata contains details about a completed execution. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecutedActionMetadata { + /** + * When the worker completed executing the action command. + */ + executionCompletedTimestamp?: string; + /** + * When the worker started executing the action command. + */ + executionStartTimestamp?: string; + /** + * When the worker finished fetching action inputs. + */ + inputFetchCompletedTimestamp?: string; + /** + * When the worker started fetching action inputs. + */ + inputFetchStartTimestamp?: string; + /** + * When the worker finished uploading action outputs. + */ + outputUploadCompletedTimestamp?: string; + /** + * When the worker started uploading action outputs. + */ + outputUploadStartTimestamp?: string; + /** + * When was the action added to the queue. + */ + queuedTimestamp?: string; + /** + * The name of the worker which ran the execution. + */ + worker?: string; + /** + * When the worker completed the action, including all stages. + */ + workerCompletedTimestamp?: string; + /** + * When the worker received the action. + */ + workerStartTimestamp?: string; + } + /** + * Metadata about an ongoing execution, which will be contained in the + * metadata field of the Operation. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecuteOperationMetadata { + /** + * The digest of the Action being executed. + */ + actionDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + stage?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard error. + */ + stderrStreamName?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard output. + */ + stdoutStreamName?: string; + } + /** + * The response message for Execution.Execute, which will be contained in the + * response field of the Operation. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecuteResponse { + /** + * True if the result was served from cache, false if it was executed. + */ + cachedResult?: boolean; + /** + * The result of the action. + */ + result?: Schema$BuildBazelRemoteExecutionV2ActionResult; + /** + * An optional list of additional log outputs the server wishes to provide. + * A server can use this to return execution-specific logs however it + * wishes. This is intended primarily to make it easier for users to debug + * issues that may be outside of the actual job execution, such as by + * identifying the worker executing the action or by providing logs from the + * worker's setup phase. The keys SHOULD be human readable so that a + * client can display them to a user. + */ + serverLogs?: {[key: string]: Schema$BuildBazelRemoteExecutionV2LogFile;}; + /** + * If the status has a code other than `OK`, it indicates that the action + * did not finish execution. For example, if the operation times out during + * execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST + * use this field for errors in execution, rather than the error field on + * the `Operation` object. If the status code is other than `OK`, then the + * result MUST NOT be cached. For an error status, the `result` field is + * optional; the server may populate the output-, stdout-, and + * stderr-related fields if it has any information available, such as the + * stdout and stderr of a timed-out action. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * A `FileNode` represents a single file and associated metadata. + */ + export interface Schema$BuildBazelRemoteExecutionV2FileNode { + /** + * The digest of the file's content. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The name of the file. + */ + name?: string; + } + /** + * A `LogFile` is a log stored in the CAS. + */ + export interface Schema$BuildBazelRemoteExecutionV2LogFile { + /** + * The digest of the log contents. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * This is a hint as to the purpose of the log, and is set to true if the + * log is human-readable text that can be usefully displayed to a user, and + * false otherwise. For instance, if a command-line client wishes to print + * the server logs to the terminal for a failed action, this allows it to + * avoid displaying a binary file. + */ + humanReadable?: boolean; + } + /** + * An `OutputDirectory` is the output in an `ActionResult` corresponding to a + * directory's full contents rather than a single file. + */ + export interface Schema$BuildBazelRemoteExecutionV2OutputDirectory { + /** + * The full path of the directory relative to the working directory. The + * path separator is a forward slash `/`. Since this is a relative path, it + * MUST NOT begin with a leading forward slash. The empty string value is + * allowed, and it denotes the entire working directory. + */ + path?: string; + /** + * The digest of the encoded Tree proto containing the directory's + * contents. + */ + treeDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + } + /** + * An `OutputFile` is similar to a FileNode, but it is used as an output in an + * `ActionResult`. It allows a full file path rather than only a name. + * `OutputFile` is binary-compatible with `FileNode`. + */ + export interface Schema$BuildBazelRemoteExecutionV2OutputFile { + /** + * The digest of the file's content. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * 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. + */ + path?: string; + } + /** + * 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 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. + */ + path?: string; + /** + * 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. + */ + target?: string; + } + /** + * A `Platform` is a set of requirements, such as hardware, operating system, + * or compiler toolchain, for an Action's execution environment. A + * `Platform` is represented as a series of key-value pairs representing the + * properties that are required of the platform. + */ + export interface Schema$BuildBazelRemoteExecutionV2Platform { + /** + * The properties that make up this platform. In order to ensure that + * equivalent `Platform`s always hash to the same value, the properties MUST + * be lexicographically sorted by name, and then by value. Sorting of + * strings is done by code point, equivalently, by the UTF-8 bytes. + */ + properties?: Schema$BuildBazelRemoteExecutionV2PlatformProperty[]; + } + /** + * A single property for the environment. The server is responsible for + * specifying the property `name`s that it accepts. If an unknown `name` is + * provided in the requirements for an Action, the server SHOULD reject the + * execution request. If permitted by the server, the same `name` may occur + * multiple times. The server is also responsible for specifying the + * interpretation of property `value`s. For instance, a property describing + * how much RAM must be available may be interpreted as allowing a worker with + * 16GB to fulfill a request for 8GB, while a property describing the OS + * environment on which the action must be performed may require an exact + * match with the worker's OS. The server MAY use the `value` of one or + * more properties to determine how it sets up the execution environment, such + * as by making specific system files available to the worker. + */ + export interface Schema$BuildBazelRemoteExecutionV2PlatformProperty { + /** + * The property name. + */ + name?: string; + /** + * The property value. + */ + value?: string; + } + /** + * An optional Metadata to attach to any RPC request to tell the server about + * an external context of the request. The server may use this for logging or + * other purposes. To use it, the client attaches the header to the call using + * the canonical proto serialization: name: + * build.bazel.remote.execution.v2.requestmetadata-bin contents: the base64 + * encoded binary RequestMetadata message. + */ + export interface Schema$BuildBazelRemoteExecutionV2RequestMetadata { + /** + * An identifier that ties multiple requests to the same action. For + * example, multiple requests to the CAS, Action Cache, and Execution API + * are used in order to compile foo.cc. + */ + actionId?: string; + /** + * An identifier to tie multiple tool invocations together. For example, + * runs of foo_test, bar_test and baz_test on a post-submit of a given + * patch. + */ + correlatedInvocationsId?: string; + /** + * The details for the tool invoking the requests. + */ + toolDetails?: Schema$BuildBazelRemoteExecutionV2ToolDetails; + /** + * An identifier that ties multiple actions together to a final result. For + * example, multiple actions are required to build and run foo_test. + */ + toolInvocationId?: string; + } + /** + * A `SymlinkNode` represents a symbolic link. + */ + export interface Schema$BuildBazelRemoteExecutionV2SymlinkNode { + /** + * The name of the symlink. + */ + name?: string; + /** + * 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. + */ + target?: string; + } + /** + * Details for the tool used to call the API. + */ + export interface Schema$BuildBazelRemoteExecutionV2ToolDetails { + /** + * Name of the tool, e.g. bazel. + */ + toolName?: string; + /** + * Version of the tool used for the request, e.g. 5.0.3. + */ + toolVersion?: string; + } + /** + * A `Tree` contains all the Directory protos in a single directory Merkle + * tree, compressed into one message. + */ + export interface Schema$BuildBazelRemoteExecutionV2Tree { + /** + * All the child directories: the directories referred to by the root and, + * recursively, all its children. In order to reconstruct the directory + * tree, the client must take the digests of each of the child directories + * and then build up a tree starting from the `root`. + */ + children?: Schema$BuildBazelRemoteExecutionV2Directory[]; + /** + * The root directory in the tree. + */ + root?: Schema$BuildBazelRemoteExecutionV2Directory; + } + /** + * CommandDuration contains the various duration metrics tracked when a bot + * performs a command. + */ + export interface Schema$GoogleDevtoolsRemotebuildbotCommandDurations { + /** + * The time spent preparing the command to be run in a Docker container + * (includes pulling the Docker image, if necessary). + */ + dockerPrep?: string; + /** + * The time spent downloading the input files and constructing the working + * directory. + */ + download?: string; + /** + * The time spent executing the command (i.e., doing useful work). + */ + execution?: string; + /** + * The timestamp when preparation is done and bot starts downloading files. + */ + isoPrepDone?: string; + /** + * The time spent completing the command, in total. + */ + overall?: string; + /** + * The time spent uploading the stdout logs. + */ + stdout?: string; + /** + * The time spent uploading the output files. + */ + upload?: string; + } + /** + * CommandEvents contains counters for the number of warnings and errors that + * occurred during the execution of a command. + */ + export interface Schema$GoogleDevtoolsRemotebuildbotCommandEvents { + /** + * Indicates whether we are using a cached Docker image (true) or had to + * pull the Docker image (false) for this command. + */ + dockerCacheHit?: boolean; + /** + * The number of errors reported. + */ + numErrors?: string; + /** + * The number of warnings reported. + */ + numWarnings?: string; + } + /** + * The request used for `CreateInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest { + /** + * Specifies the instance to create. The name in the instance, if specified + * in the instance, is ignored. + */ + instance?: Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance; + /** + * ID of the created instance. A valid `instance_id` must: be 6-50 + * characters long, contains only lowercase letters, digits, hyphens and + * underscores, start with a lowercase letter, and end with a lowercase + * letter or a digit. + */ + instanceId?: string; + /** + * Resource name of the project containing the instance. Format: + * `projects/[PROJECT_ID]`. + */ + parent?: string; + } + /** + * The request used for `CreateWorkerPool`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest { + /** + * Resource name of the instance in which to create the new worker pool. + * Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + /** + * ID of the created worker pool. A valid pool ID must: be 6-50 characters + * long, contain only lowercase letters, digits, hyphens and underscores, + * start with a lowercase letter, and end with a lowercase letter or a + * digit. + */ + poolId?: string; + /** + * Specifies the worker pool to create. The name in the worker pool, if + * specified, is ignored. + */ + workerPool?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool; + } + /** + * The request used for `DeleteInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest { + /** + * Name of the instance to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + /** + * The request used for DeleteWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest { + /** + * Name of the worker pool to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + /** + * The request used for `GetInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest { + /** + * Name of the instance to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + /** + * The request used for GetWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest { + /** + * Name of the worker pool to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + /** + * Instance conceptually encapsulates all Remote Build Execution resources for + * remote builds. An instance consists of storage and compute resources (for + * example, `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used + * for running remote builds. All Remote Build Execution API calls are scoped + * to an instance. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance { + /** + * The location is a GCP region. Currently only `us-central1` is supported. + */ + location?: string; + /** + * Output only. Instance resource name formatted as: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be + * populated when creating an instance since it is provided in the + * `instance_id` field. + */ + name?: string; + /** + * Output only. State of the instance. + */ + state?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest { + /** + * Resource name of the project. Format: `projects/[PROJECT_ID]`. + */ + parent?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse { + /** + * The list of instances in a given project. + */ + instances?: Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance[]; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest { + /** + * Resource name of the instance. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse { + /** + * The list of worker pools in a given instance. + */ + workerPools?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool[]; + } + /** + * The request used for UpdateWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest { + /** + * The update mask applies to worker_pool. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If an empty update_mask is provided, only the non-default valued field in + * the worker pool field will be updated. Note that in order to update a + * field to the default value (zero, false, empty string) an explicit + * update_mask must be provided. + */ + updateMask?: string; + /** + * Specifies the worker pool to update. + */ + workerPool?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool; + } + /** + * Defines the configuration to be used for a creating workers in the worker + * pool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig { + /** + * Required. Size of the disk attached to the worker, in GB. See + * https://cloud.google.com/compute/docs/disks/ + */ + diskSizeGb?: string; + /** + * Required. Disk Type to use for the worker. See [Storage + * options](https://cloud.google.com/compute/docs/disks/#introduction). + * Currently only `pd-standard` is supported. + */ + diskType?: string; + /** + * Required. Machine type of the worker, such as n1-standard-2. See + * https://cloud.google.com/compute/docs/machine-types for a list of + * supported machine types. + */ + machineType?: string; + /** + * Minimum CPU platform to use when creating the worker. See [CPU + * Platforms](https://cloud.google.com/compute/docs/cpu-platforms). + */ + minCpuPlatform?: string; + /** + * Output only. `reserved=true` means the worker is reserved and won't + * be preempted. + */ + reserved?: boolean; + } + /** + * A worker pool resource in the Remote Build Execution API. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool { + /** + * WorkerPool resource name formatted as: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + * name should not be populated when creating a worker pool since it is + * provided in the `poolId` field. + */ + name?: string; + /** + * Output only. State of the worker pool. + */ + state?: string; + /** + * Specifies the properties, such as machine type and disk size, used for + * creating workers in a worker pool. + */ + workerConfig?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig; + /** + * The desired number of workers in the worker pool. Must be a value between + * 0 and 1000. + */ + workerCount?: string; + } + /** + * An ActionResult represents the result of an Action being run. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testActionResult { + /** + * The exit code of the command. + */ + exitCode?: number; + /** + * 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 } ] } } ``` + */ + outputDirectories?: + Schema$GoogleDevtoolsRemoteexecutionV1testOutputDirectory[]; + /** + * 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 in the output + * list. If the action does not produce the requested output, or produces a + * directory where a regular file is expected or vice versa, 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$GoogleDevtoolsRemoteexecutionV1testOutputFile[]; + /** + * The digest for a blob containing the standard error of the action, which + * can be retrieved from the ContentAddressableStorage. See `stderr_raw` for + * when this will be set. + */ + stderrDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The standard error buffer of the action. The server will determine, based + * on the size of the buffer, whether to return it in raw form or to return + * a digest in `stderr_digest` that points to the buffer. If neither is set, + * then the buffer is empty. The client SHOULD NOT assume it will get one of + * the raw buffer or a digest on any given request and should be prepared to + * handle either. + */ + stderrRaw?: string; + /** + * The digest for a blob containing the standard output of the action, which + * can be retrieved from the ContentAddressableStorage. See `stdout_raw` for + * when this will be set. + */ + stdoutDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The standard output buffer of the action. The server will determine, + * based on the size of the buffer, whether to return it in raw form or to + * return a digest in `stdout_digest` that points to the buffer. If neither + * is set, then the buffer is empty. The client SHOULD NOT assume it will + * get one of the raw buffer or a digest on any given request and should be + * prepared to handle either. + */ + stdoutRaw?: string; + } + /** + * A `Command` is the actual command executed by a worker running an Action. + * Except as otherwise required, the environment (such as which system + * libraries or binaries are available, and what filesystems are mounted + * where) is defined by and specific to the implementation of the remote + * execution API. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testCommand { + /** + * The arguments to the command. The first argument must be the path to the + * executable, which must be either a relative path, in which case it is + * evaluated with respect to the input root, or an absolute path. The + * working directory will always be the input root. + */ + arguments?: string[]; + /** + * The environment variables to set when running the program. The worker may + * provide its own default environment variables; these defaults can be + * overridden using this field. Additional variables can also be specified. + * In order to ensure that equivalent `Command`s always hash to the same + * value, the environment variables MUST be lexicographically sorted by + * name. Sorting of strings is done by code point, equivalently, by the + * UTF-8 bytes. + */ + environmentVariables?: + Schema$GoogleDevtoolsRemoteexecutionV1testCommandEnvironmentVariable[]; + } + /** + * An `EnvironmentVariable` is one variable to set in the running + * program's environment. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testCommandEnvironmentVariable { + /** + * The variable name. + */ + name?: string; + /** + * The variable value. + */ + value?: string; + } + /** + * 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. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDigest { + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + /** + * A `Directory` represents a directory node in a file tree, containing zero + * or more children FileNodes and DirectoryNodes. Each `Node` contains its + * name in the directory, the digest of its content (either a file blob or a + * `Directory` proto), 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). - The files and directories 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 } ] } ``` + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDirectory { + /** + * The subdirectories in the directory. + */ + directories?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectoryNode[]; + /** + * The files in the directory. + */ + files?: Schema$GoogleDevtoolsRemoteexecutionV1testFileNode[]; + } + /** + * A `DirectoryNode` represents a child of a Directory which is itself a + * `Directory` and its associated metadata. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDirectoryNode { + /** + * The digest of the Directory object represented. See Digest for + * information about how to take the digest of a proto message. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The name of the directory. + */ + name?: string; + } + /** + * Metadata about an ongoing execution, which will be contained in the + * metadata field of the Operation. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadata { + /** + * The digest of the Action being executed. + */ + actionDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + stage?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard error. + */ + stderrStreamName?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard output. + */ + stdoutStreamName?: string; + } + /** + * The response message for Execution.Execute, which will be contained in the + * response field of the Operation. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testExecuteResponse { + /** + * True if the result was served from cache, false if it was executed. + */ + cachedResult?: boolean; + /** + * The result of the action. + */ + result?: Schema$GoogleDevtoolsRemoteexecutionV1testActionResult; + /** + * An optional list of additional log outputs the server wishes to provide. + * A server can use this to return execution-specific logs however it + * wishes. This is intended primarily to make it easier for users to debug + * issues that may be outside of the actual job execution, such as by + * identifying the worker executing the action or by providing logs from the + * worker's setup phase. The keys SHOULD be human readable so that a + * client can display them to a user. + */ + serverLogs?: + {[key: string]: Schema$GoogleDevtoolsRemoteexecutionV1testLogFile;}; + /** + * If the status has a code other than `OK`, it indicates that the action + * did not finish execution. For example, if the operation times out during + * execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST + * use this field for errors in execution, rather than the error field on + * the `Operation` object. If the status code is other than `OK`, then the + * result MUST NOT be cached. For an error status, the `result` field is + * optional; the server may populate the output-, stdout-, and + * stderr-related fields if it has any information available, such as the + * stdout and stderr of a timed-out action. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * A `FileNode` represents a single file and associated metadata. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testFileNode { + /** + * The digest of the file's content. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The name of the file. + */ + name?: string; + } + /** + * A `LogFile` is a log stored in the CAS. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testLogFile { + /** + * The digest of the log contents. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * This is a hint as to the purpose of the log, and is set to true if the + * log is human-readable text that can be usefully displayed to a user, and + * false otherwise. For instance, if a command-line client wishes to print + * the server logs to the terminal for a failed action, this allows it to + * avoid displaying a binary file. + */ + humanReadable?: boolean; + } + /** + * An `OutputDirectory` is the output in an `ActionResult` corresponding to a + * directory's full contents rather than a single file. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testOutputDirectory { + /** + * DEPRECATED: This field is deprecated and should no longer be used. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The full path of the directory relative to the working directory. The + * path separator is a forward slash `/`. Since this is a relative path, it + * MUST NOT begin with a leading forward slash. The empty string value is + * allowed, and it denotes the entire working directory. + */ + path?: string; + /** + * The digest of the encoded Tree proto containing the directory's + * contents. + */ + treeDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + } + /** + * An `OutputFile` is similar to a FileNode, but it is tailored for output as + * part of an `ActionResult`. It allows a full file path rather than only a + * name, and allows the server to include content inline. `OutputFile` is + * binary-compatible with `FileNode`. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testOutputFile { + /** + * The raw content of the file. This field may be used by the server to + * provide the content of a file inline in an ActionResult and avoid + * requiring that the client make a separate call to + * [ContentAddressableStorage.GetBlob] to retrieve it. The client SHOULD + * NOT assume that it will get raw content with any request, and always be + * prepared to retrieve it via `digest`. + */ + content?: string; + /** + * The digest of the file's content. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The full path of the file relative to the input root, 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. + */ + path?: string; + } + /** + * An optional Metadata to attach to any RPC request to tell the server about + * an external context of the request. The server may use this for logging or + * other purposes. To use it, the client attaches the header to the call using + * the canonical proto serialization: name: + * google.devtools.remoteexecution.v1test.requestmetadata-bin contents: the + * base64 encoded binary RequestMetadata message. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testRequestMetadata { + /** + * An identifier that ties multiple requests to the same action. For + * example, multiple requests to the CAS, Action Cache, and Execution API + * are used in order to compile foo.cc. + */ + actionId?: string; + /** + * An identifier to tie multiple tool invocations together. For example, + * runs of foo_test, bar_test and baz_test on a post-submit of a given + * patch. + */ + correlatedInvocationsId?: string; + /** + * The details for the tool invoking the requests. + */ + toolDetails?: Schema$GoogleDevtoolsRemoteexecutionV1testToolDetails; + /** + * An identifier that ties multiple actions together to a final result. For + * example, multiple actions are required to build and run foo_test. + */ + toolInvocationId?: string; + } + /** + * Details for the tool used to call the API. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testToolDetails { + /** + * Name of the tool, e.g. bazel. + */ + toolName?: string; + /** + * Version of the tool used for the request, e.g. 5.0.3. + */ + toolVersion?: string; + } + /** + * A `Tree` contains all the Directory protos in a single directory Merkle + * tree, compressed into one message. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testTree { + /** + * All the child directories: the directories referred to by the root and, + * recursively, all its children. In order to reconstruct the directory + * tree, the client must take the digests of each of the child directories + * and then build up a tree starting from the `root`. + */ + children?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectory[]; + /** + * The root directory in the tree. + */ + root?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectory; + } + /** + * AdminTemp is a prelimiary set of administration tasks. It's called + * "Temp" because we do not yet know the best way to represent admin + * tasks; it's possible that this will be entirely replaced in later + * versions of this API. If this message proves to be sufficient, it will be + * renamed in the alpha or beta release of this API. This message (suitably + * marshalled into a protobuf.Any) can be used as the inline_assignment field + * in a lease; the lease assignment field should simply be `"admin"` + * in these cases. This message is heavily based on Swarming administration + * tasks from the LUCI project + * (http://github.com/luci/luci-py/appengine/swarming). + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2AdminTemp { + /** + * The argument to the admin action; see `Command` for semantics. + */ + arg?: string; + /** + * The admin action; see `Command` for legal values. + */ + command?: string; + } + /** + * Describes a blob of binary content with its digest. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Blob { + /** + * The contents of the blob. + */ + contents?: string; + /** + * The digest of the blob. This should be verified by the receiver. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + } + /** + * DEPRECATED - use CommandResult instead. Describes the actual outputs from + * the task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandOutputs { + /** + * exit_code is only fully reliable if the status' code is OK. If the + * task exceeded its deadline or was cancelled, the process may still + * produce an exit code as it is cancelled, and this will be populated, but + * a successful (zero) is unlikely to be correct unless the status code is + * OK. + */ + exitCode?: number; + /** + * The output files. The blob referenced by the digest should contain one of + * the following (implementation-dependent): * A marshalled + * DirectoryMetadata of the returned filesystem * A LUCI-style .isolated + * file + */ + outputs?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + } + /** + * DEPRECATED - use CommandResult instead. Can be used as part of + * CompleteRequest.metadata, or are part of a more sophisticated message. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandOverhead { + /** + * The elapsed time between calling Accept and Complete. The server will + * also have its own idea of what this should be, but this excludes the + * overhead of the RPCs and the bot response time. + */ + duration?: string; + /** + * The amount of time *not* spent executing the command (ie + * uploading/downloading files). + */ + overhead?: string; + } + /** + * All information about the execution of a command, suitable for providing as + * the Bots interface's `Lease.result` field. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandResult { + /** + * The elapsed time between calling Accept and Complete. The server will + * also have its own idea of what this should be, but this excludes the + * overhead of the RPCs and the bot response time. + */ + duration?: string; + /** + * The exit code of the process. An exit code of "0" should only + * be trusted if `status` has a code of OK (otherwise it may simply be + * unset). + */ + exitCode?: number; + /** + * The output files. The blob referenced by the digest should contain one of + * the following (implementation-dependent): * A marshalled + * DirectoryMetadata of the returned filesystem * A LUCI-style .isolated + * file + */ + outputs?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * The amount of time *not* spent executing the command (ie + * uploading/downloading files). + */ + overhead?: string; + /** + * Implementation-dependent statistics about the task. Both servers and bots + * may define messages which can be encoded here; bots are free to provide + * statistics in multiple formats, and servers are free to choose one or + * more of the values to process and ignore others. In particular, it is + * *not* considered an error for the bot to provide the server with a field + * that it doesn't know about. + */ + statistics?: Array<{[key: string]: any;}>; + /** + * An overall status for the command. For example, if the command timed out, + * this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS + * for memory exhaustion, it might have a code of RESOURCE_EXHAUSTED. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * Describes a shell-style task to execute, suitable for providing as the Bots + * interface's `Lease.payload` field. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTask { + /** + * The expected outputs from the task. + */ + expectedOutputs?: + Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs; + /** + * The inputs to the task. + */ + inputs?: Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs; + /** + * The timeouts of this task. + */ + timeouts?: Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts; + } + /** + * Describes the inputs to a shell-style task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs { + /** + * The command itself to run (e.g., argv). This field should be passed + * directly to the underlying operating system, and so it must be sensible + * to that operating system. For example, on Windows, the first argument + * might be "C:\Windows\System32\ping.exe" - that is, using drive + * letters and backslashes. A command for a *nix system, on the other hand, + * would use forward slashes. All other fields in the RWAPI must + * consistently use forward slashes, since those fields may be interpretted + * by both the service and the bot. + */ + arguments?: string[]; + /** + * All environment variables required by the task. + */ + environmentVariables?: + Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable[]; + /** + * The input filesystem to be set up prior to the task beginning. The + * contents should be a repeated set of FileMetadata messages though other + * formats are allowed if better for the implementation (eg, a LUCI-style + * .isolated file). This field is repeated since implementations might want + * to cache the metadata, in which case it may be useful to break up + * portions of the filesystem that change frequently (eg, specific input + * files) from those that don't (eg, standard header files). + */ + files?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest[]; + /** + * Inline contents for blobs expected to be needed by the bot to execute the + * task. For example, contents of entries in `files` or blobs that are + * indirectly referenced by an entry there. The bot should check against + * this list before downloading required task inputs to reduce the number of + * communications between itself and the remote CAS server. + */ + inlineBlobs?: Schema$GoogleDevtoolsRemoteworkersV1test2Blob[]; + } + /** + * An environment variable required by this task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable { + /** + * The envvar name. + */ + name?: string; + /** + * The envvar value. + */ + value?: string; + } + /** + * Describes the expected outputs of the command. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs { + /** + * A list of expected directories, relative to the execution root. All paths + * MUST be delimited by forward slashes. + */ + directories?: string[]; + /** + * A list of expected files, relative to the execution root. All paths MUST + * be delimited by forward slashes. + */ + files?: string[]; + /** + * The destination to which any stderr should be sent. The method by which + * the bot should send the stream contents to that destination is not + * defined in this API. As examples, the destination could be a file + * referenced in the `files` field in this message, or it could be a URI + * that must be written via the ByteStream API. + */ + stderrDestination?: string; + /** + * The destination to which any stdout should be sent. The method by which + * the bot should send the stream contents to that destination is not + * defined in this API. As examples, the destination could be a file + * referenced in the `files` field in this message, or it could be a URI + * that must be written via the ByteStream API. + */ + stdoutDestination?: string; + } + /** + * Describes the timeouts associated with this task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts { + /** + * This specifies the maximum time that the task can run, excluding the time + * required to download inputs or upload outputs. That is, the worker will + * terminate the task if it runs longer than this. + */ + execution?: string; + /** + * This specifies the maximum amount of time the task can be idle - that is, + * go without generating some output in either stdout or stderr. If the + * process is silent for more than the specified time, the worker will + * terminate the task. + */ + idle?: string; + /** + * If the execution or IO timeouts are exceeded, the worker will try to + * gracefully terminate the task and return any existing logs. However, + * tasks may be hard-frozen in which case this process will fail. This + * timeout specifies how long to wait for a terminated task to shut down + * gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g. + * SIGKILL on *nix, CTRL_BREAK_EVENT on Windows). + */ + shutdown?: string; + } + /** + * The CommandTask and CommandResult messages assume the existence of a + * service that can serve blobs of content, identified by a hash and size + * known as a "digest." The method by which these blobs may be + * retrieved is not specified here, but a model implementation is in the + * Remote Execution API's "ContentAddressibleStorage" interface. + * In the context of the RWAPI, a Digest will virtually always refer to the + * contents of a file or a directory. The latter is represented by the + * byte-encoded Directory message. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Digest { + /** + * A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, + * 0x2b, 0x3c]) using an implementation-defined hash algorithm (eg SHA-256). + */ + hash?: string; + /** + * The size of the contents. While this is not strictly required as part of + * an identifier (after all, any given hash will have exactly one canonical + * size), it's useful in almost all cases when one might want to send or + * retrieve blobs of content and is included here for this reason. + */ + sizeBytes?: string; + } + /** + * The contents of a directory. Similar to the equivalent message in the + * Remote Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Directory { + /** + * Any subdirectories + */ + directories?: Schema$GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata[]; + /** + * The files in this directory + */ + files?: Schema$GoogleDevtoolsRemoteworkersV1test2FileMetadata[]; + } + /** + * The metadata for a directory. Similar to the equivalent message in the + * Remote Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata { + /** + * A pointer to the contents of the directory, in the form of a marshalled + * Directory message. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * The path of the directory, as in FileMetadata.path. + */ + path?: string; + } + /** + * The metadata for a file. Similar to the equivalent message in the Remote + * Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2FileMetadata { + /** + * If the file is small enough, its contents may also or alternatively be + * listed here. + */ + contents?: string; + /** + * A pointer to the contents of the file. The method by which a client + * retrieves the contents from a CAS system is not defined here. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * Properties of the file + */ + isExecutable?: boolean; + /** + * The path of this file. If this message is part of the + * CommandOutputs.outputs fields, the path is relative to the execution root + * and must correspond to an entry in CommandTask.outputs.files. If this + * message is part of a Directory message, then the path is relative to the + * root of that directory. All paths MUST be delimited by forward slashes. + */ + path?: string; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$GoogleLongrunningOperation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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;}; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any;}; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + + + export class Resource$Projects { + instances: Resource$Projects$Instances; + operations: Resource$Projects$Operations; + constructor() { + this.instances = new Resource$Projects$Instances(); + this.operations = new Resource$Projects$Operations(); + } + } + + + export class Resource$Projects$Instances { + workerpools: Resource$Projects$Instances$Workerpools; + constructor() { + this.workerpools = new Resource$Projects$Instances$Workerpools(); + } + + + /** + * remotebuildexecution.projects.instances.create + * @desc Creates a new instance in the specified region. Returns a long + * running operation which contains an instance on completion. While the + * long running operation is in progress, any call to `GetInstance` returns + * an instance in state `CREATING`. + * @alias remotebuildexecution.projects.instances.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Resource name of the project containing the instance. Format: `projects/[PROJECT_ID]`. + * @param {().GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest} 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$Instances$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Instances$Create, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + create( + params: Params$Resource$Projects$Instances$Create, + callback: BodyResponseCallback): + void; + create(callback: BodyResponseCallback): + void; + create( + paramsOrCallback?: Params$Resource$Projects$Instances$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+parent}/instances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * remotebuildexecution.projects.instances.delete + * @desc Deletes the specified instance. Returns a long running operation + * which contains a `google.protobuf.Empty` response on completion. Deleting + * an instance with worker pools in it will delete these worker pools. + * @alias remotebuildexecution.projects.instances.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Name of the instance to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_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$Instances$Delete, + options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Projects$Instances$Delete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + delete( + params: Params$Resource$Projects$Instances$Delete, + callback: BodyResponseCallback): + void; + delete(callback: BodyResponseCallback): + void; + delete( + paramsOrCallback?: Params$Resource$Projects$Instances$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * remotebuildexecution.projects.instances.get + * @desc Returns the specified instance. + * @alias remotebuildexecution.projects.instances.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Name of the instance to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_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$Instances$Get, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>; + get(params: Params$Resource$Projects$Instances$Get, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>): + void; + get(params: Params$Resource$Projects$Instances$Get, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>): + void; + get(callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>): void; + get(paramsOrCallback?: Params$Resource$Projects$Instances$Get| + BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>, + callback?: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>): + void|AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance> { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance>( + parameters); + } + } + + + /** + * remotebuildexecution.projects.instances.list + * @desc Lists instances in a project. + * @alias remotebuildexecution.projects.instances.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Resource name of the project. Format: `projects/[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 + */ + list( + params?: Params$Resource$Projects$Instances$List, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>; + list( + params: Params$Resource$Projects$Instances$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>): + void; + list( + params: Params$Resource$Projects$Instances$List, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>): + void; + list(callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>): + void; + list( + paramsOrCallback?: Params$Resource$Projects$Instances$List| + BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>, + callback?: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>): + void|AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse> { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Instances$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+parent}/instances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse>( + parameters); + } + } + } + + export interface Params$Resource$Projects$Instances$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Resource name of the project containing the instance. Format: + * `projects/[PROJECT_ID]`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest; + } + export interface Params$Resource$Projects$Instances$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Resource name of the project. Format: `projects/[PROJECT_ID]`. + */ + parent?: string; + } + + export class Resource$Projects$Instances$Workerpools { + constructor() {} + + + /** + * remotebuildexecution.projects.instances.workerpools.create + * @desc Creates a new worker pool with a specified size and configuration. + * Returns a long running operation which contains a worker pool on + * completion. While the long running operation is in progress, any call to + * `GetWorkerPool` returns a worker pool in state `CREATING`. + * @alias remotebuildexecution.projects.instances.workerpools.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Resource name of the instance in which to create the new worker pool. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + * @param {().GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest} 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$Instances$Workerpools$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Instances$Workerpools$Create, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + create( + params: Params$Resource$Projects$Instances$Workerpools$Create, + callback: BodyResponseCallback): + void; + create(callback: BodyResponseCallback): + void; + create( + paramsOrCallback?: + Params$Resource$Projects$Instances$Workerpools$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Workerpools$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Workerpools$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+parent}/workerpools') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * remotebuildexecution.projects.instances.workerpools.delete + * @desc Deletes the specified worker pool. Returns a long running + * operation, which contains a `google.protobuf.Empty` response on + * completion. While the long running operation is in progress, any call to + * `GetWorkerPool` returns a worker pool in state `DELETING`. + * @alias remotebuildexecution.projects.instances.workerpools.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Name of the worker pool to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_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$Instances$Workerpools$Delete, + options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Projects$Instances$Workerpools$Delete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + delete( + params: Params$Resource$Projects$Instances$Workerpools$Delete, + callback: BodyResponseCallback): + void; + delete(callback: BodyResponseCallback): + void; + delete( + paramsOrCallback?: + Params$Resource$Projects$Instances$Workerpools$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Workerpools$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Workerpools$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * remotebuildexecution.projects.instances.workerpools.get + * @desc Returns the specified worker pool. + * @alias remotebuildexecution.projects.instances.workerpools.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Name of the worker pool to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_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$Instances$Workerpools$Get, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>; + get(params: Params$Resource$Projects$Instances$Workerpools$Get, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>): + void; + get(params: Params$Resource$Projects$Instances$Workerpools$Get, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>): + void; + get(callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>): void; + get(paramsOrCallback?: Params$Resource$Projects$Instances$Workerpools$Get| + BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>, + callback?: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>): + void|AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Workerpools$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Workerpools$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool>( + parameters); + } + } + + + /** + * remotebuildexecution.projects.instances.workerpools.list + * @desc Lists worker pools in an instance. + * @alias remotebuildexecution.projects.instances.workerpools.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Resource name of the instance. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Instances$Workerpools$List, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>; + list( + params: Params$Resource$Projects$Instances$Workerpools$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>): + void; + list( + params: Params$Resource$Projects$Instances$Workerpools$List, + callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>): + void; + list(callback: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>): + void; + list( + paramsOrCallback?: Params$Resource$Projects$Instances$Workerpools$List| + BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>, + callback?: BodyResponseCallback< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>): + void|AxiosPromise< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Workerpools$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Workerpools$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+parent}/workerpools') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse>( + parameters); + } + } + + + /** + * remotebuildexecution.projects.instances.workerpools.patch + * @desc Updates an existing worker pool with a specified size and/or + * configuration. Returns a long running operation, which contains a worker + * pool on completion. While the long running operation is in progress, any + * call to `GetWorkerPool` returns a worker pool in state `UPDATING`. + * @alias remotebuildexecution.projects.instances.workerpools.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name WorkerPool resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. name should not be populated when creating a worker pool since it is provided in the `poolId` field. + * @param {().GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Instances$Workerpools$Patch, + options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Projects$Instances$Workerpools$Patch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + patch( + params: Params$Resource$Projects$Instances$Workerpools$Patch, + callback: BodyResponseCallback): + void; + patch(callback: BodyResponseCallback): + void; + patch( + paramsOrCallback?: Params$Resource$Projects$Instances$Workerpools$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Instances$Workerpools$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Workerpools$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Instances$Workerpools$Create extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Resource name of the instance in which to create the new worker pool. + * Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest; + } + export interface Params$Resource$Projects$Instances$Workerpools$Delete extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the worker pool to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Workerpools$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the worker pool to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Workerpools$List extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Resource name of the instance. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Instances$Workerpools$Patch extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * WorkerPool resource name formatted as: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + * name should not be populated when creating a worker pool since it is + * provided in the `poolId` field. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest; + } + + + + export class Resource$Projects$Operations { + constructor() {} + + + /** + * remotebuildexecution.projects.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias remotebuildexecution.projects.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Operations$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Operations$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + get(params: Params$Resource$Projects$Operations$Get, + callback: BodyResponseCallback): + void; + get(callback: BodyResponseCallback): + void; + get(paramsOrCallback?: Params$Resource$Projects$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || + 'https://admin-remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$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/remotebuildexecution/v2.ts b/src/apis/remotebuildexecution/v2.ts new file mode 100644 index 00000000000..a3cce0e6cea --- /dev/null +++ b/src/apis/remotebuildexecution/v2.ts @@ -0,0 +1,3193 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace remotebuildexecution_v2 { + export interface Options extends GlobalOptions { + version: 'v2'; + } + + let context: APIRequestContext; + + 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; + } + + /** + * Remote Build Execution API + * + * Supplies a Remote Execution API service for tools such as bazel. + * + * @example + * const {google} = require('googleapis'); + * const remotebuildexecution = google.remotebuildexecution('v2'); + * + * @namespace remotebuildexecution + * @type {Function} + * @version v2 + * @variation v2 + * @param {object=} options Options for Remotebuildexecution + */ + export class Remotebuildexecution { + actionResults: Resource$Actionresults; + actions: Resource$Actions; + blobs: Resource$Blobs; + operations: Resource$Operations; + v2: Resource$V2; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + context = {_options: options || {}, google}; + + this.actionResults = new Resource$Actionresults(); + this.actions = new Resource$Actions(); + this.blobs = new Resource$Blobs(); + this.operations = new Resource$Operations(); + this.v2 = new Resource$V2(); + } + } + + /** + * An `Action` captures all the information about an execution which is + * required to reproduce it. `Action`s are the core component of the + * [Execution] service. A single `Action` represents a repeatable action that + * can be performed by the execution service. `Action`s can be succinctly + * identified by the digest of their wire format encoding and, once an + * `Action` has been executed, will be cached in the action cache. Future + * requests can then use the cached result rather than needing to run afresh. + * When a server completes execution of an Action, it MAY choose to cache the + * result in the ActionCache unless `do_not_cache` is `true`. Clients SHOULD + * expect the server to do so. By default, future calls to Execute the same + * `Action` will also serve their results from the cache. Clients must take + * care to understand the caching behaviour. Ideally, all `Action`s will be + * reproducible so that serving a result from cache is always desirable and + * correct. + */ + export interface Schema$BuildBazelRemoteExecutionV2Action { + /** + * The digest of the Command to run, which MUST be present in the + * ContentAddressableStorage. + */ + commandDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * If true, then the `Action`'s result cannot be cached. + */ + doNotCache?: boolean; + /** + * 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; + /** + * 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. + */ + timeout?: string; + } + /** + * Describes the server/instance capabilities for updating the action cache. + */ + export interface Schema$BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities { + updateEnabled?: boolean; + } + /** + * An ActionResult represents the result of an Action being run. + */ + export interface Schema$BuildBazelRemoteExecutionV2ActionResult { + /** + * The details of the execution that originally produced this result. + */ + executionMetadata?: + Schema$BuildBazelRemoteExecutionV2ExecutedActionMetadata; + /** + * The exit code of the command. + */ + exitCode?: number; + /** + * 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 } ] } } ``` + */ + 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 file 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 the action does not + * produce the requested output, or produces a file where a directory is + * expected or vice versa, 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. + */ + 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 in the output_file_symlinks field, if the file was a symbolic + * link to another file. If the action does not produce the requested + * output, or produces a directory where a regular file is expected or vice + * versa, 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 the action does not produce the requested output, or produces a + * directory where a regular file is expected or vice versa, 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. + */ + outputFileSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; + /** + * The digest for a blob containing the standard error of the action, which + * can be retrieved from the ContentAddressableStorage. See `stderr_raw` for + * when this will be set. + */ + stderrDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The standard error buffer of the action. The server will determine, based + * on the size of the buffer, whether to return it in raw form or to return + * a digest in `stderr_digest` that points to the buffer. If neither is set, + * then the buffer is empty. The client SHOULD NOT assume it will get one of + * the raw buffer or a digest on any given request and should be prepared to + * handle either. + */ + stderrRaw?: string; + /** + * The digest for a blob containing the standard output of the action, which + * can be retrieved from the ContentAddressableStorage. See `stdout_raw` for + * when this will be set. + */ + stdoutDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The standard output buffer of the action. The server will determine, + * based on the size of the buffer, whether to return it in raw form or to + * return a digest in `stdout_digest` that points to the buffer. If neither + * is set, then the buffer is empty. The client SHOULD NOT assume it will + * get one of the raw buffer or a digest on any given request and should be + * prepared to handle either. + */ + stdoutRaw?: string; + } + /** + * A request message for ContentAddressableStorage.BatchReadBlobs. + */ + export interface Schema$BuildBazelRemoteExecutionV2BatchReadBlobsRequest { + /** + * The individual blob digests. + */ + digests?: Schema$BuildBazelRemoteExecutionV2Digest[]; + } + /** + * A response message for ContentAddressableStorage.BatchReadBlobs. + */ + export interface Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse { + /** + * The responses to the requests. + */ + responses?: + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponseResponse[]; + } + /** + * A response corresponding to a single blob that the client tried to upload. + */ + export interface Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponseResponse { + /** + * The raw binary data. + */ + data?: string; + /** + * The digest to which this response corresponds. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The result of attempting to download that blob. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * A request message for ContentAddressableStorage.BatchUpdateBlobs. + */ + export interface Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest { + /** + * The individual upload requests. + */ + requests?: + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsRequestRequest[]; + } + /** + * A request corresponding to a single blob that the client wants to upload. + */ + export interface Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsRequestRequest { + /** + * The raw binary data. + */ + data?: string; + /** + * The digest of the blob. This MUST be the digest of `data`. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + } + /** + * A response message for ContentAddressableStorage.BatchUpdateBlobs. + */ + export interface Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse { + /** + * The responses to the requests. + */ + responses?: + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponseResponse[]; + } + /** + * A response corresponding to a single blob that the client tried to upload. + */ + export interface Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponseResponse { + /** + * The blob digest to which this response corresponds. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The result of attempting to upload that blob. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * Capabilities of the remote cache system. + */ + export interface Schema$BuildBazelRemoteExecutionV2CacheCapabilities { + /** + * Capabilities for updating the action cache. + */ + actionCacheUpdateCapabilities?: + Schema$BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities; + /** + * Supported cache priority range for both CAS and ActionCache. + */ + cachePriorityCapabilities?: + Schema$BuildBazelRemoteExecutionV2PriorityCapabilities; + /** + * All the digest functions supported by the remote cache. Remote cache may + * support multiple digest functions simultaneously. + */ + digestFunction?: string[]; + /** + * Maximum total size of blobs to be uploaded/downloaded using batch + * methods. A value of 0 means no limit is set, although in practice there + * will always be a message size limitation of the protocol in use, e.g. + * GRPC. + */ + maxBatchTotalSizeBytes?: string; + /** + * Whether absolute symlink targets are supported. + */ + symlinkAbsolutePathStrategy?: string; + } + /** + * A `Command` is the actual command executed by a worker running an Action + * and specifications of its environment. Except as otherwise required, the + * environment (such as which system libraries or binaries are available, and + * what filesystems are mounted where) is defined by and specific to the + * implementation of the remote execution API. + */ + export interface Schema$BuildBazelRemoteExecutionV2Command { + /** + * The arguments to the command. The first argument must be the path to the + * executable, which must be either a relative path, in which case it is + * evaluated with respect to the input root, or an absolute path. + */ + arguments?: string[]; + /** + * The environment variables to set when running the program. The worker may + * provide its own default environment variables; these defaults can be + * overridden using this field. Additional variables can also be specified. + * In order to ensure that equivalent `Command`s always hash to the same + * value, the environment variables MUST be lexicographically sorted by + * name. Sorting of strings is done by code point, equivalently, by the + * UTF-8 bytes. + */ + environmentVariables?: + Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]; + /** + * A list of the output directories that the client expects to retrieve from + * the action. Only the contents of the indicated directories (recursively + * including the contents of their subdirectories) will be returned, as well + * as files listed in `output_files`. Other files 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, be a parent of another + * output directory, be a parent of a listed output file, or have the same + * path as any of the listed output files. + */ + outputDirectories?: string[]; + /** + * 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 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, be a child of a listed + * output directory, or have the same path as any of the listed output + * directories. + */ + outputFiles?: string[]; + /** + * 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. + */ + platform?: Schema$BuildBazelRemoteExecutionV2Platform; + /** + * The working directory, relative to the input root, for the command to run + * in. It must be a directory which exists in the input tree. If it is left + * empty, then the action is run in the input root. + */ + workingDirectory?: string; + } + /** + * An `EnvironmentVariable` is one variable to set in the running + * program's environment. + */ + export interface Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable { + /** + * The variable name. + */ + name?: string; + /** + * The variable value. + */ + value?: string; + } + /** + * 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. + */ + export interface Schema$BuildBazelRemoteExecutionV2Digest { + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + /** + * 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). - 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 + * } ] } ``` + */ + export interface Schema$BuildBazelRemoteExecutionV2Directory { + /** + * The subdirectories in the directory. + */ + directories?: Schema$BuildBazelRemoteExecutionV2DirectoryNode[]; + /** + * The files in the directory. + */ + files?: Schema$BuildBazelRemoteExecutionV2FileNode[]; + /** + * The symlinks in the directory. + */ + symlinks?: Schema$BuildBazelRemoteExecutionV2SymlinkNode[]; + } + /** + * A `DirectoryNode` represents a child of a Directory which is itself a + * `Directory` and its associated metadata. + */ + export interface Schema$BuildBazelRemoteExecutionV2DirectoryNode { + /** + * The digest of the Directory object represented. See Digest for + * information about how to take the digest of a proto message. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * The name of the directory. + */ + name?: string; + } + /** + * ExecutedActionMetadata contains details about a completed execution. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecutedActionMetadata { + /** + * When the worker completed executing the action command. + */ + executionCompletedTimestamp?: string; + /** + * When the worker started executing the action command. + */ + executionStartTimestamp?: string; + /** + * When the worker finished fetching action inputs. + */ + inputFetchCompletedTimestamp?: string; + /** + * When the worker started fetching action inputs. + */ + inputFetchStartTimestamp?: string; + /** + * When the worker finished uploading action outputs. + */ + outputUploadCompletedTimestamp?: string; + /** + * When the worker started uploading action outputs. + */ + outputUploadStartTimestamp?: string; + /** + * When was the action added to the queue. + */ + queuedTimestamp?: string; + /** + * The name of the worker which ran the execution. + */ + worker?: string; + /** + * When the worker completed the action, including all stages. + */ + workerCompletedTimestamp?: string; + /** + * When the worker received the action. + */ + workerStartTimestamp?: string; + } + /** + * Metadata about an ongoing execution, which will be contained in the + * metadata field of the Operation. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecuteOperationMetadata { + /** + * The digest of the Action being executed. + */ + actionDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + stage?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard error. + */ + stderrStreamName?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard output. + */ + stdoutStreamName?: string; + } + /** + * A request message for Execution.Execute. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecuteRequest { + /** + * The digest of the Action to execute. + */ + actionDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * An optional policy for execution of the action. The server will have a + * default policy if this is not provided. + */ + executionPolicy?: Schema$BuildBazelRemoteExecutionV2ExecutionPolicy; + /** + * An optional policy for the results of this execution in the remote cache. + * The server will have a default policy if this is not provided. This may + * be applied to both the ActionResult and the associated blobs. + */ + resultsCachePolicy?: Schema$BuildBazelRemoteExecutionV2ResultsCachePolicy; + /** + * If true, the action will be executed anew even if its result was already + * present in the cache. If false, the result may be served from the + * ActionCache. + */ + skipCacheLookup?: boolean; + } + /** + * The response message for Execution.Execute, which will be contained in the + * response field of the Operation. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecuteResponse { + /** + * True if the result was served from cache, false if it was executed. + */ + cachedResult?: boolean; + /** + * The result of the action. + */ + result?: Schema$BuildBazelRemoteExecutionV2ActionResult; + /** + * An optional list of additional log outputs the server wishes to provide. + * A server can use this to return execution-specific logs however it + * wishes. This is intended primarily to make it easier for users to debug + * issues that may be outside of the actual job execution, such as by + * identifying the worker executing the action or by providing logs from the + * worker's setup phase. The keys SHOULD be human readable so that a + * client can display them to a user. + */ + serverLogs?: {[key: string]: Schema$BuildBazelRemoteExecutionV2LogFile;}; + /** + * If the status has a code other than `OK`, it indicates that the action + * did not finish execution. For example, if the operation times out during + * execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST + * use this field for errors in execution, rather than the error field on + * the `Operation` object. If the status code is other than `OK`, then the + * result MUST NOT be cached. For an error status, the `result` field is + * optional; the server may populate the output-, stdout-, and + * stderr-related fields if it has any information available, such as the + * stdout and stderr of a timed-out action. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * Capabilities of the remote execution system. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecutionCapabilities { + /** + * Remote execution may only support a single digest function. + */ + digestFunction?: string; + /** + * Whether remote execution is enabled for the particular server/instance. + */ + execEnabled?: boolean; + /** + * Supported execution priority range. + */ + executionPriorityCapabilities?: + Schema$BuildBazelRemoteExecutionV2PriorityCapabilities; + } + /** + * An `ExecutionPolicy` can be used to control the scheduling of the action. + */ + export interface Schema$BuildBazelRemoteExecutionV2ExecutionPolicy { + /** + * The priority (relative importance) of this action. Generally, a lower + * value means that the action should be run sooner than actions having a + * greater priority value, but the interpretation of a given value is + * server- dependent. A priority of 0 means the *default* priority. + * Priorities may be positive or negative, and such actions should run later + * or sooner than actions having the default priority, respectively. The + * particular semantics of this field is up to the server. In particular, + * every server will have their own supported range of priorities, and will + * decide how these map into scheduling policy. + */ + priority?: number; + } + /** + * A `FileNode` represents a single file and associated metadata. + */ + export interface Schema$BuildBazelRemoteExecutionV2FileNode { + /** + * The digest of the file's content. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The name of the file. + */ + name?: string; + } + /** + * A request message for ContentAddressableStorage.FindMissingBlobs. + */ + export interface Schema$BuildBazelRemoteExecutionV2FindMissingBlobsRequest { + /** + * A list of the blobs to check. + */ + blobDigests?: Schema$BuildBazelRemoteExecutionV2Digest[]; + } + /** + * A response message for ContentAddressableStorage.FindMissingBlobs. + */ + export interface Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse { + /** + * A list of the blobs requested *not* present in the storage. + */ + missingBlobDigests?: Schema$BuildBazelRemoteExecutionV2Digest[]; + } + /** + * A response message for ContentAddressableStorage.GetTree. + */ + export interface Schema$BuildBazelRemoteExecutionV2GetTreeResponse { + /** + * The directories descended from the requested root. + */ + directories?: Schema$BuildBazelRemoteExecutionV2Directory[]; + /** + * If present, signifies that there are more results which the client can + * retrieve by passing this as the page_token in a subsequent request. If + * empty, signifies that this is the last page of results. + */ + nextPageToken?: string; + } + /** + * A `LogFile` is a log stored in the CAS. + */ + export interface Schema$BuildBazelRemoteExecutionV2LogFile { + /** + * The digest of the log contents. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * This is a hint as to the purpose of the log, and is set to true if the + * log is human-readable text that can be usefully displayed to a user, and + * false otherwise. For instance, if a command-line client wishes to print + * the server logs to the terminal for a failed action, this allows it to + * avoid displaying a binary file. + */ + humanReadable?: boolean; + } + /** + * An `OutputDirectory` is the output in an `ActionResult` corresponding to a + * directory's full contents rather than a single file. + */ + export interface Schema$BuildBazelRemoteExecutionV2OutputDirectory { + /** + * The full path of the directory relative to the working directory. The + * path separator is a forward slash `/`. Since this is a relative path, it + * MUST NOT begin with a leading forward slash. The empty string value is + * allowed, and it denotes the entire working directory. + */ + path?: string; + /** + * The digest of the encoded Tree proto containing the directory's + * contents. + */ + treeDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + } + /** + * An `OutputFile` is similar to a FileNode, but it is used as an output in an + * `ActionResult`. It allows a full file path rather than only a name. + * `OutputFile` is binary-compatible with `FileNode`. + */ + export interface Schema$BuildBazelRemoteExecutionV2OutputFile { + /** + * The digest of the file's content. + */ + digest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * 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. + */ + path?: string; + } + /** + * 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 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. + */ + path?: string; + /** + * 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. + */ + target?: string; + } + /** + * A `Platform` is a set of requirements, such as hardware, operating system, + * or compiler toolchain, for an Action's execution environment. A + * `Platform` is represented as a series of key-value pairs representing the + * properties that are required of the platform. + */ + export interface Schema$BuildBazelRemoteExecutionV2Platform { + /** + * The properties that make up this platform. In order to ensure that + * equivalent `Platform`s always hash to the same value, the properties MUST + * be lexicographically sorted by name, and then by value. Sorting of + * strings is done by code point, equivalently, by the UTF-8 bytes. + */ + properties?: Schema$BuildBazelRemoteExecutionV2PlatformProperty[]; + } + /** + * A single property for the environment. The server is responsible for + * specifying the property `name`s that it accepts. If an unknown `name` is + * provided in the requirements for an Action, the server SHOULD reject the + * execution request. If permitted by the server, the same `name` may occur + * multiple times. The server is also responsible for specifying the + * interpretation of property `value`s. For instance, a property describing + * how much RAM must be available may be interpreted as allowing a worker with + * 16GB to fulfill a request for 8GB, while a property describing the OS + * environment on which the action must be performed may require an exact + * match with the worker's OS. The server MAY use the `value` of one or + * more properties to determine how it sets up the execution environment, such + * as by making specific system files available to the worker. + */ + export interface Schema$BuildBazelRemoteExecutionV2PlatformProperty { + /** + * The property name. + */ + name?: string; + /** + * The property value. + */ + value?: string; + } + /** + * Allowed values for priority in ResultsCachePolicy Used for querying both + * cache and execution valid priority ranges. + */ + export interface Schema$BuildBazelRemoteExecutionV2PriorityCapabilities { + priorities?: + Schema$BuildBazelRemoteExecutionV2PriorityCapabilitiesPriorityRange[]; + } + /** + * Supported range of priorities, including boundaries. + */ + export interface Schema$BuildBazelRemoteExecutionV2PriorityCapabilitiesPriorityRange { + maxPriority?: number; + minPriority?: number; + } + /** + * An optional Metadata to attach to any RPC request to tell the server about + * an external context of the request. The server may use this for logging or + * other purposes. To use it, the client attaches the header to the call using + * the canonical proto serialization: name: + * build.bazel.remote.execution.v2.requestmetadata-bin contents: the base64 + * encoded binary RequestMetadata message. + */ + export interface Schema$BuildBazelRemoteExecutionV2RequestMetadata { + /** + * An identifier that ties multiple requests to the same action. For + * example, multiple requests to the CAS, Action Cache, and Execution API + * are used in order to compile foo.cc. + */ + actionId?: string; + /** + * An identifier to tie multiple tool invocations together. For example, + * runs of foo_test, bar_test and baz_test on a post-submit of a given + * patch. + */ + correlatedInvocationsId?: string; + /** + * The details for the tool invoking the requests. + */ + toolDetails?: Schema$BuildBazelRemoteExecutionV2ToolDetails; + /** + * An identifier that ties multiple actions together to a final result. For + * example, multiple actions are required to build and run foo_test. + */ + toolInvocationId?: string; + } + /** + * A `ResultsCachePolicy` is used for fine-grained control over how action + * outputs are stored in the CAS and Action Cache. + */ + export interface Schema$BuildBazelRemoteExecutionV2ResultsCachePolicy { + /** + * The priority (relative importance) of this content in the overall cache. + * Generally, a lower value means a longer retention time or other + * advantage, but the interpretation of a given value is server-dependent. A + * priority of 0 means a *default* value, decided by the server. The + * particular semantics of this field is up to the server. In particular, + * every server will have their own supported range of priorities, and will + * decide how these map into retention/eviction policy. + */ + priority?: number; + } + /** + * A response message for Capabilities.GetCapabilities. + */ + export interface Schema$BuildBazelRemoteExecutionV2ServerCapabilities { + /** + * Capabilities of the remote cache system. + */ + cacheCapabilities?: Schema$BuildBazelRemoteExecutionV2CacheCapabilities; + /** + * Earliest RE API version supported, including deprecated versions. + */ + deprecatedApiVersion?: Schema$BuildBazelSemverSemVer; + /** + * Capabilities of the remote execution system. + */ + executionCapabilities?: + Schema$BuildBazelRemoteExecutionV2ExecutionCapabilities; + /** + * Latest RE API version supported. + */ + highApiVersion?: Schema$BuildBazelSemverSemVer; + /** + * Earliest non-deprecated RE API version supported. + */ + lowApiVersion?: Schema$BuildBazelSemverSemVer; + } + /** + * A `SymlinkNode` represents a symbolic link. + */ + export interface Schema$BuildBazelRemoteExecutionV2SymlinkNode { + /** + * The name of the symlink. + */ + name?: string; + /** + * 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. + */ + target?: string; + } + /** + * Details for the tool used to call the API. + */ + export interface Schema$BuildBazelRemoteExecutionV2ToolDetails { + /** + * Name of the tool, e.g. bazel. + */ + toolName?: string; + /** + * Version of the tool used for the request, e.g. 5.0.3. + */ + toolVersion?: string; + } + /** + * A `Tree` contains all the Directory protos in a single directory Merkle + * tree, compressed into one message. + */ + export interface Schema$BuildBazelRemoteExecutionV2Tree { + /** + * All the child directories: the directories referred to by the root and, + * recursively, all its children. In order to reconstruct the directory + * tree, the client must take the digests of each of the child directories + * and then build up a tree starting from the `root`. + */ + children?: Schema$BuildBazelRemoteExecutionV2Directory[]; + /** + * The root directory in the tree. + */ + root?: Schema$BuildBazelRemoteExecutionV2Directory; + } + /** + * A request message for WaitExecution. + */ + export interface Schema$BuildBazelRemoteExecutionV2WaitExecutionRequest {} + export interface Schema$BuildBazelSemverSemVer { + major?: number; + minor?: number; + patch?: number; + prerelease?: string; + } + /** + * CommandDuration contains the various duration metrics tracked when a bot + * performs a command. + */ + export interface Schema$GoogleDevtoolsRemotebuildbotCommandDurations { + /** + * The time spent preparing the command to be run in a Docker container + * (includes pulling the Docker image, if necessary). + */ + dockerPrep?: string; + /** + * The time spent downloading the input files and constructing the working + * directory. + */ + download?: string; + /** + * The time spent executing the command (i.e., doing useful work). + */ + execution?: string; + /** + * The timestamp when preparation is done and bot starts downloading files. + */ + isoPrepDone?: string; + /** + * The time spent completing the command, in total. + */ + overall?: string; + /** + * The time spent uploading the stdout logs. + */ + stdout?: string; + /** + * The time spent uploading the output files. + */ + upload?: string; + } + /** + * CommandEvents contains counters for the number of warnings and errors that + * occurred during the execution of a command. + */ + export interface Schema$GoogleDevtoolsRemotebuildbotCommandEvents { + /** + * Indicates whether we are using a cached Docker image (true) or had to + * pull the Docker image (false) for this command. + */ + dockerCacheHit?: boolean; + /** + * The number of errors reported. + */ + numErrors?: string; + /** + * The number of warnings reported. + */ + numWarnings?: string; + } + /** + * The request used for `CreateInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest { + /** + * Specifies the instance to create. The name in the instance, if specified + * in the instance, is ignored. + */ + instance?: Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance; + /** + * ID of the created instance. A valid `instance_id` must: be 6-50 + * characters long, contains only lowercase letters, digits, hyphens and + * underscores, start with a lowercase letter, and end with a lowercase + * letter or a digit. + */ + instanceId?: string; + /** + * Resource name of the project containing the instance. Format: + * `projects/[PROJECT_ID]`. + */ + parent?: string; + } + /** + * The request used for `CreateWorkerPool`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest { + /** + * Resource name of the instance in which to create the new worker pool. + * Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + /** + * ID of the created worker pool. A valid pool ID must: be 6-50 characters + * long, contain only lowercase letters, digits, hyphens and underscores, + * start with a lowercase letter, and end with a lowercase letter or a + * digit. + */ + poolId?: string; + /** + * Specifies the worker pool to create. The name in the worker pool, if + * specified, is ignored. + */ + workerPool?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool; + } + /** + * The request used for `DeleteInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest { + /** + * Name of the instance to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + /** + * The request used for DeleteWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest { + /** + * Name of the worker pool to delete. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + /** + * The request used for `GetInstance`. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest { + /** + * Name of the instance to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + name?: string; + } + /** + * The request used for GetWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest { + /** + * Name of the worker pool to retrieve. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + */ + name?: string; + } + /** + * Instance conceptually encapsulates all Remote Build Execution resources for + * remote builds. An instance consists of storage and compute resources (for + * example, `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used + * for running remote builds. All Remote Build Execution API calls are scoped + * to an instance. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance { + /** + * The location is a GCP region. Currently only `us-central1` is supported. + */ + location?: string; + /** + * Output only. Instance resource name formatted as: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be + * populated when creating an instance since it is provided in the + * `instance_id` field. + */ + name?: string; + /** + * Output only. State of the instance. + */ + state?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest { + /** + * Resource name of the project. Format: `projects/[PROJECT_ID]`. + */ + parent?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse { + /** + * The list of instances in a given project. + */ + instances?: Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance[]; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest { + /** + * Resource name of the instance. Format: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. + */ + parent?: string; + } + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse { + /** + * The list of worker pools in a given instance. + */ + workerPools?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool[]; + } + /** + * The request used for UpdateWorkerPool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest { + /** + * The update mask applies to worker_pool. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If an empty update_mask is provided, only the non-default valued field in + * the worker pool field will be updated. Note that in order to update a + * field to the default value (zero, false, empty string) an explicit + * update_mask must be provided. + */ + updateMask?: string; + /** + * Specifies the worker pool to update. + */ + workerPool?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool; + } + /** + * Defines the configuration to be used for a creating workers in the worker + * pool. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig { + /** + * Required. Size of the disk attached to the worker, in GB. See + * https://cloud.google.com/compute/docs/disks/ + */ + diskSizeGb?: string; + /** + * Required. Disk Type to use for the worker. See [Storage + * options](https://cloud.google.com/compute/docs/disks/#introduction). + * Currently only `pd-standard` is supported. + */ + diskType?: string; + /** + * Required. Machine type of the worker, such as n1-standard-2. See + * https://cloud.google.com/compute/docs/machine-types for a list of + * supported machine types. + */ + machineType?: string; + /** + * Minimum CPU platform to use when creating the worker. See [CPU + * Platforms](https://cloud.google.com/compute/docs/cpu-platforms). + */ + minCpuPlatform?: string; + /** + * Output only. `reserved=true` means the worker is reserved and won't + * be preempted. + */ + reserved?: boolean; + } + /** + * A worker pool resource in the Remote Build Execution API. + */ + export interface Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool { + /** + * WorkerPool resource name formatted as: + * `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. + * name should not be populated when creating a worker pool since it is + * provided in the `poolId` field. + */ + name?: string; + /** + * Output only. State of the worker pool. + */ + state?: string; + /** + * Specifies the properties, such as machine type and disk size, used for + * creating workers in a worker pool. + */ + workerConfig?: + Schema$GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig; + /** + * The desired number of workers in the worker pool. Must be a value between + * 0 and 1000. + */ + workerCount?: string; + } + /** + * An ActionResult represents the result of an Action being run. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testActionResult { + /** + * The exit code of the command. + */ + exitCode?: number; + /** + * 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 } ] } } ``` + */ + outputDirectories?: + Schema$GoogleDevtoolsRemoteexecutionV1testOutputDirectory[]; + /** + * 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 in the output + * list. If the action does not produce the requested output, or produces a + * directory where a regular file is expected or vice versa, 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$GoogleDevtoolsRemoteexecutionV1testOutputFile[]; + /** + * The digest for a blob containing the standard error of the action, which + * can be retrieved from the ContentAddressableStorage. See `stderr_raw` for + * when this will be set. + */ + stderrDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The standard error buffer of the action. The server will determine, based + * on the size of the buffer, whether to return it in raw form or to return + * a digest in `stderr_digest` that points to the buffer. If neither is set, + * then the buffer is empty. The client SHOULD NOT assume it will get one of + * the raw buffer or a digest on any given request and should be prepared to + * handle either. + */ + stderrRaw?: string; + /** + * The digest for a blob containing the standard output of the action, which + * can be retrieved from the ContentAddressableStorage. See `stdout_raw` for + * when this will be set. + */ + stdoutDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The standard output buffer of the action. The server will determine, + * based on the size of the buffer, whether to return it in raw form or to + * return a digest in `stdout_digest` that points to the buffer. If neither + * is set, then the buffer is empty. The client SHOULD NOT assume it will + * get one of the raw buffer or a digest on any given request and should be + * prepared to handle either. + */ + stdoutRaw?: string; + } + /** + * A `Command` is the actual command executed by a worker running an Action. + * Except as otherwise required, the environment (such as which system + * libraries or binaries are available, and what filesystems are mounted + * where) is defined by and specific to the implementation of the remote + * execution API. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testCommand { + /** + * The arguments to the command. The first argument must be the path to the + * executable, which must be either a relative path, in which case it is + * evaluated with respect to the input root, or an absolute path. The + * working directory will always be the input root. + */ + arguments?: string[]; + /** + * The environment variables to set when running the program. The worker may + * provide its own default environment variables; these defaults can be + * overridden using this field. Additional variables can also be specified. + * In order to ensure that equivalent `Command`s always hash to the same + * value, the environment variables MUST be lexicographically sorted by + * name. Sorting of strings is done by code point, equivalently, by the + * UTF-8 bytes. + */ + environmentVariables?: + Schema$GoogleDevtoolsRemoteexecutionV1testCommandEnvironmentVariable[]; + } + /** + * An `EnvironmentVariable` is one variable to set in the running + * program's environment. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testCommandEnvironmentVariable { + /** + * The variable name. + */ + name?: string; + /** + * The variable value. + */ + value?: string; + } + /** + * 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. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDigest { + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + /** + * A `Directory` represents a directory node in a file tree, containing zero + * or more children FileNodes and DirectoryNodes. Each `Node` contains its + * name in the directory, the digest of its content (either a file blob or a + * `Directory` proto), 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). - The files and directories 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 } ] } ``` + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDirectory { + /** + * The subdirectories in the directory. + */ + directories?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectoryNode[]; + /** + * The files in the directory. + */ + files?: Schema$GoogleDevtoolsRemoteexecutionV1testFileNode[]; + } + /** + * A `DirectoryNode` represents a child of a Directory which is itself a + * `Directory` and its associated metadata. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testDirectoryNode { + /** + * The digest of the Directory object represented. See Digest for + * information about how to take the digest of a proto message. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The name of the directory. + */ + name?: string; + } + /** + * Metadata about an ongoing execution, which will be contained in the + * metadata field of the Operation. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadata { + /** + * The digest of the Action being executed. + */ + actionDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + stage?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard error. + */ + stderrStreamName?: string; + /** + * If set, the client can use this name with ByteStream.Read to stream the + * standard output. + */ + stdoutStreamName?: string; + } + /** + * The response message for Execution.Execute, which will be contained in the + * response field of the Operation. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testExecuteResponse { + /** + * True if the result was served from cache, false if it was executed. + */ + cachedResult?: boolean; + /** + * The result of the action. + */ + result?: Schema$GoogleDevtoolsRemoteexecutionV1testActionResult; + /** + * An optional list of additional log outputs the server wishes to provide. + * A server can use this to return execution-specific logs however it + * wishes. This is intended primarily to make it easier for users to debug + * issues that may be outside of the actual job execution, such as by + * identifying the worker executing the action or by providing logs from the + * worker's setup phase. The keys SHOULD be human readable so that a + * client can display them to a user. + */ + serverLogs?: + {[key: string]: Schema$GoogleDevtoolsRemoteexecutionV1testLogFile;}; + /** + * If the status has a code other than `OK`, it indicates that the action + * did not finish execution. For example, if the operation times out during + * execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST + * use this field for errors in execution, rather than the error field on + * the `Operation` object. If the status code is other than `OK`, then the + * result MUST NOT be cached. For an error status, the `result` field is + * optional; the server may populate the output-, stdout-, and + * stderr-related fields if it has any information available, such as the + * stdout and stderr of a timed-out action. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * A `FileNode` represents a single file and associated metadata. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testFileNode { + /** + * The digest of the file's content. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The name of the file. + */ + name?: string; + } + /** + * A `LogFile` is a log stored in the CAS. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testLogFile { + /** + * The digest of the log contents. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * This is a hint as to the purpose of the log, and is set to true if the + * log is human-readable text that can be usefully displayed to a user, and + * false otherwise. For instance, if a command-line client wishes to print + * the server logs to the terminal for a failed action, this allows it to + * avoid displaying a binary file. + */ + humanReadable?: boolean; + } + /** + * An `OutputDirectory` is the output in an `ActionResult` corresponding to a + * directory's full contents rather than a single file. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testOutputDirectory { + /** + * DEPRECATED: This field is deprecated and should no longer be used. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * The full path of the directory relative to the working directory. The + * path separator is a forward slash `/`. Since this is a relative path, it + * MUST NOT begin with a leading forward slash. The empty string value is + * allowed, and it denotes the entire working directory. + */ + path?: string; + /** + * The digest of the encoded Tree proto containing the directory's + * contents. + */ + treeDigest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + } + /** + * An `OutputFile` is similar to a FileNode, but it is tailored for output as + * part of an `ActionResult`. It allows a full file path rather than only a + * name, and allows the server to include content inline. `OutputFile` is + * binary-compatible with `FileNode`. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testOutputFile { + /** + * The raw content of the file. This field may be used by the server to + * provide the content of a file inline in an ActionResult and avoid + * requiring that the client make a separate call to + * [ContentAddressableStorage.GetBlob] to retrieve it. The client SHOULD + * NOT assume that it will get raw content with any request, and always be + * prepared to retrieve it via `digest`. + */ + content?: string; + /** + * The digest of the file's content. + */ + digest?: Schema$GoogleDevtoolsRemoteexecutionV1testDigest; + /** + * True if file is executable, false otherwise. + */ + isExecutable?: boolean; + /** + * The full path of the file relative to the input root, 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. + */ + path?: string; + } + /** + * An optional Metadata to attach to any RPC request to tell the server about + * an external context of the request. The server may use this for logging or + * other purposes. To use it, the client attaches the header to the call using + * the canonical proto serialization: name: + * google.devtools.remoteexecution.v1test.requestmetadata-bin contents: the + * base64 encoded binary RequestMetadata message. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testRequestMetadata { + /** + * An identifier that ties multiple requests to the same action. For + * example, multiple requests to the CAS, Action Cache, and Execution API + * are used in order to compile foo.cc. + */ + actionId?: string; + /** + * An identifier to tie multiple tool invocations together. For example, + * runs of foo_test, bar_test and baz_test on a post-submit of a given + * patch. + */ + correlatedInvocationsId?: string; + /** + * The details for the tool invoking the requests. + */ + toolDetails?: Schema$GoogleDevtoolsRemoteexecutionV1testToolDetails; + /** + * An identifier that ties multiple actions together to a final result. For + * example, multiple actions are required to build and run foo_test. + */ + toolInvocationId?: string; + } + /** + * Details for the tool used to call the API. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testToolDetails { + /** + * Name of the tool, e.g. bazel. + */ + toolName?: string; + /** + * Version of the tool used for the request, e.g. 5.0.3. + */ + toolVersion?: string; + } + /** + * A `Tree` contains all the Directory protos in a single directory Merkle + * tree, compressed into one message. + */ + export interface Schema$GoogleDevtoolsRemoteexecutionV1testTree { + /** + * All the child directories: the directories referred to by the root and, + * recursively, all its children. In order to reconstruct the directory + * tree, the client must take the digests of each of the child directories + * and then build up a tree starting from the `root`. + */ + children?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectory[]; + /** + * The root directory in the tree. + */ + root?: Schema$GoogleDevtoolsRemoteexecutionV1testDirectory; + } + /** + * AdminTemp is a prelimiary set of administration tasks. It's called + * "Temp" because we do not yet know the best way to represent admin + * tasks; it's possible that this will be entirely replaced in later + * versions of this API. If this message proves to be sufficient, it will be + * renamed in the alpha or beta release of this API. This message (suitably + * marshalled into a protobuf.Any) can be used as the inline_assignment field + * in a lease; the lease assignment field should simply be `"admin"` + * in these cases. This message is heavily based on Swarming administration + * tasks from the LUCI project + * (http://github.com/luci/luci-py/appengine/swarming). + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2AdminTemp { + /** + * The argument to the admin action; see `Command` for semantics. + */ + arg?: string; + /** + * The admin action; see `Command` for legal values. + */ + command?: string; + } + /** + * Describes a blob of binary content with its digest. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Blob { + /** + * The contents of the blob. + */ + contents?: string; + /** + * The digest of the blob. This should be verified by the receiver. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + } + /** + * DEPRECATED - use CommandResult instead. Describes the actual outputs from + * the task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandOutputs { + /** + * exit_code is only fully reliable if the status' code is OK. If the + * task exceeded its deadline or was cancelled, the process may still + * produce an exit code as it is cancelled, and this will be populated, but + * a successful (zero) is unlikely to be correct unless the status code is + * OK. + */ + exitCode?: number; + /** + * The output files. The blob referenced by the digest should contain one of + * the following (implementation-dependent): * A marshalled + * DirectoryMetadata of the returned filesystem * A LUCI-style .isolated + * file + */ + outputs?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + } + /** + * DEPRECATED - use CommandResult instead. Can be used as part of + * CompleteRequest.metadata, or are part of a more sophisticated message. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandOverhead { + /** + * The elapsed time between calling Accept and Complete. The server will + * also have its own idea of what this should be, but this excludes the + * overhead of the RPCs and the bot response time. + */ + duration?: string; + /** + * The amount of time *not* spent executing the command (ie + * uploading/downloading files). + */ + overhead?: string; + } + /** + * All information about the execution of a command, suitable for providing as + * the Bots interface's `Lease.result` field. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandResult { + /** + * The elapsed time between calling Accept and Complete. The server will + * also have its own idea of what this should be, but this excludes the + * overhead of the RPCs and the bot response time. + */ + duration?: string; + /** + * The exit code of the process. An exit code of "0" should only + * be trusted if `status` has a code of OK (otherwise it may simply be + * unset). + */ + exitCode?: number; + /** + * The output files. The blob referenced by the digest should contain one of + * the following (implementation-dependent): * A marshalled + * DirectoryMetadata of the returned filesystem * A LUCI-style .isolated + * file + */ + outputs?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * The amount of time *not* spent executing the command (ie + * uploading/downloading files). + */ + overhead?: string; + /** + * Implementation-dependent statistics about the task. Both servers and bots + * may define messages which can be encoded here; bots are free to provide + * statistics in multiple formats, and servers are free to choose one or + * more of the values to process and ignore others. In particular, it is + * *not* considered an error for the bot to provide the server with a field + * that it doesn't know about. + */ + statistics?: Array<{[key: string]: any;}>; + /** + * An overall status for the command. For example, if the command timed out, + * this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS + * for memory exhaustion, it might have a code of RESOURCE_EXHAUSTED. + */ + status?: Schema$GoogleRpcStatus; + } + /** + * Describes a shell-style task to execute, suitable for providing as the Bots + * interface's `Lease.payload` field. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTask { + /** + * The expected outputs from the task. + */ + expectedOutputs?: + Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs; + /** + * The inputs to the task. + */ + inputs?: Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs; + /** + * The timeouts of this task. + */ + timeouts?: Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts; + } + /** + * Describes the inputs to a shell-style task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs { + /** + * The command itself to run (e.g., argv). This field should be passed + * directly to the underlying operating system, and so it must be sensible + * to that operating system. For example, on Windows, the first argument + * might be "C:\Windows\System32\ping.exe" - that is, using drive + * letters and backslashes. A command for a *nix system, on the other hand, + * would use forward slashes. All other fields in the RWAPI must + * consistently use forward slashes, since those fields may be interpretted + * by both the service and the bot. + */ + arguments?: string[]; + /** + * All environment variables required by the task. + */ + environmentVariables?: + Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable[]; + /** + * The input filesystem to be set up prior to the task beginning. The + * contents should be a repeated set of FileMetadata messages though other + * formats are allowed if better for the implementation (eg, a LUCI-style + * .isolated file). This field is repeated since implementations might want + * to cache the metadata, in which case it may be useful to break up + * portions of the filesystem that change frequently (eg, specific input + * files) from those that don't (eg, standard header files). + */ + files?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest[]; + /** + * Inline contents for blobs expected to be needed by the bot to execute the + * task. For example, contents of entries in `files` or blobs that are + * indirectly referenced by an entry there. The bot should check against + * this list before downloading required task inputs to reduce the number of + * communications between itself and the remote CAS server. + */ + inlineBlobs?: Schema$GoogleDevtoolsRemoteworkersV1test2Blob[]; + } + /** + * An environment variable required by this task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable { + /** + * The envvar name. + */ + name?: string; + /** + * The envvar value. + */ + value?: string; + } + /** + * Describes the expected outputs of the command. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs { + /** + * A list of expected directories, relative to the execution root. All paths + * MUST be delimited by forward slashes. + */ + directories?: string[]; + /** + * A list of expected files, relative to the execution root. All paths MUST + * be delimited by forward slashes. + */ + files?: string[]; + /** + * The destination to which any stderr should be sent. The method by which + * the bot should send the stream contents to that destination is not + * defined in this API. As examples, the destination could be a file + * referenced in the `files` field in this message, or it could be a URI + * that must be written via the ByteStream API. + */ + stderrDestination?: string; + /** + * The destination to which any stdout should be sent. The method by which + * the bot should send the stream contents to that destination is not + * defined in this API. As examples, the destination could be a file + * referenced in the `files` field in this message, or it could be a URI + * that must be written via the ByteStream API. + */ + stdoutDestination?: string; + } + /** + * Describes the timeouts associated with this task. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts { + /** + * This specifies the maximum time that the task can run, excluding the time + * required to download inputs or upload outputs. That is, the worker will + * terminate the task if it runs longer than this. + */ + execution?: string; + /** + * This specifies the maximum amount of time the task can be idle - that is, + * go without generating some output in either stdout or stderr. If the + * process is silent for more than the specified time, the worker will + * terminate the task. + */ + idle?: string; + /** + * If the execution or IO timeouts are exceeded, the worker will try to + * gracefully terminate the task and return any existing logs. However, + * tasks may be hard-frozen in which case this process will fail. This + * timeout specifies how long to wait for a terminated task to shut down + * gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g. + * SIGKILL on *nix, CTRL_BREAK_EVENT on Windows). + */ + shutdown?: string; + } + /** + * The CommandTask and CommandResult messages assume the existence of a + * service that can serve blobs of content, identified by a hash and size + * known as a "digest." The method by which these blobs may be + * retrieved is not specified here, but a model implementation is in the + * Remote Execution API's "ContentAddressibleStorage" interface. + * In the context of the RWAPI, a Digest will virtually always refer to the + * contents of a file or a directory. The latter is represented by the + * byte-encoded Directory message. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Digest { + /** + * A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, + * 0x2b, 0x3c]) using an implementation-defined hash algorithm (eg SHA-256). + */ + hash?: string; + /** + * The size of the contents. While this is not strictly required as part of + * an identifier (after all, any given hash will have exactly one canonical + * size), it's useful in almost all cases when one might want to send or + * retrieve blobs of content and is included here for this reason. + */ + sizeBytes?: string; + } + /** + * The contents of a directory. Similar to the equivalent message in the + * Remote Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2Directory { + /** + * Any subdirectories + */ + directories?: Schema$GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata[]; + /** + * The files in this directory + */ + files?: Schema$GoogleDevtoolsRemoteworkersV1test2FileMetadata[]; + } + /** + * The metadata for a directory. Similar to the equivalent message in the + * Remote Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata { + /** + * A pointer to the contents of the directory, in the form of a marshalled + * Directory message. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * The path of the directory, as in FileMetadata.path. + */ + path?: string; + } + /** + * The metadata for a file. Similar to the equivalent message in the Remote + * Execution API. + */ + export interface Schema$GoogleDevtoolsRemoteworkersV1test2FileMetadata { + /** + * If the file is small enough, its contents may also or alternatively be + * listed here. + */ + contents?: string; + /** + * A pointer to the contents of the file. The method by which a client + * retrieves the contents from a CAS system is not defined here. + */ + digest?: Schema$GoogleDevtoolsRemoteworkersV1test2Digest; + /** + * Properties of the file + */ + isExecutable?: boolean; + /** + * The path of this file. If this message is part of the + * CommandOutputs.outputs fields, the path is relative to the execution root + * and must correspond to an entry in CommandTask.outputs.files. If this + * message is part of a Directory message, then the path is relative to the + * root of that directory. All paths MUST be delimited by forward slashes. + */ + path?: string; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$GoogleLongrunningOperation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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;}; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any;}; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: Array<{[key: string]: any;}>; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + + + export class Resource$Actionresults { + constructor() {} + + + /** + * remotebuildexecution.actionResults.get + * @desc Retrieve a cached execution result. Errors: * `NOT_FOUND`: The + * requested `ActionResult` is not in the cache. + * @alias remotebuildexecution.actionResults.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {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. + * @return {object} Request object + */ + get(params?: Params$Resource$Actionresults$Get, options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Actionresults$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): void; + get(params: Params$Resource$Actionresults$Get, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): void; + get(callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): void; + get(paramsOrCallback?: Params$Resource$Actionresults$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Actionresults$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Actionresults$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v2/{+instanceName}/actionResults/{hash}/{sizeBytes}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['instanceName', 'hash', 'sizeBytes'], + pathParams: ['hash', 'instanceName', 'sizeBytes'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * remotebuildexecution.actionResults.update + * @desc Upload a new execution result. This method is intended for servers + * which implement the distributed cache independently of the Execution API. + * As a result, it is OPTIONAL for servers to implement. In order to allow + * the server to perform access control based on the type of action, and to + * assist with client debugging, the client MUST first upload the Action + * that produced the result, along with its Command, into the + * `ContentAddressableStorage`. Errors: * `UNIMPLEMENTED`: This method is + * not supported by the server. * `RESOURCE_EXHAUSTED`: There is + * insufficient storage space to add the entry to the cache. + * @alias remotebuildexecution.actionResults.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @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.resultsCachePolicy.priority The priority (relative importance) of this content in the overall cache. Generally, a lower value means a longer retention time or other advantage, but the interpretation of a given value is server-dependent. A priority of 0 means a *default* value, decided by the server. The particular semantics of this field is up to the server. In particular, every server will have their own supported range of priorities, and will decide how these map into retention/eviction policy. + * @param {string} params.sizeBytes The size of the blob, in bytes. + * @param {().BuildBazelRemoteExecutionV2ActionResult} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Actionresults$Update, options?: MethodOptions): + AxiosPromise; + update( + params: Params$Resource$Actionresults$Update, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): void; + update( + params: Params$Resource$Actionresults$Update, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): void; + update(callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): void; + update( + paramsOrCallback?: Params$Resource$Actionresults$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ActionResult>): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Actionresults$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Actionresults$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v2/{+instanceName}/actionResults/{hash}/{sizeBytes}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['instanceName', 'hash', 'sizeBytes'], + pathParams: ['hash', 'instanceName', 'sizeBytes'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Actionresults$Get extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * 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. + */ + instanceName?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + export interface Params$Resource$Actionresults$Update extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * 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. + */ + instanceName?: string; + /** + * The priority (relative importance) of this content in the overall cache. + * Generally, a lower value means a longer retention time or other + * advantage, but the interpretation of a given value is server-dependent. A + * priority of 0 means a *default* value, decided by the server. The + * particular semantics of this field is up to the server. In particular, + * every server will have their own supported range of priorities, and will + * decide how these map into retention/eviction policy. + */ + 'resultsCachePolicy.priority'?: number; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BuildBazelRemoteExecutionV2ActionResult; + } + + + export class Resource$Actions { + constructor() {} + + + /** + * remotebuildexecution.actions.execute + * @desc Execute an action remotely. In order to execute an action, the + * client must first upload all of the inputs, the Command to run, and the + * Action into the ContentAddressableStorage. It then calls `Execute` with + * an `action_digest` referring to them. The server will run the action and + * eventually return the result. The input `Action`'s fields MUST meet the + * various canonicalization requirements specified in the documentation for + * their types so that it has the same digest as other logically equivalent + * `Action`s. The server MAY enforce the requirements and return errors if a + * non-canonical input is received. It MAY also proceed without verifying + * some or all of the requirements, such as for performance reasons. If the + * server does not verify the requirement, then it will treat the `Action` + * as distinct from another logically equivalent action if they hash + * differently. Returns a stream of google.longrunning.Operation messages + * describing the resulting execution, with eventual `response` + * ExecuteResponse. The `metadata` on the operation is of type + * ExecuteOperationMetadata. If the client remains connected after the + * first response is returned after the server, then updates are streamed as + * if the client had called WaitExecution until the execution completes or + * the request reaches an error. The operation can also be queried using + * Operations API. The server NEED NOT implement other methods or + * functionality of the Operations API. Errors discovered during creation + * of the `Operation` will be reported as gRPC Status errors, while errors + * that occurred while running the action will be reported in the `status` + * field of the `ExecuteResponse`. The server MUST NOT set the `error` field + * of the `Operation` proto. The possible errors include: * + * `INVALID_ARGUMENT`: One or more arguments are invalid. * + * `FAILED_PRECONDITION`: One or more errors occurred in setting up the + * action requested, such as a missing input or command or no worker being + * available. The client may be able to fix the errors and retry. * + * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run + * the action. * `UNAVAILABLE`: Due to a transient condition, such as all + * workers being occupied (and the server does not support a queue), the + * action could not be started. The client should retry. * `INTERNAL`: An + * internal error occurred in the execution engine or the worker. * + * `DEADLINE_EXCEEDED`: The execution timed out. In the case of a missing + * input or command, the server SHOULD additionally send a + * PreconditionFailure error detail where, for each requested blob not + * present in the CAS, there is a `Violation` with a `type` of `MISSING` and + * a `subject` of `"blobs/{hash}/{size}"` indicating the digest of the + * missing blob. + * @alias remotebuildexecution.actions.execute + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().BuildBazelRemoteExecutionV2ExecuteRequest} 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 + */ + execute(params?: Params$Resource$Actions$Execute, options?: MethodOptions): + AxiosPromise; + execute( + params: Params$Resource$Actions$Execute, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + execute( + params: Params$Resource$Actions$Execute, + callback: BodyResponseCallback): + void; + execute(callback: BodyResponseCallback): + void; + execute( + paramsOrCallback?: Params$Resource$Actions$Execute| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Actions$Execute; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Actions$Execute; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+instanceName}/actions:execute') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['instanceName'], + pathParams: ['instanceName'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Actions$Execute extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * 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. + */ + instanceName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BuildBazelRemoteExecutionV2ExecuteRequest; + } + + + export class Resource$Blobs { + constructor() {} + + + /** + * remotebuildexecution.blobs.batchRead + * @desc Download many blobs at once. The server may enforce a limit of the + * combined total size of blobs to be downloaded using this API. This limit + * may be obtained using the Capabilities API. Requests exceeding the limit + * should either be split into smaller chunks or downloaded using the + * ByteStream API, as appropriate. This request is equivalent to calling a + * Bytestream `Read` request on each individual blob, in parallel. The + * requests may succeed or fail independently. Errors: * + * `INVALID_ARGUMENT`: The client attempted to read more than the server + * supported limit. Every error on individual read will be returned in the + * corresponding digest status. + * @alias remotebuildexecution.blobs.batchRead + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().BuildBazelRemoteExecutionV2BatchReadBlobsRequest} 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 + */ + batchRead( + params?: Params$Resource$Blobs$Batchread, options?: MethodOptions): + AxiosPromise; + batchRead( + params: Params$Resource$Blobs$Batchread, + options: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>): void; + batchRead( + params: Params$Resource$Blobs$Batchread, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>): void; + batchRead(callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>): void; + batchRead( + paramsOrCallback?: Params$Resource$Blobs$Batchread|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>, + callback?: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Blobs$Batchread; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Blobs$Batchread; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+instanceName}/blobs:batchRead') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['instanceName'], + pathParams: ['instanceName'], + context + }; + if (callback) { + createAPIRequest< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$BuildBazelRemoteExecutionV2BatchReadBlobsResponse>( + parameters); + } + } + + + /** + * remotebuildexecution.blobs.batchUpdate + * @desc Upload many blobs at once. The server may enforce a limit of the + * combined total size of blobs to be uploaded using this API. This limit + * may be obtained using the Capabilities API. Requests exceeding the limit + * should either be split into smaller chunks or uploaded using the + * ByteStream API, as appropriate. This request is equivalent to calling a + * Bytestream `Write` request on each individual blob, in parallel. The + * requests may succeed or fail independently. Errors: * + * `INVALID_ARGUMENT`: The client attempted to upload more than the server + * supported limit. Individual requests may return the following errors, + * additionally: * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to + * store the blob. * `INVALID_ARGUMENT`: The Digest does not match the + * provided data. + * @alias remotebuildexecution.blobs.batchUpdate + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest} 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 + */ + batchUpdate( + params?: Params$Resource$Blobs$Batchupdate, options?: MethodOptions): + AxiosPromise< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>; + batchUpdate( + params: Params$Resource$Blobs$Batchupdate, + options: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>): void; + batchUpdate( + params: Params$Resource$Blobs$Batchupdate, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>): void; + batchUpdate(callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>): + void; + batchUpdate( + paramsOrCallback?: Params$Resource$Blobs$Batchupdate| + BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>, + callback?: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>): + void|AxiosPromise< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse> { + let params = + (paramsOrCallback || {}) as Params$Resource$Blobs$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Blobs$Batchupdate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+instanceName}/blobs:batchUpdate') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['instanceName'], + pathParams: ['instanceName'], + context + }; + if (callback) { + createAPIRequest< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse>( + parameters); + } + } + + + /** + * 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. + * @alias remotebuildexecution.blobs.findMissing + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().BuildBazelRemoteExecutionV2FindMissingBlobsRequest} 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 + */ + findMissing( + params?: Params$Resource$Blobs$Findmissing, options?: MethodOptions): + AxiosPromise< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>; + findMissing( + params: Params$Resource$Blobs$Findmissing, + options: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>): void; + findMissing( + params: Params$Resource$Blobs$Findmissing, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>): void; + findMissing(callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>): + void; + findMissing( + paramsOrCallback?: Params$Resource$Blobs$Findmissing| + BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>, + callback?: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>): + void|AxiosPromise< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse> { + let params = + (paramsOrCallback || {}) as Params$Resource$Blobs$Findmissing; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Blobs$Findmissing; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+instanceName}/blobs:findMissing') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['instanceName'], + pathParams: ['instanceName'], + context + }; + if (callback) { + createAPIRequest< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$BuildBazelRemoteExecutionV2FindMissingBlobsResponse>( + parameters); + } + } + + + /** + * 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. + * @alias remotebuildexecution.blobs.getTree + * @memberOf! () + * + * @param {object} params Parameters for request + * @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.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. + * @return {object} Request object + */ + getTree(params?: Params$Resource$Blobs$Gettree, options?: MethodOptions): + AxiosPromise; + getTree( + params: Params$Resource$Blobs$Gettree, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2GetTreeResponse>): void; + getTree( + params: Params$Resource$Blobs$Gettree, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2GetTreeResponse>): void; + getTree(callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2GetTreeResponse>): void; + getTree( + paramsOrCallback?: Params$Resource$Blobs$Gettree| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2GetTreeResponse>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Blobs$Gettree; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Blobs$Gettree; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v2/{+instanceName}/blobs/{hash}/{sizeBytes}:getTree') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['instanceName', 'hash', 'sizeBytes'], + pathParams: ['hash', 'instanceName', 'sizeBytes'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$BuildBazelRemoteExecutionV2GetTreeResponse>(parameters); + } + } + } + + export interface Params$Resource$Blobs$Batchread extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * 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. + */ + instanceName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BuildBazelRemoteExecutionV2BatchReadBlobsRequest; + } + export interface Params$Resource$Blobs$Batchupdate extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * 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. + */ + instanceName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest; + } + export interface Params$Resource$Blobs$Findmissing extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * 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. + */ + instanceName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BuildBazelRemoteExecutionV2FindMissingBlobsRequest; + } + export interface Params$Resource$Blobs$Gettree extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The hash. In the case of SHA-256, it will always be a lowercase hex + * string exactly 64 characters long. + */ + hash?: string; + /** + * 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. + */ + instanceName?: string; + /** + * 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. + */ + 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. + */ + pageToken?: string; + /** + * The size of the blob, in bytes. + */ + sizeBytes?: string; + } + + + export class Resource$Operations { + constructor() {} + + + /** + * remotebuildexecution.operations.waitExecution + * @desc Wait for an execution operation to complete. When the client + * initially makes the request, the server immediately responds with the + * current status of the execution. The server will leave the request stream + * open until the operation completes, and then respond with the completed + * operation. The server MAY choose to stream additional updates as + * execution progresses, such as to provide an update as to the state of the + * execution. + * @alias remotebuildexecution.operations.waitExecution + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the Operation returned by Execute. + * @param {().BuildBazelRemoteExecutionV2WaitExecutionRequest} 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 + */ + waitExecution( + params?: Params$Resource$Operations$Waitexecution, + options?: MethodOptions): + AxiosPromise; + waitExecution( + params: Params$Resource$Operations$Waitexecution, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + waitExecution( + params: Params$Resource$Operations$Waitexecution, + callback: BodyResponseCallback): + void; + waitExecution(callback: + BodyResponseCallback): + void; + waitExecution( + paramsOrCallback?: Params$Resource$Operations$Waitexecution| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Operations$Waitexecution; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Waitexecution; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:waitExecution') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$Waitexecution extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the Operation returned by Execute. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BuildBazelRemoteExecutionV2WaitExecutionRequest; + } + + + export class Resource$V2 { + constructor() {} + + + /** + * remotebuildexecution.getCapabilities + * @desc GetCapabilities returns the server capabilities configuration. + * @alias remotebuildexecution.getCapabilities + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getCapabilities( + params?: Params$Resource$V2$Getcapabilities, options?: MethodOptions): + AxiosPromise; + getCapabilities( + params: Params$Resource$V2$Getcapabilities, + options: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>): void; + getCapabilities( + params: Params$Resource$V2$Getcapabilities, + callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>): void; + getCapabilities(callback: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>): + void; + getCapabilities( + paramsOrCallback?: Params$Resource$V2$Getcapabilities| + BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>, + callback?: BodyResponseCallback< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>): void| + AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$V2$Getcapabilities; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$V2$Getcapabilities; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://remotebuildexecution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+instanceName}/capabilities') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['instanceName'], + pathParams: ['instanceName'], + context + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$BuildBazelRemoteExecutionV2ServerCapabilities>(parameters); + } + } + } + + export interface Params$Resource$V2$Getcapabilities extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * 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. + */ + instanceName?: string; + } +} diff --git a/src/apis/replicapoolupdater/v1beta1.ts b/src/apis/replicapoolupdater/v1beta1.ts deleted file mode 100644 index 792b3f67490..00000000000 --- a/src/apis/replicapoolupdater/v1beta1.ts +++ /dev/null @@ -1,1337 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {AxiosPromise} from 'axios'; -import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; -import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; - -// tslint:disable: no-any -// tslint:disable: class-name -// tslint:disable: variable-name -// tslint:disable: jsdoc-format -// tslint:disable: no-namespace - -export namespace replicapoolupdater_v1beta1 { - export interface Options extends GlobalOptions { - version: 'v1beta1'; - } - - let context: APIRequestContext; - - 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 Compute Engine Instance Group Updater API - * - * [Deprecated. Please use compute.instanceGroupManagers.update method. - * replicapoolupdater API will be disabled after December 30th, 2016] Updates - * groups of Compute Engine instances. - * - * @example - * const {google} = require('googleapis'); - * const replicapoolupdater = google.replicapoolupdater('v1beta1'); - * - * @namespace replicapoolupdater - * @type {Function} - * @version v1beta1 - * @variation v1beta1 - * @param {object=} options Options for Replicapoolupdater - */ - export class Replicapoolupdater { - rollingUpdates: Resource$Rollingupdates; - zoneOperations: Resource$Zoneoperations; - - constructor(options: GlobalOptions, google?: GoogleConfigurable) { - context = {_options: options || {}, google}; - - this.rollingUpdates = new Resource$Rollingupdates(); - this.zoneOperations = new Resource$Zoneoperations(); - } - } - - /** - * Update of a single instance. - */ - export interface Schema$InstanceUpdate { - /** - * Errors that occurred during the instance update. - */ - error?: { - errors?: Array<{code?: string; location?: string; message?: string;}>; - }; - /** - * Fully-qualified URL of the instance being updated. - */ - instance?: string; - /** - * Status of the instance update. Possible values are: - - * "PENDING": The instance update is pending execution. - - * "ROLLING_FORWARD": The instance update is going forward. - - * "ROLLING_BACK": The instance update is being rolled back. - - * "PAUSED": The instance update is temporarily paused (inactive). - * - "ROLLED_OUT": The instance update is finished, the instance - * is running the new template. - "ROLLED_BACK": The instance - * update is finished, the instance has been reverted to the previous - * template. - "CANCELLED": The instance update is paused and no - * longer can be resumed, undefined in which template the instance is - * running. - */ - status?: string; - } - /** - * Response returned by ListInstanceUpdates method. - */ - export interface Schema$InstanceUpdateList { - /** - * Collection of requested instance updates. - */ - items?: Schema$InstanceUpdate[]; - /** - * [Output Only] Type of the resource. - */ - kind?: string; - /** - * A token used to continue a truncated list request. - */ - nextPageToken?: string; - /** - * [Output Only] The fully qualified URL for the resource. - */ - selfLink?: string; - } - /** - * An operation resource, used to manage asynchronous API requests. - */ - export interface Schema$Operation { - clientOperationId?: string; - /** - * [Output Only] Creation timestamp in RFC3339 text format. - */ - creationTimestamp?: string; - endTime?: string; - /** - * [Output Only] If errors occurred during processing of this operation, - * this field will be populated. - */ - error?: { - errors?: Array<{code?: string; location?: string; message?: string;}>; - }; - httpErrorMessage?: string; - httpErrorStatusCode?: number; - /** - * [Output Only] Unique identifier for the resource; defined by the server. - */ - id?: string; - /** - * [Output Only] The time that this operation was requested. This is in RFC - * 3339 format. - */ - insertTime?: string; - /** - * [Output Only] Type of the resource. Always replicapoolupdater#operation - * for Operation resources. - */ - kind?: string; - /** - * [Output Only] Name of the resource. - */ - name?: string; - operationType?: string; - progress?: number; - /** - * [Output Only] URL of the region where the operation resides. - */ - region?: string; - /** - * [Output Only] The fully qualified URL for the resource. - */ - selfLink?: string; - /** - * [Output Only] The time that this operation was started by the server. - * This is in RFC 3339 format. - */ - startTime?: string; - /** - * [Output Only] Status of the operation. Can be one of the following: - * "PENDING", "RUNNING", or "DONE". - */ - status?: string; - /** - * [Output Only] An optional textual description of the current status of - * the operation. - */ - statusMessage?: string; - /** - * [Output Only] Unique target id which identifies a particular incarnation - * of the target. - */ - targetId?: string; - /** - * [Output Only] URL of the resource the operation is mutating. - */ - targetLink?: string; - user?: string; - warnings?: Array<{ - code?: string; - data?: Array<{key?: string; value?: string;}>; - message?: string; - }>; - /** - * [Output Only] URL of the zone where the operation resides. - */ - zone?: string; - } - /** - * Contains a list of Operation resources. - */ - export interface Schema$OperationList { - /** - * [Output Only] Unique identifier for the resource; defined by the server. - */ - id?: string; - /** - * [Output Only] The Operation resources. - */ - items?: Schema$Operation[]; - /** - * [Output Only] Type of resource. Always replicapoolupdater#operationList - * for OperationList resources. - */ - kind?: string; - /** - * [Output Only] A token used to continue a truncate. - */ - nextPageToken?: string; - /** - * [Output Only] The fully qualified URL for the resource. - */ - selfLink?: string; - } - /** - * The following represents a resource describing a single update (rollout) of - * a group of instances to the given template. - */ - export interface Schema$RollingUpdate { - /** - * Specifies the action to take for each instance within the instance group. - * This can be RECREATE which will recreate each instance and is only - * available for managed instance groups. It can also be REBOOT which - * performs a soft reboot for each instance and is only available for - * regular (non-managed) instance groups. - */ - actionType?: string; - /** - * [Output Only] Creation timestamp in RFC3339 text format. - */ - creationTimestamp?: string; - /** - * An optional textual description of the resource; provided by the client - * when the resource is created. - */ - description?: string; - /** - * [Output Only] Errors that occurred during the rolling update. - */ - error?: { - errors?: Array<{code?: string; location?: string; message?: string;}>; - }; - /** - * [Output Only] Unique identifier for the resource; defined by the server. - */ - id?: string; - /** - * Fully-qualified URL of an instance group being updated. Exactly one of - * instanceGroupManager and instanceGroup must be set. - */ - instanceGroup?: string; - /** - * Fully-qualified URL of an instance group manager being updated. Exactly - * one of instanceGroupManager and instanceGroup must be set. - */ - instanceGroupManager?: string; - /** - * Fully-qualified URL of an instance template to apply. - */ - instanceTemplate?: string; - /** - * [Output Only] Type of the resource. - */ - kind?: string; - /** - * Fully-qualified URL of the instance template encountered while starting - * the update. - */ - oldInstanceTemplate?: string; - /** - * Parameters of the update process. - */ - policy?: { - autoPauseAfterInstances?: number; - instanceStartupTimeoutSec?: number; - maxNumConcurrentInstances?: number; - maxNumFailedInstances?: number; - minInstanceUpdateTimeSec?: number; - }; - /** - * [Output Only] An optional progress indicator that ranges from 0 to 100. - * There is no requirement that this be linear or support any granularity of - * operations. This should not be used to guess at when the update will be - * complete. This number should be monotonically increasing as the update - * progresses. - */ - progress?: number; - /** - * [Output Only] The fully qualified URL for the resource. - */ - selfLink?: string; - /** - * [Output Only] Status of the update. Possible values are: - - * "ROLLING_FORWARD": The update is going forward. - - * "ROLLING_BACK": The update is being rolled back. - - * "PAUSED": The update is temporarily paused (inactive). - - * "ROLLED_OUT": The update is finished, all instances have been - * updated successfully. - "ROLLED_BACK": The update is finished, - * all instances have been reverted to the previous template. - - * "CANCELLED": The update is paused and no longer can be resumed, - * undefined how many instances are running in which template. - */ - status?: string; - /** - * [Output Only] An optional textual description of the current status of - * the update. - */ - statusMessage?: string; - /** - * [Output Only] User who requested the update, for example: - * user@example.com. - */ - user?: string; - } - /** - * Response returned by List method. - */ - export interface Schema$RollingUpdateList { - /** - * Collection of requested updates. - */ - items?: Schema$RollingUpdate[]; - /** - * [Output Only] Type of the resource. - */ - kind?: string; - /** - * A token used to continue a truncated list request. - */ - nextPageToken?: string; - /** - * [Output Only] The fully qualified URL for the resource. - */ - selfLink?: string; - } - - - export class Resource$Rollingupdates { - constructor() {} - - - /** - * replicapoolupdater.rollingUpdates.cancel - * @desc Cancels an update. The update must be PAUSED before it can be - * cancelled. This has no effect if the update is already CANCELLED. - * @alias replicapoolupdater.rollingUpdates.cancel - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.rollingUpdate The name of the update. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {object} [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$Rollingupdates$Cancel, - options?: MethodOptions): AxiosPromise; - cancel( - params: Params$Resource$Rollingupdates$Cancel, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - cancel( - params: Params$Resource$Rollingupdates$Cancel, - callback: BodyResponseCallback): void; - cancel(callback: BodyResponseCallback): void; - cancel( - paramsOrCallback?: Params$Resource$Rollingupdates$Cancel| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Rollingupdates$Cancel; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$Cancel; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/cancel') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'zone', 'rollingUpdate'], - pathParams: ['project', 'rollingUpdate', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.rollingUpdates.get - * @desc Returns information about an update. - * @alias replicapoolupdater.rollingUpdates.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.rollingUpdate The name of the update. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {object} [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$Rollingupdates$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Rollingupdates$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Rollingupdates$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Rollingupdates$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Rollingupdates$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'zone', 'rollingUpdate'], - pathParams: ['project', 'rollingUpdate', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.rollingUpdates.insert - * @desc Inserts and starts a new update. - * @alias replicapoolupdater.rollingUpdates.insert - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {().RollingUpdate} 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 - */ - insert( - params?: Params$Resource$Rollingupdates$Insert, - options?: MethodOptions): AxiosPromise; - insert( - params: Params$Resource$Rollingupdates$Insert, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - insert( - params: Params$Resource$Rollingupdates$Insert, - callback: BodyResponseCallback): void; - insert(callback: BodyResponseCallback): void; - insert( - paramsOrCallback?: Params$Resource$Rollingupdates$Insert| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Rollingupdates$Insert; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$Insert; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.rollingUpdates.list - * @desc Lists recent updates for a given managed instance group, in reverse - * chronological order and paginated format. - * @alias replicapoolupdater.rollingUpdates.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter Optional. Filter expression for filtering listed resources. - * @param {integer=} params.maxResults Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. - * @param {string=} params.pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {object} [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$Rollingupdates$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Rollingupdates$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Rollingupdates$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Rollingupdates$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Rollingupdates$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.rollingUpdates.listInstanceUpdates - * @desc Lists the current status for each instance within a given update. - * @alias replicapoolupdater.rollingUpdates.listInstanceUpdates - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter Optional. Filter expression for filtering listed resources. - * @param {integer=} params.maxResults Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. - * @param {string=} params.pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.rollingUpdate The name of the update. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - listInstanceUpdates( - params?: Params$Resource$Rollingupdates$Listinstanceupdates, - options?: MethodOptions): AxiosPromise; - listInstanceUpdates( - params: Params$Resource$Rollingupdates$Listinstanceupdates, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - listInstanceUpdates( - params: Params$Resource$Rollingupdates$Listinstanceupdates, - callback: BodyResponseCallback): void; - listInstanceUpdates( - callback: BodyResponseCallback): void; - listInstanceUpdates( - paramsOrCallback?: Params$Resource$Rollingupdates$Listinstanceupdates| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Rollingupdates$Listinstanceupdates; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$Listinstanceupdates; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/instanceUpdates') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'zone', 'rollingUpdate'], - pathParams: ['project', 'rollingUpdate', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.rollingUpdates.pause - * @desc Pauses the update in state from ROLLING_FORWARD or ROLLING_BACK. - * Has no effect if invoked when the state of the update is PAUSED. - * @alias replicapoolupdater.rollingUpdates.pause - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.rollingUpdate The name of the update. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - pause( - params?: Params$Resource$Rollingupdates$Pause, - options?: MethodOptions): AxiosPromise; - pause( - params: Params$Resource$Rollingupdates$Pause, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - pause( - params: Params$Resource$Rollingupdates$Pause, - callback: BodyResponseCallback): void; - pause(callback: BodyResponseCallback): void; - pause( - paramsOrCallback?: Params$Resource$Rollingupdates$Pause| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Rollingupdates$Pause; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$Pause; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/pause') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'zone', 'rollingUpdate'], - pathParams: ['project', 'rollingUpdate', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.rollingUpdates.resume - * @desc Continues an update in PAUSED state. Has no effect if invoked when - * the state of the update is ROLLED_OUT. - * @alias replicapoolupdater.rollingUpdates.resume - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.rollingUpdate The name of the update. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - resume( - params?: Params$Resource$Rollingupdates$Resume, - options?: MethodOptions): AxiosPromise; - resume( - params: Params$Resource$Rollingupdates$Resume, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - resume( - params: Params$Resource$Rollingupdates$Resume, - callback: BodyResponseCallback): void; - resume(callback: BodyResponseCallback): void; - resume( - paramsOrCallback?: Params$Resource$Rollingupdates$Resume| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Rollingupdates$Resume; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$Resume; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/resume') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'zone', 'rollingUpdate'], - pathParams: ['project', 'rollingUpdate', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.rollingUpdates.rollback - * @desc Rolls back the update in state from ROLLING_FORWARD or PAUSED. Has - * no effect if invoked when the state of the update is ROLLED_BACK. - * @alias replicapoolupdater.rollingUpdates.rollback - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project The Google Developers Console project name. - * @param {string} params.rollingUpdate The name of the update. - * @param {string} params.zone The name of the zone in which the update's target resides. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - rollback( - params?: Params$Resource$Rollingupdates$Rollback, - options?: MethodOptions): AxiosPromise; - rollback( - params: Params$Resource$Rollingupdates$Rollback, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - rollback( - params: Params$Resource$Rollingupdates$Rollback, - callback: BodyResponseCallback): void; - rollback(callback: BodyResponseCallback): void; - rollback( - paramsOrCallback?: Params$Resource$Rollingupdates$Rollback| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Rollingupdates$Rollback; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Rollingupdates$Rollback; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/rollback') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'zone', 'rollingUpdate'], - pathParams: ['project', 'rollingUpdate', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Rollingupdates$Cancel extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the update. - */ - rollingUpdate?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - } - export interface Params$Resource$Rollingupdates$Get extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the update. - */ - rollingUpdate?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - } - export interface Params$Resource$Rollingupdates$Insert extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$RollingUpdate; - } - export interface Params$Resource$Rollingupdates$List extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Optional. Filter expression for filtering listed resources. - */ - filter?: string; - /** - * Optional. Maximum count of results to be returned. Maximum value is 500 - * and default value is 500. - */ - maxResults?: number; - /** - * Optional. Tag returned by a previous list request truncated by - * maxResults. Used to continue a previous list request. - */ - pageToken?: string; - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - } - export interface Params$Resource$Rollingupdates$Listinstanceupdates extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Optional. Filter expression for filtering listed resources. - */ - filter?: string; - /** - * Optional. Maximum count of results to be returned. Maximum value is 500 - * and default value is 500. - */ - maxResults?: number; - /** - * Optional. Tag returned by a previous list request truncated by - * maxResults. Used to continue a previous list request. - */ - pageToken?: string; - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the update. - */ - rollingUpdate?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - } - export interface Params$Resource$Rollingupdates$Pause extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the update. - */ - rollingUpdate?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - } - export interface Params$Resource$Rollingupdates$Resume extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the update. - */ - rollingUpdate?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - } - export interface Params$Resource$Rollingupdates$Rollback extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The Google Developers Console project name. - */ - project?: string; - /** - * The name of the update. - */ - rollingUpdate?: string; - /** - * The name of the zone in which the update's target resides. - */ - zone?: string; - } - - - export class Resource$Zoneoperations { - constructor() {} - - - /** - * replicapoolupdater.zoneOperations.get - * @desc Retrieves the specified zone-specific operation resource. - * @alias replicapoolupdater.zoneOperations.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.operation Name of the operation resource to return. - * @param {string} params.project Name of the project scoping this request. - * @param {string} params.zone Name of the zone scoping this request. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Zoneoperations$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Zoneoperations$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Zoneoperations$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Zoneoperations$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Zoneoperations$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Zoneoperations$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/operations/{operation}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'zone', 'operation'], - pathParams: ['operation', 'project', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * replicapoolupdater.zoneOperations.list - * @desc Retrieves the list of Operation resources contained within the - * specified zone. - * @alias replicapoolupdater.zoneOperations.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter Optional. Filter expression for filtering listed resources. - * @param {integer=} params.maxResults Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. - * @param {string=} params.pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. - * @param {string} params.project Name of the project scoping this request. - * @param {string} params.zone Name of the zone scoping this request. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Zoneoperations$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Zoneoperations$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Zoneoperations$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Zoneoperations$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Zoneoperations$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Zoneoperations$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/operations') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Zoneoperations$Get extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Name of the operation resource to return. - */ - operation?: string; - /** - * Name of the project scoping this request. - */ - project?: string; - /** - * Name of the zone scoping this request. - */ - zone?: string; - } - export interface Params$Resource$Zoneoperations$List extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Optional. Filter expression for filtering listed resources. - */ - filter?: string; - /** - * Optional. Maximum count of results to be returned. Maximum value is 500 - * and default value is 500. - */ - maxResults?: number; - /** - * Optional. Tag returned by a previous list request truncated by - * maxResults. Used to continue a previous list request. - */ - pageToken?: string; - /** - * Name of the project scoping this request. - */ - project?: string; - /** - * Name of the zone scoping this request. - */ - zone?: string; - } -} diff --git a/src/apis/runtimeconfig/v1beta1.ts b/src/apis/runtimeconfig/v1beta1.ts index 89c502ddada..19d039dce84 100644 --- a/src/apis/runtimeconfig/v1beta1.ts +++ b/src/apis/runtimeconfig/v1beta1.ts @@ -502,7 +502,9 @@ export namespace runtimeconfig_v1beta1 { /** * The binary value of the variable. The length of the value must be less * than 4096 bytes. Empty values are also accepted. The value must be base64 - * encoded. Only one of `value` or `text` can be set. + * encoded, and must comply with IETF RFC4648 + * (https://www.ietf.org/rfc/rfc4648.txt). Only one of `value` or `text` can + * be set. */ value?: string; } diff --git a/src/apis/serviceconsumermanagement/v1.ts b/src/apis/serviceconsumermanagement/v1.ts index 09a8624f204..d7379dcb821 100644 --- a/src/apis/serviceconsumermanagement/v1.ts +++ b/src/apis/serviceconsumermanagement/v1.ts @@ -295,7 +295,7 @@ export namespace serviceconsumermanagement_v1 { */ audiences?: string; /** - * Redirect URL if JWT token is required but no present or is expired. + * Redirect URL if JWT token is required but not present or is expired. * Implement authorizationUrl of securityDefinitions in OpenAPI spec. */ authorizationUrl?: string; @@ -375,6 +375,10 @@ export namespace serviceconsumermanagement_v1 { * seconds. */ deadline?: number; + /** + * The JWT audience is used when generating a JWT id token for the backend. + */ + jwtAudience?: string; /** * Minimum deadline in seconds needed for this method. Calls having deadline * value lower than this will be rejected. @@ -385,6 +389,7 @@ export namespace serviceconsumermanagement_v1 { * operation. The default is no deadline. */ operationDeadline?: number; + pathTranslation?: string; /** * Selects the methods to which this rule applies. Refer to selector for * syntax details. @@ -1445,16 +1450,20 @@ export namespace serviceconsumermanagement_v1 { export interface Schema$Monitoring { /** * Monitoring configurations for sending metrics to the consumer project. - * There can be multiple consumer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * consumer destination. + * There can be multiple consumer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ consumerDestinations?: Schema$MonitoringDestination[]; /** * Monitoring configurations for sending metrics to the producer project. - * There can be multiple producer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * producer destination. + * There can be multiple producer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ producerDestinations?: Schema$MonitoringDestination[]; } @@ -1464,7 +1473,7 @@ export namespace serviceconsumermanagement_v1 { */ export interface Schema$MonitoringDestination { /** - * Names of the metrics to report to this monitoring destination. Each name + * Types of the metrics to report to this monitoring destination. Each type * must be defined in Service.metrics section. */ metrics?: string[]; @@ -1854,8 +1863,10 @@ export namespace serviceconsumermanagement_v1 { */ monitoring?: Schema$Monitoring; /** - * The DNS address at which this service is available, e.g. - * `calendar.googleapis.com`. + * The service name, which is a DNS-like logical identifier for the service, + * such as `calendar.googleapis.com`. The service name typically goes + * through DNS verification to make sure the owner of the service also owns + * the DNS name. */ name?: string; /** @@ -3028,7 +3039,8 @@ export namespace serviceconsumermanagement_v1 { /** * serviceconsumermanagement.services.tenancyUnits.delete * @desc Delete a tenancy unit. Before the tenancy unit is deleted, there - * should be no tenant resources in it. Operation. + * should be no tenant resources in it not in DELETED state. + * Operation. * @alias serviceconsumermanagement.services.tenancyUnits.delete * @memberOf! () * @@ -3173,7 +3185,9 @@ export namespace serviceconsumermanagement_v1 { * @desc Removes specified project resource identified by tenant resource * tag. It will remove project lien with 'TenantManager' origin if that was * added. It will then attempt to delete the project. If that operation - * fails, this method fails. Operation. + * fails, this method fails. After the project has been deleted, or if was + * already in DELETED state, resource metadata is permanently removed from + * the tenancy unit. Operation. * @alias serviceconsumermanagement.services.tenancyUnits.removeProject * @memberOf! () * diff --git a/src/apis/servicecontrol/v1.ts b/src/apis/servicecontrol/v1.ts index d86a413aae8..42529cce73d 100644 --- a/src/apis/servicecontrol/v1.ts +++ b/src/apis/servicecontrol/v1.ts @@ -325,6 +325,13 @@ export namespace servicecontrol_v1 { * fail with a "permission denied" error. */ principalEmail?: string; + /** + * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + */ + serviceAccountKeyName?: string; /** * The third party identification (if any) of the authenticated user making * the request. When the JSON object represented here has a proto @@ -1359,14 +1366,18 @@ export namespace servicecontrol_v1 { */ export interface Schema$ResourceLocation { /** - * The locations of a resource after the execution of the operation. For - * example: "europe-west1-a" "us-east1" - * "nam3" + * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate the + * 'current_locations' field and not the + * 'original_locations' field. For example: + * "europe-west1-a" "us-east1" "nam3" */ currentLocations?: string[]; /** - * The locations of a resource prior to the execution of the operation. For - * example: "europe-west1-a" "us-east1" + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' + * fields. For example: "europe-west1-a" "us-east1" * "nam3" */ originalLocations?: string[]; diff --git a/src/apis/servicemanagement/v1.ts b/src/apis/servicemanagement/v1.ts index 5246fba42a5..a249a713fad 100644 --- a/src/apis/servicemanagement/v1.ts +++ b/src/apis/servicemanagement/v1.ts @@ -313,7 +313,7 @@ export namespace servicemanagement_v1 { */ audiences?: string; /** - * Redirect URL if JWT token is required but no present or is expired. + * Redirect URL if JWT token is required but not present or is expired. * Implement authorizationUrl of securityDefinitions in OpenAPI spec. */ authorizationUrl?: string; @@ -1719,16 +1719,20 @@ export namespace servicemanagement_v1 { export interface Schema$Monitoring { /** * Monitoring configurations for sending metrics to the consumer project. - * There can be multiple consumer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * consumer destination. + * There can be multiple consumer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ consumerDestinations?: Schema$MonitoringDestination[]; /** * Monitoring configurations for sending metrics to the producer project. - * There can be multiple producer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * producer destination. + * There can be multiple producer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ producerDestinations?: Schema$MonitoringDestination[]; } @@ -1738,7 +1742,7 @@ export namespace servicemanagement_v1 { */ export interface Schema$MonitoringDestination { /** - * Names of the metrics to report to this monitoring destination. Each name + * Types of the metrics to report to this monitoring destination. Each type * must be defined in Service.metrics section. */ metrics?: string[]; @@ -2204,8 +2208,10 @@ export namespace servicemanagement_v1 { */ monitoring?: Schema$Monitoring; /** - * The DNS address at which this service is available, e.g. - * `calendar.googleapis.com`. + * The service name, which is a DNS-like logical identifier for the service, + * such as `calendar.googleapis.com`. The service name typically goes + * through DNS verification to make sure the owner of the service also owns + * the DNS name. */ name?: string; /** diff --git a/src/apis/servicenetworking/v1beta.ts b/src/apis/servicenetworking/v1beta.ts index 61c74fcebde..781cb4c8f99 100644 --- a/src/apis/servicenetworking/v1beta.ts +++ b/src/apis/servicenetworking/v1beta.ts @@ -115,35 +115,36 @@ export namespace servicenetworking_v1beta { */ export interface Schema$AddSubnetworkRequest { /** - * Required. Resource representing service consumer. It may be different - * from the project number in consumer network parameter in case of that - * network being a shared VPC network. In that case, Service Networking will - * validate that this resource belongs to that shared VPC. For example - * 'projects/123456'. + * Required. A resource that represents the service consumer, such as + * `projects/123456`. The project number can be different from the value in + * the consumer network parameter. For example, the network might be part of + * a Shared VPC network. In those cases, Service Networking validates that + * this resource belongs to that Shared VPC. */ consumer?: string; /** - * Required. Network name in the consumer project. This network must have - * been already peered with a shared VPC network using CreateConnection - * method. Must be in a form - * 'projects/{project}/global/networks/{network}'. {project} is a - * project number, as in '12345' {network} is network name. + * Required. The name of the service consumer's VPC network. The network + * must have an existing private connection that was provisioned through the + * connections.create method. The name must be in the following format: + * `projects/{project}/global/networks/{network}`, where {project} is a + * project number, such as `12345`. {network} is the name of a VPC network + * in the project. */ consumerNetwork?: string; /** - * Optional. Description of the subnetwork. + * An optional description of the subnet. */ description?: string; /** - * Required. The prefix length of the IP range. Use usual CIDR range - * notation. For example, '30' to provision subnet with x.x.x.x/30 - * CIDR range. Actual range will be determined using allocated range for the - * consumer peered network and returned in the result. + * Required. The prefix length of the subnet's IP address range. Use + * CIDR range notation, such as `30` to provision a subnet with an + * `x.x.x.x/30` CIDR range. The IP address range is drawn from a pool of + * available ranges in the service consumer's allocated range. */ ipPrefixLength?: number; /** - * Required. Cloud [region](/compute/docs/reference/rest/v1/regions) for the - * new subnetwork. + * Required. The name of a [region](/compute/docs/regions-zones) for the + * subnet, such `europe-west1`. */ region?: string; /** @@ -155,13 +156,15 @@ export namespace servicenetworking_v1beta { */ requestedAddress?: string; /** - * Required. Name for the new subnetwork. Must be a legal - * [subnetwork](compute/docs/reference/rest/v1/subnetworks) name. + * Required. A name for the new subnet. For information about the naming + * requirements, see + * [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in the Compute + * API documentation. */ subnetwork?: string; /** - * Optional. List of members that will be granted - * 'compute.networkUser' role on the newly added subnetwork. + * A list of members that are granted the `compute.networkUser` role on the + * subnet. */ subnetworkUsers?: string[]; } @@ -301,7 +304,7 @@ export namespace servicenetworking_v1beta { */ audiences?: string; /** - * Redirect URL if JWT token is required but no present or is expired. + * Redirect URL if JWT token is required but not present or is expired. * Implement authorizationUrl of securityDefinitions in OpenAPI spec. */ authorizationUrl?: string; @@ -381,6 +384,10 @@ export namespace servicenetworking_v1beta { * seconds. */ deadline?: number; + /** + * The JWT audience is used when generating a JWT id token for the backend. + */ + jwtAudience?: string; /** * Minimum deadline in seconds needed for this method. Calls having deadline * value lower than this will be rejected. @@ -391,6 +398,7 @@ export namespace servicenetworking_v1beta { * operation. The default is no deadline. */ operationDeadline?: number; + pathTranslation?: string; /** * Selects the methods to which this rule applies. Refer to selector for * syntax details. @@ -435,30 +443,35 @@ export namespace servicenetworking_v1beta { monitoredResource?: string; } /** - * Message returning the created service connection. + * Represents a private connection resource. A private connection is + * implemented as a VPC Network Peering connection between a service + * producer's VPC network and a service consumer's VPC network. */ export interface Schema$Connection { /** - * Name of VPC network connected with service producer network. Must be in a - * form 'projects/{project}/global/networks/{network}'. {project} is - * a project number, as in '12345' {network} is a network name. + * The name of service consumer's VPC network that's connected with + * service producer network, in the following format: + * `projects/{project}/global/networks/{network}`. `{project}` is a project + * number, such as in `12345` that includes the VPC service consumer's + * VPC network. `{network}` is the name of the service consumer's VPC + * network. */ network?: string; /** - * Output only. Name of the peering connection that is created by the - * peering service. + * Output only. The name of the VPC Network Peering connection that was + * created by the service producer. */ peering?: string; /** - * Named IP address range(s) of PEERING type allocated for this service - * provider. Note that invoking this method with a different range when - * connection is already established will not modify already provisioned - * service producer subnetworks. + * The name of one or more allocated IP address ranges for this service + * producer of type `PEERING`. Note that invoking this method with a + * different range when connection is already established will not modify + * already provisioned service producer subnetworks. */ reservedPeeringRanges?: string[]; /** - * Output only. Name of the peering service associated with this connection. - * "services/{service name} + * Output only. The name of the peering service that's associated with + * this connection, in the following format: `services/{service name}`. */ service?: string; } @@ -1426,16 +1439,20 @@ export namespace servicenetworking_v1beta { export interface Schema$Monitoring { /** * Monitoring configurations for sending metrics to the consumer project. - * There can be multiple consumer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * consumer destination. + * There can be multiple consumer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ consumerDestinations?: Schema$MonitoringDestination[]; /** * Monitoring configurations for sending metrics to the producer project. - * There can be multiple producer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * producer destination. + * There can be multiple producer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ producerDestinations?: Schema$MonitoringDestination[]; } @@ -1445,7 +1462,7 @@ export namespace servicenetworking_v1beta { */ export interface Schema$MonitoringDestination { /** - * Names of the metrics to report to this monitoring destination. Each name + * Types of the metrics to report to this monitoring destination. Each type * must be defined in Service.metrics section. */ metrics?: string[]; @@ -1690,6 +1707,26 @@ export namespace servicenetworking_v1beta { */ values?: {[key: string]: string;}; } + /** + * Request to search for an unused range within allocated ranges. + */ + export interface Schema$SearchRangeRequest { + /** + * Required. The prefix length of the IP range. Use usual CIDR range + * notation. For example, '30' to find unused x.x.x.x/30 CIDR range. + * Actual range will be determined using allocated range for the consumer + * peered network and returned in the result. + */ + ipPrefixLength?: number; + /** + * Network name in the consumer project. This network must have been + * already peered with a shared VPC network using CreateConnection method. + * Must be in a form 'projects/{project}/global/networks/{network}'. + * {project} is a project number, as in '12345' {network} is network + * name. + */ + network?: string; + } /** * `Service` is the root object of Google service configuration schema. It * describes basic information about a service, such as the name and the @@ -1797,8 +1834,10 @@ export namespace servicenetworking_v1beta { */ monitoring?: Schema$Monitoring; /** - * The DNS address at which this service is available, e.g. - * `calendar.googleapis.com`. + * The service name, which is a DNS-like logical identifier for the service, + * such as `calendar.googleapis.com`. The service name typically goes + * through DNS verification to make sure the owner of the service also owns + * the DNS name. */ name?: string; /** @@ -1917,11 +1956,12 @@ export namespace servicenetworking_v1beta { message?: string; } /** - * Message returning the created service subnetwork. + * Represents a subnet that was created or discovered by a private access + * management service. */ export interface Schema$Subnetwork { /** - * Subnetwork CIDR range in "10.x.x.x/y" format. + * Subnetwork CIDR range in `10.x.x.x/y` format. */ ipCidrRange?: string; /** @@ -1929,10 +1969,16 @@ export namespace servicenetworking_v1beta { */ name?: string; /** - * Shared VPC host project network peered with consumer network. For - * example: projects/1234321/global/networks/host-network + * In the Shared VPC host project, the VPC network that's peered with + * the consumer network. For example: + * `projects/1234321/global/networks/host-network` */ network?: string; + /** + * This is a discovered subnet that is not within the current consumer + * allocated ranges. + */ + outsideAllocation?: boolean; } /** * Define a parameter's name and location. The parameter may be passed as @@ -2178,19 +2224,21 @@ export namespace servicenetworking_v1beta { /** * servicenetworking.services.addSubnetwork - * @desc Service producers use this method to provision a new subnet in - * peered service shared VPC network. It will validate previously provided - * allocated ranges, find non-conflicting sub-range of requested size - * (expressed in number of leading bits of ipv4 network mask, as in CIDR - * range notation). It will then create a subnetwork in the request region. - * The subsequent call will try to reuse the subnetwork previously created - * if subnetwork name, region and prefix length of the IP range match. - * Operation + * @desc For service producers, provisions a new subnet in a peered + * service's shared VPC network in the requested region and with the + * requested size that's expressed as a CIDR range (number of leading bits + * of ipV4 network mask). The method checks against the assigned allocated + * ranges to find a non-conflicting IP address range. The method will reuse + * a subnet if subsequent calls contain the same subnet name, region, and + * prefix length. This method will make producer's tenant project to be a + * shared VPC service project as needed. The response from the `get` + * operation will be of type `Subnetwork` if the operation successfully + * completes. * @alias servicenetworking.services.addSubnetwork * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. This is a 'tenant' project in the service producer organization. services/{service}/{collection-id}/{resource-id} {collection id} is the cloud resource collection type representing the tenant project. Only 'projects' are currently supported. {resource id} is the tenant project numeric id: '123456'. {service} the name of the peering service, for example 'service-peering.example.com'. This service must be activated. in the consumer project. + * @param {string} params.parent Required. A tenant project in the service producer organization, in the following format: services/{service}/{collection-id}/{resource-id}. {collection-id} is the cloud resource collection type that represents the tenant project. Only `projects` are supported. {resource-id} is the tenant project numeric id, such as `123456`. {service} the name of the peering service, such as `service-peering.example.com`. This service must already be enabled in the service consumer's project. * @param {().AddSubnetworkRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2254,15 +2302,16 @@ export namespace servicenetworking_v1beta { /** * servicenetworking.services.patch - * @desc Allocated ranges specified for the connection may be updated. - * Operation. + * @desc Updates the allocated ranges that are assigned to a connection. The + * response from the `get` operation will be of type `Connection` if the + * operation successfully completes. * @alias servicenetworking.services.patch * @memberOf! () * * @param {object} params Parameters for request * @param {boolean=} params.force If a previously defined allocated range is removed, force flag must be set to true. - * @param {string} params.name Provider peering service that is managing peering connectivity for a service provider organization. For Google services that support this functionality it is 'services/servicenetworking.googleapis.com'. - * @param {string=} params.updateMask The update mask. If this is omitted, it defaults to "*". Only reserved peering ranges list may be updated. + * @param {string} params.name The service producer peering service that is managing peering connectivity for a service producer organization. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com`. + * @param {string=} params.updateMask The update mask. If this is omitted, it defaults to "*". You can only update the listed peering ranges. * @param {().Connection} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2319,6 +2368,80 @@ export namespace servicenetworking_v1beta { return createAPIRequest(parameters); } } + + + /** + * servicenetworking.services.searchRange + * @desc Service producers can use this method to find a currently unused + * range within consumer allocated ranges. This returned range is not + * reserved, and not guaranteed to remain unused. It will validate + * previously provided allocated ranges, find non-conflicting sub-range of + * requested size (expressed in number of leading bits of ipv4 network mask, + * as in CIDR range notation). Operation + * @alias servicenetworking.services.searchRange + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. This is in a form services/{service}. {service} the name of the private access management service, for example 'service-peering.example.com'. + * @param {().SearchRangeRequest} 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 + */ + searchRange( + params?: Params$Resource$Services$Searchrange, + options?: MethodOptions): AxiosPromise; + searchRange( + params: Params$Resource$Services$Searchrange, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + searchRange( + params: Params$Resource$Services$Searchrange, + callback: BodyResponseCallback): void; + searchRange(callback: BodyResponseCallback): void; + searchRange( + paramsOrCallback?: Params$Resource$Services$Searchrange| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Services$Searchrange; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Services$Searchrange; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://servicenetworking.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}:searchRange') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Services$Addsubnetwork extends @@ -2329,13 +2452,13 @@ export namespace servicenetworking_v1beta { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. This is a 'tenant' project in the service producer - * organization. services/{service}/{collection-id}/{resource-id} - * {collection id} is the cloud resource collection type representing the - * tenant project. Only 'projects' are currently supported. {resource id} is - * the tenant project numeric id: '123456'. {service} the name of the - * peering service, for example 'service-peering.example.com'. This service - * must be activated. in the consumer project. + * Required. A tenant project in the service producer organization, in the + * following format: services/{service}/{collection-id}/{resource-id}. + * {collection-id} is the cloud resource collection type that represents the + * tenant project. Only `projects` are supported. {resource-id} is the + * tenant project numeric id, such as `123456`. {service} the name of the + * peering service, such as `service-peering.example.com`. This service must + * already be enabled in the service consumer's project. */ parent?: string; @@ -2356,14 +2479,15 @@ export namespace servicenetworking_v1beta { */ force?: boolean; /** - * Provider peering service that is managing peering connectivity for a - * service provider organization. For Google services that support this - * functionality it is 'services/servicenetworking.googleapis.com'. + * The service producer peering service that is managing peering + * connectivity for a service producer organization. For Google services + * that support this functionality, this is + * `services/servicenetworking.googleapis.com`. */ name?: string; /** - * The update mask. If this is omitted, it defaults to "*". Only reserved - * peering ranges list may be updated. + * The update mask. If this is omitted, it defaults to "*". You can only + * update the listed peering ranges. */ updateMask?: string; @@ -2372,6 +2496,25 @@ export namespace servicenetworking_v1beta { */ requestBody?: Schema$Connection; } + export interface Params$Resource$Services$Searchrange extends + StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. This is in a form services/{service}. {service} the name of the + * private access management service, for example + * 'service-peering.example.com'. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SearchRangeRequest; + } export class Resource$Services$Connections { constructor() {} @@ -2379,19 +2522,20 @@ export namespace servicenetworking_v1beta { /** * servicenetworking.services.connections.create - * @desc To connect service to a VPC network peering connection must be - * established prior to service provisioning. This method must be invoked by - * the consumer VPC network administrator It will establish a permanent - * peering connection with a shared network created in the service producer - * organization and register a allocated IP range(s) to be used for service - * subnetwork provisioning. This connection will be used for all supported - * services in the service producer organization, so it only needs to be - * invoked once. Operation. + * @desc Creates a private connection that establishes a VPC Network Peering + * connection to a VPC network in the service producer's organization. The + * administrator of the service consumer's VPC network invokes this method. + * The administrator must assign one or more allocated IP ranges for + * provisioning subnetworks in the service producer's VPC network. This + * connection is used for all supported services in the service producer's + * organization, so it only needs to be invoked once. The response from the + * `get` operation will be of type `Connection` if the operation + * successfully completes. * @alias servicenetworking.services.connections.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Provider peering service that is managing peering connectivity for a service provider organization. For Google services that support this functionality it is 'services/servicenetworking.googleapis.com'. + * @param {string} params.parent The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. * @param {().Connection} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2455,14 +2599,14 @@ export namespace servicenetworking_v1beta { /** * servicenetworking.services.connections.list - * @desc Service consumers use this method to list configured peering - * connection for the given service and consumer network. + * @desc List the private connections that are configured in a service + * consumer's VPC network. * @alias servicenetworking.services.connections.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.network Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project}/global/networks/{network}'. {project} is a project number, as in '12345' {network} is network name. - * @param {string} params.parent Provider peering service that is managing peering connectivity for a service provider organization. For Google services that support this functionality it is 'services/servicenetworking.googleapis.com'. For "-" all configured public peering services will be queried. + * @param {string=} params.network The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project}/global/networks/{network}`. {project} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network} is the name of the service consumer's VPC network. + * @param {string} params.parent The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `-` as the parameter value, all configured public peering services are listed. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -2532,9 +2676,9 @@ export namespace servicenetworking_v1beta { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Provider peering service that is managing peering connectivity for a - * service provider organization. For Google services that support this - * functionality it is 'services/servicenetworking.googleapis.com'. + * The service that is managing peering connectivity for a service + * producer's organization. For Google services that support this + * functionality, this value is `services/servicenetworking.googleapis.com`. */ parent?: string; @@ -2551,17 +2695,20 @@ export namespace servicenetworking_v1beta { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Network name in the consumer project. This network must have been - * already peered with a shared VPC network using CreateConnection method. - * Must be in a form 'projects/{project}/global/networks/{network}'. - * {project} is a project number, as in '12345' {network} is network name. + * The name of service consumer's VPC network that's connected with service + * producer network through a private connection. The network name must be + * in the following format: `projects/{project}/global/networks/{network}`. + * {project} is a project number, such as in `12345` that includes the VPC + * service consumer's VPC network. {network} is the name of the service + * consumer's VPC network. */ network?: string; /** - * Provider peering service that is managing peering connectivity for a - * service provider organization. For Google services that support this - * functionality it is 'services/servicenetworking.googleapis.com'. For "-" - * all configured public peering services will be queried. + * The service that is managing peering connectivity for a service + * producer's organization. For Google services that support this + * functionality, this value is `services/servicenetworking.googleapis.com`. + * If you specify `-` as the parameter value, all configured public peering + * services are listed. */ parent?: string; } diff --git a/src/apis/serviceusage/v1.ts b/src/apis/serviceusage/v1.ts index 79c356e4ddf..4c27721f4bf 100644 --- a/src/apis/serviceusage/v1.ts +++ b/src/apis/serviceusage/v1.ts @@ -247,7 +247,7 @@ export namespace serviceusage_v1 { */ audiences?: string; /** - * Redirect URL if JWT token is required but no present or is expired. + * Redirect URL if JWT token is required but not present or is expired. * Implement authorizationUrl of securityDefinitions in OpenAPI spec. */ authorizationUrl?: string; @@ -327,6 +327,10 @@ export namespace serviceusage_v1 { * seconds. */ deadline?: number; + /** + * The JWT audience is used when generating a JWT id token for the backend. + */ + jwtAudience?: string; /** * Minimum deadline in seconds needed for this method. Calls having deadline * value lower than this will be rejected. @@ -337,6 +341,7 @@ export namespace serviceusage_v1 { * operation. The default is no deadline. */ operationDeadline?: number; + pathTranslation?: string; /** * Selects the methods to which this rule applies. Refer to selector for * syntax details. @@ -934,8 +939,10 @@ export namespace serviceusage_v1 { */ monitoring?: Schema$Monitoring; /** - * The DNS address at which this service is available, e.g. - * `calendar.googleapis.com`. + * The service name, which is a DNS-like logical identifier for the service, + * such as `calendar.googleapis.com`. The service name typically goes + * through DNS verification to make sure the owner of the service also owns + * the DNS name. */ name?: string; /** @@ -1683,16 +1690,20 @@ export namespace serviceusage_v1 { export interface Schema$Monitoring { /** * Monitoring configurations for sending metrics to the consumer project. - * There can be multiple consumer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * consumer destination. + * There can be multiple consumer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ consumerDestinations?: Schema$MonitoringDestination[]; /** * Monitoring configurations for sending metrics to the producer project. - * There can be multiple producer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * producer destination. + * There can be multiple producer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ producerDestinations?: Schema$MonitoringDestination[]; } @@ -1702,7 +1713,7 @@ export namespace serviceusage_v1 { */ export interface Schema$MonitoringDestination { /** - * Names of the metrics to report to this monitoring destination. Each name + * Types of the metrics to report to this monitoring destination. Each type * must be defined in Service.metrics section. */ metrics?: string[]; diff --git a/src/apis/serviceusage/v1beta1.ts b/src/apis/serviceusage/v1beta1.ts index 46fc774e4ae..4521bf8fb73 100644 --- a/src/apis/serviceusage/v1beta1.ts +++ b/src/apis/serviceusage/v1beta1.ts @@ -247,7 +247,7 @@ export namespace serviceusage_v1beta1 { */ audiences?: string; /** - * Redirect URL if JWT token is required but no present or is expired. + * Redirect URL if JWT token is required but not present or is expired. * Implement authorizationUrl of securityDefinitions in OpenAPI spec. */ authorizationUrl?: string; @@ -327,6 +327,10 @@ export namespace serviceusage_v1beta1 { * seconds. */ deadline?: number; + /** + * The JWT audience is used when generating a JWT id token for the backend. + */ + jwtAudience?: string; /** * Minimum deadline in seconds needed for this method. Calls having deadline * value lower than this will be rejected. @@ -337,6 +341,7 @@ export namespace serviceusage_v1beta1 { * operation. The default is no deadline. */ operationDeadline?: number; + pathTranslation?: string; /** * Selects the methods to which this rule applies. Refer to selector for * syntax details. @@ -921,8 +926,10 @@ export namespace serviceusage_v1beta1 { */ monitoring?: Schema$Monitoring; /** - * The DNS address at which this service is available, e.g. - * `calendar.googleapis.com`. + * The service name, which is a DNS-like logical identifier for the service, + * such as `calendar.googleapis.com`. The service name typically goes + * through DNS verification to make sure the owner of the service also owns + * the DNS name. */ name?: string; /** @@ -1670,16 +1677,20 @@ export namespace serviceusage_v1beta1 { export interface Schema$Monitoring { /** * Monitoring configurations for sending metrics to the consumer project. - * There can be multiple consumer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * consumer destination. + * There can be multiple consumer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ consumerDestinations?: Schema$MonitoringDestination[]; /** * Monitoring configurations for sending metrics to the producer project. - * There can be multiple producer destinations, each one must have a - * different monitored resource type. A metric can be used in at most one - * producer destination. + * There can be multiple producer destinations. A monitored resouce type may + * appear in multiple monitoring destinations if different aggregations are + * needed for different sets of metrics associated with that monitored + * resource type. A monitored resource and metric pair may only be used once + * in the Monitoring configuration. */ producerDestinations?: Schema$MonitoringDestination[]; } @@ -1689,7 +1700,7 @@ export namespace serviceusage_v1beta1 { */ export interface Schema$MonitoringDestination { /** - * Names of the metrics to report to this monitoring destination. Each name + * Types of the metrics to report to this monitoring destination. Each type * must be defined in Service.metrics section. */ metrics?: string[]; diff --git a/src/apis/slides/v1.ts b/src/apis/slides/v1.ts index c1e777cfb77..f1ebe4ac9af 100644 --- a/src/apis/slides/v1.ts +++ b/src/apis/slides/v1.ts @@ -2505,7 +2505,7 @@ export namespace slides_v1 { * table where all the cells of the last row are merged together. The table * looks like this: [ ] A table range with * location = (0, 0), row span = 3 and column span = 2 specifies the following - * cells: x x [ x ] + * cells: x x [ x x x ] */ export interface Schema$TableRange { /** diff --git a/src/apis/speech/v1.ts b/src/apis/speech/v1.ts index 2c067663ad9..f95568c361e 100644 --- a/src/apis/speech/v1.ts +++ b/src/apis/speech/v1.ts @@ -122,6 +122,26 @@ export namespace speech_v1 { */ operations?: Schema$Operation[]; } + /** + * Describes the progress of a long-running `LongRunningRecognize` call. It is + * included in the `metadata` field of the `Operation` returned by the + * `GetOperation` call of the `google::longrunning::Operations` service. + */ + export interface Schema$LongRunningRecognizeMetadata { + /** + * Time of the most recent processing update. + */ + lastUpdateTime?: string; + /** + * Approximate percentage of audio processed thus far. Guaranteed to be 100 + * when the audio is fully processed and the results are available. + */ + progressPercent?: number; + /** + * Time when the request was received. + */ + startTime?: string; + } /** * The top-level message sent by the client for the `LongRunningRecognize` * method. @@ -137,6 +157,20 @@ export namespace speech_v1 { */ config?: Schema$RecognitionConfig; } + /** + * The only message returned to the client by the `LongRunningRecognize` + * method. It contains the result as zero or more sequential + * `SpeechRecognitionResult` messages. It is included in the `result.response` + * field of the `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$LongRunningRecognizeResponse { + /** + * Output only. Sequential list of transcription results corresponding to + * sequential portions of audio. + */ + results?: Schema$SpeechRecognitionResult[]; + } /** * This resource represents a long-running operation that is the result of a * network API call. @@ -450,15 +484,6 @@ export namespace speech_v1 { * an experimental feature and the accuracy of the time offset can vary. */ endTime?: string; - /** - * Output only. A distinct integer value is assigned for every speaker - * within the audio. This field specifies which one of those speakers was - * detected to have spoken this word. Value ranges from '1' to - * diarization_speaker_count. speaker_tag is set if - * enable_speaker_diarization = 'true' and only in the top - * alternative. - */ - speakerTag?: number; /** * Output only. Time offset relative to the beginning of the audio, and * corresponding to the start of the spoken word. This field is only set if diff --git a/src/apis/speech/v1p1beta1.ts b/src/apis/speech/v1p1beta1.ts index 825e36d9ace..a6fb96d8303 100644 --- a/src/apis/speech/v1p1beta1.ts +++ b/src/apis/speech/v1p1beta1.ts @@ -99,229 +99,48 @@ export namespace speech_v1p1beta1 { */ export class Speech { operations: Resource$Operations; - projects: Resource$Projects; speech: Resource$Speech; constructor(options: GlobalOptions, google?: GoogleConfigurable) { context = {_options: options || {}, google}; this.operations = new Resource$Operations(); - this.projects = new Resource$Projects(); this.speech = new Resource$Speech(); } } /** - * Different types of dataset errors and the stats associated with each error. + * The response message for Operations.ListOperations. */ - export interface Schema$DataErrors { + export interface Schema$ListOperationsResponse { /** - * Number of records having errors associated with the enum. + * The standard List next-page token. */ - count?: number; - /** - * Type of the error. - */ - errorType?: string; - } - /** - * Specifies the parameters needed for creating a dataset. In addition this is - * also the message returned to the client by the `CreateDataset` method. It - * is included in the `result.response` field of the `Operation` returned by - * the `GetOperation` call of the `google::longrunning::Operations` service. - */ - export interface Schema$Dataset { - /** - * Output only. All the blocking operations associated with this dataset. - * Like (pre-processing, training-model, testing-model) - */ - blockingOperationIds?: string[]; - /** - * If set, the log data to be used in this dataset is restricted to the - * bucket specified. This field is only applicable if use_logged_data is - * true. If use_logged_data is true, but this field is not set, then all - * logs will be used for training the models. See: RecognitionMetadata for - * information on setting up data logs. - */ - bucketName?: string; - /** - * Output only. The timestamp this dataset is created. - */ - createTime?: string; - /** - * Location where the data should be processed. If not specified then we - * will pick a location on behalf of the user for storing and processing the - * data. Currently only us-central is supported. - */ - dataProcessingRegion?: string; - /** - * Output only. Stats assoiated with the data. - */ - dataStats?: Schema$DataStats; - /** - * Required. Name of the data set for display. - */ - displayName?: string; - /** - * Output only. True if the data is sufficient to create custom models. - */ - hasSufficientData?: boolean; - /** - * Required. The language of the supplied audio as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". See [Language - * Support](/speech-to-text/docs/languages) for a list of the currently - * supported language codes. - */ - languageCode?: string; - /** - * All the models (including models pending training) built using the - * dataset. - */ - models?: Schema$Model[]; - /** - * Output only. Resource name of the dataset. Form :- - * '/projects/{project_number}/locations/{location_id}/datasets/{dataset_id}' - */ - name?: string; - /** - * Output only. The timestamp this dataset is last updated. - */ - updateTime?: string; - /** - * URI that points to a file in csv file where each row has following - * format. - * <gs_path_to_audio>,<gs_path_to_transcript>,<label> - * label can be HUMAN_TRANSCRIBED or MACHINE_TRANSCRIBED. To be valid, rows - * must do the following: 1. Each row must have at least a label and - * <gs_path_to_transcript> 2. If a row is marked HUMAN_TRANSCRIBED, - * then you must specify both <gs_path_to_audio> and - * <gs_path_to_transcript>. Only WAV file formats which encode linear - * 16-bit pulse-code modulation (PCM) audio format are supported. The - * maximum audio file size is 50 MB. Also note that the audio has to be - * single channel audio. 3. There has to be at least 500 rows labelled - * HUMAN_TRANSCRIBED covering at least ~10K words in order to get reliable - * word error rate results. 4. To create a language model, you should - * provide at least 100,000 words in your transcriptions as training data if - * you have conversational and captions type of data. You should provide at - * least 10,000 words if you have short utterances like voice commands and - * search type of use cases. Currently, only Google Cloud Storage URIs are - * supported, which must be specified in the following format: - * `gs://bucket_name/object_name` (other URI formats will be ignored). For - * more information, see [Request URIs](/storage/docs/reference-uris). - */ - uri?: string; - /** - * If this is true, then use the previously logged data (for the project) - * The logs data for this project will be preprocessed and prepared for - * downstream pipelines (like training) - */ - useLoggedData?: boolean; - } - /** - * Contains stats about the data which was uploaded and preprocessed to be use - * by downstream pipelines like training, evals pipelines. - */ - export interface Schema$DataStats { - /** - * Different types of data errors and the counts associated with them. - */ - dataErrors?: Schema$DataErrors[]; - /** - * The number of examples used for testing. - */ - testExampleCount?: number; - /** - * The number of examples used for training. - */ - trainingExampleCount?: number; - } - /** - * Message sent by the client for the `DeployModel` method. - */ - export interface Schema$DeployModelRequest {} - /** - * Message sent by the client for the `EvaluateModel` method. - */ - export interface Schema$EvaluateModelRequest {} - /** - * The only message returned to the client by the `EvaluateModel` method. This - * is also returned as part of the Dataset message returned to the client by - * the CreateDataset method. It is included in the `result.response` field of - * the `Operation` returned by the `GetOperation` call of the - * `google::longrunning::Operations` service. - */ - export interface Schema$EvaluateModelResponse { - /** - * If true then it means we are referring to the results of an enhanced - * version of the model_type. Currently only PHONE_CALL model_type has an - * enhanced version. - */ - isEnhancedModel?: boolean; - /** - * Required. The type of model used in this evaluation. - */ - modelType?: string; - /** - * Number of words used in the word_error_rate computation. - */ - wordCount?: number; - /** - * Word error rate metric computed on the test set using the AutoML model. - */ - wordErrorRate?: number; - } - export interface Schema$ListDatasetsResponse { - /** - * Repeated list of data sets containing details about each data set. - */ - datasets?: Schema$Dataset[]; + nextPageToken?: string; /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. + * A list of operations that matches the specified filter in the request. */ - nextPageToken?: string; + operations?: Schema$Operation[]; } /** - * Message received by the client for the `ListLogDataStats` method. + * Describes the progress of a long-running `LongRunningRecognize` call. It is + * included in the `metadata` field of the `Operation` returned by the + * `GetOperation` call of the `google::longrunning::Operations` service. */ - export interface Schema$ListLogDataStatsResponse { - /** - * Output only. True if user has opted in for log data collection. - */ - logDataEnabled?: boolean; - /** - * The stats for each bucket. - */ - logDataStats?: Schema$LogBucketStats[]; - /** - * The overall count for log data (including all bucket data). - */ - totalCount?: number; - } - export interface Schema$ListModelsResponse { - /** - * Repeated list of models containing details about each model. - */ - models?: Schema$Model[]; + export interface Schema$LongRunningRecognizeMetadata { /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. + * Time of the most recent processing update. */ - nextPageToken?: string; - } - /** - * Stats for log data within a bucket. - */ - export interface Schema$LogBucketStats { + lastUpdateTime?: string; /** - * The display name for the bucket in which logs are collected. + * Approximate percentage of audio processed thus far. Guaranteed to be 100 + * when the audio is fully processed and the results are available. */ - bucketName?: string; + progressPercent?: number; /** - * Number of audio samples that have been collected in this bucket. + * Time when the request was received. */ - count?: number; + startTime?: string; } /** * The top-level message sent by the client for the `LongRunningRecognize` @@ -339,37 +158,18 @@ export namespace speech_v1p1beta1 { config?: Schema$RecognitionConfig; } /** - * Specifies the model parameters needed for training a model. In addition - * this is also the message returned to the client by the `CreateModel` - * method. It is included in the `result.response` field of the `Operation` - * returned by the `GetOperation` call of the + * The only message returned to the client by the `LongRunningRecognize` + * method. It contains the result as zero or more sequential + * `SpeechRecognitionResult` messages. It is included in the `result.response` + * field of the `Operation` returned by the `GetOperation` call of the * `google::longrunning::Operations` service. */ - export interface Schema$Model { + export interface Schema$LongRunningRecognizeResponse { /** - * Output only. Timestamp when this model was created. - */ - createTime?: string; - /** - * Required. Display name of the model to be trained. - */ - displayName?: string; - /** - * Output only. Evaluation results associated with this model. A model can - * contain multiple sub-models in which case the evaluation results for all - * of those are available. If there are no sub models then there would be - * just a single EvaluateModelResponse. - */ - evaluateModelResponses?: Schema$EvaluateModelResponse[]; - /** - * Output only. Resource name of the model. Format: - * "projects/{project_id}/locations/{location_id}/models/{model_id}" - */ - name?: string; - /** - * Required. Type of the training to perform. + * Output only. Sequential list of transcription results corresponding to + * sequential portions of audio. */ - trainingType?: string; + results?: Schema$SpeechRecognitionResult[]; } /** * This resource represents a long-running operation that is the result of a @@ -463,10 +263,22 @@ export namespace speech_v1p1beta1 { * channel set `enable_separate_recognition_per_channel` to 'true'. */ audioChannelCount?: number; + /** + * *Optional* Config to enable speaker diarization and set additional + * parameters to make diarization better suited for your application. Note: + * When this is enabled, we send all the words from the beginning of the + * audio for the top alternative in every consecutive STREAMING responses. + * This is done in order to improve our speaker tags as our models learn to + * identify the speakers in the conversation over time. For non-streaming + * requests, the diarization results will be provided only in the top + * alternative of the FINAL SpeechRecognitionResult. + */ + diarizationConfig?: Schema$SpeakerDiarizationConfig; /** * *Optional* If set, specifies the estimated number of speakers in the * conversation. If not set, defaults to '2'. Ignored unless - * enable_speaker_diarization is set to true." + * enable_speaker_diarization is set to true." Note: Use + * diarization_config instead. This field will be DEPRECATED soon. */ diarizationSpeakerCount?: number; /** @@ -491,13 +303,8 @@ export namespace speech_v1p1beta1 { /** * *Optional* If 'true', enables speaker detection for each * recognized word in the top alternative of the recognition result using a - * speaker_tag provided in the WordInfo. Note: When this is true, we send - * all the words from the beginning of the audio for the top alternative in - * every consecutive STREAMING responses. This is done in order to improve - * our speaker tags as our models learn to identify the speakers in the - * conversation over time. For non-streaming requests, the diarization - * results will be provided only in the top alternative of the FINAL - * SpeechRecognitionResult. + * speaker_tag provided in the WordInfo. Note: Use diarization_config + * instead. This field will be DEPRECATED soon. */ enableSpeakerDiarization?: boolean; /** @@ -652,12 +459,6 @@ export namespace speech_v1p1beta1 { * The type of device the speech was recorded with. */ recordingDeviceType?: string; - /** - * A freeform field to tag this input sample with. This can be used for - * grouping the logs into separate buckets. This enables selective purging - * of data based on the tags, and also for training models in AutoML. - */ - tags?: string[]; } /** * The top-level message sent by the client for the `Recognize` method. @@ -685,30 +486,27 @@ export namespace speech_v1p1beta1 { */ results?: Schema$SpeechRecognitionResult[]; } - /** - * Message sent by the client to refresh data in a existing dataset. - */ - export interface Schema$RefreshDataRequest { - /** - * URI that points to a file in csv file where each row has following - * format. - * <gs_path_to_audio>,<gs_path_to_transcript>,<label> - * label can be HUMAN_TRANSCRIBED or MACHINE_TRANSCRIBED. Few rules for a - * row to be considered valid are :- 1. Each row must have at least a label - * and <gs_path_to_transcript> 2. If a row is marked - * HUMAN_TRANSCRIBED, then both <gs_path_to_audio> and - * <gs_path_to_transcript> needs to be specified. 3. There has to be - * minimum 500 number of rows labelled HUMAN_TRANSCRIBED if evaluation stats - * are required. 4. If use_logged_data_for_training is set to true, then we - * ignore the rows labelled as MACHINE_TRANSCRIBED. 5. There has to be - * minimum 100,000 words in the transcripts in order to provide sufficient - * textual training data for the language model. Currently, only Google - * Cloud Storage URIs are supported, which must be specified in the - * following format: `gs://bucket_name/object_name` (other URI formats will - * be ignored). For more information, see [Request - * URIs](https://cloud.google.com/storage/docs/reference-uris). + export interface Schema$SpeakerDiarizationConfig { + /** + * *Optional* If 'true', enables speaker detection for each + * recognized word in the top alternative of the recognition result using a + * speaker_tag provided in the WordInfo. */ - uri?: string; + enableSpeakerDiarization?: boolean; + /** + * *Optional* Only used if diarization_speaker_count is not set. Maximum + * number of speakers in the conversation. This range gives you more + * flexibility by allowing the system to automatically determine the correct + * number of speakers. If not set, the default value is 6. + */ + maxSpeakerCount?: number; + /** + * *Optional* Only used if diarization_speaker_count is not set. Minimum + * number of speakers in the conversation. This range gives you more + * flexibility by allowing the system to automatically determine the correct + * number of speakers. If not set, the default value is 2. + */ + minSpeakerCount?: number; } /** * Provides "hints" to the speech recognizer to favor specific words @@ -725,14 +523,6 @@ export namespace speech_v1p1beta1 { * limits](/speech-to-text/quotas#content). */ phrases?: string[]; - /** - * Hint strength to use (high, medium or low). If you use a high strength - * then you are more likely to see those phrases in the results. If strength - * is not specified then by default medium strength will be used. If - * you'd like different phrases to have different strengths, you can - * specify multiple speech_contexts. - */ - strength?: string; } /** * Alternative hypotheses (a.k.a. n-best list). @@ -947,221 +737,55 @@ export namespace speech_v1p1beta1 { return createAPIRequest(parameters); } } - } - - export interface Params$Resource$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: Resource$Projects$Locations; - constructor() { - this.locations = new Resource$Projects$Locations(); - } - } - - - export class Resource$Projects$Locations { - datasets: Resource$Projects$Locations$Datasets; - log_data_stats: Resource$Projects$Locations$Log_data_stats; - models: Resource$Projects$Locations$Models; - constructor() { - this.datasets = new Resource$Projects$Locations$Datasets(); - this.log_data_stats = new Resource$Projects$Locations$Log_data_stats(); - this.models = new Resource$Projects$Locations$Models(); - } - } - - - export class Resource$Projects$Locations$Datasets { - constructor() {} - - - /** - * speech.projects.locations.datasets.create - * @desc Performs asynchronous data upload for AutoML: receive results via - * the google.longrunning.Operations interface. Returns either an - * `Operation.error` or an `Operation.response` which contains a `Dataset` - * message. - * @alias speech.projects.locations.datasets.create - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.parent Required. Resource name of the parent. Has the format :- "projects/{project_id}/locations/{location_id}" - * @param {().Dataset} 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$Locations$Datasets$Create, - options?: MethodOptions): AxiosPromise; - create( - params: Params$Resource$Projects$Locations$Datasets$Create, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - create( - params: Params$Resource$Projects$Locations$Datasets$Create, - callback: BodyResponseCallback): void; - create(callback: BodyResponseCallback): void; - create( - paramsOrCallback?: Params$Resource$Projects$Locations$Datasets$Create| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Datasets$Create; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Datasets$Create; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+parent}/datasets') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * speech.projects.locations.datasets.get - * @desc Get the dataset associated with the dataset resource. - * @alias speech.projects.locations.datasets.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {boolean=} params.includeModelInfo If true then also include information about the models built using this dataset. - * @param {string} params.name The resource name of the dataset to retrieve. Form :- '/projects/{project_number}/locations/{location_id}/datasets/{dataset_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$Datasets$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Projects$Locations$Datasets$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Projects$Locations$Datasets$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Projects$Locations$Datasets$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Datasets$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Datasets$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+name}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } /** - * speech.projects.locations.datasets.list - * @desc Fetch the list of dataset associated with this project. - * @alias speech.projects.locations.datasets.list + * speech.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 speech.operations.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.filter Filter the response based on display_name of the dataset. For e.g display_name=Foo The filter string is case sensitive - * @param {boolean=} params.includeModelInfo If true then also include information about the models built using the datasets. - * @param {integer=} params.pageSize The maximum number of items to return. - * @param {string=} params.pageToken The next_page_token value returned from a previous List request, if any. - * @param {string} params.parent Required. Resource name of the parent. Has the format :- "projects/{project_id}/locations/{location_id}" + * @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$Operations$List, options?: MethodOptions): + AxiosPromise; list( - params?: Params$Resource$Projects$Locations$Datasets$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Projects$Locations$Datasets$List, + params: Params$Resource$Operations$List, options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; + BodyResponseCallback, + callback: BodyResponseCallback): void; list( - params: Params$Resource$Projects$Locations$Datasets$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; + params: Params$Resource$Operations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( - paramsOrCallback?: Params$Resource$Projects$Locations$Datasets$List| - BodyResponseCallback, + paramsOrCallback?: Params$Resource$Operations$List| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Datasets$List; + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Datasets$List; + params = {} as Params$Resource$Operations$List; options = {}; } @@ -1174,643 +798,60 @@ export namespace speech_v1p1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1p1beta1/{+parent}/datasets') + url: (rootUrl + '/v1p1beta1/operations') .replace(/([^:]\/)\/+/g, '$1'), method: 'GET' }, options), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: [], + pathParams: [], context }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } - + export interface Params$Resource$Operations$Get extends StandardParameters { /** - * speech.projects.locations.datasets.refreshData - * @desc Refresh data for a dataset. - * @alias speech.projects.locations.datasets.refreshData - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name The resource name of the destination dataset. - * @param {().RefreshDataRequest} 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 + * Auth client or API Key for the request */ - refreshData( - params?: Params$Resource$Projects$Locations$Datasets$Refreshdata, - options?: MethodOptions): AxiosPromise; - refreshData( - params: Params$Resource$Projects$Locations$Datasets$Refreshdata, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - refreshData( - params: Params$Resource$Projects$Locations$Datasets$Refreshdata, - callback: BodyResponseCallback): void; - refreshData(callback: BodyResponseCallback): void; - refreshData( - paramsOrCallback?: - Params$Resource$Projects$Locations$Datasets$Refreshdata| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Datasets$Refreshdata; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Datasets$Refreshdata; - options = {}; - } + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+name}:refreshData') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Projects$Locations$Datasets$Create extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Required. Resource name of the parent. Has the format :- - * "projects/{project_id}/locations/{location_id}" - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Dataset; - } - export interface Params$Resource$Projects$Locations$Datasets$Get extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * If true then also include information about the models built using this - * dataset. - */ - includeModelInfo?: boolean; /** - * The resource name of the dataset to retrieve. Form :- - * '/projects/{project_number}/locations/{location_id}/datasets/{dataset_id}' + * The name of the operation resource. */ name?: string; } - export interface Params$Resource$Projects$Locations$Datasets$List extends - StandardParameters { + export interface Params$Resource$Operations$List extends StandardParameters { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Filter the response based on display_name of the dataset. For e.g - * display_name=Foo The filter string is case sensitive + * The standard list filter. */ filter?: string; /** - * If true then also include information about the models built using the - * datasets. - */ - includeModelInfo?: boolean; - /** - * The maximum number of items to return. - */ - pageSize?: number; - /** - * The next_page_token value returned from a previous List request, if any. - */ - pageToken?: string; - /** - * Required. Resource name of the parent. Has the format :- - * "projects/{project_id}/locations/{location_id}" - */ - parent?: string; - } - export interface Params$Resource$Projects$Locations$Datasets$Refreshdata - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The resource name of the destination dataset. - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$RefreshDataRequest; - } - - - export class Resource$Projects$Locations$Log_data_stats { - constructor() {} - - - /** - * speech.projects.locations.log_data_stats.list - * @desc List all log data stats associated with this project. - * @alias speech.projects.locations.log_data_stats.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.parent Required. Resource name of the parent. Has the format :- "projects/{project_id}/locations/{location_id}" - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Projects$Locations$Log_data_stats$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Projects$Locations$Log_data_stats$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Projects$Locations$Log_data_stats$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: - Params$Resource$Projects$Locations$Log_data_stats$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Log_data_stats$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Log_data_stats$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+parent}/log_data_stats') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Projects$Locations$Log_data_stats$List - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Required. Resource name of the parent. Has the format :- - * "projects/{project_id}/locations/{location_id}" - */ - parent?: string; - } - - - export class Resource$Projects$Locations$Models { - constructor() {} - - - /** - * speech.projects.locations.models.create - * @desc Performs asynchronous model training for AutoML: receive results - * via the google.longrunning.Operations interface. Returns either an - * `Operation.error` or an `Operation.response` which contains a `Model` - * message. - * @alias speech.projects.locations.models.create - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.name Required. Resource name of the dataset being used to create the model. '/projects/{project_id}/locations/{location_id}/datasets/{dataset_id}' - * @param {string} params.parent Required. Resource name of the parent. Has the format :- "projects/{project_id}/locations/{location_id}" - * @param {().Model} 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$Locations$Models$Create, - options?: MethodOptions): AxiosPromise; - create( - params: Params$Resource$Projects$Locations$Models$Create, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - create( - params: Params$Resource$Projects$Locations$Models$Create, - callback: BodyResponseCallback): void; - create(callback: BodyResponseCallback): void; - create( - paramsOrCallback?: Params$Resource$Projects$Locations$Models$Create| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Models$Create; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Models$Create; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+parent}/models') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * speech.projects.locations.models.deploy - * @desc Performs asynchronous model deployment of the model: receive - * results via the google.longrunning.Operations interface. After the - * operation is completed this returns either an `Operation.error` in case - * of error or a `google.protobuf.Empty` if the deployment was successful. - * @alias speech.projects.locations.models.deploy - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Resource name of the model. Format: "projects/{project_id}/locations/{location_id}/models/{model_id}" - * @param {().DeployModelRequest} 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 - */ - deploy( - params?: Params$Resource$Projects$Locations$Models$Deploy, - options?: MethodOptions): AxiosPromise; - deploy( - params: Params$Resource$Projects$Locations$Models$Deploy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - deploy( - params: Params$Resource$Projects$Locations$Models$Deploy, - callback: BodyResponseCallback): void; - deploy(callback: BodyResponseCallback): void; - deploy( - paramsOrCallback?: Params$Resource$Projects$Locations$Models$Deploy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Models$Deploy; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Models$Deploy; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+name}:deploy') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * speech.projects.locations.models.evaluate - * @desc Performs asynchronous evaluation of the model: receive results via - * the google.longrunning.Operations interface. After the operation is - * completed this returns either an `Operation.error` in case of error or a - * `EvaluateModelResponse` with the evaluation results. - * @alias speech.projects.locations.models.evaluate - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Resource name of the model. Format: "projects/{project_id}/locations/{location_id}/models/{model_id}" - * @param {().EvaluateModelRequest} 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 - */ - evaluate( - params?: Params$Resource$Projects$Locations$Models$Evaluate, - options?: MethodOptions): AxiosPromise; - evaluate( - params: Params$Resource$Projects$Locations$Models$Evaluate, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - evaluate( - params: Params$Resource$Projects$Locations$Models$Evaluate, - callback: BodyResponseCallback): void; - evaluate(callback: BodyResponseCallback): void; - evaluate( - paramsOrCallback?: Params$Resource$Projects$Locations$Models$Evaluate| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Models$Evaluate; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Models$Evaluate; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+name}:evaluate') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * speech.projects.locations.models.list - * @desc Fetch the list of models associated with this project. - * @alias speech.projects.locations.models.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter Filter the response based on display_name of the model. For e.g display_name=Foo The filter string is case sensitive - * @param {integer=} params.pageSize The maximum number of items to return. - * @param {string=} params.pageToken The next_page_token value returned from a previous List request, if any. - * @param {string} params.parent Required. Resource name of the parent. Has the format :- "projects/{project_id}/locations/{location_id}" - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Projects$Locations$Models$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Projects$Locations$Models$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Projects$Locations$Models$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Projects$Locations$Models$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Models$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Models$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1p1beta1/{+parent}/models') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Projects$Locations$Models$Create extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Required. Resource name of the dataset being used to create the model. - * '/projects/{project_id}/locations/{location_id}/datasets/{dataset_id}' + * The name of the operation's parent resource. */ name?: string; /** - * Required. Resource name of the parent. Has the format :- - * "projects/{project_id}/locations/{location_id}" - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Model; - } - export interface Params$Resource$Projects$Locations$Models$Deploy extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Resource name of the model. Format: - * "projects/{project_id}/locations/{location_id}/models/{model_id}" - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$DeployModelRequest; - } - export interface Params$Resource$Projects$Locations$Models$Evaluate extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Resource name of the model. Format: - * "projects/{project_id}/locations/{location_id}/models/{model_id}" - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$EvaluateModelRequest; - } - export interface Params$Resource$Projects$Locations$Models$List extends - StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Filter the response based on display_name of the model. For e.g - * display_name=Foo The filter string is case sensitive - */ - filter?: string; - /** - * The maximum number of items to return. + * The standard list page size. */ pageSize?: number; /** - * The next_page_token value returned from a previous List request, if any. + * The standard list page token. */ pageToken?: string; - /** - * Required. Resource name of the parent. Has the format :- - * "projects/{project_id}/locations/{location_id}" - */ - parent?: string; } - export class Resource$Speech { constructor() {} diff --git a/src/apis/streetviewpublish/v1.ts b/src/apis/streetviewpublish/v1.ts index 72ce304e40d..30b0bed486c 100644 --- a/src/apis/streetviewpublish/v1.ts +++ b/src/apis/streetviewpublish/v1.ts @@ -1144,9 +1144,10 @@ export namespace streetviewpublish_v1 { * BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures * that can occur per photo. Only the fields specified in updateMask field * are used. If `updateMask` is not present, the update applies to all - * fields. + * fields. The number of UpdatePhotoRequest messages in a + * BatchUpdatePhotosRequest must not exceed 20. * @alias streetviewpublish.photos.batchUpdate * @memberOf! () * diff --git a/src/apis/testing/v1.ts b/src/apis/testing/v1.ts index 86648cadc8c..ae48dc358fc 100644 --- a/src/apis/testing/v1.ts +++ b/src/apis/testing/v1.ts @@ -113,11 +113,11 @@ export namespace testing_v1 { } /** - * Identifies an account and how to log into it + * Identifies an account and how to log into it. */ export interface Schema$Account { /** - * An automatic google login account + * An automatic google login account. */ googleAuto?: Schema$GoogleAuto; } @@ -126,23 +126,23 @@ export namespace testing_v1 { */ export interface Schema$AndroidDevice { /** - * The id of the Android device to be used. Use the - * EnvironmentDiscoveryService to get supported options. Required + * Required. The id of the Android device to be used. Use the + * EnvironmentDiscoveryService to get supported options. */ androidModelId?: string; /** - * The id of the Android OS version to be used. Use the - * EnvironmentDiscoveryService to get supported options. Required + * Required. The id of the Android OS version to be used. Use the + * EnvironmentDiscoveryService to get supported options. */ androidVersionId?: string; /** - * The locale the test device used for testing. Use the - * EnvironmentDiscoveryService to get supported options. Required + * Required. The locale the test device used for testing. Use the + * EnvironmentDiscoveryService to get supported options. */ locale?: string; /** - * How the device is oriented during the test. Use the - * EnvironmentDiscoveryService to get supported options. Required + * Required. How the device is oriented during the test. Use the + * EnvironmentDiscoveryService to get supported options. */ orientation?: string; } @@ -151,15 +151,15 @@ export namespace testing_v1 { */ export interface Schema$AndroidDeviceCatalog { /** - * The set of supported Android device models. @OutputOnly + * The set of supported Android device models. */ models?: Schema$AndroidModel[]; /** - * The set of supported runtime configurations. @OutputOnly + * The set of supported runtime configurations. */ runtimeConfiguration?: Schema$AndroidRuntimeConfiguration; /** - * The set of supported Android OS versions. @OutputOnly + * The set of supported Android OS versions. */ versions?: Schema$AndroidVersion[]; } @@ -169,7 +169,7 @@ export namespace testing_v1 { */ export interface Schema$AndroidDeviceList { /** - * A list of Android devices Required + * Required. A list of Android devices. */ androidDevices?: Schema$AndroidDevice[]; } @@ -193,7 +193,7 @@ export namespace testing_v1 { */ appBundle?: Schema$AppBundle; /** - * The java package for the application under test. Optional, default is + * The java package for the application under test. The default value is * determined by examining the application's manifest. */ appPackageId?: string; @@ -204,21 +204,21 @@ export namespace testing_v1 { * Orchestrator offers the following benefits: - No shared state - Crashes * are isolated - Logs are scoped per test See * <https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator> - * for more information about Android Test Orchestrator. Optional. If not - * set, the test will be run without the orchestrator. + * for more information about Android Test Orchestrator. If not set, the + * test will be run without the orchestrator. */ orchestratorOption?: string; /** - * The APK containing the test code to be executed. Required + * Required. The APK containing the test code to be executed. */ testApk?: Schema$FileReference; /** - * The java package for the test to be executed. Optional, default is + * The java package for the test to be executed. The default value is * determined by examining the application's manifest. */ testPackageId?: string; /** - * The InstrumentationTestRunner class. Optional, default is determined by + * The InstrumentationTestRunner class. The default value is determined by * examining the application's manifest. */ testRunnerClass?: string; @@ -226,37 +226,37 @@ export namespace testing_v1 { * Each target must be fully qualified with the package name or class name, * in one of these formats: - "package package_name" - * "class package_name.class_name" - "class - * package_name.class_name#method_name" Optional, if empty, all - * targets in the module will be run. + * package_name.class_name#method_name" If empty, all targets in the + * module will be run. */ testTargets?: string[]; } /** * A set of Android device configuration permutations is defined by the the - * cross-product of the given axes. Internally, the given AndroidMatrix will + * cross-product of the given axes. Internally, the given AndroidMatrix will * be expanded into a set of AndroidDevices. Only supported permutations will * be instantiated. Invalid permutations (e.g., incompatible models/versions) * are ignored. */ export interface Schema$AndroidMatrix { /** - * The ids of the set of Android device to be used. Use the - * EnvironmentDiscoveryService to get supported options. Required + * Required. The ids of the set of Android device to be used. Use the + * EnvironmentDiscoveryService to get supported options. */ androidModelIds?: string[]; /** - * The ids of the set of Android OS version to be used. Use the - * EnvironmentDiscoveryService to get supported options. Required + * Required. The ids of the set of Android OS version to be used. Use the + * EnvironmentDiscoveryService to get supported options. */ androidVersionIds?: string[]; /** - * The set of locales the test device will enable for testing. Use the - * EnvironmentDiscoveryService to get supported options. Required + * Required. The set of locales the test device will enable for testing. Use + * the EnvironmentDiscoveryService to get supported options. */ locales?: string[]; /** - * The set of orientations to test with. Use the EnvironmentDiscoveryService - * to get supported options. Required + * Required. The set of orientations to test with. Use the + * EnvironmentDiscoveryService to get supported options. */ orientations?: string[]; } @@ -266,53 +266,51 @@ export namespace testing_v1 { export interface Schema$AndroidModel { /** * The company that this device is branded with. Example: - * "Google", "Samsung" @OutputOnly + * "Google", "Samsung". */ brand?: string; /** * The name of the industrial design. This corresponds to - * android.os.Build.DEVICE @OutputOnly + * android.os.Build.DEVICE. */ codename?: string; /** - * Whether this device is virtual or physical. @OutputOnly + * Whether this device is virtual or physical. */ form?: string; /** - * Whether this device is a phone, tablet, wearable, etc. @OutputOnly + * Whether this device is a phone, tablet, wearable, etc. */ formFactor?: string; /** * The unique opaque id for this model. Use this for invoking the - * TestExecutionService. @OutputOnly + * TestExecutionService. */ id?: string; /** * True if and only if tests with this model are recorded by stitching * together screenshots. See use_low_spec_video_recording in device config. - * @OutputOnly */ lowFpsVideoRecording?: boolean; /** - * The manufacturer of this device. @OutputOnly + * The manufacturer of this device. */ manufacturer?: string; /** * The human-readable marketing name for this device model. Examples: - * "Nexus 5", "Galaxy S5" @OutputOnly + * "Nexus 5", "Galaxy S5". */ name?: string; /** - * Screen density in DPI. This corresponds to ro.sf.lcd_density @OutputOnly + * Screen density in DPI. This corresponds to ro.sf.lcd_density */ screenDensity?: number; /** * Screen size in the horizontal (X) dimension measured in pixels. - * @OutputOnly */ screenX?: number; /** - * Screen size in the vertical (Y) dimension measured in pixels. @OutputOnly + * Screen size in the vertical (Y) dimension measured in pixels. */ screenY?: number; /** @@ -322,16 +320,16 @@ export namespace testing_v1 { * element in the list. Elements are optionally prefixed by * "version_id:" (where version_id is the id of an * AndroidVersion), denoting an ABI that is supported only on a particular - * version. @OutputOnly + * version. */ supportedAbis?: string[]; /** - * The set of Android versions this device supports. @OutputOnly + * The set of Android versions this device supports. */ supportedVersionIds?: string[]; /** * Tags for this dimension. Examples: "default", - * "preview", "deprecated" + * "preview", "deprecated". */ tags?: string[]; } @@ -349,33 +347,33 @@ export namespace testing_v1 { */ appBundle?: Schema$AppBundle; /** - * The initial activity that should be used to start the app. Optional + * The initial activity that should be used to start the app. */ appInitialActivity?: string; /** - * The java package for the application under test. Optional, default is + * The java package for the application under test. The default value is * determined by examining the application's manifest. */ appPackageId?: string; /** * The max depth of the traversal stack Robo can explore. Needs to be at * least 2 to make Robo explore the app beyond the first activity. Default - * is 50. Optional + * is 50. */ maxDepth?: number; /** - * The max number of steps Robo can execute. Default is no limit. Optional + * The max number of steps Robo can execute. Default is no limit. */ maxSteps?: number; /** * A set of directives Robo should apply during the crawl. This allows users * to customize the crawl. For example, the username and password for a test - * account can be provided. Optional + * account can be provided. */ roboDirectives?: Schema$RoboDirective[]; /** * A JSON file with a sequence of actions Robo should perform as a prologue - * for the crawl. Optional + * for the crawl. */ roboScript?: Schema$FileReference; /** @@ -391,18 +389,18 @@ export namespace testing_v1 { */ export interface Schema$AndroidRuntimeConfiguration { /** - * The set of available locales. @OutputOnly + * The set of available locales. */ locales?: Schema$Locale[]; /** - * The set of available orientations. @OutputOnly + * The set of available orientations. */ orientations?: Schema$Orientation[]; } /** * A test of an Android Application with a Test Loop. The intent - * <intent-name> will be implicitly added, since Games is the only user - * of this api, for the time being. + * \<intent-name\> will be implicitly added, since Games is the only + * user of this api, for the time being. */ export interface Schema$AndroidTestLoop { /** @@ -414,7 +412,7 @@ export namespace testing_v1 { */ appBundle?: Schema$AppBundle; /** - * The java package for the application under test. Optional, default is + * The java package for the application under test. The default is * determined by examining the application's manifest. */ appPackageId?: string; @@ -424,50 +422,49 @@ export namespace testing_v1 { * manifest. For example, player_experience and * com.google.test.loops.player_experience add all of the loops labeled in * the manifest with the com.google.test.loops.player_experience name to the - * execution. Optional. Scenarios can also be specified in the scenarios - * field. + * execution. Scenarios can also be specified in the scenarios field. */ scenarioLabels?: string[]; /** - * The list of scenarios that should be run during the test. Optional, - * default is all test loops, derived from the application's manifest. + * The list of scenarios that should be run during the test. The default is + * all test loops, derived from the application's manifest. */ scenarios?: number[]; } /** - * A version of the Android OS + * A version of the Android OS. */ export interface Schema$AndroidVersion { /** - * The API level for this Android version. Examples: 18, 19 @OutputOnly + * The API level for this Android version. Examples: 18, 19. */ apiLevel?: number; /** * The code name for this Android version. Examples: "JellyBean", - * "KitKat" @OutputOnly + * "KitKat". */ codeName?: string; /** - * Market share for this version. @OutputOnly + * Market share for this version. */ distribution?: Schema$Distribution; /** * An opaque id for this Android version. Use this id to invoke the - * TestExecutionService. @OutputOnly + * TestExecutionService. */ id?: string; /** - * The date this Android version became available in the market. @OutputOnly + * The date this Android version became available in the market. */ releaseDate?: Schema$Date; /** * Tags for this dimension. Examples: "default", - * "preview", "deprecated" + * "preview", "deprecated". */ tags?: string[]; /** * A string representing this version of the Android OS. Examples: - * "4.3", "4.4" @OutputOnly + * "4.3", "4.4". */ versionString?: string; } @@ -477,18 +474,17 @@ export namespace testing_v1 { export interface Schema$Apk { /** * The path to an APK to be installed on the device before the test begins. - * Optional */ location?: Schema$FileReference; /** - * The java package for the APK to be installed. Optional, value is - * determined by examining the application's manifest. + * The java package for the APK to be installed. Value is determined by + * examining the application's manifest. */ packageName?: string; } /** * Android application details based on application manifest and apk archive - * contents + * contents. */ export interface Schema$ApkDetail { apkManifest?: Schema$ApkManifest; @@ -548,22 +544,22 @@ export namespace testing_v1 { */ clientInfoDetails?: Schema$ClientInfoDetail[]; /** - * Client name, such as gcloud. Required + * Required. Client name, such as gcloud. */ name?: string; } /** * Key-value pair of detailed information about the client which invoked the - * test. For example {'Version', '1.0'}, {'Release - * Track', 'BETA'} + * test. Examples: {'Version', '1.0'}, {'Release + * Track', 'BETA'}. */ export interface Schema$ClientInfoDetail { /** - * The key of detailed client information. Required + * Required. The key of detailed client information. */ key?: string; /** - * The value of detailed client information. Required + * Required. The value of detailed client information. */ value?: string; } @@ -614,12 +610,12 @@ export namespace testing_v1 { */ export interface Schema$Distribution { /** - * The estimated fraction (0-1) of the total market with this configuration. - * @OutputOnly + * Output only. The estimated fraction (0-1) of the total market with this + * configuration. */ marketShare?: number; /** - * The time this distribution was measured. @OutputOnly + * Output only. The time this distribution was measured. */ measurementTime?: string; } @@ -655,15 +651,15 @@ export namespace testing_v1 { iosDeviceList?: Schema$IosDeviceList; } /** - * A key-value pair passed as an environment variable to the test + * A key-value pair passed as an environment variable to the test. */ export interface Schema$EnvironmentVariable { /** - * Key for the environment variable + * Key for the environment variable. */ key?: string; /** - * Value for the environment variable + * Value for the environment variable. */ value?: string; } @@ -700,9 +696,9 @@ export namespace testing_v1 { */ export interface Schema$GoogleCloudStorage { /** - * The path to a directory in GCS that will eventually contain the results - * for this test. The requesting user must have write access on the bucket - * in the supplied path. Required + * Required. The path to a directory in GCS that will eventually contain the + * results for this test. The requesting user must have write access on the + * bucket in the supplied path. */ gcsPath?: string; } @@ -712,15 +708,15 @@ export namespace testing_v1 { */ export interface Schema$IntentFilter { /** - * The android:name value of the <action> tag + * The android:name value of the <action> tag. */ actionNames?: string[]; /** - * The android:name value of the <category> tag + * The android:name value of the <category> tag. */ categoryNames?: string[]; /** - * The android:mimeType value of the <data> tag + * The android:mimeType value of the <data> tag. */ mimeType?: string; } @@ -754,19 +750,19 @@ export namespace testing_v1 { */ export interface Schema$IosDeviceCatalog { /** - * Output only. The set of supported iOS device models. + * The set of supported iOS device models. */ models?: Schema$IosModel[]; /** - * Output only. The set of supported runtime configurations. + * The set of supported runtime configurations. */ runtimeConfiguration?: Schema$IosRuntimeConfiguration; /** - * Output only. The set of supported iOS software versions. + * The set of supported iOS software versions. */ versions?: Schema$IosVersion[]; /** - * Output only. The set of supported Xcode versions. + * The set of supported Xcode versions. */ xcodeVersions?: Schema$XcodeVersion[]; } @@ -775,7 +771,7 @@ export namespace testing_v1 { */ export interface Schema$IosDeviceList { /** - * Required. A list of iOS devices + * Required. A list of iOS devices. */ iosDevices?: Schema$IosDevice[]; } @@ -784,31 +780,31 @@ export namespace testing_v1 { */ export interface Schema$IosModel { /** - * Output only. Device capabilities. Copied from + * Device capabilities. Copied from * https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html */ deviceCapabilities?: string[]; /** - * Whether this device is a phone, tablet, wearable, etc. @OutputOnly + * Whether this device is a phone, tablet, wearable, etc. */ formFactor?: string; /** - * Output only. The unique opaque id for this model. Use this for invoking - * the TestExecutionService. + * The unique opaque id for this model. Use this for invoking the + * TestExecutionService. */ id?: string; /** - * Output only. The human-readable name for this device model. Examples: - * "iPhone 4s", "iPad Mini 2" + * The human-readable name for this device model. Examples: "iPhone + * 4s", "iPad Mini 2". */ name?: string; /** - * Output only. The set of iOS major software versions this device supports. + * The set of iOS major software versions this device supports. */ supportedVersionIds?: string[]; /** - * Output only. Tags for this dimension. Examples: "default", - * "preview", "deprecated" + * Tags for this dimension. Examples: "default", + * "preview", "deprecated". */ tags?: string[]; } @@ -817,11 +813,11 @@ export namespace testing_v1 { */ export interface Schema$IosRuntimeConfiguration { /** - * Output only. The set of available locales. + * The set of available locales. */ locales?: Schema$Locale[]; /** - * Output only. The set of available orientations. + * The set of available orientations. */ orientations?: Schema$Orientation[]; } @@ -830,39 +826,39 @@ export namespace testing_v1 { */ export interface Schema$IosTestSetup { /** - * Optional. The network traffic profile used for running the test. - * Available network profiles can be queried by using the - * NETWORK_CONFIGURATION environment type when calling + * The network traffic profile used for running the test. Available network + * profiles can be queried by using the NETWORK_CONFIGURATION environment + * type when calling * TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog. */ networkProfile?: string; } /** - * An iOS version + * An iOS version. */ export interface Schema$IosVersion { /** - * Output only. An opaque id for this iOS version. Use this id to invoke the + * An opaque id for this iOS version. Use this id to invoke the * TestExecutionService. */ id?: string; /** - * Output only. An integer representing the major iOS version. Examples: - * "8", "9" + * An integer representing the major iOS version. Examples: "8", + * "9". */ majorVersion?: number; /** - * Output only. An integer representing the minor iOS version. Examples: - * "1", "2" + * An integer representing the minor iOS version. Examples: "1", + * "2". */ minorVersion?: number; /** - * Output only. The available Xcode versions for this version. + * The available Xcode versions for this version. */ supportedXcodeVersionIds?: string[]; /** - * Output only. Tags for this dimension. Examples: "default", - * "preview", "deprecated" + * Tags for this dimension. Examples: "default", + * "preview", "deprecated". */ tags?: string[]; } @@ -875,6 +871,10 @@ export namespace testing_v1 { * the binaries needed to run the tests. */ export interface Schema$IosXcTest { + /** + * Output only. The bundle id for the application under test. + */ + appBundleId?: string; /** * Required. The .zip containing the .xctestrun file and the contents of the * DerivedData/Build/Products directory. The .xctestrun file in this zip is @@ -882,16 +882,16 @@ export namespace testing_v1 { */ testsZip?: Schema$FileReference; /** - * Optional. The Xcode version that should be used for the test. Use the + * The Xcode version that should be used for the test. Use the * EnvironmentDiscoveryService to get supported options. Defaults to the * latest Xcode version Firebase Test Lab supports. */ xcodeVersion?: string; /** - * Optional. An .xctestrun file that will override the .xctestrun file in - * the tests zip. Because the .xctestrun file contains environment variables - * along with test methods to run and/or ignore, this can be useful for - * sharding tests. Default is taken from the tests zip. + * An .xctestrun file that will override the .xctestrun file in the tests + * zip. Because the .xctestrun file contains environment variables along + * with test methods to run and/or ignore, this can be useful for sharding + * tests. Default is taken from the tests zip. */ xctestrun?: Schema$FileReference; } @@ -904,35 +904,35 @@ export namespace testing_v1 { */ export interface Schema$Locale { /** - * The id for this locale. Example: "en_US" @OutputOnly + * The id for this locale. Example: "en_US". */ id?: string; /** * A human-friendly name for this language/locale. Example: - * "English" @OutputOnly + * "English". */ name?: string; /** * A human-friendly string representing the region for this locale. Example: - * "United States" Not present for every locale. @OutputOnly + * "United States". Not present for every locale. */ region?: string; /** - * Tags for this dimension. Examples: "default" + * Tags for this dimension. Example: "default". */ tags?: string[]; } export interface Schema$NetworkConfiguration { /** - * The emulation rule applying to the download traffic + * The emulation rule applying to the download traffic. */ downRule?: Schema$TrafficRule; /** - * The unique opaque id for this network traffic configuration @OutputOnly + * The unique opaque id for this network traffic configuration. */ id?: string; /** - * The emulation rule applying to the upload traffic + * The emulation rule applying to the upload traffic. */ upRule?: Schema$TrafficRule; } @@ -940,18 +940,19 @@ export namespace testing_v1 { configurations?: Schema$NetworkConfiguration[]; } /** - * An opaque binary blob file to install on the device before the test starts + * An opaque binary blob file to install on the device before the test starts. */ export interface Schema$ObbFile { /** - * Opaque Binary Blob (OBB) file(s) to install on the device Required + * Required. Opaque Binary Blob (OBB) file(s) to install on the device. */ obb?: Schema$FileReference; /** - * OBB file name which must conform to the format as specified by Android - * e.g. [main|patch].0300110.com.example.android.obb which will be installed - * into <shared-storage>/Android/obb/<package-name>/ on the - * device Required + * Required. OBB file name which must conform to the format as specified by + * Android e.g. [main|patch].0300110.com.example.android.obb which will be + * installed into + * \<shared-storage\>/Android/obb/\<package-name\>/ on the + * device. */ obbFileName?: string; } @@ -960,16 +961,16 @@ export namespace testing_v1 { */ export interface Schema$Orientation { /** - * The id for this orientation. Example: "portrait" @OutputOnly + * The id for this orientation. Example: "portrait". */ id?: string; /** - * A human-friendly name for this orientation. Example: "portrait" - * @OutputOnly + * A human-friendly name for this orientation. Example: + * "portrait". */ name?: string; /** - * Tags for this dimension. Examples: "default" + * Tags for this dimension. Example: "default". */ tags?: string[]; } @@ -979,22 +980,23 @@ export namespace testing_v1 { export interface Schema$ProvidedSoftwareCatalog { /** * A string representing the current version of Android Test Orchestrator - * that is provided by TestExecutionService. Example: "1.0.2 beta" + * that is provided by TestExecutionService. Example: "1.0.2 + * beta". */ orchestratorVersion?: string; } /** - * A file or directory to install on the device before the test starts + * A file or directory to install on the device before the test starts. */ export interface Schema$RegularFile { /** - * Required + * Required. The source file. */ content?: Schema$FileReference; /** - * Where to put the content on the device. Must be an absolute, whitelisted - * path. If the file exists, it will be replaced. The following device-side - * directories and any of their subdirectories are whitelisted: + * Required. Where to put the content on the device. Must be an absolute, + * whitelisted path. If the file exists, it will be replaced. The following + * device-side directories and any of their subdirectories are whitelisted: * <p>${EXTERNAL_STORAGE}, or /sdcard</p> * <p>${ANDROID_DATA}/local/tmp, or /data/local/tmp</p> * <p>Specifying a path outside of these directory trees is invalid. @@ -1005,7 +1007,7 @@ export namespace testing_v1 { * <p> It is strongly advised to use the <a href= * "http://developer.android.com/reference/android/os/Environment.html"> * Environment API</a> in app and test code to access files on the - * device in a portable way. Required + * device in a portable way. */ devicePath?: string; } @@ -1018,13 +1020,13 @@ export namespace testing_v1 { */ googleCloudStorage?: Schema$GoogleCloudStorage; /** - * The tool results execution that results are written to. @OutputOnly + * Output only. The tool results execution that results are written to. */ toolResultsExecution?: Schema$ToolResultsExecution; /** * The tool results history that contains the tool results execution that - * results are written to. Optional, if not provided the service will - * choose an appropriate value. + * results are written to. If not provided, the service will choose an + * appropriate value. */ toolResultsHistory?: Schema$ToolResultsHistory; } @@ -1034,26 +1036,25 @@ export namespace testing_v1 { */ export interface Schema$RoboDirective { /** - * The type of action that Robo should perform on the specified element. - * Required. + * Required. The type of action that Robo should perform on the specified + * element. */ actionType?: string; /** * The text that Robo is directed to set. If left empty, the directive will - * be treated as a CLICK on the element matching the resource_name. Optional + * be treated as a CLICK on the element matching the resource_name. */ inputText?: string; /** - * The android resource name of the target UI element For example, in - * Java: R.string.foo in xml: @string/foo Only the “foo” part is needed. - * Reference doc: + * Required. The android resource name of the target UI element. For + * example, in Java: R.string.foo in xml: @string/foo Only the + * "foo" part is needed. Reference doc: * https://developer.android.com/guide/topics/resources/accessing-resources.html - * Required */ resourceName?: string; } /** - * Message for specifying the start activities to crawl + * Message for specifying the start activities to crawl. */ export interface Schema$RoboStartingIntent { launcherActivity?: Schema$LauncherActivityIntent; @@ -1068,11 +1069,11 @@ export namespace testing_v1 { */ action?: string; /** - * Intent categories to set on the intent. Optional. + * Intent categories to set on the intent. */ categories?: string[]; /** - * URI for the action. Optional. + * URI for the action. */ uri?: string; } @@ -1081,15 +1082,15 @@ export namespace testing_v1 { */ export interface Schema$TestDetails { /** - * If the TestState is ERROR, then this string will contain human-readable - * details about the error. @OutputOnly + * Output only. If the TestState is ERROR, then this string will contain + * human-readable details about the error. */ errorMessage?: string; /** - * Human-readable, detailed descriptions of the test's progress. For - * example: "Provisioning a device", "Starting Test". - * During the course of execution new data may be appended to the end of - * progress_messages. @OutputOnly + * Output only. Human-readable, detailed descriptions of the test's + * progress. For example: "Provisioning a device", "Starting + * Test". During the course of execution new data may be appended to + * the end of progress_messages. */ progressMessages?: string[]; } @@ -1098,15 +1099,15 @@ export namespace testing_v1 { */ export interface Schema$TestEnvironmentCatalog { /** - * Android devices suitable for running Android Instrumentation Tests. + * Supported Android devices. */ androidDeviceCatalog?: Schema$AndroidDeviceCatalog; /** - * Supported iOS devices + * Supported iOS devices. */ iosDeviceCatalog?: Schema$IosDeviceCatalog; /** - * Supported network configurations + * Supported network configurations. */ networkConfigurationCatalog?: Schema$NetworkConfigurationCatalog; /** @@ -1119,40 +1120,40 @@ export namespace testing_v1 { */ export interface Schema$TestExecution { /** - * How the host machine(s) are configured. @OutputOnly + * Output only. How the host machine(s) are configured. */ environment?: Schema$Environment; /** - * Unique id set by the backend. @OutputOnly + * Output only. Unique id set by the backend. */ id?: string; /** - * Id of the containing TestMatrix. @OutputOnly + * Output only. Id of the containing TestMatrix. */ matrixId?: string; /** - * The cloud project that owns the test execution. @OutputOnly + * Output only. The cloud project that owns the test execution. */ projectId?: string; /** - * Indicates the current progress of the test execution (e.g., FINISHED). - * @OutputOnly + * Output only. Indicates the current progress of the test execution (e.g., + * FINISHED). */ state?: string; /** - * Additional details about the running test. @OutputOnly + * Output only. Additional details about the running test. */ testDetails?: Schema$TestDetails; /** - * How to run the test. @OutputOnly + * Output only. How to run the test. */ testSpecification?: Schema$TestSpecification; /** - * The time this test execution was initially created. @OutputOnly + * Output only. The time this test execution was initially created. */ timestamp?: string; /** - * Where the results for this execution are written. @OutputOnly + * Output only. Where the results for this execution are written. */ toolResultsStep?: Schema$ToolResultsStep; } @@ -1162,46 +1163,52 @@ export namespace testing_v1 { */ export interface Schema$TestMatrix { /** - * Information about the client which invoked the test. Optional + * Information about the client which invoked the test. */ clientInfo?: Schema$ClientInfo; /** - * How the host machine(s) are configured. Required + * Required. How the host machine(s) are configured. */ environmentMatrix?: Schema$EnvironmentMatrix; /** - * Describes why the matrix is considered invalid. Only useful for matrices - * in the INVALID state. @OutputOnly + * The number of times a TestExecution should be re-attempted if one or more + * of its test cases fail for any reason. The maximum number of reruns + * allowed is 10. Default is 0, which implies no reruns. + */ + flakyTestAttempts?: number; + /** + * Output only. Describes why the matrix is considered invalid. Only useful + * for matrices in the INVALID state. */ invalidMatrixDetails?: string; /** - * The cloud project that owns the test matrix. @OutputOnly + * The cloud project that owns the test matrix. */ projectId?: string; /** - * Where the results for the matrix are written. Required + * Required. Where the results for the matrix are written. */ resultStorage?: Schema$ResultStorage; /** - * Indicates the current progress of the test matrix (e.g., FINISHED) - * @OutputOnly + * Output only. Indicates the current progress of the test matrix (e.g., + * FINISHED). */ state?: string; /** - * The list of test executions that the service creates for this matrix. - * @OutputOnly + * Output only. The list of test executions that the service creates for + * this matrix. */ testExecutions?: Schema$TestExecution[]; /** - * Unique id set by the service. @OutputOnly + * Output only. Unique id set by the service. */ testMatrixId?: string; /** - * How to run the test. Required + * Required. How to run the test. */ testSpecification?: Schema$TestSpecification; /** - * The time this test matrix was initially created. @OutputOnly + * Output only. The time this test matrix was initially created. */ timestamp?: string; } @@ -1212,12 +1219,12 @@ export namespace testing_v1 { export interface Schema$TestSetup { /** * The device will be logged in on this account for the duration of the - * test. Optional + * test. */ account?: Schema$Account; /** * APKs to install in addition to those being directly tested. Currently - * capped at 100. Optional + * capped at 100. */ additionalApks?: Schema$Apk[]; /** @@ -1227,7 +1234,7 @@ export namespace testing_v1 { * paths /sdcard and /data will be made available and treated as implicit * path substitutions. E.g. if /sdcard on a particular device does not map * to external storage, the system will replace it with the external storage - * path prefix for that device. Optional + * path prefix for that device. */ directoriesToPull?: string[]; /** @@ -1236,13 +1243,13 @@ export namespace testing_v1 { */ environmentVariables?: Schema$EnvironmentVariable[]; /** - * List of files to push to the device before starting the test. Optional + * List of files to push to the device before starting the test. */ filesToPush?: Schema$DeviceFile[]; /** - * Optional. The network traffic profile used for running the test. - * Available network profiles can be queried by using the - * NETWORK_CONFIGURATION environment type when calling + * The network traffic profile used for running the test. Available network + * profiles can be queried by using the NETWORK_CONFIGURATION environment + * type when calling * TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog. */ networkProfile?: string; @@ -1260,7 +1267,7 @@ export namespace testing_v1 { */ androidRoboTest?: Schema$AndroidRoboTest; /** - * An Android Application with a Test Loop + * An Android Application with a Test Loop. */ androidTestLoop?: Schema$AndroidTestLoop; /** @@ -1269,7 +1276,7 @@ export namespace testing_v1 { * before executing the test. Note that test accounts might be reused. Many * applications show their full set of functionalities when an account is * present on the device. Logging into the device with these generated - * accounts allows testing more functionalities. Default is false. Optional + * accounts allows testing more functionalities. Default is false. */ autoGoogleLogin?: boolean; /** @@ -1281,21 +1288,21 @@ export namespace testing_v1 { */ disableVideoRecording?: boolean; /** - * Optional. Test setup requirements for iOS. + * Test setup requirements for iOS. */ iosTestSetup?: Schema$IosTestSetup; /** - * An iOS XCTest, via an .xctestrun file + * An iOS XCTest, via an .xctestrun file. */ iosXcTest?: Schema$IosXcTest; /** * Test setup requirements for Android e.g. files to install, bootstrap - * scripts. Optional + * scripts. */ testSetup?: Schema$TestSetup; /** * Max time a test execution is allowed to run before it is automatically - * cancelled. Optional, default is 5 min. + * cancelled. The default value is 5 min. */ testTimeout?: string; } @@ -1305,15 +1312,15 @@ export namespace testing_v1 { */ export interface Schema$ToolResultsExecution { /** - * A tool results execution ID. @OutputOnly + * Output only. A tool results execution ID. */ executionId?: string; /** - * A tool results history ID. @OutputOnly + * Output only. A tool results history ID. */ historyId?: string; /** - * The cloud project that owns the tool results execution. @OutputOnly + * Output only. The cloud project that owns the tool results execution. */ projectId?: string; } @@ -1322,11 +1329,11 @@ export namespace testing_v1 { */ export interface Schema$ToolResultsHistory { /** - * A tool results history ID. Required + * Required. A tool results history ID. */ historyId?: string; /** - * The cloud project that owns the tool results history. Required + * Required. The cloud project that owns the tool results history. */ projectId?: string; } @@ -1336,44 +1343,44 @@ export namespace testing_v1 { */ export interface Schema$ToolResultsStep { /** - * A tool results execution ID. @OutputOnly + * Output only. A tool results execution ID. */ executionId?: string; /** - * A tool results history ID. @OutputOnly + * Output only. A tool results history ID. */ historyId?: string; /** - * The cloud project that owns the tool results step. @OutputOnly + * Output only. The cloud project that owns the tool results step. */ projectId?: string; /** - * A tool results step ID. @OutputOnly + * Output only. A tool results step ID. */ stepId?: string; } /** - * Network emulation parameters + * Network emulation parameters. */ export interface Schema$TrafficRule { /** - * Bandwidth in kbits/second + * Bandwidth in kbits/second. */ bandwidth?: number; /** - * Burst size in kbits + * Burst size in kbits. */ burst?: number; /** - * Packet delay, must be >= 0 + * Packet delay, must be >= 0. */ delay?: string; /** - * Packet duplication ratio (0.0 - 1.0) + * Packet duplication ratio (0.0 - 1.0). */ packetDuplicationRatio?: number; /** - * Packet loss ratio (0.0 - 1.0) + * Packet loss ratio (0.0 - 1.0). */ packetLossRatio?: number; } @@ -1382,11 +1389,11 @@ export namespace testing_v1 { */ export interface Schema$XcodeVersion { /** - * Output only. Tags for this Xcode version. Examples: "default" + * Tags for this Xcode version. Example: "default". */ tags?: string[]; /** - * Output only. The id for this version. Example: "9.2" + * The id for this version. Example: "9.2". */ version?: string; } @@ -1398,7 +1405,7 @@ export namespace testing_v1 { /** * testing.applicationDetailService.getApkDetails - * @desc Request the details of an Android application APK. + * @desc Gets the details of an Android application APK. * @alias testing.applicationDetailService.getApkDetails * @memberOf! () * @@ -1572,7 +1579,7 @@ export namespace testing_v1 { /** * testing.projects.testMatrices.create - * @desc Request to run a matrix of tests according to the given + * @desc Creates and runs a matrix of tests according to the given * specifications. Unsupported environments will be returned in the state * UNSUPPORTED. Matrices are limited to at most 200 supported executions. * May return any of the following canonical error codes: - @@ -1647,9 +1654,9 @@ export namespace testing_v1 { /** * testing.projects.testMatrices.get - * @desc Check the status of a test matrix. May return any of the following - * canonical error codes: - PERMISSION_DENIED - if the user is not - * authorized to read project - INVALID_ARGUMENT - if the request is + * @desc Checks the status of a test matrix. May return any of the + * following canonical error codes: - PERMISSION_DENIED - if the user is + * not authorized to read project - INVALID_ARGUMENT - if the request is * malformed - NOT_FOUND - if the Test Matrix does not exist * @alias testing.projects.testMatrices.get * @memberOf! () @@ -1777,7 +1784,7 @@ export namespace testing_v1 { /** * testing.testEnvironmentCatalog.get - * @desc Get the catalog of supported test environments. May return any of + * @desc Gets the catalog of supported test environments. May return any of * the following canonical error codes: - INVALID_ARGUMENT - if the request * is malformed - NOT_FOUND - if the environment type does not exist - * INTERNAL - if an internal error occurred @@ -1785,8 +1792,8 @@ export namespace testing_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.environmentType The type of environment that should be listed. Required - * @param {string=} params.projectId For authorization, the cloud project requesting the TestEnvironmentCatalog. Optional + * @param {string} params.environmentType Required. The type of environment that should be listed. + * @param {string=} params.projectId For authorization, the cloud project requesting the TestEnvironmentCatalog. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1851,12 +1858,12 @@ export namespace testing_v1 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * The type of environment that should be listed. Required + * Required. The type of environment that should be listed. */ environmentType?: string; /** * For authorization, the cloud project requesting the - * TestEnvironmentCatalog. Optional + * TestEnvironmentCatalog. */ projectId?: string; } diff --git a/src/apis/texttospeech/v1beta1.ts b/src/apis/texttospeech/v1beta1.ts index 1beb92858f8..b3a17e9fd3a 100644 --- a/src/apis/texttospeech/v1beta1.ts +++ b/src/apis/texttospeech/v1beta1.ts @@ -121,7 +121,9 @@ export namespace texttospeech_v1beta1 { /** * 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. + * of each other in the order they are given. See [audio-profiles](https: + * //cloud.google.com/text-to-speech/docs/audio-profiles) for current + * supported profile ids. */ effectsProfileId?: string[]; /** diff --git a/src/apis/vision/v1.ts b/src/apis/vision/v1.ts index 705e77bda9d..1e42904d15a 100644 --- a/src/apis/vision/v1.ts +++ b/src/apis/vision/v1.ts @@ -6481,10 +6481,10 @@ export namespace vision_v1 { /** * vision.projects.locations.productSets.delete - * @desc Permanently deletes a ProductSet. All Products and ReferenceImages - * in the ProductSet will be deleted. The actual image files are not - * deleted from Google Cloud Storage. Possible errors: * Returns NOT_FOUND - * if the ProductSet does not exist. + * @desc Permanently deletes a ProductSet. Products and ReferenceImages in + * the ProductSet are not deleted. The actual image files are not deleted + * from Google Cloud Storage. Possible errors: * Returns NOT_FOUND if the + * ProductSet does not exist. * @alias vision.projects.locations.productSets.delete * @memberOf! () * diff --git a/src/generator/generator.ts b/src/generator/generator.ts index 79f43d69a64..e62720b8d47 100644 --- a/src/generator/generator.ts +++ b/src/generator/generator.ts @@ -72,6 +72,23 @@ function cleanPropertyName(prop: string) { return match ? `'${prop}'` : prop; } +function camelify(name: string) { + // If the name has a `-`, remove it and camelize. + // Ex: `well-known` => `wellKnown` + if (name.includes('-')) { + const parts = name.split('-').filter(x => !!x); + name = parts + .map((part, i) => { + if (i === 0) { + return part; + } + return part.charAt(0).toUpperCase() + part.slice(1); + }) + .join(''); + } + return name; +} + function getType(item: SchemaItem): string { if (item.$ref) { return `Schema$${item.$ref}`; @@ -158,6 +175,7 @@ export class Generator { this.env.addFilter('getType', getType); this.env.addFilter('cleanPropertyName', cleanPropertyName); this.env.addFilter('cleanComments', this.cleanComments); + this.env.addFilter('camelify', camelify); this.env.addFilter('getPathParams', this.getPathParams); this.env.addFilter('getSafeParamName', this.getSafeParamName); this.env.addFilter('hasResourceParam', this.hasResourceParam); diff --git a/src/generator/templates/package.json.njk b/src/generator/templates/package.json.njk index b7a4b5525e7..07cb438e8dd 100644 --- a/src/generator/templates/package.json.njk +++ b/src/generator/templates/package.json.njk @@ -31,6 +31,6 @@ "devDependencies": { "gts": "^0.9.0", "typescript": "~3.2.0", - "typedoc": "^0.13.0" + "typedoc": "^0.14.0" } } diff --git a/src/generator/templates/resource-partial.njk b/src/generator/templates/resource-partial.njk index 9a7d842fac9..c8b4208807a 100644 --- a/src/generator/templates/resource-partial.njk +++ b/src/generator/templates/resource-partial.njk @@ -2,19 +2,19 @@ {% macro render(api, rootApi, classPath) %} {% if api.resources %} {% for rname, r in api.resources|dictsort %} - {% set ClassName = classPath + rname|capitalize %} + {% set ClassName = classPath + rname|capitalize|camelify %} export class {{ ClassName }} { {% if r.resources %} {% for rname, r2 in r.resources|dictsort %} - {% set innerClassName = ClassName + "$" + rname|capitalize %} - {{ rname }}: {{ innerClassName }}; + {% set innerClassName = ClassName + "$" + rname|capitalize|camelify %} + {{ rname|camelify }}: {{ innerClassName }}; {% endfor %} {% endif %} constructor() { {% if r.resources %} {% for rname, r2 in r.resources|dictsort %} - {% set innerClassName = ClassName + "$" + rname|capitalize %} - this.{{ rname }} = new {{ innerClassName }}(); + {% set innerClassName = ClassName + "$" + rname|capitalize|camelify %} + this.{{ rname|camelify }} = new {{ innerClassName }}(); {% endfor %} {% endif %} } diff --git a/src/index.ts b/src/index.ts index b7e97060c45..735c4445369 100644 --- a/src/index.ts +++ b/src/index.ts @@ -53,6 +53,7 @@ export {appsactivity_v1} from './apis/appsactivity/v1'; export {appstate_v1} from './apis/appstate/v1'; export {bigquery_v2} from './apis/bigquery/v2'; export {bigquerydatatransfer_v1} from './apis/bigquerydatatransfer/v1'; +export {bigtableadmin_v2} from './apis/bigtableadmin/v2'; export {binaryauthorization_v1beta1} from './apis/binaryauthorization/v1beta1'; export {blogger_v2} from './apis/blogger/v2'; export {blogger_v3} from './apis/blogger/v3'; @@ -64,10 +65,13 @@ export {classroom_v1} from './apis/classroom/v1'; export {cloudasset_v1beta1} from './apis/cloudasset/v1beta1'; export {cloudbilling_v1} from './apis/cloudbilling/v1'; export {cloudbuild_v1} from './apis/cloudbuild/v1'; +export {cloudbuild_v1alpha1} from './apis/cloudbuild/v1alpha1'; export {clouddebugger_v2} from './apis/clouddebugger/v2'; export {clouderrorreporting_v1beta1} from './apis/clouderrorreporting/v1beta1'; export {cloudfunctions_v1} from './apis/cloudfunctions/v1'; export {cloudfunctions_v1beta2} from './apis/cloudfunctions/v1beta2'; +export {cloudidentity_v1} from './apis/cloudidentity/v1'; +export {cloudidentity_v1beta1} from './apis/cloudidentity/v1beta1'; export {cloudiot_v1} from './apis/cloudiot/v1'; export {cloudkms_v1} from './apis/cloudkms/v1'; export {cloudprofiler_v2} from './apis/cloudprofiler/v2'; @@ -90,6 +94,9 @@ export {compute_beta} from './apis/compute/beta'; export {compute_v1} from './apis/compute/v1'; export {container_v1} from './apis/container/v1'; export {container_v1beta1} from './apis/container/v1beta1'; +export {containeranalysis_v1alpha1} from './apis/containeranalysis/v1alpha1'; +export {containeranalysis_v1beta1} from './apis/containeranalysis/v1beta1'; +export {content_v2_1} from './apis/content/v2.1'; export {content_v2} from './apis/content/v2'; export {customsearch_v1} from './apis/customsearch/v1'; export {dataflow_v1b3} from './apis/dataflow/v1b3'; @@ -137,6 +144,7 @@ export {groupsmigration_v1} from './apis/groupsmigration/v1'; export {groupssettings_v1} from './apis/groupssettings/v1'; export {iam_v1} from './apis/iam/v1'; export {iamcredentials_v1} from './apis/iamcredentials/v1'; +export {iap_v1} from './apis/iap/v1'; export {iap_v1beta1} from './apis/iap/v1beta1'; export {identitytoolkit_v3} from './apis/identitytoolkit/v3'; export {indexing_v3} from './apis/indexing/v3'; @@ -147,6 +155,7 @@ export {kgsearch_v1} from './apis/kgsearch/v1'; export {language_v1} from './apis/language/v1'; export {language_v1beta1} from './apis/language/v1beta1'; export {language_v1beta2} from './apis/language/v1beta2'; +export {libraryagent_v1} from './apis/libraryagent/v1'; export {licensing_v1} from './apis/licensing/v1'; export {logging_v2} from './apis/logging/v2'; export {logging_v2beta1} from './apis/logging/v2beta1'; @@ -174,8 +183,10 @@ export {pubsub_v1beta1a} from './apis/pubsub/v1beta1a'; export {pubsub_v1beta2} from './apis/pubsub/v1beta2'; export {redis_v1} from './apis/redis/v1'; export {redis_v1beta1} from './apis/redis/v1beta1'; +export {remotebuildexecution_v1} from './apis/remotebuildexecution/v1'; +export {remotebuildexecution_v1alpha} from './apis/remotebuildexecution/v1alpha'; +export {remotebuildexecution_v2} from './apis/remotebuildexecution/v2'; export {replicapool_v1beta1} from './apis/replicapool/v1beta1'; -export {replicapoolupdater_v1beta1} from './apis/replicapoolupdater/v1beta1'; export {reseller_v1} from './apis/reseller/v1'; export {runtimeconfig_v1} from './apis/runtimeconfig/v1'; export {runtimeconfig_v1beta1} from './apis/runtimeconfig/v1beta1';