From 310123f3cc948072ab635d1f0fe9ce919e35c6c9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 12 May 2018 14:10:08 -0700 Subject: [PATCH] chore: re-organize directory structure (and run generator) (#1167) --- Makefile | 2 +- package-lock.json | 6 +- src/apis/abusiveexperiencereport/v1.ts | 4 +- src/apis/acceleratedmobilepageurl/v1.ts | 4 +- src/apis/adexchangebuyer/v1.2.ts | 4 +- src/apis/adexchangebuyer/v1.3.ts | 4 +- src/apis/adexchangebuyer/v1.4.ts | 4 +- src/apis/adexchangebuyer2/v2beta1.ts | 4 +- src/apis/adexchangeseller/v1.1.ts | 4 +- src/apis/adexchangeseller/v1.ts | 4 +- src/apis/adexchangeseller/v2.0.ts | 4 +- src/apis/adexperiencereport/v1.ts | 4 +- src/apis/admin/datatransfer_v1.ts | 4 +- src/apis/admin/directory_v1.ts | 4 +- src/apis/admin/reports_v1.ts | 4 +- src/apis/adsense/v1.4.ts | 4 +- src/apis/adsensehost/v4.1.ts | 4 +- src/apis/analytics/v2.4.ts | 4 +- src/apis/analytics/v3.ts | 17 +- src/apis/analyticsreporting/v4.ts | 4 +- src/apis/androiddeviceprovisioning/v1.ts | 4 +- src/apis/androidenterprise/v1.ts | 20 +- src/apis/androidmanagement/v1.ts | 4 +- src/apis/androidpublisher/v1.1.ts | 4 +- src/apis/androidpublisher/v1.ts | 4 +- src/apis/androidpublisher/v2.ts | 241 +- src/apis/androidpublisher/v3.ts | 6064 +++++++++++++++++ src/apis/appengine/v1.ts | 4 +- src/apis/appengine/v1alpha.ts | 4 +- src/apis/appengine/v1beta.ts | 4 +- src/apis/appengine/v1beta4.ts | 4 +- src/apis/appengine/v1beta5.ts | 4 +- src/apis/appsactivity/v1.ts | 4 +- src/apis/appstate/v1.ts | 4 +- src/apis/bigquery/v2.ts | 4 +- src/apis/bigquerydatatransfer/v1.ts | 4 +- src/apis/blogger/v2.ts | 4 +- src/apis/blogger/v3.ts | 4 +- src/apis/books/v1.ts | 4 +- src/apis/calendar/v3.ts | 36 +- src/apis/chat/v1.ts | 4 +- src/apis/civicinfo/v2.ts | 4 +- src/apis/classroom/v1.ts | 4 +- src/apis/cloudbilling/v1.ts | 4 +- src/apis/cloudbuild/v1.ts | 4 +- src/apis/clouddebugger/v2.ts | 4 +- src/apis/clouderrorreporting/v1beta1.ts | 4 +- src/apis/cloudfunctions/v1.ts | 11 +- src/apis/cloudfunctions/v1beta2.ts | 11 +- src/apis/cloudiot/v1.ts | 18 +- src/apis/cloudkms/v1.ts | 4 +- src/apis/cloudresourcemanager/v1.ts | 4 +- src/apis/cloudresourcemanager/v1beta1.ts | 4 +- src/apis/cloudresourcemanager/v2.ts | 4 +- src/apis/cloudresourcemanager/v2beta1.ts | 4 +- src/apis/cloudshell/v1.ts | 4 +- src/apis/cloudshell/v1alpha1.ts | 4 +- src/apis/cloudtasks/v2beta2.ts | 4 +- src/apis/cloudtrace/v1.ts | 4 +- src/apis/cloudtrace/v2.ts | 4 +- src/apis/composer/v1beta1.ts | 4 +- src/apis/compute/alpha.ts | 1423 +++- src/apis/compute/beta.ts | 45 +- src/apis/compute/v1.ts | 1201 +++- src/apis/container/v1.ts | 19 +- src/apis/container/v1beta1.ts | 122 +- src/apis/content/v2.ts | 40 +- src/apis/content/v2sandbox.ts | 4 +- src/apis/customsearch/v1.ts | 4 +- src/apis/dataflow/v1b3.ts | 4 +- src/apis/dataproc/v1.ts | 4 +- src/apis/dataproc/v1beta2.ts | 4 +- src/apis/datastore/v1.ts | 39 +- src/apis/datastore/v1beta1.ts | 39 +- src/apis/datastore/v1beta3.ts | 4 +- src/apis/deploymentmanager/alpha.ts | 47 +- src/apis/deploymentmanager/v2.ts | 47 +- src/apis/deploymentmanager/v2beta.ts | 47 +- src/apis/dfareporting/v2.8.ts | 4 +- src/apis/dfareporting/v3.0.ts | 4 +- src/apis/dialogflow/v2.ts | 58 +- src/apis/dialogflow/v2beta1.ts | 58 +- src/apis/digitalassetlinks/v1.ts | 4 +- src/apis/discovery/v1.ts | 4 +- src/apis/dlp/v2.ts | 6 +- src/apis/dns/v1.ts | 4 +- src/apis/dns/v1beta2.ts | 4 +- src/apis/dns/v2beta1.ts | 4 +- src/apis/doubleclickbidmanager/v1.ts | 4 +- src/apis/doubleclicksearch/v2.ts | 4 +- src/apis/drive/v2.ts | 4 +- src/apis/drive/v3.ts | 4 +- src/apis/firebasedynamiclinks/v1.ts | 4 +- src/apis/firebaserules/v1.ts | 4 +- src/apis/firestore/v1beta1.ts | 4 +- src/apis/fitness/v1.ts | 4 +- src/apis/fusiontables/v1.ts | 4 +- src/apis/fusiontables/v2.ts | 4 +- src/apis/games/v1.ts | 4 +- .../gamesConfiguration/v1configuration.ts | 4 +- src/apis/gamesManagement/v1management.ts | 4 +- src/apis/genomics/v1.ts | 300 +- src/apis/genomics/v1alpha2.ts | 4 +- src/apis/genomics/v2alpha1.ts | 4 +- src/apis/gmail/v1.ts | 48 +- src/apis/groupsmigration/v1.ts | 4 +- src/apis/groupssettings/v1.ts | 4 +- src/apis/iam/v1.ts | 4 +- src/apis/identitytoolkit/v3.ts | 4 +- src/apis/index.ts | 33 +- src/apis/jobs/v2.ts | 3648 ++++++++++ src/apis/kgsearch/v1.ts | 4 +- src/apis/language/v1.ts | 4 +- src/apis/language/v1beta1.ts | 4 +- src/apis/language/v1beta2.ts | 4 +- src/apis/licensing/v1.ts | 4 +- src/apis/logging/v2.ts | 4 +- src/apis/logging/v2beta1.ts | 4 +- src/apis/manufacturers/v1.ts | 4 +- src/apis/mirror/v1.ts | 4 +- src/apis/ml/v1.ts | 4 +- src/apis/monitoring/v3.ts | 4 +- src/apis/oauth2/v1.ts | 4 +- src/apis/oauth2/v2.ts | 4 +- src/apis/oslogin/v1.ts | 4 +- src/apis/oslogin/v1alpha.ts | 4 +- src/apis/oslogin/v1beta.ts | 4 +- src/apis/pagespeedonline/v1.ts | 4 +- src/apis/pagespeedonline/v2.ts | 4 +- src/apis/pagespeedonline/v4.ts | 4 +- src/apis/partners/v2.ts | 4 +- src/apis/people/v1.ts | 4 +- src/apis/photoslibrary/v1.ts | 1655 +++++ src/apis/playcustomapp/v1.ts | 4 +- src/apis/plus/v1.ts | 4 +- src/apis/plusDomains/v1.ts | 4 +- src/apis/poly/v1.ts | 4 +- src/apis/proximitybeacon/v1beta1.ts | 4 +- src/apis/pubsub/v1.ts | 4 +- src/apis/pubsub/v1beta1a.ts | 4 +- src/apis/pubsub/v1beta2.ts | 4 +- src/apis/redis/v1beta1.ts | 4 +- src/apis/replicapool/v1beta1.ts | 4 +- src/apis/replicapool/v1beta2.ts | 4 +- src/apis/replicapoolupdater/v1beta1.ts | 4 +- src/apis/reseller/v1.ts | 4 +- src/apis/resourceviews/v1beta1.ts | 4 +- src/apis/resourceviews/v1beta2.ts | 4 +- src/apis/runtimeconfig/v1.ts | 4 +- src/apis/runtimeconfig/v1beta1.ts | 4 +- src/apis/safebrowsing/v4.ts | 4 +- src/apis/script/v1.ts | 4 +- src/apis/searchconsole/v1.ts | 4 +- src/apis/servicebroker/v1.ts | 4 +- src/apis/servicebroker/v1alpha1.ts | 4 +- src/apis/servicebroker/v1beta1.ts | 4 +- src/apis/serviceconsumermanagement/v1.ts | 4 +- src/apis/servicecontrol/v1.ts | 4 +- src/apis/servicemanagement/v1.ts | 4 +- src/apis/serviceusage/v1beta1.ts | 118 +- src/apis/serviceuser/v1.ts | 4 +- src/apis/sheets/v4.ts | 160 +- src/apis/siteVerification/v1.ts | 4 +- src/apis/slides/v1.ts | 4 +- src/apis/sourcerepo/v1.ts | 4 +- src/apis/spanner/v1.ts | 4 +- src/apis/spectrum/v1explorer.ts | 4 +- src/apis/speech/v1.ts | 4 +- src/apis/speech/v1beta1.ts | 4 +- src/apis/sqladmin/v1beta3.ts | 34 +- src/apis/sqladmin/v1beta4.ts | 34 +- src/apis/storage/v1.ts | 7 +- src/apis/storage/v1beta1.ts | 4 +- src/apis/storage/v1beta2.ts | 4 +- src/apis/storagetransfer/v1.ts | 4 +- src/apis/streetviewpublish/v1.ts | 4 +- src/apis/surveys/v2.ts | 369 +- src/apis/tagmanager/v1.ts | 4 +- src/apis/tagmanager/v2.ts | 4 +- src/apis/tasks/v1.ts | 4 +- src/apis/testing/v1.ts | 4 +- src/apis/texttospeech/v1beta1.ts | 4 +- src/apis/toolresults/v1beta3.ts | 4 +- src/apis/tpu/v1alpha1.ts | 4 +- src/apis/translate/v2.ts | 4 +- src/apis/urlshortener/v1.ts | 4 +- src/apis/vault/v1.ts | 4 +- src/apis/videointelligence/v1.ts | 9 +- src/apis/videointelligence/v1beta1.ts | 9 +- src/apis/videointelligence/v1beta2.ts | 9 +- src/apis/vision/v1.ts | 4 +- src/apis/vision/v1p1beta1.ts | 4 +- src/apis/vision/v1p2beta1.ts | 4 +- src/apis/webfonts/v1.ts | 4 +- src/apis/webmasters/v3.ts | 4 +- src/apis/websecurityscanner/v1alpha.ts | 4 +- src/apis/youtube/v3.ts | 4 +- src/apis/youtubeAnalytics/v1.ts | 4 +- src/apis/youtubeAnalytics/v1beta1.ts | 4 +- src/apis/youtubeAnalytics/v2.ts | 4 +- src/apis/youtubereporting/v1.ts | 4 +- src/{scripts => generator}/generate.ts | 8 +- src/{scripts => generator}/generator.ts | 41 +- .../templates/api-endpoint.njk | 4 +- src/{ => generator}/templates/index.njk | 2 +- .../templates/method-partial.njk | 0 .../templates/resource-partial.njk | 0 src/{ => generator}/templates/root-index.njk | 2 +- src/index.ts | 5 +- src/scripts/generator_utils.ts | 27 - src/{lib => shared}/api.ts | 0 src/{lib => shared}/apirequest.ts | 0 src/{lib => shared}/discovery.ts | 0 src/{lib => shared}/endpoint.ts | 13 +- src/{lib => shared}/googleapis.ts | 0 src/{lib => shared}/schema.ts | 0 test/test.apikey.ts | 2 +- test/test.auth.ts | 2 +- test/test.clients.ts | 2 +- test/test.discover.ts | 2 +- test/test.drive.v2.ts | 2 +- test/test.path.ts | 2 +- test/test.query.ts | 2 +- test/test.transporters.ts | 2 +- test/test.urlshortener.v1.ts | 2 +- test/utils.ts | 2 +- tsconfig.tools.json | 4 +- 227 files changed, 15524 insertions(+), 1304 deletions(-) create mode 100644 src/apis/androidpublisher/v3.ts create mode 100644 src/apis/jobs/v2.ts create mode 100644 src/apis/photoslibrary/v1.ts rename src/{scripts => generator}/generate.ts (88%) rename src/{scripts => generator}/generator.ts (90%) rename src/{ => generator}/templates/api-endpoint.njk (98%) rename src/{ => generator}/templates/index.njk (98%) rename src/{ => generator}/templates/method-partial.njk (100%) rename src/{ => generator}/templates/resource-partial.njk (100%) rename src/{ => generator}/templates/root-index.njk (95%) delete mode 100644 src/scripts/generator_utils.ts rename src/{lib => shared}/api.ts (100%) rename src/{lib => shared}/apirequest.ts (100%) rename src/{lib => shared}/discovery.ts (100%) rename src/{lib => shared}/endpoint.ts (93%) rename src/{lib => shared}/googleapis.ts (100%) rename src/{lib => shared}/schema.ts (100%) diff --git a/Makefile b/Makefile index b869458f963..d23e5fd1dbb 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ fix-typescript: gts fix generate: build-tools - node build/src/scripts/generate.js + node build/src/generator/generate.js clang-format -i -style='{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}' src/apis/**/*.ts install: diff --git a/package-lock.json b/package-lock.json index 11d3e348008..1429ecb6852 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8061,9 +8061,9 @@ } }, "tsutils": { - "version": "2.26.2", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.26.2.tgz", - "integrity": "sha512-uzwnhmrSbyinPCiwfzGsOY3IulBTwoky7r83HmZdz9QNCjhSCzavkh47KLWuU0zF2F2WbpmmzoJUIEiYyd+jEQ==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.27.0.tgz", + "integrity": "sha512-JcyX25oM9pFcb3zh60OqG1St8p/uSqC5Bgipdo3ieacB/Ao4dPhm7hAtKT9NrEu23CyYrrgJPV3CqYfo+/+T4w==", "dev": true, "requires": { "tslib": "^1.8.1" diff --git a/src/apis/abusiveexperiencereport/v1.ts b/src/apis/abusiveexperiencereport/v1.ts index 683e6151fc6..00c823e3ac5 100644 --- a/src/apis/abusiveexperiencereport/v1.ts +++ b/src/apis/abusiveexperiencereport/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/acceleratedmobilepageurl/v1.ts b/src/apis/acceleratedmobilepageurl/v1.ts index 0fef859c061..432fa41f42b 100644 --- a/src/apis/acceleratedmobilepageurl/v1.ts +++ b/src/apis/acceleratedmobilepageurl/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexchangebuyer/v1.2.ts b/src/apis/adexchangebuyer/v1.2.ts index 72543ac4467..9d76912f43f 100644 --- a/src/apis/adexchangebuyer/v1.2.ts +++ b/src/apis/adexchangebuyer/v1.2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexchangebuyer/v1.3.ts b/src/apis/adexchangebuyer/v1.3.ts index 11e33952990..61fda892615 100644 --- a/src/apis/adexchangebuyer/v1.3.ts +++ b/src/apis/adexchangebuyer/v1.3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexchangebuyer/v1.4.ts b/src/apis/adexchangebuyer/v1.4.ts index 0c2ba4a3389..1918b6d82ee 100644 --- a/src/apis/adexchangebuyer/v1.4.ts +++ b/src/apis/adexchangebuyer/v1.4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexchangebuyer2/v2beta1.ts b/src/apis/adexchangebuyer2/v2beta1.ts index 646a2cc5b3d..4a89bcca017 100644 --- a/src/apis/adexchangebuyer2/v2beta1.ts +++ b/src/apis/adexchangebuyer2/v2beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexchangeseller/v1.1.ts b/src/apis/adexchangeseller/v1.1.ts index d5cd36c267d..93f128b0328 100644 --- a/src/apis/adexchangeseller/v1.1.ts +++ b/src/apis/adexchangeseller/v1.1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexchangeseller/v1.ts b/src/apis/adexchangeseller/v1.ts index 1c19a528757..b1c0a81cf84 100644 --- a/src/apis/adexchangeseller/v1.ts +++ b/src/apis/adexchangeseller/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexchangeseller/v2.0.ts b/src/apis/adexchangeseller/v2.0.ts index 536c713fc6f..bf6a4e59eb1 100644 --- a/src/apis/adexchangeseller/v2.0.ts +++ b/src/apis/adexchangeseller/v2.0.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adexperiencereport/v1.ts b/src/apis/adexperiencereport/v1.ts index db1ad01fe6f..0e68369cfee 100644 --- a/src/apis/adexperiencereport/v1.ts +++ b/src/apis/adexperiencereport/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/admin/datatransfer_v1.ts b/src/apis/admin/datatransfer_v1.ts index 5d8f111aadc..406ac1684f7 100644 --- a/src/apis/admin/datatransfer_v1.ts +++ b/src/apis/admin/datatransfer_v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/admin/directory_v1.ts b/src/apis/admin/directory_v1.ts index bc398d4cd30..0e7663b961d 100644 --- a/src/apis/admin/directory_v1.ts +++ b/src/apis/admin/directory_v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/admin/reports_v1.ts b/src/apis/admin/reports_v1.ts index 388c9f9d919..e690b3e5c76 100644 --- a/src/apis/admin/reports_v1.ts +++ b/src/apis/admin/reports_v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adsense/v1.4.ts b/src/apis/adsense/v1.4.ts index 13378b54d61..7a195117ad2 100644 --- a/src/apis/adsense/v1.4.ts +++ b/src/apis/adsense/v1.4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/adsensehost/v4.1.ts b/src/apis/adsensehost/v4.1.ts index 4a25b8dbb8f..f7a8e562845 100644 --- a/src/apis/adsensehost/v4.1.ts +++ b/src/apis/adsensehost/v4.1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/analytics/v2.4.ts b/src/apis/analytics/v2.4.ts index 11bf0591d19..cb2b99ace00 100644 --- a/src/apis/analytics/v2.4.ts +++ b/src/apis/analytics/v2.4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/analytics/v3.ts b/src/apis/analytics/v3.ts index 18c009f4291..922fb1eeb02 100644 --- a/src/apis/analytics/v3.ts +++ b/src/apis/analytics/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -2466,6 +2466,19 @@ export namespace analytics_v3 { * Time this web property was created. */ created?: string; + /** + * Set to true to reset the retention period of the user identifier with + * each new event from that user (thus setting the expiration date to + * current time plus retention period). Set to false to delete data + * associated with the user identifer automatically after the rentention + * period. This property cannot be set on insert. + */ + dataRetentionResetOnNewActivity?: boolean; + /** + * The length of time for which user and event data is retained. This + * property cannot be set on insert. + */ + dataRetentionTtl?: string; /** * Default view (profile) ID. */ diff --git a/src/apis/analyticsreporting/v4.ts b/src/apis/analyticsreporting/v4.ts index 43e32d135a8..ff119b26fa1 100644 --- a/src/apis/analyticsreporting/v4.ts +++ b/src/apis/analyticsreporting/v4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/androiddeviceprovisioning/v1.ts b/src/apis/androiddeviceprovisioning/v1.ts index 29f4167468c..d113d7f571a 100644 --- a/src/apis/androiddeviceprovisioning/v1.ts +++ b/src/apis/androiddeviceprovisioning/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/androidenterprise/v1.ts b/src/apis/androidenterprise/v1.ts index a4a6a3e0add..8baf30320dc 100644 --- a/src/apis/androidenterprise/v1.ts +++ b/src/apis/androidenterprise/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -1084,15 +1084,13 @@ export namespace androidenterprise_v1 { /** * The availability granted to the device for the specified products. * "all" gives the device access to all products, regardless of - * approval status. "allApproved" entitles the device to access - * all products that are approved for the enterprise. - * "allApproved" and "all" do not enable automatic - * visibility of "alpha" or "beta" tracks. - * "whitelist" grants the device access the products specified in - * productPolicy[]. Only products that are approved or products that were - * previously approved (products with revoked approval) by the enterprise - * can be whitelisted. If no value is provided, the availability set at the - * user level is applied by default. + * approval status. "all" does not enable automatic visibility of + * "alpha" or "beta" tracks. "whitelist" + * grants the device access the products specified in productPolicy[]. Only + * products that are approved or products that were previously approved + * (products with revoked approval) by the enterprise can be whitelisted. If + * no value is provided, the availability set at the user level is applied + * by default. */ productAvailabilityPolicy?: string; /** diff --git a/src/apis/androidmanagement/v1.ts b/src/apis/androidmanagement/v1.ts index d84b1602001..a282ff3019b 100644 --- a/src/apis/androidmanagement/v1.ts +++ b/src/apis/androidmanagement/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/androidpublisher/v1.1.ts b/src/apis/androidpublisher/v1.1.ts index 4d8b1fb65dd..11dfe897088 100644 --- a/src/apis/androidpublisher/v1.1.ts +++ b/src/apis/androidpublisher/v1.1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/androidpublisher/v1.ts b/src/apis/androidpublisher/v1.ts index e939a2e2af6..3ea21ba55cb 100644 --- a/src/apis/androidpublisher/v1.ts +++ b/src/apis/androidpublisher/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/androidpublisher/v2.ts b/src/apis/androidpublisher/v2.ts index a97b18d0877..a8820606dba 100644 --- a/src/apis/androidpublisher/v2.ts +++ b/src/apis/androidpublisher/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -172,6 +172,31 @@ export namespace androidpublisher_v2 { */ id?: string; } + export interface Schema$Bundle { + /** + * A sha1 hash of the upload payload, encoded as a hex string and matching + * the output of the sha1sum command. + */ + sha1?: string; + /** + * A sha256 hash of the upload payload, encoded as a hex string and matching + * the output of the sha256sum command. + */ + sha256?: string; + /** + * The version code of the Android App Bundle. As specified in the Android + * App Bundle's base module APK manifest file. + */ + versionCode?: number; + } + export interface Schema$BundlesListResponse { + bundles?: Schema$Bundle[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "androidpublisher#bundlesListResponse". + */ + kind?: string; + } export interface Schema$Comment { /** * A comment from a developer. @@ -797,6 +822,11 @@ export namespace androidpublisher_v2 { */ track?: string; userFraction?: number; + /** + * Version codes to make active on this track. Note that this list should + * contain all versions you wish to be active, including those you wish to + * retain from previous releases. + */ versionCodes?: number[]; } export interface Schema$TracksListResponse { @@ -903,6 +933,7 @@ export namespace androidpublisher_v2 { root: Androidpublisher; apklistings: Resource$Edits$Apklistings; apks: Resource$Edits$Apks; + bundles: Resource$Edits$Bundles; deobfuscationfiles: Resource$Edits$Deobfuscationfiles; details: Resource$Edits$Details; expansionfiles: Resource$Edits$Expansionfiles; @@ -915,6 +946,7 @@ export namespace androidpublisher_v2 { this.getRoot.bind(this); this.apklistings = new Resource$Edits$Apklistings(root); this.apks = new Resource$Edits$Apks(root); + this.bundles = new Resource$Edits$Bundles(root); this.deobfuscationfiles = new Resource$Edits$Deobfuscationfiles(root); this.details = new Resource$Edits$Details(root); this.expansionfiles = new Resource$Edits$Expansionfiles(root); @@ -2258,6 +2290,211 @@ export namespace androidpublisher_v2 { } + export class Resource$Edits$Bundles { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.bundles.list + * @alias androidpublisher.edits.bundles.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Bundles$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Edits$Bundles$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Edits$Bundles$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Edits$Bundles$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Bundles$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Bundles$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v2/applications/{packageName}/edits/{editId}/bundles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.bundles.upload + * @alias androidpublisher.edits.bundles.upload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} params.media Media object + * @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$Edits$Bundles$Upload, + options?: MethodOptions): AxiosPromise; + upload( + params: Params$Resource$Edits$Bundles$Upload, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + upload( + params: Params$Resource$Edits$Bundles$Upload, + callback: BodyResponseCallback): void; + upload(callback: BodyResponseCallback): void; + upload( + paramsOrCallback?: Params$Resource$Edits$Bundles$Upload| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Bundles$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Bundles$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v2/applications/{packageName}/edits/{editId}/bundles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + mediaUrl: + (rootUrl + + '/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/bundles') + .replace(/([^:]\/)\/+/g, '$1'), + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Bundles$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Bundles$Upload { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mediaType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + export class Resource$Edits$Deobfuscationfiles { root: Androidpublisher; constructor(root: Androidpublisher) { diff --git a/src/apis/androidpublisher/v3.ts b/src/apis/androidpublisher/v3.ts new file mode 100644 index 00000000000..ef4759449b5 --- /dev/null +++ b/src/apis/androidpublisher/v3.ts @@ -0,0 +1,6064 @@ +/** + * 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 {GoogleApis} from '../..'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; + +// TODO: We will eventually get the `any` in here cleared out, but in the +// interim we want to turn on no-implicit-any. + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace androidpublisher_v3 { + export interface Options extends GlobalOptions { + version: 'v3'; + } + + /** + * Google Play Developer API + * + * Lets Android application developers access their Google Play accounts. + * + * @example + * const google = require('googleapis'); + * const androidpublisher = google.androidpublisher('v3'); + * + * @namespace androidpublisher + * @type {Function} + * @version v3 + * @variation v3 + * @param {object=} options Options for Androidpublisher + */ + export class Androidpublisher { + _options: GlobalOptions; + google: GoogleApis; + root = this; + + edits: Resource$Edits; + inappproducts: Resource$Inappproducts; + purchases: Resource$Purchases; + reviews: Resource$Reviews; + + constructor(options: GlobalOptions, google: GoogleApis) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.edits = new Resource$Edits(this); + this.inappproducts = new Resource$Inappproducts(this); + this.purchases = new Resource$Purchases(this); + this.reviews = new Resource$Reviews(this); + } + + getRoot() { + return this.root; + } + } + + export interface Schema$Apk { + /** + * Information about the binary payload of this APK. + */ + binary?: Schema$ApkBinary; + /** + * The version code of the APK, as specified in the APK's manifest file. + */ + versionCode?: number; + } + /** + * Represents the binary payload of an APK. + */ + export interface Schema$ApkBinary { + /** + * A sha1 hash of the APK payload, encoded as a hex string and matching the + * output of the sha1sum command. + */ + sha1?: string; + /** + * A sha256 hash of the APK payload, encoded as a hex string and matching + * the output of the sha256sum command. + */ + sha256?: string; + } + export interface Schema$ApksAddExternallyHostedRequest { + /** + * The definition of the externally-hosted APK and where it is located. + */ + externallyHostedApk?: Schema$ExternallyHostedApk; + } + export interface Schema$ApksAddExternallyHostedResponse { + /** + * The definition of the externally-hosted APK and where it is located. + */ + externallyHostedApk?: Schema$ExternallyHostedApk; + } + export interface Schema$ApksListResponse { + apks?: Schema$Apk[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "androidpublisher#apksListResponse". + */ + kind?: string; + } + export interface Schema$AppDetails { + /** + * The user-visible support email for this app. + */ + contactEmail?: string; + /** + * The user-visible support telephone number for this app. + */ + contactPhone?: string; + /** + * The user-visible website for this app. + */ + contactWebsite?: string; + /** + * Default language code, in BCP 47 format (eg "en-US"). + */ + defaultLanguage?: string; + } + /** + * Represents an edit of an app. An edit allows clients to make multiple + * changes before committing them in one operation. + */ + export interface Schema$AppEdit { + /** + * The time at which the edit will expire and will be no longer valid for + * use in any subsequent API calls (encoded as seconds since the Epoch). + */ + expiryTimeSeconds?: string; + /** + * The ID of the edit that can be used in subsequent API calls. + */ + id?: string; + } + export interface Schema$Bundle { + /** + * A sha1 hash of the upload payload, encoded as a hex string and matching + * the output of the sha1sum command. + */ + sha1?: string; + /** + * A sha256 hash of the upload payload, encoded as a hex string and matching + * the output of the sha256sum command. + */ + sha256?: string; + /** + * The version code of the Android App Bundle. As specified in the Android + * App Bundle's base module APK manifest file. + */ + versionCode?: number; + } + export interface Schema$BundlesListResponse { + bundles?: Schema$Bundle[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "androidpublisher#bundlesListResponse". + */ + kind?: string; + } + export interface Schema$Comment { + /** + * A comment from a developer. + */ + developerComment?: Schema$DeveloperComment; + /** + * A comment from a user. + */ + userComment?: Schema$UserComment; + } + /** + * Represents a deobfuscation file. + */ + export interface Schema$DeobfuscationFile { + /** + * The type of the deobfuscation file. + */ + symbolType?: string; + } + export interface Schema$DeobfuscationFilesUploadResponse { + deobfuscationFile?: Schema$DeobfuscationFile; + } + export interface Schema$DeveloperComment { + /** + * The last time at which this comment was updated. + */ + lastModified?: Schema$Timestamp; + /** + * The content of the comment, i.e. reply body. + */ + text?: string; + } + export interface Schema$DeviceMetadata { + /** + * Device CPU make e.g. "Qualcomm" + */ + cpuMake?: string; + /** + * Device CPU model e.g. "MSM8974" + */ + cpuModel?: string; + /** + * Device class (e.g. tablet) + */ + deviceClass?: string; + /** + * OpenGL version + */ + glEsVersion?: number; + /** + * Device manufacturer (e.g. Motorola) + */ + manufacturer?: string; + /** + * Comma separated list of native platforms (e.g. "arm", + * "arm7") + */ + nativePlatform?: string; + /** + * Device model name (e.g. Droid) + */ + productName?: string; + /** + * Device RAM in Megabytes e.g. "2048" + */ + ramMb?: number; + /** + * Screen density in DPI + */ + screenDensityDpi?: number; + /** + * Screen height in pixels + */ + screenHeightPx?: number; + /** + * Screen width in pixels + */ + screenWidthPx?: number; + } + export interface Schema$ExpansionFile { + /** + * If set this field indicates that this APK has an Expansion File uploaded + * to it: this APK does not reference another APK's Expansion File. The + * field's value is the size of the uploaded Expansion File in bytes. + */ + fileSize?: string; + /** + * If set this APK's Expansion File references another APK's + * Expansion File. The file_size field will not be set. + */ + referencesVersion?: number; + } + export interface Schema$ExpansionFilesUploadResponse { + expansionFile?: Schema$ExpansionFile; + } + /** + * Defines an APK available for this application that is hosted externally and + * not uploaded to Google Play. This function is only available to enterprises + * who are using Google Play for Work, and whos application is restricted to + * the enterprise private channel + */ + export interface Schema$ExternallyHostedApk { + /** + * The application label. + */ + applicationLabel?: string; + /** + * A certificate (or array of certificates if a certificate-chain is used) + * used to signed this APK, represented as a base64 encoded byte array. + */ + certificateBase64s?: string[]; + /** + * The URL at which the APK is hosted. This must be an https URL. + */ + externallyHostedUrl?: string; + /** + * The SHA1 checksum of this APK, represented as a base64 encoded byte + * array. + */ + fileSha1Base64?: string; + /** + * The SHA256 checksum of this APK, represented as a base64 encoded byte + * array. + */ + fileSha256Base64?: string; + /** + * The file size in bytes of this APK. + */ + fileSize?: string; + /** + * The icon image from the APK, as a base64 encoded byte array. + */ + iconBase64?: string; + /** + * The maximum SDK supported by this APK (optional). + */ + maximumSdk?: number; + /** + * The minimum SDK targeted by this APK. + */ + minimumSdk?: number; + /** + * The native code environments supported by this APK (optional). + */ + nativeCodes?: string[]; + /** + * The package name. + */ + packageName?: string; + /** + * The features required by this APK (optional). + */ + usesFeatures?: string[]; + /** + * The permissions requested by this APK. + */ + usesPermissions?: Schema$ExternallyHostedApkUsesPermission[]; + /** + * The version code of this APK. + */ + versionCode?: number; + /** + * The version name of this APK. + */ + versionName?: string; + } + /** + * A permission used by this APK. + */ + export interface Schema$ExternallyHostedApkUsesPermission { + /** + * Optionally, the maximum SDK version for which the permission is required. + */ + maxSdkVersion?: number; + /** + * The name of the permission requested. + */ + name?: string; + } + export interface Schema$Image { + /** + * A unique id representing this image. + */ + id?: string; + /** + * A sha1 hash of the image that was uploaded. + */ + sha1?: string; + /** + * A URL that will serve a preview of the image. + */ + url?: string; + } + export interface Schema$ImagesDeleteAllResponse { + deleted?: Schema$Image[]; + } + export interface Schema$ImagesListResponse { + images?: Schema$Image[]; + } + export interface Schema$ImagesUploadResponse { + image?: Schema$Image; + } + export interface Schema$InAppProduct { + /** + * The default language of the localized data, as defined by BCP 47. e.g. + * "en-US", "en-GB". + */ + defaultLanguage?: string; + /** + * Default price cannot be zero. In-app products can never be free. Default + * price is always in the developer's Checkout merchant currency. + */ + defaultPrice?: Schema$Price; + /** + * List of localized title and description data. + */ + listings?: any; + /** + * The package name of the parent app. + */ + packageName?: string; + /** + * Prices per buyer region. None of these prices should be zero. In-app + * products can never be free. + */ + prices?: any; + /** + * Purchase type enum value. Unmodifiable after creation. + */ + purchaseType?: string; + /** + * Definition of a season for a seasonal subscription. Can be defined only + * for yearly subscriptions. + */ + season?: Schema$Season; + /** + * The stock-keeping-unit (SKU) of the product, unique within an app. + */ + sku?: string; + status?: string; + /** + * Subscription period, specified in ISO 8601 format. Acceptable values are + * "P1W" (one week), "P1M" (one month), "P3M" + * (three months), "P6M" (six months), and "P1Y" (one + * year). + */ + subscriptionPeriod?: string; + /** + * Trial period, specified in ISO 8601 format. Acceptable values are + * anything between "P7D" (seven days) and "P999D" (999 + * days). Seasonal subscriptions cannot have a trial period. + */ + trialPeriod?: string; + } + export interface Schema$InAppProductListing { + description?: string; + title?: string; + } + export interface Schema$InappproductsListResponse { + inappproduct?: Schema$InAppProduct[]; + /** + * Identifies what kind of resource this is. Value: the fixed string + * "androidpublisher#inappproductsListResponse". + */ + kind?: string; + pageInfo?: Schema$PageInfo; + tokenPagination?: Schema$TokenPagination; + } + export interface Schema$Listing { + /** + * Full description of the app; this may be up to 4000 characters in length. + */ + fullDescription?: string; + /** + * Language localization code (for example, "de-AT" for Austrian + * German). + */ + language?: string; + /** + * Short description of the app (previously known as promo text); this may + * be up to 80 characters in length. + */ + shortDescription?: string; + /** + * App's localized title. + */ + title?: string; + /** + * URL of a promotional YouTube video for the app. + */ + video?: string; + } + export interface Schema$ListingsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "androidpublisher#listingsListResponse". + */ + kind?: string; + listings?: Schema$Listing[]; + } + export interface Schema$LocalizedText { + /** + * The language code, in BCP 47 format (eg "en-US"). + */ + language?: string; + /** + * The text in the given `language`. + */ + text?: string; + } + export interface Schema$MonthDay { + /** + * Day of a month, value in [1, 31] range. Valid range depends on the + * specified month. + */ + day?: number; + /** + * Month of a year. e.g. 1 = JAN, 2 = FEB etc. + */ + month?: number; + } + export interface Schema$PageInfo { + resultPerPage?: number; + startIndex?: number; + totalResults?: number; + } + export interface Schema$Price { + /** + * 3 letter Currency code, as defined by ISO 4217. + */ + currency?: string; + /** + * The price in millionths of the currency base unit represented as a + * string. + */ + priceMicros?: string; + } + /** + * A ProductPurchase resource indicates the status of a user's inapp + * product purchase. + */ + export interface Schema$ProductPurchase { + /** + * The consumption state of the inapp product. Possible values are: - Yet + * to be consumed - Consumed + */ + consumptionState?: number; + /** + * A developer-specified string that contains supplemental information about + * an order. + */ + developerPayload?: string; + /** + * This kind represents an inappPurchase object in the androidpublisher + * service. + */ + kind?: string; + /** + * The order id associated with the purchase of the inapp product. + */ + orderId?: string; + /** + * The purchase state of the order. Possible values are: - Purchased - + * Canceled + */ + purchaseState?: number; + /** + * The time the product was purchased, in milliseconds since the epoch (Jan + * 1, 1970). + */ + purchaseTimeMillis?: string; + /** + * The type of purchase of the inapp product. This field is only set if this + * purchase was not made using the standard in-app billing flow. Possible + * values are: - Test (i.e. purchased from a license testing account) - + * Promo (i.e. purchased using a promo code) + */ + purchaseType?: number; + } + export interface Schema$Prorate { + /** + * Default price cannot be zero and must be less than the full subscription + * price. Default price is always in the developer's Checkout merchant + * currency. Targeted countries have their prices set automatically based on + * the default_price. + */ + defaultPrice?: Schema$Price; + /** + * Defines the first day on which the price takes effect. + */ + start?: Schema$MonthDay; + } + export interface Schema$Review { + /** + * The name of the user who wrote the review. + */ + authorName?: string; + /** + * A repeated field containing comments for the review. + */ + comments?: Schema$Comment[]; + /** + * Unique identifier for this review. + */ + reviewId?: string; + } + export interface Schema$ReviewReplyResult { + /** + * The time at which the reply took effect. + */ + lastEdited?: Schema$Timestamp; + /** + * The reply text that was applied. + */ + replyText?: string; + } + export interface Schema$ReviewsListResponse { + pageInfo?: Schema$PageInfo; + reviews?: Schema$Review[]; + tokenPagination?: Schema$TokenPagination; + } + export interface Schema$ReviewsReplyRequest { + /** + * The text to set as the reply. Replies of more than approximately 350 + * characters will be rejected. HTML tags will be stripped. + */ + replyText?: string; + } + export interface Schema$ReviewsReplyResponse { + result?: Schema$ReviewReplyResult; + } + export interface Schema$Season { + /** + * Inclusive end date of the recurrence period. + */ + end?: Schema$MonthDay; + /** + * Optionally present list of prorations for the season. Each proration is a + * one-off discounted entry into a subscription. Each proration contains the + * first date on which the discount is available and the new pricing + * information. + */ + prorations?: Schema$Prorate[]; + /** + * Inclusive start date of the recurrence period. + */ + start?: Schema$MonthDay; + } + /** + * Information provided by the user when they complete the subscription + * cancellation flow (cancellation reason survey). + */ + export interface Schema$SubscriptionCancelSurveyResult { + /** + * The cancellation reason the user chose in the survey. Possible values + * are: - Other - I don't use this service enough - Technical issues + * - Cost-related reasons - I found a better app + */ + cancelSurveyReason?: number; + /** + * The customized input cancel reason from the user. Only present when + * cancelReason is 0. + */ + userInputCancelReason?: string; + } + /** + * A SubscriptionDeferralInfo contains the data needed to defer a subscription + * purchase to a future expiry time. + */ + export interface Schema$SubscriptionDeferralInfo { + /** + * The desired next expiry time to assign to the subscription, in + * milliseconds since the Epoch. The given time must be later/greater than + * the current expiry time for the subscription. + */ + desiredExpiryTimeMillis?: string; + /** + * The expected expiry time for the subscription. If the current expiry time + * for the subscription is not the value specified here, the deferral will + * not occur. + */ + expectedExpiryTimeMillis?: string; + } + /** + * A SubscriptionPurchase resource indicates the status of a user's + * subscription purchase. + */ + export interface Schema$SubscriptionPurchase { + /** + * Whether the subscription will automatically be renewed when it reaches + * its current expiry time. + */ + autoRenewing?: boolean; + /** + * The reason why a subscription was canceled or is not auto-renewing. + * Possible values are: - User canceled the subscription - Subscription + * was canceled by the system, for example because of a billing problem - + * Subscription was replaced with a new subscription - Subscription was + * canceled by the developer + */ + cancelReason?: number; + /** + * Information provided by the user when they complete the subscription + * cancellation flow (cancellation reason survey). + */ + cancelSurveyResult?: Schema$SubscriptionCancelSurveyResult; + /** + * ISO 3166-1 alpha-2 billing country/region code of the user at the time + * the subscription was granted. + */ + countryCode?: string; + /** + * A developer-specified string that contains supplemental information about + * an order. + */ + developerPayload?: string; + /** + * The email address of the user when the subscription was purchased. Only + * present for purchases made with 'Subscribe with Google'. + */ + emailAddress?: string; + /** + * Time at which the subscription will expire, in milliseconds since the + * Epoch. + */ + expiryTimeMillis?: string; + /** + * The family name of the user when the subscription was purchased. Only + * present for purchases made with 'Subscribe with Google'. + */ + familyName?: string; + /** + * The given name of the user when the subscription was purchased. Only + * present for purchases made with 'Subscribe with Google'. + */ + givenName?: string; + /** + * This kind represents a subscriptionPurchase object in the + * androidpublisher service. + */ + kind?: string; + /** + * The purchase token of the originating purchase if this subscription is + * one of the following: - Re-signup of a canceled but non-lapsed + * subscription - Upgrade/downgrade from a previous subscription For + * example, suppose a user originally signs up and you receive purchase + * token X, then the user cancels and goes through the resignup flow (before + * their subscription lapses) and you receive purchase token Y, and finally + * the user upgrades their subscription and you receive purchase token Z. If + * you call this API with purchase token Z, this field will be set to Y. If + * you call this API with purchase token Y, this field will be set to X. If + * you call this API with purchase token X, this field will not be set. + */ + linkedPurchaseToken?: string; + /** + * The order id of the latest recurring order associated with the purchase + * of the subscription. + */ + orderId?: string; + /** + * The payment state of the subscription. Possible values are: - Payment + * pending - Payment received - Free trial + */ + paymentState?: number; + /** + * Price of the subscription, not including tax. Price is expressed in + * micro-units, where 1,000,000 micro-units represents one unit of the + * currency. For example, if the subscription price is €1.99, + * price_amount_micros is 1990000. + */ + priceAmountMicros?: string; + /** + * ISO 4217 currency code for the subscription price. For example, if the + * price is specified in British pounds sterling, price_currency_code is + * "GBP". + */ + priceCurrencyCode?: string; + /** + * The profile id of the user when the subscription was purchased. Only + * present for purchases made with 'Subscribe with Google'. + */ + profileId?: string; + /** + * The profile name of the user when the subscription was purchased. Only + * present for purchases made with 'Subscribe with Google'. + */ + profileName?: string; + /** + * The type of purchase of the subscription. This field is only set if this + * purchase was not made using the standard in-app billing flow. Possible + * values are: - Test (i.e. purchased from a license testing account) + */ + purchaseType?: number; + /** + * Time at which the subscription was granted, in milliseconds since the + * Epoch. + */ + startTimeMillis?: string; + /** + * The time at which the subscription was canceled by the user, in + * milliseconds since the epoch. Only present if cancelReason is 0. + */ + userCancellationTimeMillis?: string; + } + export interface Schema$SubscriptionPurchasesDeferRequest { + /** + * The information about the new desired expiry time for the subscription. + */ + deferralInfo?: Schema$SubscriptionDeferralInfo; + } + export interface Schema$SubscriptionPurchasesDeferResponse { + /** + * The new expiry time for the subscription in milliseconds since the Epoch. + */ + newExpiryTimeMillis?: string; + } + export interface Schema$Testers { + googleGroups?: string[]; + googlePlusCommunities?: string[]; + } + export interface Schema$Timestamp { + nanos?: number; + seconds?: string; + } + export interface Schema$TokenPagination { + nextPageToken?: string; + previousPageToken?: string; + } + export interface Schema$Track { + /** + * A list of all active releases in this track during a read request. On an + * update request, it represents desired changes. + */ + releases?: Schema$TrackRelease[]; + /** + * Identifier for this track. One of "alpha", "beta", + * "production", "rollout" or "internal". + */ + track?: string; + } + export interface Schema$TrackRelease { + /** + * The release name, used to identify this release in the Play Console UI. + * Not required to be unique. This is optional, if not set it will be + * generated from the version_name in the APKs. + */ + name?: string; + /** + * The description of what is new in the app in this release. + */ + releaseNotes?: Schema$LocalizedText[]; + /** + * The desired status of this release. + */ + status?: string; + /** + * Fraction of users who are eligible to receive the release. 0 <= + * fraction < 1. To be set, release status must be "inProgress" + * or "halted". + */ + userFraction?: number; + /** + * A list of all version codes of APKs that will be exposed to the users of + * this track when this release is rolled out. Note that this list should + * contain all versions you wish to be active, including those you wish to + * retain from previous releases. + */ + versionCodes?: string[]; + } + export interface Schema$TracksListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "androidpublisher#tracksListResponse". + */ + kind?: string; + tracks?: Schema$Track[]; + } + export interface Schema$UserComment { + /** + * Integer Android SDK version of the user's device at the time the + * review was written, e.g. 23 is Marshmallow. May be absent. + */ + androidOsVersion?: number; + /** + * Integer version code of the app as installed at the time the review was + * written. May be absent. + */ + appVersionCode?: number; + /** + * String version name of the app as installed at the time the review was + * written. May be absent. + */ + appVersionName?: string; + /** + * Codename for the reviewer's device, e.g. klte, flounder. May be + * absent. + */ + device?: string; + /** + * Some information about the characteristics of the user's device + */ + deviceMetadata?: Schema$DeviceMetadata; + /** + * The last time at which this comment was updated. + */ + lastModified?: Schema$Timestamp; + /** + * Untranslated text of the review, in the case where the review has been + * translated. If the review has not been translated this is left blank. + */ + originalText?: string; + /** + * Language code for the reviewer. This is taken from the device settings so + * is not guaranteed to match the language the review is written in. May be + * absent. + */ + reviewerLanguage?: string; + /** + * The star rating associated with the review, from 1 to 5. + */ + starRating?: number; + /** + * The content of the comment, i.e. review body. In some cases users have + * been able to write a review with separate title and body; in those cases + * the title and body are concatenated and separated by a tab character. + */ + text?: string; + /** + * Number of users who have given this review a thumbs down + */ + thumbsDownCount?: number; + /** + * Number of users who have given this review a thumbs up + */ + thumbsUpCount?: number; + } + /** + * A VoidedPurchase resource indicates a purchase that was either + * canceled/refunded/charged-back. + */ + export interface Schema$VoidedPurchase { + /** + * This kind represents a voided purchase object in the androidpublisher + * service. + */ + kind?: string; + /** + * The time at which the purchase was made, in milliseconds since the epoch + * (Jan 1, 1970). + */ + purchaseTimeMillis?: string; + /** + * The token that was generated when a purchase was made. This uniquely + * identifies a purchase. + */ + purchaseToken?: string; + /** + * The time at which the purchase was canceled/refunded/charged-back, in + * milliseconds since the epoch (Jan 1, 1970). + */ + voidedTimeMillis?: string; + } + export interface Schema$VoidedPurchasesListResponse { + pageInfo?: Schema$PageInfo; + tokenPagination?: Schema$TokenPagination; + voidedPurchases?: Schema$VoidedPurchase[]; + } + + + export class Resource$Edits { + root: Androidpublisher; + apks: Resource$Edits$Apks; + bundles: Resource$Edits$Bundles; + deobfuscationfiles: Resource$Edits$Deobfuscationfiles; + details: Resource$Edits$Details; + expansionfiles: Resource$Edits$Expansionfiles; + images: Resource$Edits$Images; + listings: Resource$Edits$Listings; + testers: Resource$Edits$Testers; + tracks: Resource$Edits$Tracks; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + this.apks = new Resource$Edits$Apks(root); + this.bundles = new Resource$Edits$Bundles(root); + this.deobfuscationfiles = new Resource$Edits$Deobfuscationfiles(root); + this.details = new Resource$Edits$Details(root); + this.expansionfiles = new Resource$Edits$Expansionfiles(root); + this.images = new Resource$Edits$Images(root); + this.listings = new Resource$Edits$Listings(root); + this.testers = new Resource$Edits$Testers(root); + this.tracks = new Resource$Edits$Tracks(root); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.commit + * @desc Commits/applies the changes made in this edit back to the app. + * @alias androidpublisher.edits.commit + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Commit, options?: MethodOptions): + AxiosPromise; + commit( + params: Params$Resource$Edits$Commit, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + commit( + params: Params$Resource$Edits$Commit, + callback: BodyResponseCallback): void; + commit(callback: BodyResponseCallback): void; + commit( + paramsOrCallback?: Params$Resource$Edits$Commit| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Edits$Commit; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Commit; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}:commit') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.delete + * @desc Deletes an edit for an app. Creating a new edit will automatically + * delete any of your previous edits so this method need only be called if + * you want to preemptively abandon an edit. + * @alias androidpublisher.edits.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Edits$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Edits$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Edits$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Edits$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.get + * @desc Returns information about the edit specified. Calls will fail if + * the edit is no long active (e.g. has been deleted, superseded or + * expired). + * @alias androidpublisher.edits.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Edits$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Edits$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Edits$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Edits$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.insert + * @desc Creates a new edit for an app, populated with the app's current + * state. + * @alias androidpublisher.edits.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().AppEdit} params.resource Request body data + * @param {object} [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$Edits$Insert, options?: MethodOptions): + AxiosPromise; + insert( + params: Params$Resource$Edits$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Edits$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Edits$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Edits$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.validate + * @desc Checks that the edit can be successfully committed. The edit's + * changes are not applied to the live app. + * @alias androidpublisher.edits.validate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + validate(params?: Params$Resource$Edits$Validate, options?: MethodOptions): + AxiosPromise; + validate( + params: Params$Resource$Edits$Validate, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + validate( + params: Params$Resource$Edits$Validate, + callback: BodyResponseCallback): void; + validate(callback: BodyResponseCallback): void; + validate( + paramsOrCallback?: Params$Resource$Edits$Validate| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Edits$Validate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Validate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}:validate') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Commit { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Insert { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AppEdit; + } + export interface Params$Resource$Edits$Validate { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + + export class Resource$Edits$Apks { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.apks.addexternallyhosted + * @desc Creates a new APK without uploading the APK itself to Google Play, + * instead hosting the APK at a specified URL. This function is only + * available to enterprises using Google Play for Work whose application is + * configured to restrict distribution to the enterprise domain. + * @alias androidpublisher.edits.apks.addexternallyhosted + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().ApksAddExternallyHostedRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + addexternallyhosted( + params?: Params$Resource$Edits$Apks$Addexternallyhosted, + options?: MethodOptions): + AxiosPromise; + addexternallyhosted( + params: Params$Resource$Edits$Apks$Addexternallyhosted, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + addexternallyhosted( + params: Params$Resource$Edits$Apks$Addexternallyhosted, + callback: BodyResponseCallback): + void; + addexternallyhosted( + callback: BodyResponseCallback): + void; + addexternallyhosted( + paramsOrCallback?: Params$Resource$Edits$Apks$Addexternallyhosted| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Edits$Apks$Addexternallyhosted; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Apks$Addexternallyhosted; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/externallyHosted') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * androidpublisher.edits.apks.list + * @alias androidpublisher.edits.apks.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Apks$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Edits$Apks$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Edits$Apks$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Edits$Apks$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Edits$Apks$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Apks$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.apks.upload + * @alias androidpublisher.edits.apks.upload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} params.media Media object + * @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$Edits$Apks$Upload, options?: MethodOptions): + AxiosPromise; + upload( + params: Params$Resource$Edits$Apks$Upload, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + upload( + params: Params$Resource$Edits$Apks$Upload, + callback: BodyResponseCallback): void; + upload(callback: BodyResponseCallback): void; + upload( + paramsOrCallback?: Params$Resource$Edits$Apks$Upload| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Apks$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Apks$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + mediaUrl: + (rootUrl + + '/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks') + .replace(/([^:]\/)\/+/g, '$1'), + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Apks$Addexternallyhosted { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ApksAddExternallyHostedRequest; + } + export interface Params$Resource$Edits$Apks$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Apks$Upload { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mediaType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + + export class Resource$Edits$Bundles { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.bundles.list + * @alias androidpublisher.edits.bundles.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Bundles$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Edits$Bundles$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Edits$Bundles$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Edits$Bundles$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Bundles$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Bundles$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/bundles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.bundles.upload + * @alias androidpublisher.edits.bundles.upload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} params.media Media object + * @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$Edits$Bundles$Upload, + options?: MethodOptions): AxiosPromise; + upload( + params: Params$Resource$Edits$Bundles$Upload, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + upload( + params: Params$Resource$Edits$Bundles$Upload, + callback: BodyResponseCallback): void; + upload(callback: BodyResponseCallback): void; + upload( + paramsOrCallback?: Params$Resource$Edits$Bundles$Upload| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Bundles$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Bundles$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/bundles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + mediaUrl: + (rootUrl + + '/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/bundles') + .replace(/([^:]\/)\/+/g, '$1'), + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Bundles$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Bundles$Upload { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mediaType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + + export class Resource$Edits$Deobfuscationfiles { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.deobfuscationfiles.upload + * @desc Uploads the deobfuscation file of the specified APK. If a + * deobfuscation file already exists, it will be replaced. + * @alias androidpublisher.edits.deobfuscationfiles.upload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer} params.apkVersionCode The version code of the APK whose deobfuscation file is being uploaded. + * @param {string} params.deobfuscationFileType + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier of the Android app for which the deobfuscatiuon files are being uploaded; for example, "com.spiffygame". + * @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$Edits$Deobfuscationfiles$Upload, + options?: MethodOptions): + AxiosPromise; + upload( + params: Params$Resource$Edits$Deobfuscationfiles$Upload, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + upload( + params: Params$Resource$Edits$Deobfuscationfiles$Upload, + callback: + BodyResponseCallback): + void; + upload(callback: + BodyResponseCallback): + void; + upload( + paramsOrCallback?: Params$Resource$Edits$Deobfuscationfiles$Upload| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Edits$Deobfuscationfiles$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Deobfuscationfiles$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + mediaUrl: + (rootUrl + + '/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}') + .replace(/([^:]\/)\/+/g, '$1'), + requiredParams: [ + 'packageName', 'editId', 'apkVersionCode', 'deobfuscationFileType' + ], + pathParams: [ + 'apkVersionCode', 'deobfuscationFileType', 'editId', 'packageName' + ], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Edits$Deobfuscationfiles$Upload { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The version code of the APK whose deobfuscation file is being uploaded. + */ + apkVersionCode?: number; + /** + * + */ + deobfuscationFileType?: string; + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier of the Android app for which the deobfuscatiuon files + * are being uploaded; for example, "com.spiffygame". + */ + packageName?: string; + + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mediaType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + + export class Resource$Edits$Details { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.details.get + * @desc Fetches app details for this edit. This includes the default + * language and developer support contact information. + * @alias androidpublisher.edits.details.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Details$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Edits$Details$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Edits$Details$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Edits$Details$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Details$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Details$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/details') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.details.patch + * @desc Updates app details for this edit. This method supports patch + * semantics. + * @alias androidpublisher.edits.details.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().AppDetails} params.resource Request body data + * @param {object} [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$Edits$Details$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Edits$Details$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Edits$Details$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Edits$Details$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Details$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Details$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/details') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.details.update + * @desc Updates app details for this edit. + * @alias androidpublisher.edits.details.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().AppDetails} params.resource Request body data + * @param {object} [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$Edits$Details$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Edits$Details$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Edits$Details$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Edits$Details$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Details$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Details$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/details') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Details$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Details$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AppDetails; + } + export interface Params$Resource$Edits$Details$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AppDetails; + } + + + export class Resource$Edits$Expansionfiles { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.expansionfiles.get + * @desc Fetches the Expansion File configuration for the APK specified. + * @alias androidpublisher.edits.expansionfiles.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer} params.apkVersionCode The version code of the APK whose Expansion File configuration is being read or modified. + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.expansionFileType + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Expansionfiles$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Edits$Expansionfiles$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Edits$Expansionfiles$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Edits$Expansionfiles$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Expansionfiles$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Expansionfiles$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: + ['packageName', 'editId', 'apkVersionCode', 'expansionFileType'], + pathParams: + ['apkVersionCode', 'editId', 'expansionFileType', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.expansionfiles.patch + * @desc Updates the APK's Expansion File configuration to reference another + * APK's Expansion Files. To add a new Expansion File use the Upload method. + * This method supports patch semantics. + * @alias androidpublisher.edits.expansionfiles.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer} params.apkVersionCode The version code of the APK whose Expansion File configuration is being read or modified. + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.expansionFileType + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().ExpansionFile} params.resource Request body data + * @param {object} [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$Edits$Expansionfiles$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Edits$Expansionfiles$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Edits$Expansionfiles$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Edits$Expansionfiles$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Edits$Expansionfiles$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Expansionfiles$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: + ['packageName', 'editId', 'apkVersionCode', 'expansionFileType'], + pathParams: + ['apkVersionCode', 'editId', 'expansionFileType', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.expansionfiles.update + * @desc Updates the APK's Expansion File configuration to reference another + * APK's Expansion Files. To add a new Expansion File use the Upload method. + * @alias androidpublisher.edits.expansionfiles.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer} params.apkVersionCode The version code of the APK whose Expansion File configuration is being read or modified. + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.expansionFileType + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().ExpansionFile} params.resource Request body data + * @param {object} [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$Edits$Expansionfiles$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Edits$Expansionfiles$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Edits$Expansionfiles$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Edits$Expansionfiles$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Edits$Expansionfiles$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Expansionfiles$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: + ['packageName', 'editId', 'apkVersionCode', 'expansionFileType'], + pathParams: + ['apkVersionCode', 'editId', 'expansionFileType', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.expansionfiles.upload + * @desc Uploads and attaches a new Expansion File to the APK specified. + * @alias androidpublisher.edits.expansionfiles.upload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer} params.apkVersionCode The version code of the APK whose Expansion File configuration is being read or modified. + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.expansionFileType + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @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$Edits$Expansionfiles$Upload, + options?: MethodOptions): + AxiosPromise; + upload( + params: Params$Resource$Edits$Expansionfiles$Upload, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + upload( + params: Params$Resource$Edits$Expansionfiles$Upload, + callback: BodyResponseCallback): + void; + upload(callback: BodyResponseCallback): + void; + upload( + paramsOrCallback?: Params$Resource$Edits$Expansionfiles$Upload| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Edits$Expansionfiles$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Expansionfiles$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + mediaUrl: + (rootUrl + + '/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}') + .replace(/([^:]\/)\/+/g, '$1'), + requiredParams: + ['packageName', 'editId', 'apkVersionCode', 'expansionFileType'], + pathParams: + ['apkVersionCode', 'editId', 'expansionFileType', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Edits$Expansionfiles$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The version code of the APK whose Expansion File configuration is being + * read or modified. + */ + apkVersionCode?: number; + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * + */ + expansionFileType?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Expansionfiles$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The version code of the APK whose Expansion File configuration is being + * read or modified. + */ + apkVersionCode?: number; + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * + */ + expansionFileType?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ExpansionFile; + } + export interface Params$Resource$Edits$Expansionfiles$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The version code of the APK whose Expansion File configuration is being + * read or modified. + */ + apkVersionCode?: number; + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * + */ + expansionFileType?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ExpansionFile; + } + export interface Params$Resource$Edits$Expansionfiles$Upload { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The version code of the APK whose Expansion File configuration is being + * read or modified. + */ + apkVersionCode?: number; + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * + */ + expansionFileType?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mediaType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + + export class Resource$Edits$Images { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.images.delete + * @desc Deletes the image (specified by id) from the edit. + * @alias androidpublisher.edits.images.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.imageId Unique identifier an image within the set of images attached to this edit. + * @param {string} params.imageType + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Images$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Edits$Images$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Edits$Images$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Edits$Images$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Images$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Images$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}/{imageId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: + ['packageName', 'editId', 'language', 'imageType', 'imageId'], + pathParams: + ['editId', 'imageId', 'imageType', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.images.deleteall + * @desc Deletes all images for the specified language and image type. + * @alias androidpublisher.edits.images.deleteall + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.imageType + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + deleteall( + params?: Params$Resource$Edits$Images$Deleteall, + options?: MethodOptions): AxiosPromise; + deleteall( + params: Params$Resource$Edits$Images$Deleteall, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + deleteall( + params: Params$Resource$Edits$Images$Deleteall, + callback: BodyResponseCallback): void; + deleteall(callback: BodyResponseCallback): + void; + deleteall( + paramsOrCallback?: Params$Resource$Edits$Images$Deleteall| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Images$Deleteall; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Images$Deleteall; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'language', 'imageType'], + pathParams: ['editId', 'imageType', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.images.list + * @desc Lists all images for the specified language and image type. + * @alias androidpublisher.edits.images.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.imageType + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Images$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Edits$Images$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Edits$Images$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Edits$Images$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Images$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Images$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'language', 'imageType'], + pathParams: ['editId', 'imageType', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.images.upload + * @desc Uploads a new image and adds it to the list of images for the + * specified language and image type. + * @alias androidpublisher.edits.images.upload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.imageType + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @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$Edits$Images$Upload, + options?: MethodOptions): AxiosPromise; + upload( + params: Params$Resource$Edits$Images$Upload, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + upload( + params: Params$Resource$Edits$Images$Upload, + callback: BodyResponseCallback): void; + upload(callback: BodyResponseCallback): void; + upload( + paramsOrCallback?: Params$Resource$Edits$Images$Upload| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Images$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Images$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + mediaUrl: + (rootUrl + + '/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}') + .replace(/([^:]\/)\/+/g, '$1'), + requiredParams: ['packageName', 'editId', 'language', 'imageType'], + pathParams: ['editId', 'imageType', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Images$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier an image within the set of images attached to this + * edit. + */ + imageId?: string; + /** + * + */ + imageType?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing whose + * images are to read or modified. For example, to select Austrian German, + * pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Images$Deleteall { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * + */ + imageType?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing whose + * images are to read or modified. For example, to select Austrian German, + * pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Images$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * + */ + imageType?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing whose + * images are to read or modified. For example, to select Austrian German, + * pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Images$Upload { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * + */ + imageType?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing whose + * images are to read or modified. For example, to select Austrian German, + * pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mediaType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + + export class Resource$Edits$Listings { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.listings.delete + * @desc Deletes the specified localized store listing from an edit. + * @alias androidpublisher.edits.listings.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Listings$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Edits$Listings$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Edits$Listings$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Edits$Listings$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Listings$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Listings$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'language'], + pathParams: ['editId', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.listings.deleteall + * @desc Deletes all localized listings from an edit. + * @alias androidpublisher.edits.listings.deleteall + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + deleteall( + params?: Params$Resource$Edits$Listings$Deleteall, + options?: MethodOptions): AxiosPromise; + deleteall( + params: Params$Resource$Edits$Listings$Deleteall, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + deleteall( + params: Params$Resource$Edits$Listings$Deleteall, + callback: BodyResponseCallback): void; + deleteall(callback: BodyResponseCallback): void; + deleteall( + paramsOrCallback?: Params$Resource$Edits$Listings$Deleteall| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Listings$Deleteall; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Listings$Deleteall; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.listings.get + * @desc Fetches information about a localized store listing. + * @alias androidpublisher.edits.listings.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Listings$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Edits$Listings$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Edits$Listings$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Edits$Listings$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Listings$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Listings$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'language'], + pathParams: ['editId', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.listings.list + * @desc Returns all of the localized store listings attached to this edit. + * @alias androidpublisher.edits.listings.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Listings$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Edits$Listings$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Edits$Listings$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Edits$Listings$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Listings$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Listings$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.listings.patch + * @desc Creates or updates a localized store listing. This method supports + * patch semantics. + * @alias androidpublisher.edits.listings.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().Listing} params.resource Request body data + * @param {object} [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$Edits$Listings$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Edits$Listings$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Edits$Listings$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Edits$Listings$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Listings$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Listings$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'language'], + pathParams: ['editId', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.listings.update + * @desc Creates or updates a localized store listing. + * @alias androidpublisher.edits.listings.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.language The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {().Listing} params.resource Request body data + * @param {object} [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$Edits$Listings$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Edits$Listings$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Edits$Listings$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Edits$Listings$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Listings$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Listings$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/listings/{language}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'language'], + pathParams: ['editId', 'language', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Listings$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing to + * read or modify. For example, to select Austrian German, pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Listings$Deleteall { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Listings$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing to + * read or modify. For example, to select Austrian German, pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Listings$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Listings$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing to + * read or modify. For example, to select Austrian German, pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Listing; + } + export interface Params$Resource$Edits$Listings$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * The language code (a BCP-47 language tag) of the localized listing to + * read or modify. For example, to select Austrian German, pass "de-AT". + */ + language?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Listing; + } + + + export class Resource$Edits$Testers { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.testers.get + * @alias androidpublisher.edits.testers.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {string} params.track The track to read or modify. Acceptable values are: "alpha", "beta", "production", "rollout" or "internal". + * @param {object} [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$Edits$Testers$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Edits$Testers$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Edits$Testers$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Edits$Testers$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Testers$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Testers$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'track'], + pathParams: ['editId', 'packageName', 'track'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.testers.patch + * @alias androidpublisher.edits.testers.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {string} params.track The track to read or modify. Acceptable values are: "alpha", "beta", "production", "rollout" or "internal". + * @param {().Testers} params.resource Request body data + * @param {object} [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$Edits$Testers$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Edits$Testers$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Edits$Testers$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Edits$Testers$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Testers$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Testers$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'track'], + pathParams: ['editId', 'packageName', 'track'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.testers.update + * @alias androidpublisher.edits.testers.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {string} params.track The track to read or modify. Acceptable values are: "alpha", "beta", "production", "rollout" or "internal". + * @param {().Testers} params.resource Request body data + * @param {object} [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$Edits$Testers$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Edits$Testers$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Edits$Testers$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Edits$Testers$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Testers$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Testers$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'track'], + pathParams: ['editId', 'packageName', 'track'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Testers$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + /** + * The track to read or modify. Acceptable values are: "alpha", "beta", + * "production", "rollout" or "internal". + */ + track?: string; + } + export interface Params$Resource$Edits$Testers$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + /** + * The track to read or modify. Acceptable values are: "alpha", "beta", + * "production", "rollout" or "internal". + */ + track?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Testers; + } + export interface Params$Resource$Edits$Testers$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + /** + * The track to read or modify. Acceptable values are: "alpha", "beta", + * "production", "rollout" or "internal". + */ + track?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Testers; + } + + + export class Resource$Edits$Tracks { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.edits.tracks.get + * @desc Fetches the track configuration for the specified track type. + * Includes the APK version codes that are in this track. + * @alias androidpublisher.edits.tracks.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {string} params.track The track to read or 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 + */ + get(params?: Params$Resource$Edits$Tracks$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Edits$Tracks$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Edits$Tracks$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Edits$Tracks$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Edits$Tracks$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Tracks$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/tracks/{track}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'track'], + pathParams: ['editId', 'packageName', 'track'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.tracks.list + * @desc Lists all the track configurations for this edit. + * @alias androidpublisher.edits.tracks.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {object} [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$Edits$Tracks$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Edits$Tracks$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Edits$Tracks$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Edits$Tracks$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Tracks$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Tracks$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/tracks') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'editId'], + pathParams: ['editId', 'packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.tracks.patch + * @desc Updates the track configuration for the specified track type. When + * halted, the rollout track cannot be updated without adding new APKs, and + * adding new APKs will cause it to resume. This method supports patch + * semantics. + * @alias androidpublisher.edits.tracks.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {string} params.track The track to read or modify. + * @param {().Track} params.resource Request body data + * @param {object} [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$Edits$Tracks$Patch, options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Edits$Tracks$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Edits$Tracks$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Edits$Tracks$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Tracks$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Tracks$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/tracks/{track}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'track'], + pathParams: ['editId', 'packageName', 'track'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.edits.tracks.update + * @desc Updates the track configuration for the specified track type. When + * halted, the rollout track cannot be updated without adding new APKs, and + * adding new APKs will cause it to resume. + * @alias androidpublisher.edits.tracks.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.editId Unique identifier for this edit. + * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + * @param {string} params.track The track to read or modify. + * @param {().Track} params.resource Request body data + * @param {object} [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$Edits$Tracks$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Edits$Tracks$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Edits$Tracks$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Edits$Tracks$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Edits$Tracks$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Edits$Tracks$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/edits/{editId}/tracks/{track}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['packageName', 'editId', 'track'], + pathParams: ['editId', 'packageName', 'track'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Edits$Tracks$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + /** + * The track to read or modify. + */ + track?: string; + } + export interface Params$Resource$Edits$Tracks$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + } + export interface Params$Resource$Edits$Tracks$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + /** + * The track to read or modify. + */ + track?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Track; + } + export interface Params$Resource$Edits$Tracks$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for this edit. + */ + editId?: string; + /** + * Unique identifier for the Android app that is being updated; for example, + * "com.spiffygame". + */ + packageName?: string; + /** + * The track to read or modify. + */ + track?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Track; + } + + + + export class Resource$Inappproducts { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.inappproducts.delete + * @desc Delete an in-app product for an app. + * @alias androidpublisher.inappproducts.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + * @param {string} params.sku Unique identifier for the in-app 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$Inappproducts$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Inappproducts$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Inappproducts$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Inappproducts$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Inappproducts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Inappproducts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['packageName', 'sku'], + pathParams: ['packageName', 'sku'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.inappproducts.get + * @desc Returns information about the in-app product specified. + * @alias androidpublisher.inappproducts.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName + * @param {string} params.sku Unique identifier for the in-app 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$Inappproducts$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Inappproducts$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Inappproducts$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Inappproducts$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Inappproducts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Inappproducts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'sku'], + pathParams: ['packageName', 'sku'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.inappproducts.insert + * @desc Creates a new in-app product for an app. + * @alias androidpublisher.inappproducts.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.autoConvertMissingPrices If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + * @param {string} params.packageName Unique identifier for the Android app; for example, "com.spiffygame". + * @param {().InAppProduct} params.resource Request body data + * @param {object} [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$Inappproducts$Insert, + options?: MethodOptions): AxiosPromise; + insert( + params: Params$Resource$Inappproducts$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Inappproducts$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Inappproducts$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Inappproducts$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Inappproducts$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/inappproducts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.inappproducts.list + * @desc List all the in-app products for an Android app, both subscriptions + * and managed in-app products.. + * @alias androidpublisher.inappproducts.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults + * @param {string} params.packageName Unique identifier for the Android app with in-app products; for example, "com.spiffygame". + * @param {integer=} params.startIndex + * @param {string=} params.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$Inappproducts$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Inappproducts$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Inappproducts$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Inappproducts$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Inappproducts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Inappproducts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/inappproducts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.inappproducts.patch + * @desc Updates the details of an in-app product. This method supports + * patch semantics. + * @alias androidpublisher.inappproducts.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.autoConvertMissingPrices If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + * @param {string} params.packageName Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + * @param {string} params.sku Unique identifier for the in-app product. + * @param {().InAppProduct} params.resource Request body data + * @param {object} [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$Inappproducts$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Inappproducts$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Inappproducts$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Inappproducts$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Inappproducts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Inappproducts$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['packageName', 'sku'], + pathParams: ['packageName', 'sku'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.inappproducts.update + * @desc Updates the details of an in-app product. + * @alias androidpublisher.inappproducts.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.autoConvertMissingPrices If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + * @param {string} params.packageName Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + * @param {string} params.sku Unique identifier for the in-app product. + * @param {().InAppProduct} params.resource Request body data + * @param {object} [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$Inappproducts$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Inappproducts$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Inappproducts$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Inappproducts$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Inappproducts$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Inappproducts$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['packageName', 'sku'], + pathParams: ['packageName', 'sku'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Inappproducts$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for the Android app with the in-app product; for + * example, "com.spiffygame". + */ + packageName?: string; + /** + * Unique identifier for the in-app product. + */ + sku?: string; + } + export interface Params$Resource$Inappproducts$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * + */ + packageName?: string; + /** + * Unique identifier for the in-app product. + */ + sku?: string; + } + export interface Params$Resource$Inappproducts$Insert { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If true the prices for all regions targeted by the parent app that don't + * have a price specified for this in-app product will be auto converted to + * the target currency based on the default price. Defaults to false. + */ + autoConvertMissingPrices?: boolean; + /** + * Unique identifier for the Android app; for example, "com.spiffygame". + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InAppProduct; + } + export interface Params$Resource$Inappproducts$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * + */ + maxResults?: number; + /** + * Unique identifier for the Android app with in-app products; for example, + * "com.spiffygame". + */ + packageName?: string; + /** + * + */ + startIndex?: number; + /** + * + */ + token?: string; + } + export interface Params$Resource$Inappproducts$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If true the prices for all regions targeted by the parent app that don't + * have a price specified for this in-app product will be auto converted to + * the target currency based on the default price. Defaults to false. + */ + autoConvertMissingPrices?: boolean; + /** + * Unique identifier for the Android app with the in-app product; for + * example, "com.spiffygame". + */ + packageName?: string; + /** + * Unique identifier for the in-app product. + */ + sku?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InAppProduct; + } + export interface Params$Resource$Inappproducts$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * If true the prices for all regions targeted by the parent app that don't + * have a price specified for this in-app product will be auto converted to + * the target currency based on the default price. Defaults to false. + */ + autoConvertMissingPrices?: boolean; + /** + * Unique identifier for the Android app with the in-app product; for + * example, "com.spiffygame". + */ + packageName?: string; + /** + * Unique identifier for the in-app product. + */ + sku?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InAppProduct; + } + + + export class Resource$Purchases { + root: Androidpublisher; + products: Resource$Purchases$Products; + subscriptions: Resource$Purchases$Subscriptions; + voidedpurchases: Resource$Purchases$Voidedpurchases; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + this.products = new Resource$Purchases$Products(root); + this.subscriptions = new Resource$Purchases$Subscriptions(root); + this.voidedpurchases = new Resource$Purchases$Voidedpurchases(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Purchases$Products { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.purchases.products.get + * @desc Checks the purchase and consumption status of an inapp item. + * @alias androidpublisher.purchases.products.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName The package name of the application the inapp product was sold in (for example, 'com.some.thing'). + * @param {string} params.productId The inapp product SKU (for example, 'com.some.thing.inapp1'). + * @param {string} params.token The token provided to the user's device when the inapp product was purchased. + * @param {object} [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$Purchases$Products$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Purchases$Products$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Purchases$Products$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Purchases$Products$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Purchases$Products$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$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 + + '/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'productId', 'token'], + pathParams: ['packageName', 'productId', 'token'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Purchases$Products$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The package name of the application the inapp product was sold in (for + * example, 'com.some.thing'). + */ + packageName?: string; + /** + * The inapp product SKU (for example, 'com.some.thing.inapp1'). + */ + productId?: string; + /** + * The token provided to the user's device when the inapp product was + * purchased. + */ + token?: string; + } + + + export class Resource$Purchases$Subscriptions { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.purchases.subscriptions.cancel + * @desc Cancels a user's subscription purchase. The subscription remains + * valid until its expiration time. + * @alias androidpublisher.purchases.subscriptions.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + * @param {string} params.subscriptionId The purchased subscription ID (for example, 'monthly001'). + * @param {string} params.token The token provided to the user's device when the subscription was purchased. + * @param {object} [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$Purchases$Subscriptions$Cancel, + options?: MethodOptions): AxiosPromise; + cancel( + params: Params$Resource$Purchases$Subscriptions$Cancel, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + cancel( + params: Params$Resource$Purchases$Subscriptions$Cancel, + callback: BodyResponseCallback): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Purchases$Subscriptions$Cancel| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Purchases$Subscriptions$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$Subscriptions$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'subscriptionId', 'token'], + pathParams: ['packageName', 'subscriptionId', 'token'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.purchases.subscriptions.defer + * @desc Defers a user's subscription purchase until a specified future + * expiration time. + * @alias androidpublisher.purchases.subscriptions.defer + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + * @param {string} params.subscriptionId The purchased subscription ID (for example, 'monthly001'). + * @param {string} params.token The token provided to the user's device when the subscription was purchased. + * @param {().SubscriptionPurchasesDeferRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + defer( + params?: Params$Resource$Purchases$Subscriptions$Defer, + options?: MethodOptions): + AxiosPromise; + defer( + params: Params$Resource$Purchases$Subscriptions$Defer, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + defer( + params: Params$Resource$Purchases$Subscriptions$Defer, + callback: + BodyResponseCallback): + void; + defer(callback: + BodyResponseCallback): + void; + defer( + paramsOrCallback?: Params$Resource$Purchases$Subscriptions$Defer| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Purchases$Subscriptions$Defer; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$Subscriptions$Defer; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:defer') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'subscriptionId', 'token'], + pathParams: ['packageName', 'subscriptionId', 'token'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * androidpublisher.purchases.subscriptions.get + * @desc Checks whether a user's subscription purchase is valid and returns + * its expiry time. + * @alias androidpublisher.purchases.subscriptions.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + * @param {string} params.subscriptionId The purchased subscription ID (for example, 'monthly001'). + * @param {string} params.token The token provided to the user's device when the subscription was purchased. + * @param {object} [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$Purchases$Subscriptions$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Purchases$Subscriptions$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Purchases$Subscriptions$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Purchases$Subscriptions$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Purchases$Subscriptions$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$Subscriptions$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'subscriptionId', 'token'], + pathParams: ['packageName', 'subscriptionId', 'token'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.purchases.subscriptions.refund + * @desc Refunds a user's subscription purchase, but the subscription + * remains valid until its expiration time and it will continue to recur. + * @alias androidpublisher.purchases.subscriptions.refund + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + * @param {string} params.subscriptionId The purchased subscription ID (for example, 'monthly001'). + * @param {string} params.token The token provided to the user's device when the subscription was purchased. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + refund( + params?: Params$Resource$Purchases$Subscriptions$Refund, + options?: MethodOptions): AxiosPromise; + refund( + params: Params$Resource$Purchases$Subscriptions$Refund, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + refund( + params: Params$Resource$Purchases$Subscriptions$Refund, + callback: BodyResponseCallback): void; + refund(callback: BodyResponseCallback): void; + refund( + paramsOrCallback?: Params$Resource$Purchases$Subscriptions$Refund| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Purchases$Subscriptions$Refund; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$Subscriptions$Refund; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:refund') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'subscriptionId', 'token'], + pathParams: ['packageName', 'subscriptionId', 'token'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.purchases.subscriptions.revoke + * @desc Refunds and immediately revokes a user's subscription purchase. + * Access to the subscription will be terminated immediately and it will + * stop recurring. + * @alias androidpublisher.purchases.subscriptions.revoke + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + * @param {string} params.subscriptionId The purchased subscription ID (for example, 'monthly001'). + * @param {string} params.token The token provided to the user's device when the subscription was purchased. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + revoke( + params?: Params$Resource$Purchases$Subscriptions$Revoke, + options?: MethodOptions): AxiosPromise; + revoke( + params: Params$Resource$Purchases$Subscriptions$Revoke, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + revoke( + params: Params$Resource$Purchases$Subscriptions$Revoke, + callback: BodyResponseCallback): void; + revoke(callback: BodyResponseCallback): void; + revoke( + paramsOrCallback?: Params$Resource$Purchases$Subscriptions$Revoke| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Purchases$Subscriptions$Revoke; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$Subscriptions$Revoke; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:revoke') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'subscriptionId', 'token'], + pathParams: ['packageName', 'subscriptionId', 'token'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Purchases$Subscriptions$Cancel { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The package name of the application for which this subscription was + * purchased (for example, 'com.some.thing'). + */ + packageName?: string; + /** + * The purchased subscription ID (for example, 'monthly001'). + */ + subscriptionId?: string; + /** + * The token provided to the user's device when the subscription was + * purchased. + */ + token?: string; + } + export interface Params$Resource$Purchases$Subscriptions$Defer { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The package name of the application for which this subscription was + * purchased (for example, 'com.some.thing'). + */ + packageName?: string; + /** + * The purchased subscription ID (for example, 'monthly001'). + */ + subscriptionId?: string; + /** + * The token provided to the user's device when the subscription was + * purchased. + */ + token?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SubscriptionPurchasesDeferRequest; + } + export interface Params$Resource$Purchases$Subscriptions$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The package name of the application for which this subscription was + * purchased (for example, 'com.some.thing'). + */ + packageName?: string; + /** + * The purchased subscription ID (for example, 'monthly001'). + */ + subscriptionId?: string; + /** + * The token provided to the user's device when the subscription was + * purchased. + */ + token?: string; + } + export interface Params$Resource$Purchases$Subscriptions$Refund { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The package name of the application for which this subscription was + * purchased (for example, 'com.some.thing'). + */ + packageName?: string; + /** + * The purchased subscription ID (for example, 'monthly001'). + */ + subscriptionId?: string; + /** + * The token provided to the user's device when the subscription was + * purchased. + */ + token?: string; + } + export interface Params$Resource$Purchases$Subscriptions$Revoke { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The package name of the application for which this subscription was + * purchased (for example, 'com.some.thing'). + */ + packageName?: string; + /** + * The purchased subscription ID (for example, 'monthly001'). + */ + subscriptionId?: string; + /** + * The token provided to the user's device when the subscription was + * purchased. + */ + token?: string; + } + + + export class Resource$Purchases$Voidedpurchases { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.purchases.voidedpurchases.list + * @desc Lists the purchases that were canceled, refunded or charged-back. + * @alias androidpublisher.purchases.voidedpurchases.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.endTime The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response. + * @param {integer=} params.maxResults + * @param {string} params.packageName The package name of the application for which voided purchases need to be returned (for example, 'com.some.thing'). + * @param {integer=} params.startIndex + * @param {string=} params.startTime The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response. + * @param {string=} params.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$Purchases$Voidedpurchases$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Purchases$Voidedpurchases$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Purchases$Voidedpurchases$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Purchases$Voidedpurchases$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Purchases$Voidedpurchases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$Voidedpurchases$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/purchases/voidedpurchases') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Purchases$Voidedpurchases$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The time, in milliseconds since the Epoch, of the newest voided in-app + * product purchase that you want to see in the response. The value of this + * parameter cannot be greater than the current time and is ignored if a + * pagination token is set. Default value is current time. Note: This filter + * is applied on the time at which the record is seen as voided by our + * systems and not the actual voided time returned in the response. + */ + endTime?: string; + /** + * + */ + maxResults?: number; + /** + * The package name of the application for which voided purchases need to be + * returned (for example, 'com.some.thing'). + */ + packageName?: string; + /** + * + */ + startIndex?: number; + /** + * The time, in milliseconds since the Epoch, of the oldest voided in-app + * product purchase that you want to see in the response. The value of this + * parameter cannot be older than 30 days and is ignored if a pagination + * token is set. Default value is current time minus 30 days. Note: This + * filter is applied on the time at which the record is seen as voided by + * our systems and not the actual voided time returned in the response. + */ + startTime?: string; + /** + * + */ + token?: string; + } + + + + export class Resource$Reviews { + root: Androidpublisher; + constructor(root: Androidpublisher) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * androidpublisher.reviews.get + * @desc Returns a single review. + * @alias androidpublisher.reviews.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". + * @param {string} params.reviewId + * @param {string=} params.translationLanguage + * @param {object} [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$Reviews$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Reviews$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Reviews$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Reviews$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Reviews$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Reviews$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/reviews/{reviewId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName', 'reviewId'], + pathParams: ['packageName', 'reviewId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.reviews.list + * @desc Returns a list of reviews. Only reviews from last week will be + * returned. + * @alias androidpublisher.reviews.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.maxResults + * @param {string} params.packageName Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". + * @param {integer=} params.startIndex + * @param {string=} params.token + * @param {string=} params.translationLanguage + * @param {object} [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$Reviews$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Reviews$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Reviews$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Reviews$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Reviews$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Reviews$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/androidpublisher/v3/applications/{packageName}/reviews') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * androidpublisher.reviews.reply + * @desc Reply to a single review, or update an existing reply. + * @alias androidpublisher.reviews.reply + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.packageName Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". + * @param {string} params.reviewId + * @param {().ReviewsReplyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + reply(params?: Params$Resource$Reviews$Reply, options?: MethodOptions): + AxiosPromise; + reply( + params: Params$Resource$Reviews$Reply, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + reply( + params: Params$Resource$Reviews$Reply, + callback: BodyResponseCallback): void; + reply(callback: BodyResponseCallback): void; + reply( + paramsOrCallback?: Params$Resource$Reviews$Reply| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Reviews$Reply; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Reviews$Reply; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/androidpublisher/v3/applications/{packageName}/reviews/{reviewId}:reply') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['packageName', 'reviewId'], + pathParams: ['packageName', 'reviewId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Reviews$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for the Android app for which we want reviews; for + * example, "com.spiffygame". + */ + packageName?: string; + /** + * + */ + reviewId?: string; + /** + * + */ + translationLanguage?: string; + } + export interface Params$Resource$Reviews$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * + */ + maxResults?: number; + /** + * Unique identifier for the Android app for which we want reviews; for + * example, "com.spiffygame". + */ + packageName?: string; + /** + * + */ + startIndex?: number; + /** + * + */ + token?: string; + /** + * + */ + translationLanguage?: string; + } + export interface Params$Resource$Reviews$Reply { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Unique identifier for the Android app for which we want reviews; for + * example, "com.spiffygame". + */ + packageName?: string; + /** + * + */ + reviewId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ReviewsReplyRequest; + } +} diff --git a/src/apis/appengine/v1.ts b/src/apis/appengine/v1.ts index ff2cbe2133f..62dc34d3e85 100644 --- a/src/apis/appengine/v1.ts +++ b/src/apis/appengine/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/appengine/v1alpha.ts b/src/apis/appengine/v1alpha.ts index eb6a899a8b5..3ba03c88b9f 100644 --- a/src/apis/appengine/v1alpha.ts +++ b/src/apis/appengine/v1alpha.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/appengine/v1beta.ts b/src/apis/appengine/v1beta.ts index fbec83f7f30..d2fb758eea7 100644 --- a/src/apis/appengine/v1beta.ts +++ b/src/apis/appengine/v1beta.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/appengine/v1beta4.ts b/src/apis/appengine/v1beta4.ts index 08d41d918f1..f17d0330c1f 100644 --- a/src/apis/appengine/v1beta4.ts +++ b/src/apis/appengine/v1beta4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/appengine/v1beta5.ts b/src/apis/appengine/v1beta5.ts index 42bc5a1cbbb..6d10b8a6154 100644 --- a/src/apis/appengine/v1beta5.ts +++ b/src/apis/appengine/v1beta5.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/appsactivity/v1.ts b/src/apis/appsactivity/v1.ts index 38f75b13dcf..7b13b1ddab2 100644 --- a/src/apis/appsactivity/v1.ts +++ b/src/apis/appsactivity/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/appstate/v1.ts b/src/apis/appstate/v1.ts index ec7fe4d028e..7195597aa6e 100644 --- a/src/apis/appstate/v1.ts +++ b/src/apis/appstate/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/bigquery/v2.ts b/src/apis/bigquery/v2.ts index a2296e59286..ff0f5864617 100644 --- a/src/apis/bigquery/v2.ts +++ b/src/apis/bigquery/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/bigquerydatatransfer/v1.ts b/src/apis/bigquerydatatransfer/v1.ts index 4296d448220..bf32d737bb3 100644 --- a/src/apis/bigquerydatatransfer/v1.ts +++ b/src/apis/bigquerydatatransfer/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/blogger/v2.ts b/src/apis/blogger/v2.ts index e9b1f60758e..4e5d3e49847 100644 --- a/src/apis/blogger/v2.ts +++ b/src/apis/blogger/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/blogger/v3.ts b/src/apis/blogger/v3.ts index e5ab9e6e436..9e6590255e4 100644 --- a/src/apis/blogger/v3.ts +++ b/src/apis/blogger/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/books/v1.ts b/src/apis/books/v1.ts index 85991f47154..13c2ed118ef 100644 --- a/src/apis/books/v1.ts +++ b/src/apis/books/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/calendar/v3.ts b/src/apis/calendar/v3.ts index 660f32059b4..2d0b85fc59e 100644 --- a/src/apis/calendar/v3.ts +++ b/src/apis/calendar/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -3315,22 +3315,22 @@ export namespace calendar_v3 { } - /** - * calendar.events.import - * @desc Imports an event. This operation is used to add a private copy of - * an existing event to a calendar. - * @alias calendar.events.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.calendarId Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - * @param {integer=} params.conferenceDataVersion Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0. - * @param {boolean=} params.supportsAttachments Whether API client performing operation supports event attachments. Optional. The default is False. - * @param {().Event} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * calendar.events.import + * @desc Imports an event. This operation is used to add a private copy of an + * existing event to a calendar. + * @alias calendar.events.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.calendarId Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + * @param {integer=} params.conferenceDataVersion Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0. + * @param {boolean=} params.supportsAttachments Whether API client performing operation supports event attachments. Optional. The default is False. + * @param {().Event} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Events$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Events$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Events$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/chat/v1.ts b/src/apis/chat/v1.ts index 02e42e10369..1a522494602 100644 --- a/src/apis/chat/v1.ts +++ b/src/apis/chat/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/civicinfo/v2.ts b/src/apis/civicinfo/v2.ts index 40926687e9c..cce2aebcde6 100644 --- a/src/apis/civicinfo/v2.ts +++ b/src/apis/civicinfo/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/classroom/v1.ts b/src/apis/classroom/v1.ts index b54ff11fa9d..00338be3fce 100644 --- a/src/apis/classroom/v1.ts +++ b/src/apis/classroom/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudbilling/v1.ts b/src/apis/cloudbilling/v1.ts index eda848f380b..72065f07223 100644 --- a/src/apis/cloudbilling/v1.ts +++ b/src/apis/cloudbilling/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudbuild/v1.ts b/src/apis/cloudbuild/v1.ts index 979c59e4a43..d392d27c339 100644 --- a/src/apis/cloudbuild/v1.ts +++ b/src/apis/cloudbuild/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/clouddebugger/v2.ts b/src/apis/clouddebugger/v2.ts index 69bcb905719..e223727189d 100644 --- a/src/apis/clouddebugger/v2.ts +++ b/src/apis/clouddebugger/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/clouderrorreporting/v1beta1.ts b/src/apis/clouderrorreporting/v1beta1.ts index 78c8bb05148..968aaa183a1 100644 --- a/src/apis/clouderrorreporting/v1beta1.ts +++ b/src/apis/clouderrorreporting/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudfunctions/v1.ts b/src/apis/cloudfunctions/v1.ts index 1fdb6390688..ca0ae2bef9c 100644 --- a/src/apis/cloudfunctions/v1.ts +++ b/src/apis/cloudfunctions/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -36,7 +36,7 @@ export namespace cloudfunctions_v1 { } /** - * Google Cloud Functions API + * Cloud Functions API * * Manages lightweight user-provided functions executed in response to events. * @@ -139,6 +139,11 @@ export namespace cloudfunctions_v1 { * globally and match pattern `projects/x/locations/x/functions/x */ name?: string; + /** + * The runtime in which the function is going to run. If empty, defaults to + * Node.js 6. + */ + runtime?: string; /** * Output only. The email of the function's service account. */ diff --git a/src/apis/cloudfunctions/v1beta2.ts b/src/apis/cloudfunctions/v1beta2.ts index 10f6ad0c759..8592754dfaa 100644 --- a/src/apis/cloudfunctions/v1beta2.ts +++ b/src/apis/cloudfunctions/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -36,7 +36,7 @@ export namespace cloudfunctions_v1beta2 { } /** - * Google Cloud Functions API + * Cloud Functions API * * Manages lightweight user-provided functions executed in response to events. * @@ -141,6 +141,11 @@ export namespace cloudfunctions_v1beta2 { * globally and match pattern `projects/x/locations/x/functions/x */ name?: string; + /** + * The runtime in which the function is going to run. If empty, defaults to + * Node.js 6. + */ + runtime?: string; /** * Output only. The service account of the function. */ diff --git a/src/apis/cloudiot/v1.ts b/src/apis/cloudiot/v1.ts index d6406fa71ce..0edd4f219f0 100644 --- a/src/apis/cloudiot/v1.ts +++ b/src/apis/cloudiot/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -725,6 +725,7 @@ export namespace cloudiot_v1 { * @param {string=} params.deviceIds A list of device string identifiers. If empty, it will ignore this field. For example, `['device0', 'device12']`. This field cannot hold more than 10,000 entries. * @param {string=} params.deviceNumIds A list of device numerical ids. If empty, it will ignore this field. This field cannot hold more than 10,000 entries. * @param {string=} params.fieldMask The fields of the `Device` resource to be returned in the response. The fields `id`, and `num_id` are always returned by default, along with any other fields specified. + * @param {string=} params.gatewayType If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` specified, only non-gateway devices are returned. If `GATEWAY_TYPE_UNSPECIFIED` specified, all devices are returned. * @param {integer=} params.pageSize The maximum number of devices to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested, but if there is a non-empty `page_token`, it indicates that more entries are available. * @param {string=} params.pageToken The value returned by the last `ListDevicesResponse`; indicates that this is a continuation of a prior `ListDevices` call, and that the system should return the next page of data. * @param {string} params.parent The device registry path. Required. For example, `projects/my-project/locations/us-central1/registries/my-registry`. @@ -811,6 +812,12 @@ export namespace cloudiot_v1 { * other fields specified. */ fieldMask?: string; + /** + * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + * specified, only non-gateway devices are returned. If + * `GATEWAY_TYPE_UNSPECIFIED` specified, all devices are returned. + */ + gatewayType?: string; /** * The maximum number of devices to return in the response. If this value is * zero, the service will select a default size. A call may return fewer @@ -1783,6 +1790,7 @@ export namespace cloudiot_v1 { * @param {string=} params.deviceIds A list of device string identifiers. If empty, it will ignore this field. For example, `['device0', 'device12']`. This field cannot hold more than 10,000 entries. * @param {string=} params.deviceNumIds A list of device numerical ids. If empty, it will ignore this field. This field cannot hold more than 10,000 entries. * @param {string=} params.fieldMask The fields of the `Device` resource to be returned in the response. The fields `id`, and `num_id` are always returned by default, along with any other fields specified. + * @param {string=} params.gatewayType If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` specified, only non-gateway devices are returned. If `GATEWAY_TYPE_UNSPECIFIED` specified, all devices are returned. * @param {integer=} params.pageSize The maximum number of devices to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested, but if there is a non-empty `page_token`, it indicates that more entries are available. * @param {string=} params.pageToken The value returned by the last `ListDevicesResponse`; indicates that this is a continuation of a prior `ListDevices` call, and that the system should return the next page of data. * @param {string} params.parent The device registry path. Required. For example, `projects/my-project/locations/us-central1/registries/my-registry`. @@ -2067,6 +2075,12 @@ export namespace cloudiot_v1 { * other fields specified. */ fieldMask?: string; + /** + * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + * specified, only non-gateway devices are returned. If + * `GATEWAY_TYPE_UNSPECIFIED` specified, all devices are returned. + */ + gatewayType?: string; /** * The maximum number of devices to return in the response. If this value is * zero, the service will select a default size. A call may return fewer diff --git a/src/apis/cloudkms/v1.ts b/src/apis/cloudkms/v1.ts index 05bb1766b3d..612683d3c66 100644 --- a/src/apis/cloudkms/v1.ts +++ b/src/apis/cloudkms/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudresourcemanager/v1.ts b/src/apis/cloudresourcemanager/v1.ts index 728c8074e3e..1fbe54b12f3 100644 --- a/src/apis/cloudresourcemanager/v1.ts +++ b/src/apis/cloudresourcemanager/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudresourcemanager/v1beta1.ts b/src/apis/cloudresourcemanager/v1beta1.ts index 08d058e61ec..a15fd64baa1 100644 --- a/src/apis/cloudresourcemanager/v1beta1.ts +++ b/src/apis/cloudresourcemanager/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudresourcemanager/v2.ts b/src/apis/cloudresourcemanager/v2.ts index fa3acfee605..d23b14c8259 100644 --- a/src/apis/cloudresourcemanager/v2.ts +++ b/src/apis/cloudresourcemanager/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudresourcemanager/v2beta1.ts b/src/apis/cloudresourcemanager/v2beta1.ts index 1147dcf9f7e..d0e983422e9 100644 --- a/src/apis/cloudresourcemanager/v2beta1.ts +++ b/src/apis/cloudresourcemanager/v2beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudshell/v1.ts b/src/apis/cloudshell/v1.ts index b8e96826d13..4be8d3916ee 100644 --- a/src/apis/cloudshell/v1.ts +++ b/src/apis/cloudshell/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudshell/v1alpha1.ts b/src/apis/cloudshell/v1alpha1.ts index fa4520656b7..9b1663d0d70 100644 --- a/src/apis/cloudshell/v1alpha1.ts +++ b/src/apis/cloudshell/v1alpha1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudtasks/v2beta2.ts b/src/apis/cloudtasks/v2beta2.ts index 0bf86fd998f..96d498ebb9b 100644 --- a/src/apis/cloudtasks/v2beta2.ts +++ b/src/apis/cloudtasks/v2beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudtrace/v1.ts b/src/apis/cloudtrace/v1.ts index 96c1fa87faa..a4b9d55bfa6 100644 --- a/src/apis/cloudtrace/v1.ts +++ b/src/apis/cloudtrace/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/cloudtrace/v2.ts b/src/apis/cloudtrace/v2.ts index c02d69d84f3..c3a3f5100c0 100644 --- a/src/apis/cloudtrace/v2.ts +++ b/src/apis/cloudtrace/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/composer/v1beta1.ts b/src/apis/composer/v1beta1.ts index f1b42476bcb..6f647861aad 100644 --- a/src/apis/composer/v1beta1.ts +++ b/src/apis/composer/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/compute/alpha.ts b/src/apis/compute/alpha.ts index 7aea4323341..509e46f7d0b 100644 --- a/src/apis/compute/alpha.ts +++ b/src/apis/compute/alpha.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -117,6 +117,7 @@ export namespace compute_alpha { targetTcpProxies: Resource$Targettcpproxies; targetVpnGateways: Resource$Targetvpngateways; urlMaps: Resource$Urlmaps; + vpnGateways: Resource$Vpngateways; vpnTunnels: Resource$Vpntunnels; zoneOperations: Resource$Zoneoperations; zones: Resource$Zones; @@ -189,6 +190,7 @@ export namespace compute_alpha { this.targetTcpProxies = new Resource$Targettcpproxies(this); this.targetVpnGateways = new Resource$Targetvpngateways(this); this.urlMaps = new Resource$Urlmaps(this); + this.vpnGateways = new Resource$Vpngateways(this); this.vpnTunnels = new Resource$Vpntunnels(this); this.zoneOperations = new Resource$Zoneoperations(this); this.zones = new Resource$Zones(this); @@ -1752,7 +1754,7 @@ export namespace compute_alpha { * a Google account. * `allAuthenticatedUsers`: A special identifier that * represents anyone who is authenticated with a Google account or a service * account. * `user:{emailid}`: An email address that represents a specific - * Google account. For example, `alice@gmail.com` or `joe@example.com`. * + * 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 @@ -2470,6 +2472,12 @@ export namespace compute_alpha { * [Output Only] Name of the resource. */ name?: string; + /** + * [Output Only] URL of the region where the disk type resides. Only + * applicable for regional resources. You must specify this field as part of + * the HTTP request URL. It is not settable as a field in the request body. + */ + region?: string; /** * [Output Only] Server-defined URL for the resource. */ @@ -3106,6 +3114,25 @@ export namespace compute_alpha { */ labels?: any; } + export interface Schema$GlobalSetPolicyRequest { + /** + * 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; + } /** * A guest attributes entry. */ @@ -3843,51 +3870,6 @@ export namespace compute_alpha { */ warning?: any; } - 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. @@ -3963,6 +3945,51 @@ export namespace compute_alpha { */ 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. */ @@ -7281,7 +7308,8 @@ export namespace compute_alpha { */ creationTimestamp?: string; /** - * [Output Only] An optional textual description of the resource. + * An optional description of this resource. Provide this property when you + * create the resource. */ description?: string; /** @@ -7721,7 +7749,8 @@ export namespace compute_alpha { */ export interface Schema$Operation { /** - * [Output Only] Reserved for future use. + * [Output Only] The value of `requestId` if you provided it in the request. + * Not present otherwise. */ clientOperationId?: string; /** @@ -7967,9 +7996,18 @@ export namespace compute_alpha { service?: string; } export interface Schema$PerInstanceConfig { + /** + * Fingerprint of this per-instance config. This field may be used in + * optimistic locking. It will be ignored when inserting a per-instance + * config. An up-to-date fingerprint must be provided in order to update an + * existing per-instance config or the field needs to be unset. + */ + fingerprint?: string; /** * The URL of the instance. Serves as a merge key during - * UpdatePerInstanceConfigs operation. + * UpdatePerInstanceConfigs operation, i.e. if per-instance config with the + * same instance URL exists then it will be updated, otherwise a new one + * will be created. */ instance?: string; override?: Schema$ManagedInstanceOverride; @@ -8031,6 +8069,12 @@ export namespace compute_alpha { */ version?: number; } + export interface Schema$PreconfiguredWafSet { + /** + * List of entities that are currently supported for WAF rules. + */ + expressionSets?: Schema$WafExpressionSet[]; + } /** * A Project resource. For an overview of projects, see Cloud Platform * Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for @@ -8601,6 +8645,25 @@ export namespace compute_alpha { */ labels?: any; } + 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; + } export interface Schema$RegionUrlMapsValidateRequest { /** * Content of the UrlMap to be validated. @@ -8804,11 +8867,6 @@ export namespace compute_alpha { * the setLabels method. Label values may be empty. */ labels?: any; - /** - * GCS bucket storage location of the auto snapshot (regional or - * multi-regional). - */ - storageLocations?: string[]; } /** * Time window specified for daily operations. @@ -9125,19 +9183,6 @@ export namespace compute_alpha { */ range?: string; } - /** - * Description-tagged prefixes for the router to advertise. - */ - export interface Schema$RouterAdvertisedPrefix { - /** - * User-specified description for the prefix. - */ - description?: string; - /** - * The prefix to advertise. The value must be a CIDR-formatted string. - */ - prefix?: string; - } /** * Contains a list of routers. */ @@ -9188,14 +9233,6 @@ export namespace compute_alpha { * no custom IP ranges. */ advertisedIpRanges?: Schema$RouterAdvertisedIpRange[]; - /** - * User-specified list of individual prefixes to advertise in custom mode. - * This field can only be populated if advertise_mode is CUSTOM and is - * advertised to all peers of the router. These prefixes will be advertised - * in addition to any specified groups. Leave this field blank to advertise - * no custom prefixes. - */ - advertisedPrefixs?: Schema$RouterAdvertisedPrefix[]; /** * User-specified flag to indicate which mode to use for advertisement. */ @@ -9225,14 +9262,6 @@ export namespace compute_alpha { * field blank to advertise no custom IP ranges. */ advertisedIpRanges?: Schema$RouterAdvertisedIpRange[]; - /** - * User-specified list of individual prefixes to advertise in custom mode. - * This field can only be populated if advertise_mode is CUSTOM and - * overrides the list defined for the router (in Bgp message). These - * prefixes will be advertised in addition to any specified groups. Leave - * this field blank to advertise no custom prefixes. - */ - advertisedPrefixs?: Schema$RouterAdvertisedPrefix[]; /** * The priority of routes advertised to this BGP peer. In the case where * there is more than one matching route of maximum length, the routes with @@ -9619,6 +9648,12 @@ export namespace compute_alpha { */ values?: string[]; } + export interface Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse { + preconfiguredExpressionSets?: Schema$SecurityPoliciesWafConfig; + } + export interface Schema$SecurityPoliciesWafConfig { + wafRules?: Schema$PreconfiguredWafSet; + } /** * A security policy is comprised of one or more rules. It can also be * associated with one or more 'targets'. @@ -11909,6 +11944,172 @@ export namespace compute_alpha { */ reportNamePrefix?: string; } + /** + * Represents a VPN gateway resource. + */ + export interface Schema$VpnGateway { + /** + * [Output Only] Creation timestamp in RFC3339 text format. + */ + creationTimestamp?: string; + /** + * An optional description of this resource. Provide this property when you + * create the resource. + */ + description?: string; + /** + * [Output Only] The unique identifier for the resource. This identifier is + * defined by the server. + */ + id?: string; + /** + * [Output Only] Type of resource. Always compute#vpnGateway for VPN + * gateways. + */ + kind?: string; + /** + * A fingerprint for the labels being applied to this VpnGateway, which is + * 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 + * the latest fingerprint, make a get() request to retrieve an VpnGateway. + */ + labelFingerprint?: string; + /** + * Labels to apply to this VpnGateway resource. These can be later modified + * by the setLabels method. Each label key/value must comply with RFC1035. + * Label values may be empty. + */ + labels?: any; + /** + * Name of the resource. Provided by the client when the resource is + * created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular + * expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character + * must be a lowercase letter, and all following characters must be a dash, + * lowercase letter, or digit, except the last character, which cannot be a + * dash. + */ + name?: string; + /** + * URL of the network to which this VPN gateway is attached. Provided by the + * client when the VPN gateway is created. + */ + network?: string; + /** + * The redundancy mode configured for this VPN gateway. Possible values are + * ACTIVE_ACTIVE and NONE. If set to ACTIVE_ACTIVE, two VPN interfaces are + * created thereby providing higher availability. If set to NONE, only one + * interface is created with a lower availability SLA. If this field is + * specified, either 2 or 1 external IP addresses (depending on the value of + * specified redundancy) are automatically allocated for use with this VPN + * gateway, and incoming traffic on the external addresses to ports ESP, + * UDP:500 and UDP:4500 are automatically forwarded to this gateway. + */ + redundancy?: string; + /** + * [Output Only] URL of the region where the VPN gateway resides. + */ + region?: string; + /** + * [Output Only] Server-defined URL for the resource. + */ + selfLink?: string; + /** + * [Output Only] A list of interfaces on this VPN gateway. + */ + vpnInterfaces?: Schema$VpnGatewayVpnGatewayInterface[]; + } + export interface Schema$VpnGatewayAggregatedList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string; + /** + * A list of VpnGateway resources. + */ + items?: any; + /** + * [Output Only] Type of resource. Always compute#vpnGateway for VPN + * gateways. + */ + 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?: any; + } + /** + * Contains a list of VpnGateway resources. + */ + export interface Schema$VpnGatewayList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string; + /** + * A list of VpnGateway resources. + */ + items?: Schema$VpnGateway[]; + /** + * [Output Only] Type of resource. Always compute#vpnGateway for VPN + * gateways. + */ + 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?: any; + } + export interface Schema$VpnGatewaysScopedList { + /** + * [Output Only] A list of VPN gateways contained in this scope. + */ + vpnGateways?: Schema$VpnGateway[]; + /** + * [Output Only] Informational warning which replaces the list of addresses + * when the list is empty. + */ + warning?: any; + } + /** + * A VPN gateway interface. + */ + export interface Schema$VpnGatewayVpnGatewayInterface { + /** + * The numeric ID of this VPN gateway interface. + */ + id?: number; + /** + * The external IP address for this VPN gateway interface. + */ + ipAddress?: string; + } /** * VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for * v1.vpnTunnels ==) @@ -12015,6 +12216,20 @@ export namespace compute_alpha { * Provided by the client when the VPN tunnel is created. */ targetVpnGateway?: string; + /** + * URL of the VPN gateway with which this VPN tunnel is associated. Provided + * by the client when the VPN tunnel is created. This must be used (instead + * of target_vpn_gateway) if a VPN gateway resource is created with + * redundancy. VPN gateway resource provides a way to create a highly + * available VPN setup. + */ + vpnGateway?: string; + /** + * The interface ID of the VPN gateway with which this VPN tunnel is + * associated. If the VPN gateway has redundancy other than NONE, this field + * is required to identify which interface of the VPN gateway to use. + */ + vpnGatewayInterface?: number; } export interface Schema$VpnTunnelAggregatedList { /** @@ -12090,6 +12305,34 @@ export namespace compute_alpha { */ warning?: any; } + export interface Schema$WafExpressionSet { + /** + * A list of alternate IDs. The format should be: - E.g. XSS-stable Generic + * suffix like "stable" is particularly useful if a policy likes + * to avail newer set of expressions without having to change the policy. A + * given alias name can't be used for more than one entity set. + */ + aliases?: string[]; + /** + * List of available expressions. + */ + expressions?: Schema$WafExpressionSetExpression[]; + /** + * Google specified expression set ID. The format should be: - E.g. + * XSS-20170329 + */ + id?: string; + } + export interface Schema$WafExpressionSetExpression { + /** + * Expression ID should uniquely identify the origin of the expression. E.g. + * owasp-crs-v020901-id973337 identifies Owasp core rule set version 2.9.1 + * rule id 973337. The ID could be used to determine the individual attack + * definition that has been detected. It could also be used to exclude it + * from the policy in case of false positive. + */ + id?: string; + } export interface Schema$XpnHostList { /** * [Output Only] Unique identifier for the resource; defined by the server. @@ -12231,6 +12474,25 @@ export namespace compute_alpha { */ labels?: any; } + 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 { @@ -12328,8 +12590,7 @@ export namespace compute_alpha { /** * compute.acceleratorTypes.get - * @desc Returns the specified accelerator type. Gets a list of available - * accelerator types by making a list() request. + * @desc Returns the specified accelerator type. * @alias compute.acceleratorTypes.get * @memberOf! () * @@ -14854,7 +15115,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 {().Policy} params.resource Request body data + * @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 @@ -15320,7 +15581,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Backendbuckets$Testiampermissions { /** @@ -17407,7 +17668,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.resource_ Name of the resource for this request. * @param {string} params.zone The name of the zone for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -18008,7 +18269,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$ZoneSetPolicyRequest; } export interface Params$Resource$Disks$Setlabels { /** @@ -23412,7 +23673,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.resource_ Name of the resource for this request. * @param {string} params.zone The name of the zone for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -23784,7 +24045,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$ZoneSetPolicyRequest; } export interface Params$Resource$Hosts$Testiampermissions { /** @@ -26136,7 +26397,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 {().Policy} params.resource Request body data + * @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 @@ -26552,7 +26813,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Images$Setlabels { /** @@ -31646,7 +31907,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.resource_ Name of the resource for this request. * @param {string} params.zone The name of the zone for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -33792,7 +34053,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$ZoneSetPolicyRequest; } export interface Params$Resource$Instances$Setlabels { /** @@ -35506,7 +35767,7 @@ export namespace compute_alpha { * @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 of the resource for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -35991,7 +36252,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$RegionSetPolicyRequest; } export interface Params$Resource$Interconnectattachments$Setlabels { /** @@ -36461,7 +36722,7 @@ export namespace compute_alpha { /** * compute.interconnects.get - * @desc Returns the specified interconnect. Gets a list of available + * @desc Returns the specified interconnect. Get a list of available * interconnects by making a list() request. * @alias compute.interconnects.get * @memberOf! () @@ -36823,7 +37084,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 {().Policy} params.resource Request body data + * @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 @@ -37221,7 +37482,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Interconnects$Setlabels { /** @@ -37423,7 +37684,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 {().Policy} params.resource Request body data + * @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 @@ -37605,7 +37866,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Licensecodes$Testiampermissions { /** @@ -37916,7 +38177,7 @@ export namespace compute_alpha { * compute.licenses.list * @desc Retrieves the list of licenses available in the specified project. * This method does not get any licenses that belong to other projects, - * including licenses attached to publicly-available images, like Debian 8. + * including licenses attached to publicly-available images, like Debian 9. * If you want to get a list of publicly-available licenses, use this method * to make a request to the respective image project, such as debian-cloud * or windows-cloud. @@ -37998,7 +38259,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 {().Policy} params.resource Request body data + * @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 @@ -38291,7 +38552,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Licenses$Testiampermissions { /** @@ -41432,7 +41693,7 @@ export namespace compute_alpha { * @param {string} params.project Project ID for this request. * @param {string} params.resource_ Name of the resource for this request. * @param {string} params.zone The name of the zone for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -41955,7 +42216,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$ZoneSetPolicyRequest; } export interface Params$Resource$Nodegroups$Setnodetemplate { /** @@ -42481,7 +42742,7 @@ export namespace compute_alpha { * @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 of the resource for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -42853,7 +43114,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$RegionSetPolicyRequest; } export interface Params$Resource$Nodetemplates$Testiampermissions { /** @@ -54081,7 +54342,7 @@ export namespace compute_alpha { * @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 of the resource for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -54453,7 +54714,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$RegionSetPolicyRequest; } export interface Params$Resource$Resourcepolicies$Testiampermissions { /** @@ -56491,6 +56752,102 @@ export namespace compute_alpha { } + /** + * compute.securityPolicies.listPreconfiguredExpressionSets + * @desc Gets the current list of preconfigured Web Application Firewall + * (WAF) expressions. + * @alias compute.securityPolicies.listPreconfiguredExpressionSets + * @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 + */ + listPreconfiguredExpressionSets( + params?: + Params$Resource$Securitypolicies$Listpreconfiguredexpressionsets, + options?: MethodOptions): + AxiosPromise< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>; + listPreconfiguredExpressionSets( + params: + Params$Resource$Securitypolicies$Listpreconfiguredexpressionsets, + options: MethodOptions|BodyResponseCallback< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>, + callback: BodyResponseCallback< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>): + void; + listPreconfiguredExpressionSets( + params: + Params$Resource$Securitypolicies$Listpreconfiguredexpressionsets, + callback: BodyResponseCallback< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>): + void; + listPreconfiguredExpressionSets( + callback: BodyResponseCallback< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>): + void; + listPreconfiguredExpressionSets( + paramsOrCallback?: + Params$Resource$Securitypolicies$Listpreconfiguredexpressionsets| + BodyResponseCallback< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>, + callback?: BodyResponseCallback< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>): + void|AxiosPromise< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Securitypolicies$Listpreconfiguredexpressionsets; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Securitypolicies$Listpreconfiguredexpressionsets; + 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}/global/securityPolicies/listPreconfiguredExpressionSets') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$SecurityPoliciesListPreconfiguredExpressionSetsResponse>( + parameters); + } + } + + /** * compute.securityPolicies.patch * @desc Patches the specified policy with the data included in the request. @@ -56953,6 +57310,60 @@ export namespace compute_alpha { */ project?: string; } + export interface Params$Resource$Securitypolicies$Listpreconfiguredexpressionsets { + /** + * 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$Securitypolicies$Patch { /** * Auth client or API Key for the request @@ -57356,7 +57767,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 {().Policy} params.resource Request body data + * @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 @@ -57692,7 +58103,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Snapshots$Setlabels { /** @@ -59693,7 +60104,7 @@ export namespace compute_alpha { * @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 of the resource for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -60268,7 +60679,7 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$RegionSetPolicyRequest; } export interface Params$Resource$Subnetworks$Setprivateipgoogleaccess { /** @@ -67403,6 +67814,784 @@ export namespace compute_alpha { } + export class Resource$Vpngateways { + root: Compute; + constructor(root: Compute) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * compute.vpnGateways.aggregatedList + * @desc Retrieves an aggregated list of VPN gateways. + * @alias compute.vpnGateways.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$Vpngateways$Aggregatedlist, + options?: MethodOptions): AxiosPromise; + aggregatedList( + params: Params$Resource$Vpngateways$Aggregatedlist, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + aggregatedList( + params: Params$Resource$Vpngateways$Aggregatedlist, + callback: BodyResponseCallback): void; + aggregatedList( + callback: BodyResponseCallback): void; + aggregatedList( + paramsOrCallback?: Params$Resource$Vpngateways$Aggregatedlist| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Vpngateways$Aggregatedlist; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$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/alpha/projects/{project}/aggregated/vpnGateways') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.vpnGateways.delete + * @desc Deletes the specified VPN gateway. + * @alias compute.vpnGateways.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of 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.vpnGateway Name of the VPN gateway 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$Vpngateways$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Vpngateways$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Vpngateways$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Vpngateways$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Vpngateways$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$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/{project}/regions/{region}/vpnGateways/{vpnGateway}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['project', 'region', 'vpnGateway'], + pathParams: ['project', 'region', 'vpnGateway'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.vpnGateways.get + * @desc Returns the specified VPN gateway. Gets a list of available VPN + * gateways by making a list() request. + * @alias compute.vpnGateways.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of the region for this request. + * @param {string} params.vpnGateway Name of the VPN gateway 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 + */ + get(params?: Params$Resource$Vpngateways$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Vpngateways$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Vpngateways$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Vpngateways$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Vpngateways$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$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/{project}/regions/{region}/vpnGateways/{vpnGateway}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region', 'vpnGateway'], + pathParams: ['project', 'region', 'vpnGateway'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.vpnGateways.insert + * @desc Creates a VPN gateway in the specified project and region using the + * data included in the request. + * @alias compute.vpnGateways.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of 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 {().VpnGateway} params.resource Request body data + * @param {object} [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$Vpngateways$Insert, + options?: MethodOptions): AxiosPromise; + insert( + params: Params$Resource$Vpngateways$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Vpngateways$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Vpngateways$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Vpngateways$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$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/{project}/regions/{region}/vpnGateways') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.vpnGateways.list + * @desc Retrieves a list of VPN gateways available to the specified project + * and region. + * @alias compute.vpnGateways.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.region Name of the region 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$Vpngateways$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Vpngateways$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Vpngateways$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Vpngateways$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Vpngateways$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$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/{project}/regions/{region}/vpnGateways') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.vpnGateways.setLabels + * @desc Sets the labels on a VpnGateway. To learn more about labels, read + * the Labeling Resources documentation. + * @alias compute.vpnGateways.setLabels + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().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. + * @return {object} Request object + */ + setLabels( + params?: Params$Resource$Vpngateways$Setlabels, + options?: MethodOptions): AxiosPromise; + setLabels( + params: Params$Resource$Vpngateways$Setlabels, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setLabels( + params: Params$Resource$Vpngateways$Setlabels, + callback: BodyResponseCallback): void; + setLabels(callback: BodyResponseCallback): void; + setLabels( + paramsOrCallback?: Params$Resource$Vpngateways$Setlabels| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Vpngateways$Setlabels; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$Setlabels; + 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}/vpnGateways/{resource}/setLabels') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.vpnGateways.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.vpnGateways.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 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$Vpngateways$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Vpngateways$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Vpngateways$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Vpngateways$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Vpngateways$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$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/alpha/projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Vpngateways$Aggregatedlist { + /** + * 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$Vpngateways$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for 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; + /** + * Name of the VPN gateway to delete. + */ + vpnGateway?: string; + } + export interface Params$Resource$Vpngateways$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for this request. + */ + region?: string; + /** + * Name of the VPN gateway to return. + */ + vpnGateway?: string; + } + export interface Params$Resource$Vpngateways$Insert { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for 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$VpnGateway; + } + export interface Params$Resource$Vpngateways$List { + /** + * 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 region for this request. + */ + region?: string; + } + export interface Params$Resource$Vpngateways$Setlabels { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The region for 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; + /** + * Name of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetLabelsRequest; + } + export interface Params$Resource$Vpngateways$Testiampermissions { + /** + * 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 of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + + export class Resource$Vpntunnels { root: Compute; constructor(root: Compute) { diff --git a/src/apis/compute/beta.ts b/src/apis/compute/beta.ts index c98da44f41e..0557505e771 100644 --- a/src/apis/compute/beta.ts +++ b/src/apis/compute/beta.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -1540,7 +1540,7 @@ export namespace compute_beta { * a Google account. * `allAuthenticatedUsers`: A special identifier that * represents anyone who is authenticated with a Google account or a service * account. * `user:{emailid}`: An email address that represents a specific - * Google account. For example, `alice@gmail.com` or `joe@example.com`. * + * 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 @@ -2227,6 +2227,12 @@ export namespace compute_beta { * [Output Only] Name of the resource. */ name?: string; + /** + * [Output Only] URL of the region where the disk type resides. Only + * applicable for regional resources. You must specify this field as part of + * the HTTP request URL. It is not settable as a field in the request body. + */ + region?: string; /** * [Output Only] Server-defined URL for the resource. */ @@ -6077,7 +6083,8 @@ export namespace compute_beta { */ export interface Schema$Operation { /** - * [Output Only] Reserved for future use. + * [Output Only] The value of `requestId` if you provided it in the request. + * Not present otherwise. */ clientOperationId?: string; /** @@ -6885,6 +6892,25 @@ export namespace compute_beta { */ labels?: any; } + 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). @@ -9998,8 +10024,7 @@ export namespace compute_beta { /** * compute.acceleratorTypes.get - * @desc Returns the specified accelerator type. Gets a list of available - * accelerator types by making a list() request. + * @desc Returns the specified accelerator type. * @example * * // BEFORE RUNNING: * // --------------- @@ -40707,7 +40732,7 @@ export namespace compute_beta { /** * compute.interconnects.get - * @desc Returns the specified interconnect. Gets a list of available + * @desc Returns the specified interconnect. Get a list of available * interconnects by making a list() request. * @example * * // BEFORE RUNNING: @@ -42002,7 +42027,7 @@ export namespace compute_beta { * compute.licenses.list * @desc Retrieves the list of licenses available in the specified project. * This method does not get any licenses that belong to other projects, - * including licenses attached to publicly-available images, like Debian 8. + * including licenses attached to publicly-available images, like Debian 9. * If you want to get a list of publicly-available licenses, use this method * to make a request to the respective image project, such as debian-cloud * or windows-cloud. @@ -62480,7 +62505,7 @@ export namespace compute_beta { * @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 of the resource for this request. - * @param {().Policy} params.resource Request body data + * @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 @@ -63177,7 +63202,7 @@ export namespace compute_beta { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$RegionSetPolicyRequest; } export interface Params$Resource$Subnetworks$Setprivateipgoogleaccess { /** diff --git a/src/apis/compute/v1.ts b/src/apis/compute/v1.ts index 1cea6762a46..4d353a21811 100644 --- a/src/apis/compute/v1.ts +++ b/src/apis/compute/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -86,6 +86,8 @@ export namespace compute_v1 { regionAutoscalers: Resource$Regionautoscalers; regionBackendServices: Resource$Regionbackendservices; regionCommitments: Resource$Regioncommitments; + regionDisks: Resource$Regiondisks; + regionDiskTypes: Resource$Regiondisktypes; regionInstanceGroupManagers: Resource$Regioninstancegroupmanagers; regionInstanceGroups: Resource$Regioninstancegroups; regionOperations: Resource$Regionoperations; @@ -144,6 +146,8 @@ export namespace compute_v1 { this.regionAutoscalers = new Resource$Regionautoscalers(this); this.regionBackendServices = new Resource$Regionbackendservices(this); this.regionCommitments = new Resource$Regioncommitments(this); + this.regionDisks = new Resource$Regiondisks(this); + this.regionDiskTypes = new Resource$Regiondisktypes(this); this.regionInstanceGroupManagers = new Resource$Regioninstancegroupmanagers(this); this.regionInstanceGroups = new Resource$Regioninstancegroups(this); @@ -1688,6 +1692,17 @@ export namespace compute_v1 { * Internal use only. */ options?: 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 + * request URL. It is not settable as a field in the request body. + */ + region?: string; + /** + * URLs of the zones where the disk should be replicated to. Only applicable + * for regional resources. + */ + replicaZones?: string[]; /** * [Output Only] Server-defined fully-qualified URL for this resource. */ @@ -1906,6 +1921,12 @@ export namespace compute_v1 { * [Output Only] Name of the resource. */ name?: string; + /** + * [Output Only] URL of the region where the disk type resides. Only + * applicable for regional resources. You must specify this field as part of + * the HTTP request URL. It is not settable as a field in the request body. + */ + region?: string; /** * [Output Only] Server-defined URL for the resource. */ @@ -5203,7 +5224,8 @@ export namespace compute_v1 { */ export interface Schema$Operation { /** - * [Output Only] Reserved for future use. + * [Output Only] The value of `requestId` if you provided it in the request. + * Not present otherwise. */ clientOperationId?: string; /** @@ -5671,6 +5693,43 @@ export namespace compute_v1 { */ warning?: any; } + export interface Schema$RegionDisksResizeRequest { + /** + * The new size of the regional persistent disk, which is specified in GB. + */ + sizeGb?: string; + } + export interface Schema$RegionDiskTypeList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string; + /** + * A list of DiskType resources. + */ + items?: Schema$DiskType[]; + /** + * [Output Only] Type of resource. Always compute#regionDiskTypeList for + * region disk types. + */ + 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?: any; + } /** * Contains a list of InstanceGroup resources. */ @@ -5879,6 +5938,21 @@ export namespace compute_v1 { */ warning?: any; } + export interface Schema$RegionSetLabelsRequest { + /** + * The fingerprint of the previous set of labels for this resource, used to + * 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 in order to update or + * change labels. Make a get() request to the resource to get the latest + * fingerprint. + */ + labelFingerprint?: string; + /** + * The labels to set for this resource. + */ + labels?: any; + } /** * Commitment for a particular resource (a Commitment is composed of one or * more of these). @@ -6838,6 +6912,10 @@ export namespace compute_v1 { * time. */ description?: string; + /** + * Whether to enable flow logging for this subnetwork. + */ + enableFlowLogs?: boolean; /** * Fingerprint of this resource. A hash of the contents stored in this * object. This field is used in optimistic locking. This field will be @@ -8608,8 +8686,7 @@ export namespace compute_v1 { /** * compute.acceleratorTypes.get - * @desc Returns the specified accelerator type. Gets a list of available - * accelerator types by making a list() request. + * @desc Returns the specified accelerator type. * @example * * // BEFORE RUNNING: * // --------------- @@ -27929,6 +28006,7 @@ export namespace compute_v1 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.forceAttach Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks. * @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). @@ -31155,6 +31233,11 @@ export namespace compute_v1 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Whether to force attach the disk even if it's currently attached to + * another instance. This is only available for regional disks. + */ + forceAttach?: boolean; /** * The instance name for this request. */ @@ -34154,7 +34237,7 @@ export namespace compute_v1 { /** * compute.interconnects.get - * @desc Returns the specified interconnect. Gets a list of available + * @desc Returns the specified interconnect. Get a list of available * interconnects by making a list() request. * @example * * // BEFORE RUNNING: @@ -35296,7 +35379,7 @@ export namespace compute_v1 { * compute.licenses.list * @desc Retrieves the list of licenses available in the specified project. * This method does not get any licenses that belong to other projects, - * including licenses attached to publicly-available images, like Debian 8. + * including licenses attached to publicly-available images, like Debian 9. * If you want to get a list of publicly-available licenses, use this method * to make a request to the respective image project, such as debian-cloud * or windows-cloud. @@ -42258,6 +42341,1110 @@ export namespace compute_v1 { } + export class Resource$Regiondisks { + root: Compute; + constructor(root: Compute) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * compute.regionDisks.createSnapshot + * @desc Creates a snapshot of this regional disk. + * @alias compute.regionDisks.createSnapshot + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.disk Name of the regional persistent disk to snapshot. + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of 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 {().Snapshot} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + createSnapshot( + params?: Params$Resource$Regiondisks$Createsnapshot, + options?: MethodOptions): AxiosPromise; + createSnapshot( + params: Params$Resource$Regiondisks$Createsnapshot, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + createSnapshot( + params: Params$Resource$Regiondisks$Createsnapshot, + callback: BodyResponseCallback): void; + createSnapshot(callback: BodyResponseCallback): void; + createSnapshot( + paramsOrCallback?: Params$Resource$Regiondisks$Createsnapshot| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Regiondisks$Createsnapshot; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$Createsnapshot; + 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}/disks/{disk}/createSnapshot') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'disk'], + pathParams: ['disk', 'project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDisks.delete + * @desc Deletes the specified regional persistent disk. Deleting a regional + * disk removes all the replicas of its data permanently and is + * irreversible. However, deleting a disk does not delete any snapshots + * previously made from the disk. You must separately delete snapshots. + * @alias compute.regionDisks.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.disk Name of the regional persistent disk to delete. + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of 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 {object} [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$Regiondisks$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Regiondisks$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Regiondisks$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Regiondisks$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisks$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$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}/regions/{region}/disks/{disk}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['project', 'region', 'disk'], + pathParams: ['disk', 'project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDisks.get + * @desc Returns a specified regional persistent disk. + * @alias compute.regionDisks.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.disk Name of the regional persistent disk to return. + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of the region 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$Regiondisks$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Regiondisks$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Regiondisks$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Regiondisks$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Regiondisks$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$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/v1/projects/{project}/regions/{region}/disks/{disk}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region', 'disk'], + pathParams: ['disk', 'project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDisks.insert + * @desc Creates a persistent regional disk in the specified project using + * the data included in the request. + * @alias compute.regionDisks.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of 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.sourceImage Optional. Source image to restore onto a disk. + * @param {().Disk} params.resource Request body data + * @param {object} [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$Regiondisks$Insert, + options?: MethodOptions): AxiosPromise; + insert( + params: Params$Resource$Regiondisks$Insert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + insert( + params: Params$Resource$Regiondisks$Insert, + callback: BodyResponseCallback): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: Params$Resource$Regiondisks$Insert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisks$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$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/v1/projects/{project}/regions/{region}/disks') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDisks.list + * @desc Retrieves the list of persistent disks contained within the + * specified region. + * @alias compute.regionDisks.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.region Name of the region 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$Regiondisks$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Regiondisks$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Regiondisks$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Regiondisks$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Regiondisks$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$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/v1/projects/{project}/regions/{region}/disks') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDisks.resize + * @desc Resizes the specified regional persistent disk. + * @alias compute.regionDisks.resize + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.disk Name of the regional persistent disk. + * @param {string} params.project The project ID for this request. + * @param {string} params.region Name of 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 {().RegionDisksResizeRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + resize( + params?: Params$Resource$Regiondisks$Resize, + options?: MethodOptions): AxiosPromise; + resize( + params: Params$Resource$Regiondisks$Resize, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + resize( + params: Params$Resource$Regiondisks$Resize, + callback: BodyResponseCallback): void; + resize(callback: BodyResponseCallback): void; + resize( + paramsOrCallback?: Params$Resource$Regiondisks$Resize| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisks$Resize; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$Resize; + 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}/disks/{disk}/resize') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'disk'], + pathParams: ['disk', 'project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDisks.setLabels + * @desc Sets the labels on the target regional disk. + * @alias compute.regionDisks.setLabels + * @memberOf! () + * + * @param {object} params Parameters for request + * @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 {().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. + * @return {object} Request object + */ + setLabels( + params?: Params$Resource$Regiondisks$Setlabels, + options?: MethodOptions): AxiosPromise; + setLabels( + params: Params$Resource$Regiondisks$Setlabels, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setLabels( + params: Params$Resource$Regiondisks$Setlabels, + callback: BodyResponseCallback): void; + setLabels(callback: BodyResponseCallback): void; + setLabels( + paramsOrCallback?: Params$Resource$Regiondisks$Setlabels| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisks$Setlabels; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$Setlabels; + 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}/disks/{resource}/setLabels') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDisks.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. + * @alias compute.regionDisks.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 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$Regiondisks$Testiampermissions, + options?: MethodOptions): AxiosPromise; + testIamPermissions( + params: Params$Resource$Regiondisks$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + testIamPermissions( + params: Params$Resource$Regiondisks$Testiampermissions, + callback: BodyResponseCallback): void; + testIamPermissions( + callback: BodyResponseCallback): void; + testIamPermissions( + paramsOrCallback?: Params$Resource$Regiondisks$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Regiondisks$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisks$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}/disks/{resource}/testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Regiondisks$Createsnapshot { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the regional persistent disk to snapshot. + */ + disk?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for 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$Snapshot; + } + export interface Params$Resource$Regiondisks$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the regional persistent disk to delete. + */ + disk?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for 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; + } + export interface Params$Resource$Regiondisks$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the regional persistent disk to return. + */ + disk?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for this request. + */ + region?: string; + } + export interface Params$Resource$Regiondisks$Insert { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for 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; + /** + * Optional. Source image to restore onto a disk. + */ + sourceImage?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Disk; + } + export interface Params$Resource$Regiondisks$List { + /** + * 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 region for this request. + */ + region?: string; + } + export interface Params$Resource$Regiondisks$Resize { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the regional persistent disk. + */ + disk?: string; + /** + * The project ID for this request. + */ + project?: string; + /** + * Name of the region for 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$RegionDisksResizeRequest; + } + export interface Params$Resource$Regiondisks$Setlabels { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Project ID for this request. + */ + project?: string; + /** + * The region for 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; + /** + * Name of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetLabelsRequest; + } + export interface Params$Resource$Regiondisks$Testiampermissions { + /** + * 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 of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + + + export class Resource$Regiondisktypes { + root: Compute; + constructor(root: Compute) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * compute.regionDiskTypes.get + * @desc Returns the specified regional disk type. Gets a list of available + * disk types by making a list() request. + * @alias compute.regionDiskTypes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.diskType Name of the disk type to return. + * @param {string} params.project Project ID for this request. + * @param {string} params.region The name of the region 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$Regiondisktypes$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Regiondisktypes$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Regiondisktypes$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Regiondisktypes$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisktypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisktypes$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/v1/projects/{project}/regions/{region}/diskTypes/{diskType}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region', 'diskType'], + pathParams: ['diskType', 'project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * compute.regionDiskTypes.list + * @desc Retrieves a list of regional disk types available to the specified + * project. + * @alias compute.regionDiskTypes.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.region The name of the region 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$Regiondisktypes$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Regiondisktypes$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Regiondisktypes$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Regiondisktypes$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Regiondisktypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiondisktypes$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/v1/projects/{project}/regions/{region}/diskTypes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Regiondisktypes$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the disk type to return. + */ + diskType?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + } + export interface Params$Resource$Regiondisktypes$List { + /** + * 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; + /** + * The name of the region for this request. + */ + region?: string; + } + + export class Resource$Regioninstancegroupmanagers { root: Compute; constructor(root: Compute) { diff --git a/src/apis/container/v1.ts b/src/apis/container/v1.ts index f9b7a5095aa..5d7187fe780 100644 --- a/src/apis/container/v1.ts +++ b/src/apis/container/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -309,8 +309,7 @@ export namespace container_v1 { */ masterAuth?: Schema$MasterAuth; /** - * Master authorized networks is a Beta feature. The configuration options - * for master authorized networks feature. + * The configuration options for master authorized networks feature. */ masterAuthorizedNetworksConfig?: Schema$MasterAuthorizedNetworksConfig; /** @@ -426,8 +425,7 @@ export namespace container_v1 { */ desiredLocations?: string[]; /** - * Master authorized networks is a Beta feature. The desired configuration - * options for master authorized networks feature. + * The desired configuration options for master authorized networks feature. */ desiredMasterAuthorizedNetworksConfig?: Schema$MasterAuthorizedNetworksConfig; @@ -819,11 +817,10 @@ export namespace container_v1 { username?: string; } /** - * Master authorized networks is a Beta feature. Configuration options for the - * master authorized networks feature. Enabled master authorized networks will - * disallow all external traffic to access Kubernetes master through HTTPS - * except traffic from the given CIDR blocks, Google Compute Engine Public IPs - * and Google Prod IPs. + * Configuration options for the master authorized networks feature. Enabled + * master authorized networks will disallow all external traffic to access + * Kubernetes master through HTTPS except traffic from the given CIDR blocks, + * Google Compute Engine Public IPs and Google Prod IPs. */ export interface Schema$MasterAuthorizedNetworksConfig { /** diff --git a/src/apis/container/v1beta1.ts b/src/apis/container/v1beta1.ts index 59e2132acf5..45917d06be6 100644 --- a/src/apis/container/v1beta1.ts +++ b/src/apis/container/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -768,6 +768,23 @@ export namespace container_v1beta1 { */ missingZones?: string[]; } + /** + * ListLocationsResponse returns the list of all GKE locations and their + * recommendation state. + */ + export interface Schema$ListLocationsResponse { + /** + * A full list of GKE locations. + */ + locations?: Schema$Location[]; + /** + * Only return ListLocationsResponse that occur after the page_token. This + * value should be populated from the ListLocationsResponse.next_page_token + * if that response token was set (which happens when listing more Locations + * than fit in a single ListLocationsResponse). + */ + nextPageToken?: string; + } /** * ListNodePoolsResponse is the result of ListNodePoolsRequest. */ @@ -808,6 +825,28 @@ export namespace container_v1beta1 { */ subnetworks?: Schema$UsableSubnetwork[]; } + /** + * Location returns the location name, and if the location is recommended for + * GKE cluster scheduling. + */ + export interface Schema$Location { + /** + * Contains the name of the resource requested. Specific in the format + * 'projects/x/locations/*'. + */ + 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. + */ + recommended?: boolean; + /** + * Contains the type of location this Location is for. Regional or Zonal. + */ + type?: string; + } /** * MaintenancePolicy defines the maintenance policy to be used for the * cluster. @@ -2132,6 +2171,73 @@ export namespace container_v1beta1 { return createAPIRequest(parameters); } } + + + /** + * container.projects.locations.list + * @alias container.projects.locations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Contains the name of the resource requested. Specific in the format 'projects/x/locations'. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Locations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://container.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/locations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Getserverconfig { @@ -2158,6 +2264,18 @@ export namespace container_v1beta1 { */ zone?: string; } + export interface Params$Resource$Projects$Locations$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Contains the name of the resource requested. Specific in the format + * 'projects/x/locations'. + */ + parent?: string; + } export class Resource$Projects$Locations$Clusters { root: Container; diff --git a/src/apis/content/v2.ts b/src/apis/content/v2.ts index 8ae730a252b..ea4a981c40d 100644 --- a/src/apis/content/v2.ts +++ b/src/apis/content/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -1601,6 +1601,14 @@ export namespace content_v2 { */ merchantId?: string; method?: string; + /** + * The account ID by which this merchant is known to the POS provider. + */ + posExternalAccountId?: string; + /** + * The ID of POS provider. Required only for SetPosProvider. + */ + posProviderId?: string; } export interface Schema$LiasettingsCustomBatchResponse { /** @@ -1635,6 +1643,10 @@ export namespace content_v2 { * The retrieved or updated Lia settings. */ liaSettings?: Schema$LiaSettings; + /** + * The list of POS providers. + */ + posProviders?: Schema$PosProviders[]; } export interface Schema$LiasettingsGetAccessibleGmbAccountsResponse { /** @@ -3424,6 +3436,30 @@ export namespace content_v2 { kind?: string; resources?: Schema$PosStore[]; } + export interface Schema$PosProviders { + /** + * Country code. + */ + country?: string; + /** + * A list of POS providers. + */ + posProviders?: Schema$PosProvidersPosProvider[]; + } + export interface Schema$PosProvidersPosProvider { + /** + * The display name of Pos Provider. + */ + displayName?: string; + /** + * The full name of this POS Provider. + */ + fullName?: string; + /** + * The ID of the account. + */ + providerId?: string; + } /** * The change of the available quantity of an item at the given store. */ diff --git a/src/apis/content/v2sandbox.ts b/src/apis/content/v2sandbox.ts index 9a39d795c22..58adf633ba9 100644 --- a/src/apis/content/v2sandbox.ts +++ b/src/apis/content/v2sandbox.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/customsearch/v1.ts b/src/apis/customsearch/v1.ts index aec4fbfd543..b8d35ea025a 100644 --- a/src/apis/customsearch/v1.ts +++ b/src/apis/customsearch/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dataflow/v1b3.ts b/src/apis/dataflow/v1b3.ts index a50eb075550..b417bfb7a49 100644 --- a/src/apis/dataflow/v1b3.ts +++ b/src/apis/dataflow/v1b3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dataproc/v1.ts b/src/apis/dataproc/v1.ts index 27115bdb904..c46c2dec24e 100644 --- a/src/apis/dataproc/v1.ts +++ b/src/apis/dataproc/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dataproc/v1beta2.ts b/src/apis/dataproc/v1beta2.ts index 5b91fef124d..58f3a918405 100644 --- a/src/apis/dataproc/v1beta2.ts +++ b/src/apis/dataproc/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/datastore/v1.ts b/src/apis/datastore/v1.ts index 5f2d5269827..14234c7f482 100644 --- a/src/apis/datastore/v1.ts +++ b/src/apis/datastore/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -1528,24 +1528,23 @@ export namespace datastore_v1 { } - /** - * datastore.projects.import - * @desc Imports entities into Google Cloud Datastore. Existing entities - * with the same key are overwritten. The import occurs in the background - * and its progress can be monitored and managed via the Operation resource - * that is created. If an ImportEntities operation is cancelled, it is - * possible that a subset of the data has already been imported to Cloud - * Datastore. - * @alias datastore.projects.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.projectId Project ID against which to make the request. - * @param {().GoogleDatastoreAdminV1ImportEntitiesRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * datastore.projects.import + * @desc Imports entities into Google Cloud Datastore. Existing entities with + * the same key are overwritten. The import occurs in the background and its + * progress can be monitored and managed via the Operation resource that is + * created. If an ImportEntities operation is cancelled, it is possible that a + * subset of the data has already been imported to Cloud Datastore. + * @alias datastore.projects.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.projectId Project ID against which to make the request. + * @param {().GoogleDatastoreAdminV1ImportEntitiesRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Projects$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Projects$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Projects$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/datastore/v1beta1.ts b/src/apis/datastore/v1beta1.ts index 4acefcd1b54..fd6afed3b50 100644 --- a/src/apis/datastore/v1beta1.ts +++ b/src/apis/datastore/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -589,24 +589,23 @@ export namespace datastore_v1beta1 { } - /** - * datastore.projects.import - * @desc Imports entities into Google Cloud Datastore. Existing entities - * with the same key are overwritten. The import occurs in the background - * and its progress can be monitored and managed via the Operation resource - * that is created. If an ImportEntities operation is cancelled, it is - * possible that a subset of the data has already been imported to Cloud - * Datastore. - * @alias datastore.projects.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.projectId Project ID against which to make the request. - * @param {().GoogleDatastoreAdminV1beta1ImportEntitiesRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * datastore.projects.import + * @desc Imports entities into Google Cloud Datastore. Existing entities with + * the same key are overwritten. The import occurs in the background and its + * progress can be monitored and managed via the Operation resource that is + * created. If an ImportEntities operation is cancelled, it is possible that a + * subset of the data has already been imported to Cloud Datastore. + * @alias datastore.projects.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.projectId Project ID against which to make the request. + * @param {().GoogleDatastoreAdminV1beta1ImportEntitiesRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Projects$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Projects$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Projects$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/datastore/v1beta3.ts b/src/apis/datastore/v1beta3.ts index f2512a13212..7c7ffbbf69b 100644 --- a/src/apis/datastore/v1beta3.ts +++ b/src/apis/datastore/v1beta3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/deploymentmanager/alpha.ts b/src/apis/deploymentmanager/alpha.ts index a56ad39c399..4d4a4b3bc2d 100644 --- a/src/apis/deploymentmanager/alpha.ts +++ b/src/apis/deploymentmanager/alpha.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -187,7 +187,7 @@ export namespace deploymentmanager_alpha { * a Google account. * `allAuthenticatedUsers`: A special identifier that * represents anyone who is authenticated with a Google account or a service * account. * `user:{emailid}`: An email address that represents a specific - * Google account. For example, `alice@gmail.com` or `joe@example.com`. * + * 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 @@ -560,6 +560,25 @@ export namespace deploymentmanager_alpha { */ title?: string; } + export interface Schema$GlobalSetPolicyRequest { + /** + * 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 interface Schema$ImportFile { /** * The contents of the file. @@ -748,7 +767,8 @@ export namespace deploymentmanager_alpha { */ export interface Schema$Operation { /** - * [Output Only] Reserved for future use. + * [Output Only] The value of `requestId` if you provided it in the request. + * Not present otherwise. */ clientOperationId?: string; /** @@ -908,17 +928,20 @@ export namespace deploymentmanager_alpha { /** * 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 + * consists of a list of `bindings`. A `binding` binds a list of `members` to * a `role`, where the members can be user accounts, Google groups, Google * domains, and service accounts. A `role` is a named list of permissions - * defined by IAM. **Example** { "bindings": [ { "role": - * "roles/owner", "members": [ + * 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", ] }, { + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { * "role": "roles/viewer", "members": - * ["user:sean@example.com"] } ] } For a description of IAM and its - * features, see the [IAM developer's + * ["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 { @@ -2542,7 +2565,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 {().Policy} params.resource Request body data + * @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 @@ -3033,7 +3056,7 @@ export namespace deploymentmanager_alpha { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Deployments$Stop { /** diff --git a/src/apis/deploymentmanager/v2.ts b/src/apis/deploymentmanager/v2.ts index 0c68efe5ee9..1b4d412a3d9 100644 --- a/src/apis/deploymentmanager/v2.ts +++ b/src/apis/deploymentmanager/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -161,7 +161,7 @@ export namespace deploymentmanager_v2 { * a Google account. * `allAuthenticatedUsers`: A special identifier that * represents anyone who is authenticated with a Google account or a service * account. * `user:{emailid}`: An email address that represents a specific - * Google account. For example, `alice@gmail.com` or `joe@example.com`. * + * 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 @@ -382,6 +382,25 @@ export namespace deploymentmanager_v2 { */ title?: string; } + export interface Schema$GlobalSetPolicyRequest { + /** + * 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 interface Schema$ImportFile { /** * The contents of the file. @@ -518,7 +537,8 @@ export namespace deploymentmanager_v2 { */ export interface Schema$Operation { /** - * [Output Only] Reserved for future use. + * [Output Only] The value of `requestId` if you provided it in the request. + * Not present otherwise. */ clientOperationId?: string; /** @@ -655,17 +675,20 @@ export namespace deploymentmanager_v2 { /** * 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 + * consists of a list of `bindings`. A `binding` binds a list of `members` to * a `role`, where the members can be user accounts, Google groups, Google * domains, and service accounts. A `role` is a named list of permissions - * defined by IAM. **Example** { "bindings": [ { "role": - * "roles/owner", "members": [ + * 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", ] }, { + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { * "role": "roles/viewer", "members": - * ["user:sean@example.com"] } ] } For a description of IAM and its - * features, see the [IAM developer's + * ["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 { @@ -1922,7 +1945,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 {().Policy} params.resource Request body data + * @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 @@ -2593,7 +2616,7 @@ export namespace deploymentmanager_v2 { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Deployments$Stop { /** diff --git a/src/apis/deploymentmanager/v2beta.ts b/src/apis/deploymentmanager/v2beta.ts index 9d4b56c790b..2aeac89783d 100644 --- a/src/apis/deploymentmanager/v2beta.ts +++ b/src/apis/deploymentmanager/v2beta.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -208,7 +208,7 @@ export namespace deploymentmanager_v2beta { * a Google account. * `allAuthenticatedUsers`: A special identifier that * represents anyone who is authenticated with a Google account or a service * account. * `user:{emailid}`: An email address that represents a specific - * Google account. For example, `alice@gmail.com` or `joe@example.com`. * + * 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 @@ -538,6 +538,25 @@ export namespace deploymentmanager_v2beta { */ title?: string; } + export interface Schema$GlobalSetPolicyRequest { + /** + * 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 interface Schema$ImportFile { /** * The contents of the file. @@ -696,7 +715,8 @@ export namespace deploymentmanager_v2beta { */ export interface Schema$Operation { /** - * [Output Only] Reserved for future use. + * [Output Only] The value of `requestId` if you provided it in the request. + * Not present otherwise. */ clientOperationId?: string; /** @@ -860,17 +880,20 @@ export namespace deploymentmanager_v2beta { /** * 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 + * consists of a list of `bindings`. A `binding` binds a list of `members` to * a `role`, where the members can be user accounts, Google groups, Google * domains, and service accounts. A `role` is a named list of permissions - * defined by IAM. **Example** { "bindings": [ { "role": - * "roles/owner", "members": [ + * 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", ] }, { + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { * "role": "roles/viewer", "members": - * ["user:sean@example.com"] } ] } For a description of IAM and its - * features, see the [IAM developer's + * ["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 { @@ -2474,7 +2497,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 {().Policy} params.resource Request body data + * @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 @@ -2965,7 +2988,7 @@ export namespace deploymentmanager_v2beta { /** * Request body metadata */ - requestBody?: Schema$Policy; + requestBody?: Schema$GlobalSetPolicyRequest; } export interface Params$Resource$Deployments$Stop { /** diff --git a/src/apis/dfareporting/v2.8.ts b/src/apis/dfareporting/v2.8.ts index 79482603932..cc356501313 100644 --- a/src/apis/dfareporting/v2.8.ts +++ b/src/apis/dfareporting/v2.8.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dfareporting/v3.0.ts b/src/apis/dfareporting/v3.0.ts index 854d2401f73..5d21cdffb20 100644 --- a/src/apis/dfareporting/v3.0.ts +++ b/src/apis/dfareporting/v3.0.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dialogflow/v2.ts b/src/apis/dialogflow/v2.ts index 8463d4b9498..a270bdd4a58 100644 --- a/src/apis/dialogflow/v2.ts +++ b/src/apis/dialogflow/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -481,11 +481,11 @@ export namespace dialogflow_v2 { * Note: If `ml_enabled` setting is set to false, then this intent is not * taken into account during inference in `ML ONLY` match mode. Also, * auto-markup in the UI is turned off. DEPRECATED! Please use `ml_disabled` - * field instead. NOTE: If neither `ml_enabled` nor `ml_disabled` field is - * set, then the default value is determined as follows: - Before April - * 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - - * After April 15th, 2018 the default is: ml_enabled = true / ml_disabled - * = false. + * field instead. NOTE: If both `ml_enabled` and `ml_disabled` are either + * not set or false, then the default value is determined as follows: - + * Before April 15th, 2018 the default is: ml_enabled = false / + * ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled + * = true / ml_disabled = false. */ mlEnabled?: boolean; /** @@ -730,8 +730,8 @@ export namespace dialogflow_v2 { */ export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageImage { /** - * Optional. A text description of the image to be used for accessibility, - * e.g., screen readers. + * A text description of the image to be used for accessibility, e.g., + * screen readers. Required if image_uri is set for CarouselSelect. */ accessibilityText?: string; /** @@ -1303,8 +1303,10 @@ export namespace dialogflow_v2 { */ export interface Schema$GoogleCloudDialogflowV2ExportAgentRequest { /** - * Optional. The Google Cloud Storage URI to export the agent to. Note: The - * URI must start with "gs://". If left unspecified, the + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be + * `gs://<bucket-name>/<object-name>`. If left unspecified, the * serialized agent is returned inline. */ agentUri?: string; @@ -2614,23 +2616,23 @@ export namespace dialogflow_v2 { } - /** - * dialogflow.projects.agent.import - * @desc Imports the specified agent from a ZIP file. Uploads new intents - * and entity types without deleting the existing ones. Intents and entity - * types with the same name are replaced with the new versions from - * ImportAgentRequest. Operation - * @alias dialogflow.projects.agent.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.parent Required. The project that the agent to import is associated with. Format: `projects/`. - * @param {().GoogleCloudDialogflowV2ImportAgentRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * dialogflow.projects.agent.import + * @desc Imports the specified agent from a ZIP file. Uploads new intents and + * entity types without deleting the existing ones. Intents and entity types + * with the same name are replaced with the new versions from + * ImportAgentRequest. Operation + * @alias dialogflow.projects.agent.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project that the agent to import is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2ImportAgentRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Projects$Agent$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Projects$Agent$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Projects$Agent$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/dialogflow/v2beta1.ts b/src/apis/dialogflow/v2beta1.ts index c248b7184a9..db0f22f9c81 100644 --- a/src/apis/dialogflow/v2beta1.ts +++ b/src/apis/dialogflow/v2beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -456,8 +456,10 @@ export namespace dialogflow_v2beta1 { */ export interface Schema$GoogleCloudDialogflowV2beta1ExportAgentRequest { /** - * Optional. The Google Cloud Storage URI to export the agent to. Note: The - * URI must start with "gs://". If left unspecified, the + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be + * `gs://<bucket-name>/<object-name>`. If left unspecified, the * serialized agent is returned inline. */ agentUri?: string; @@ -594,11 +596,11 @@ export namespace dialogflow_v2beta1 { * Note: If `ml_enabled` setting is set to false, then this intent is not * taken into account during inference in `ML ONLY` match mode. Also, * auto-markup in the UI is turned off. DEPRECATED! Please use `ml_disabled` - * field instead. NOTE: If neither `ml_enabled` nor `ml_disabled` field is - * set, then the default value is determined as follows: - Before April - * 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - - * After April 15th, 2018 the default is: ml_enabled = true / ml_disabled - * = false. + * field instead. NOTE: If both `ml_enabled` and `ml_disabled` are either + * not set or false, then the default value is determined as follows: - + * Before April 15th, 2018 the default is: ml_enabled = false / + * ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled + * = true / ml_disabled = false. */ mlEnabled?: boolean; /** @@ -852,8 +854,8 @@ export namespace dialogflow_v2beta1 { */ export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageImage { /** - * Optional. A text description of the image to be used for accessibility, - * e.g., screen readers. + * A text description of the image to be used for accessibility, e.g., + * screen readers. Required if image_uri is set for CarouselSelect. */ accessibilityText?: string; /** @@ -2627,23 +2629,23 @@ export namespace dialogflow_v2beta1 { } - /** - * dialogflow.projects.agent.import - * @desc Imports the specified agent from a ZIP file. Uploads new intents - * and entity types without deleting the existing ones. Intents and entity - * types with the same name are replaced with the new versions from - * ImportAgentRequest. Operation - * @alias dialogflow.projects.agent.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.parent Required. The project that the agent to import is associated with. Format: `projects/`. - * @param {().GoogleCloudDialogflowV2beta1ImportAgentRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * dialogflow.projects.agent.import + * @desc Imports the specified agent from a ZIP file. Uploads new intents and + * entity types without deleting the existing ones. Intents and entity types + * with the same name are replaced with the new versions from + * ImportAgentRequest. Operation + * @alias dialogflow.projects.agent.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project that the agent to import is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1ImportAgentRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Projects$Agent$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Projects$Agent$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Projects$Agent$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/digitalassetlinks/v1.ts b/src/apis/digitalassetlinks/v1.ts index bad6b19830f..91d7882fd4f 100644 --- a/src/apis/digitalassetlinks/v1.ts +++ b/src/apis/digitalassetlinks/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/discovery/v1.ts b/src/apis/discovery/v1.ts index 14c075cbb4d..fe9a7501bfb 100644 --- a/src/apis/discovery/v1.ts +++ b/src/apis/discovery/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dlp/v2.ts b/src/apis/dlp/v2.ts index c73c436900f..8f1ace0fce1 100644 --- a/src/apis/dlp/v2.ts +++ b/src/apis/dlp/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -363,7 +363,7 @@ export namespace dlp_v2 { fileTypes?: string[]; } /** - * Message representing a path in Cloud Storage. + * Message representing a single file or path in Cloud Storage. */ export interface Schema$GooglePrivacyDlpV2CloudStoragePath { /** diff --git a/src/apis/dns/v1.ts b/src/apis/dns/v1.ts index 4f9b951918e..e8bac0cc8fb 100644 --- a/src/apis/dns/v1.ts +++ b/src/apis/dns/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dns/v1beta2.ts b/src/apis/dns/v1beta2.ts index 59677f8bdfe..4ae29fdb09b 100644 --- a/src/apis/dns/v1beta2.ts +++ b/src/apis/dns/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/dns/v2beta1.ts b/src/apis/dns/v2beta1.ts index b79311a24af..ed2ad0b9ecf 100644 --- a/src/apis/dns/v2beta1.ts +++ b/src/apis/dns/v2beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/doubleclickbidmanager/v1.ts b/src/apis/doubleclickbidmanager/v1.ts index 68454a5c367..5e8f4396ea0 100644 --- a/src/apis/doubleclickbidmanager/v1.ts +++ b/src/apis/doubleclickbidmanager/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/doubleclicksearch/v2.ts b/src/apis/doubleclicksearch/v2.ts index 90fa521f682..9d7e5461c34 100644 --- a/src/apis/doubleclicksearch/v2.ts +++ b/src/apis/doubleclicksearch/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/drive/v2.ts b/src/apis/drive/v2.ts index 58659043968..b5eb51deff4 100644 --- a/src/apis/drive/v2.ts +++ b/src/apis/drive/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/drive/v3.ts b/src/apis/drive/v3.ts index ed707d038b3..4fcc34cd86b 100644 --- a/src/apis/drive/v3.ts +++ b/src/apis/drive/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/firebasedynamiclinks/v1.ts b/src/apis/firebasedynamiclinks/v1.ts index b22f84f75f7..3460ed450f1 100644 --- a/src/apis/firebasedynamiclinks/v1.ts +++ b/src/apis/firebasedynamiclinks/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/firebaserules/v1.ts b/src/apis/firebaserules/v1.ts index 3a9a0884381..a6e8bd69531 100644 --- a/src/apis/firebaserules/v1.ts +++ b/src/apis/firebaserules/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/firestore/v1beta1.ts b/src/apis/firestore/v1beta1.ts index 28cf3124d3c..2c9dcfa80f8 100644 --- a/src/apis/firestore/v1beta1.ts +++ b/src/apis/firestore/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/fitness/v1.ts b/src/apis/fitness/v1.ts index 9a9bce51bbb..bf8ade4c424 100644 --- a/src/apis/fitness/v1.ts +++ b/src/apis/fitness/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/fusiontables/v1.ts b/src/apis/fusiontables/v1.ts index 87074333ac5..3b91df586f8 100644 --- a/src/apis/fusiontables/v1.ts +++ b/src/apis/fusiontables/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/fusiontables/v2.ts b/src/apis/fusiontables/v2.ts index c61d184ddb6..1f544d2b768 100644 --- a/src/apis/fusiontables/v2.ts +++ b/src/apis/fusiontables/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/games/v1.ts b/src/apis/games/v1.ts index 6774f3c64fb..a8865bd71e4 100644 --- a/src/apis/games/v1.ts +++ b/src/apis/games/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/gamesConfiguration/v1configuration.ts b/src/apis/gamesConfiguration/v1configuration.ts index 88d27f7070e..c7c7e3a5c0a 100644 --- a/src/apis/gamesConfiguration/v1configuration.ts +++ b/src/apis/gamesConfiguration/v1configuration.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/gamesManagement/v1management.ts b/src/apis/gamesManagement/v1management.ts index 8009f226ffc..daaaf84f065 100644 --- a/src/apis/gamesManagement/v1management.ts +++ b/src/apis/gamesManagement/v1management.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/genomics/v1.ts b/src/apis/genomics/v1.ts index a90526c1957..1acae86d1e2 100644 --- a/src/apis/genomics/v1.ts +++ b/src/apis/genomics/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -6664,81 +6664,78 @@ export namespace genomics_v1 { } - /** - * genomics.readgroupsets.import - * @desc Creates read group sets by asynchronously importing the provided - * information. The caller must have WRITE permissions to the dataset. ## - * Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - - * Tags will be converted to strings - tag types are not preserved - - * Comments (`@CO`) in the input file header will not be preserved - - * Original header order of references (`@SQ`) will not be preserved - Any - * reverse stranded unmapped reads will be reverse complemented, and their - * qualities (also the "BQ" and "OQ" tags, if any) will be reversed - - * Unmapped reads will be stripped of positional information (reference name - * and position) - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Genomics API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/genomics - * // 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 genomics = google.genomics('v1'); - * - * authorize(function(authClient) { - * var request = { - * resource: { - * // TODO: Add desired properties to the request body. - * }, - * - * auth: authClient, - * }; - * - * genomics.readgroupsets.import(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 genomics.readgroupsets.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {().ImportReadGroupSetsRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * genomics.readgroupsets.import + * @desc Creates read group sets by asynchronously importing the provided + * information. The caller must have WRITE permissions to the dataset. ## + * Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - Tags + * will be converted to strings - tag types are not preserved - Comments (`@CO`) + * in the input file header will not be preserved - Original header order of + * references (`@SQ`) will not be preserved - Any reverse stranded unmapped + * reads will be reverse complemented, and their qualities (also the "BQ" and + * "OQ" tags, if any) will be reversed - Unmapped reads will be stripped of + * positional information (reference name and position) + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Genomics API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/genomics + * // 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 genomics = google.genomics('v1'); + * + * authorize(function(authClient) { + * var request = { + * resource: { + * // TODO: Add desired properties to the request body. + * }, + * + * auth: authClient, + * }; + * + * genomics.readgroupsets.import(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 genomics.readgroupsets.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().ImportReadGroupSetsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Readgroupsets$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Readgroupsets$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Readgroupsets$Import, callback: BodyResponseCallback): void; @@ -8632,82 +8629,79 @@ import(paramsOrCallback?: Params$Resource$Readgroupsets$Import|BodyResponseCallb } - /** - * genomics.variants.import - * @desc Creates variant data by asynchronously importing the provided - * information. The variants for import will be merged with any existing - * variant that matches its reference sequence, start, end, reference bases, - * and alternative bases. If no such variant exists, a new one will be - * created. When variants are merged, the call information from the new - * variant is added to the existing variant, and Variant info fields are - * merged as specified in infoMergeConfig. As a special case, for - * single-sample VCF files, QUAL and FILTER fields will be moved to the call - * level; these are sometimes interpreted in a call-specific context. - * Imported VCF headers are appended to the metadata already in a variant - * set. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Genomics API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/genomics - * // 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 genomics = google.genomics('v1'); - * - * authorize(function(authClient) { - * var request = { - * resource: { - * // TODO: Add desired properties to the request body. - * }, - * - * auth: authClient, - * }; - * - * genomics.variants.import(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 genomics.variants.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {().ImportVariantsRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * genomics.variants.import + * @desc Creates variant data by asynchronously importing the provided + * information. The variants for import will be merged with any existing + * variant that matches its reference sequence, start, end, reference bases, and + * alternative bases. If no such variant exists, a new one will be created. When + * variants are merged, the call information from the new variant is added to + * the existing variant, and Variant info fields are merged as specified in + * infoMergeConfig. As a special case, for single-sample VCF files, QUAL and + * FILTER fields will be moved to the call level; these are sometimes + * interpreted in a call-specific context. Imported VCF headers are appended to + * the metadata already in a variant set. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Genomics API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/genomics + * // 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 genomics = google.genomics('v1'); + * + * authorize(function(authClient) { + * var request = { + * resource: { + * // TODO: Add desired properties to the request body. + * }, + * + * auth: authClient, + * }; + * + * genomics.variants.import(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 genomics.variants.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().ImportVariantsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Variants$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Variants$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Variants$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/genomics/v1alpha2.ts b/src/apis/genomics/v1alpha2.ts index b90eda3de16..2857c9fc499 100644 --- a/src/apis/genomics/v1alpha2.ts +++ b/src/apis/genomics/v1alpha2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/genomics/v2alpha1.ts b/src/apis/genomics/v2alpha1.ts index 36ce5fcd981..19e2eb02baf 100644 --- a/src/apis/genomics/v2alpha1.ts +++ b/src/apis/genomics/v2alpha1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/gmail/v1.ts b/src/apis/gmail/v1.ts index 5ce322fbe5c..f3b9fa78d82 100644 --- a/src/apis/gmail/v1.ts +++ b/src/apis/gmail/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -2687,28 +2687,28 @@ export namespace gmail_v1 { } - /** - * gmail.users.messages.import - * @desc Imports a message into only this user's mailbox, with standard - * email delivery scanning and classification similar to receiving via SMTP. - * Does not send a message. - * @alias gmail.users.messages.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {boolean=} params.deleted Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts. - * @param {string=} params.internalDateSource Source for Gmail's internal date of the message. - * @param {boolean=} params.neverMarkSpam Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. - * @param {boolean=} params.processForCalendar Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. - * @param {string} params.userId The user's email address. The special value me can be used to indicate the authenticated user. - * @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 - */ +/** + * gmail.users.messages.import + * @desc Imports a message into only this user's mailbox, with standard email + * delivery scanning and classification similar to receiving via SMTP. Does not + * send a message. + * @alias gmail.users.messages.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.deleted Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts. + * @param {string=} params.internalDateSource Source for Gmail's internal date of the message. + * @param {boolean=} params.neverMarkSpam Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. + * @param {boolean=} params.processForCalendar Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. + * @param {string} params.userId The user's email address. The special value me can be used to indicate the authenticated user. + * @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 + */ import(params?: Params$Resource$Users$Messages$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Users$Messages$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Users$Messages$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/groupsmigration/v1.ts b/src/apis/groupsmigration/v1.ts index 50b4558b47c..01d9ac49f3d 100644 --- a/src/apis/groupsmigration/v1.ts +++ b/src/apis/groupsmigration/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/groupssettings/v1.ts b/src/apis/groupssettings/v1.ts index d59a86dc519..1edb70c298e 100644 --- a/src/apis/groupssettings/v1.ts +++ b/src/apis/groupssettings/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/iam/v1.ts b/src/apis/iam/v1.ts index 07de92d114f..733432b0bee 100644 --- a/src/apis/iam/v1.ts +++ b/src/apis/iam/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/identitytoolkit/v3.ts b/src/apis/identitytoolkit/v3.ts index f517c43a004..78d3d7c63e7 100644 --- a/src/apis/identitytoolkit/v3.ts +++ b/src/apis/identitytoolkit/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/index.ts b/src/apis/index.ts index fc734d452f6..30139112c7d 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -16,7 +16,7 @@ import * as path from 'path'; import * as util from 'util'; -import {ServiceOptions} from '../lib/api'; +import {ServiceOptions} from '../shared/api'; import {abusiveexperiencereport_v1} from './abusiveexperiencereport/v1'; import {acceleratedmobilepageurl_v1} from './acceleratedmobilepageurl/v1'; @@ -42,6 +42,7 @@ import {androidmanagement_v1} from './androidmanagement/v1'; import {androidpublisher_v1} from './androidpublisher/v1'; import {androidpublisher_v1_1} from './androidpublisher/v1.1'; import {androidpublisher_v2} from './androidpublisher/v2'; +import {androidpublisher_v3} from './androidpublisher/v3'; import {appengine_v1} from './appengine/v1'; import {appengine_v1alpha} from './appengine/v1alpha'; import {appengine_v1beta} from './appengine/v1beta'; @@ -124,6 +125,7 @@ import {groupsmigration_v1} from './groupsmigration/v1'; import {groupssettings_v1} from './groupssettings/v1'; import {iam_v1} from './iam/v1'; import {identitytoolkit_v3} from './identitytoolkit/v3'; +import {jobs_v2} from './jobs/v2'; import {kgsearch_v1} from './kgsearch/v1'; import {language_v1} from './language/v1'; import {language_v1beta1} from './language/v1beta1'; @@ -145,6 +147,7 @@ import {pagespeedonline_v2} from './pagespeedonline/v2'; import {pagespeedonline_v4} from './pagespeedonline/v4'; import {partners_v2} from './partners/v2'; import {people_v1} from './people/v1'; +import {photoslibrary_v1} from './photoslibrary/v1'; import {playcustomapp_v1} from './playcustomapp/v1'; import {plus_v1} from './plus/v1'; import {plusDomains_v1} from './plusDomains/v1'; @@ -273,6 +276,7 @@ export const APIS: APIList = { 'v1.1': androidpublisher_v1_1.Androidpublisher, 'v1': androidpublisher_v1.Androidpublisher, 'v2': androidpublisher_v2.Androidpublisher, + 'v3': androidpublisher_v3.Androidpublisher, }, appengine: { 'v1': appengine_v1.Appengine, @@ -464,6 +468,9 @@ export const APIS: APIList = { identitytoolkit: { 'v3': identitytoolkit_v3.Identitytoolkit, }, + jobs: { + 'v2': jobs_v2.Jobs, + }, kgsearch: { 'v1': kgsearch_v1.Kgsearch, }, @@ -511,6 +518,9 @@ export const APIS: APIList = { people: { 'v1': people_v1.People, }, + photoslibrary: { + 'v1': photoslibrary_v1.Photoslibrary, + }, playcustomapp: { 'v1': playcustomapp_v1.Playcustomapp, }, @@ -847,13 +857,18 @@ export class GeneratedAPIs { androidpublisher(version: 'v2'): androidpublisher_v2.Androidpublisher; androidpublisher(options: androidpublisher_v2.Options): androidpublisher_v2.Androidpublisher; + androidpublisher(version: 'v3'): androidpublisher_v3.Androidpublisher; + androidpublisher(options: androidpublisher_v3.Options): + androidpublisher_v3.Androidpublisher; androidpublisher< T = androidpublisher_v1_1.Androidpublisher | androidpublisher_v1.Androidpublisher | - androidpublisher_v2.Androidpublisher>( + androidpublisher_v2.Androidpublisher | + androidpublisher_v3.Androidpublisher>( versionOrOptions: 'v1_1'| androidpublisher_v1_1.Options|'v1'| - androidpublisher_v1.Options|'v2'|androidpublisher_v2.Options) { + androidpublisher_v1.Options|'v2'| + androidpublisher_v2.Options|'v3'|androidpublisher_v3.Options) { return this.getAPI('androidpublisher', versionOrOptions); } appengine(version: 'v1'): appengine_v1.Appengine; @@ -1309,6 +1324,11 @@ export class GeneratedAPIs { versionOrOptions: 'v3'|identitytoolkit_v3.Options) { return this.getAPI('identitytoolkit', versionOrOptions); } + jobs(version: 'v2'): jobs_v2.Jobs; + jobs(options: jobs_v2.Options): jobs_v2.Jobs; + jobs(versionOrOptions: 'v2'|jobs_v2.Options) { + return this.getAPI('jobs', versionOrOptions); + } kgsearch(version: 'v1'): kgsearch_v1.Kgsearch; kgsearch(options: kgsearch_v1.Options): kgsearch_v1.Kgsearch; kgsearch(versionOrOptions: 'v1'| @@ -1415,6 +1435,13 @@ export class GeneratedAPIs { people(versionOrOptions: 'v1'|people_v1.Options) { return this.getAPI('people', versionOrOptions); } + photoslibrary(version: 'v1'): photoslibrary_v1.Photoslibrary; + photoslibrary(options: photoslibrary_v1.Options): + photoslibrary_v1.Photoslibrary; + photoslibrary(versionOrOptions: 'v1'| + photoslibrary_v1.Options) { + return this.getAPI('photoslibrary', versionOrOptions); + } playcustomapp(version: 'v1'): playcustomapp_v1.Playcustomapp; playcustomapp(options: playcustomapp_v1.Options): playcustomapp_v1.Playcustomapp; diff --git a/src/apis/jobs/v2.ts b/src/apis/jobs/v2.ts new file mode 100644 index 00000000000..52b352f9cd4 --- /dev/null +++ b/src/apis/jobs/v2.ts @@ -0,0 +1,3648 @@ +/** + * 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 {GoogleApis} from '../..'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; + +// TODO: We will eventually get the `any` in here cleared out, but in the +// interim we want to turn on no-implicit-any. + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace jobs_v2 { + export interface Options extends GlobalOptions { + version: 'v2'; + } + + /** + * Cloud Job Discovery + * + * Cloud Job Discovery provides the capability to create, read, update, and + * delete job postings, as well as search jobs based on keywords and filters. + * + * @example + * const google = require('googleapis'); + * const jobs = google.jobs('v2'); + * + * @namespace jobs + * @type {Function} + * @version v2 + * @variation v2 + * @param {object=} options Options for Jobs + */ + export class Jobs { + _options: GlobalOptions; + google: GoogleApis; + root = this; + + companies: Resource$Companies; + jobs: Resource$Jobs; + v2: Resource$V2; + + constructor(options: GlobalOptions, google: GoogleApis) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.companies = new Resource$Companies(this); + this.jobs = new Resource$Jobs(this); + this.v2 = new Resource$V2(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Input only. Batch delete jobs request. + */ + export interface Schema$BatchDeleteJobsRequest { + /** + * Required. The filter string specifies the jobs to be deleted. Supported + * operator: =, AND The fields eligible for filtering are: * `companyName` + * (Required) * `requisitionId` (Required) Sample Query: companyName = + * "companies/123" AND requisitionId = "req-1" + */ + filter?: string; + } + /** + * Represents count of jobs within one bucket. + */ + export interface Schema$BucketizedCount { + /** + * Number of jobs whose numeric field value fall into `range`. + */ + count?: number; + /** + * Bucket range on which histogram was performed for the numeric field, that + * is, the count represents number of jobs in this range. + */ + range?: Schema$BucketRange; + } + /** + * Represents starting and ending value of a range in double. + */ + export interface Schema$BucketRange { + /** + * Starting value of the bucket range. + */ + from?: number; + /** + * Ending value of the bucket range. + */ + to?: number; + } + /** + * Output only. Commute details related to this job. + */ + export interface Schema$CommuteInfo { + /** + * Location used as the destination in the commute calculation. + */ + jobLocation?: Schema$JobLocation; + /** + * Travel time to reach the job. + */ + travelDuration?: string; + } + /** + * Input only. Parameters needed for commute search. + */ + export interface Schema$CommutePreference { + /** + * Optional. If `true`, jobs without street level addresses may also be + * returned. For city level addresses, the city center is used. For state + * and coarser level addresses, text matching is used. If this field is set + * to `false` or is not specified, only jobs that include street level + * addresses will be returned by commute search. + */ + allowNonStreetLevelAddress?: boolean; + /** + * Optional. The departure hour to use to calculate traffic impact. Accepts + * an integer between 0 and 23, representing the hour in the time zone of + * the start_location. Must not be present if road_traffic is specified. + */ + departureHourLocal?: number; + /** + * Required. The method of transportation for which to calculate the + * commute time. + */ + method?: string; + /** + * Optional. Specifies the traffic density to use when caculating commute + * time. Must not be present if departure_hour_local is specified. + */ + roadTraffic?: string; + /** + * Required. The latitude and longitude of the location from which to + * calculate the commute time. + */ + startLocation?: Schema$LatLng; + /** + * Required. The maximum travel time in seconds. The maximum allowed value + * is `3600s` (one hour). Format is `123s`. + */ + travelTime?: string; + } + /** + * A Company resource represents a company in the service. A company is the + * entity that owns job listings, that is, the hiring entity responsible for + * employing applicants for the job position. + */ + export interface Schema$Company { + /** + * Optional. The URL to employer's career site or careers page on the + * employer's web site. + */ + careerPageLink?: string; + /** + * Optional. Identifiers external to the application that help to further + * identify the employer. + */ + companyInfoSources?: Schema$CompanyInfoSource[]; + /** + * Optional. The employer's company size. + */ + companySize?: string; + /** + * Deprecated. Do not use this field. Optional. This field is no longer + * used. Any value set to it is ignored. + */ + disableLocationOptimization?: boolean; + /** + * Required. The name of the employer to be displayed with the job, for + * example, "Google, LLC.". + */ + displayName?: string; + /** + * Optional. The unique company identifier provided by the client to + * identify an employer for billing purposes. Recommended practice is to use + * the distributor_company_id. Defaults to same value as + * distributor_company_id when a value is not provided. + */ + distributorBillingCompanyId?: string; + /** + * Required. A client's company identifier, used to uniquely identify + * the company. If an employer has a subsidiary or sub-brand, such as + * "Alphabet" and "Google", which the client wishes to + * use as the company displayed on the job. Best practice is to create a + * distinct company identifier for each distinct brand displayed. + */ + distributorCompanyId?: string; + /** + * Optional. Equal Employment Opportunity legal disclaimer text to be + * associated with all jobs, and typically to be displayed in all roles. The + * maximum number of allowed characters is 500. + */ + eeoText?: string; + /** + * Optional. Set to true if it is the hiring agency that post jobs for + * other employers. Defaults to false if not provided. + */ + hiringAgency?: boolean; + /** + * Optional. The street address of the company's main headquarters, + * which may be different from the job location. The service attempts to + * geolocate the provided address, and populates a more specific location + * wherever possible in structured_company_hq_location. + */ + hqLocation?: string; + /** + * Optional. A URL that hosts the employer's company logo. If provided, + * the logo image should be squared at 80x80 pixels. The url must be a + * Google Photos or Google Album url. Only images in these Google + * sub-domains are accepted. + */ + imageUrl?: string; + /** + * Optional. A list of keys of filterable Job.custom_attributes, whose + * corresponding `string_values` are used in keyword search. Jobs with + * `string_values` under these specified field keys are returned if any of + * the values matches the search keyword. + */ + keywordSearchableCustomAttributes?: string[]; + /** + * Deprecated. Use keyword_searchable_custom_attributes instead. Optional. + * A list of filterable custom fields that should be used in keyword search. + * The jobs of this company are returned if any of these custom fields + * matches the search keyword. + */ + keywordSearchableCustomFields?: number[]; + /** + * Required during company update. The resource name for a company. This is + * generated by the service when a company is created, for example, + * "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + */ + name?: string; + /** + * Output only. A structured headquarters location of the company, resolved + * from hq_location if possible. + */ + structuredCompanyHqLocation?: Schema$JobLocation; + /** + * Output only. Indicates whether a company is flagged to be suspended from + * public availability by the service when job content appears suspicious, + * abusive, or spammy. + */ + suspended?: boolean; + /** + * Deprecated. Use display_name instead. Required. The name of the + * employer to be displayed with the job, for example, "Google, + * LLC.". + */ + title?: string; + /** + * Optional. The URL representing the company's primary web site or + * home page, such as, "www.google.com". + */ + website?: string; + } + /** + * A resource that represents an external Google identifier for a company, + * for example, a Google+ business page or a Google Maps business page. For + * unsupported types, use `unknown_type_id`. + */ + export interface Schema$CompanyInfoSource { + /** + * Optional. The Google's Knowledge Graph value for the employer's + * company. + */ + freebaseMid?: string; + /** + * Optional. The numeric identifier for the employer's Google+ business + * page. + */ + gplusId?: string; + /** + * Optional. The numeric identifier for the employer's headquarters on + * Google Maps, namely, the Google Maps CID (cell id). + */ + mapsCid?: string; + /** + * Optional. A Google identifier that does not match any of the other + * types. + */ + unknownTypeId?: string; + } + /** + * A compensation entry that represents one component of compensation, such as + * base pay, bonus, or other compensation type. Annualization: One + * compensation entry can be annualized if - it contains valid amount or + * range. - and its expected_units_per_year is set or can be derived. Its + * annualized range is determined as (amount or range) times + * expected_units_per_year. + */ + export interface Schema$CompensationEntry { + /** + * Optional. Compensation amount. + */ + amount?: Schema$Money; + /** + * Optional. Compensation description. For example, could indicate equity + * terms or provide additional context to an estimated bonus. + */ + description?: string; + /** + * Optional. Expected number of units paid each year. If not specified, + * when Job.employment_types is FULLTIME, a default value is inferred based + * on unit. Default values: - HOURLY: 2080 - DAILY: 260 - WEEKLY: 52 - + * MONTHLY: 12 - ANNUAL: 1 + */ + expectedUnitsPerYear?: number; + /** + * Optional. Compensation range. + */ + range?: Schema$CompensationRange; + /** + * Required. Compensation type. + */ + type?: string; + /** + * Optional. Frequency of the specified amount. Default is + * CompensationUnit.OTHER_COMPENSATION_UNIT. + */ + unit?: string; + } + /** + * Input only. Filter on job compensation type and amount. + */ + export interface Schema$CompensationFilter { + /** + * Optional. Whether to include jobs whose compensation range is + * unspecified. + */ + includeJobsWithUnspecifiedCompensationRange?: boolean; + /** + * Optional. Compensation range. + */ + range?: Schema$CompensationRange; + /** + * Required. Type of filter. + */ + type?: string; + /** + * Required. Specify desired ** base compensation entry's ** + * CompensationInfo.CompensationUnit. + */ + units?: string[]; + } + /** + * Input only. Compensation based histogram request. + */ + export interface Schema$CompensationHistogramRequest { + /** + * Required. Numeric histogram options, like buckets, whether include min + * or max value. + */ + bucketingOption?: Schema$NumericBucketingOption; + /** + * Required. Type of the request, representing which field the + * histogramming should be performed over. A single request can only specify + * one histogram of each `CompensationHistogramRequestType`. + */ + type?: string; + } + /** + * Output only. Compensation based histogram result. + */ + export interface Schema$CompensationHistogramResult { + /** + * Histogram result. + */ + result?: Schema$NumericBucketingResult; + /** + * Type of the request, corresponding to CompensationHistogramRequest.type. + */ + type?: string; + } + /** + * Job compensation details. + */ + export interface Schema$CompensationInfo { + /** + * Deprecated. Use entries instead. Optional. The amount of compensation + * or pay for the job. As an alternative, compensation_amount_min and + * compensation_amount_max may be used to define a range of compensation. + */ + amount?: Schema$Money; + /** + * Output only. Annualized base compensation range. Computed as base + * compensation entry's CompensationEntry.compensation times + * CompensationEntry.expected_units_per_year. See CompensationEntry for + * explanation on compensation annualization. + */ + annualizedBaseCompensationRange?: Schema$CompensationRange; + /** + * Output only. Annualized total compensation range. Computed as all + * compensation entries' CompensationEntry.compensation times + * CompensationEntry.expected_units_per_year. See CompensationEntry for + * explanation on compensation annualization. + */ + annualizedTotalCompensationRange?: Schema$CompensationRange; + /** + * Optional. Job compensation information. At most one entry can be of + * type CompensationInfo.CompensationType.BASE, which is referred as ** base + * compensation entry ** for the job. + */ + entries?: Schema$CompensationEntry[]; + /** + * Deprecated. Use entries instead. Optional. An upper bound on a range + * for compensation or pay for the job. The currency type is specified in + * compensation_amount. + */ + max?: Schema$Money; + /** + * Deprecated. Use entries instead. Optional. A lower bound on a range for + * compensation or pay for the job. The currency type is specified in + * compensation_amount. + */ + min?: Schema$Money; + /** + * Deprecated. Use entries instead. Optional. Type of job compensation. + */ + type?: string; + } + /** + * Compensation range. + */ + export interface Schema$CompensationRange { + /** + * Required. The maximum amount of compensation. + */ + max?: Schema$Money; + /** + * Required. The minimum amount of compensation. + */ + min?: Schema$Money; + } + /** + * Output only. Response of auto-complete query. + */ + export interface Schema$CompleteQueryResponse { + /** + * Results of the matching job/company candidates. + */ + completionResults?: Schema$CompletionResult[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + } + /** + * Output only. Resource that represents completion results. + */ + export interface Schema$CompletionResult { + /** + * The URL for the company logo if `type=COMPANY_NAME`. + */ + imageUrl?: string; + /** + * The suggestion for the query. + */ + suggestion?: string; + /** + * The completion topic. + */ + type?: string; + } + /** + * Input only. Create job request. The job typically becomes searchable + * within 10 seconds, but it may take up to 5 minutes for the job to become + * searchable. + */ + export interface Schema$CreateJobRequest { + /** + * If set to `true`, the service will not attempt to resolve a more precise + * address for the job. + */ + disableStreetAddressResolution?: boolean; + /** + * Required. The Job to be created. + */ + job?: Schema$Job; + } + /** + * Custom attribute values that are either filterable or non-filterable. + */ + export interface Schema$CustomAttribute { + /** + * Optional. If the `filterable` flag is true, custom field values are + * searchable. If false, values are not searchable. Default is false. + */ + filterable?: boolean; + /** + * Optional but at least one of string_values or long_value must be + * specified. This field is used to perform number range search. (`EQ`, + * `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. For `long_value`, a + * value between Long.MIN and Long.MIN is allowed. + */ + longValue?: string; + /** + * Optional but at least one of string_values or long_value must be + * specified. This field is used to perform a string match + * (`CASE_SENSITIVE_MATCH` or `CASE_INSENSITIVE_MATCH`) search. For + * filterable `string_values`, a maximum total number of 200 values is + * allowed, with each `string_value` has a byte size of no more than 255B. + * For unfilterable `string_values`, the maximum total byte size of + * unfilterable `string_values` is 50KB. Empty strings are not allowed. + */ + stringValues?: Schema$StringValues; + } + /** + * Custom attributes histogram request. An error will be thrown if neither + * string_value_histogram or long_value_histogram_bucketing_option has been + * defined. + */ + export interface Schema$CustomAttributeHistogramRequest { + /** + * Required. Specifies the custom field key to perform a histogram on. If + * specified without `long_value_buckets` or `long_value_min_max`, a + * histogram on string values of the given `key` is triggered, otherwise + * histogram is performed on long values. + */ + key?: string; + /** + * Optional. Specifies buckets used to perform a range histogram on + * Job's filterable long custom field values, or min/max value + * requirements. + */ + longValueHistogramBucketingOption?: Schema$NumericBucketingOption; + /** + * Optional. If set to true, the response will include the histogram value + * for each key as a string. + */ + stringValueHistogram?: boolean; + } + /** + * Output only. Custom attribute histogram result. + */ + export interface Schema$CustomAttributeHistogramResult { + /** + * Stores the key of custom attribute the histogram is performed on. + */ + key?: string; + /** + * Stores bucketed histogram counting result or min/max values for custom + * attribute long values associated with `key`. + */ + longValueHistogramResult?: Schema$NumericBucketingResult; + /** + * Stores a map from the values of string custom field associated with `key` + * to the number of jobs with that value in this histogram result. + */ + stringValueHistogramResult?: any; + } + /** + * Resource that represents the custom data not captured by the standard + * fields. + */ + export interface Schema$CustomField { + /** + * Optional. The values of the custom data. + */ + values?: string[]; + } + /** + * Input only. Custom field filter of the search. + */ + export interface Schema$CustomFieldFilter { + /** + * Required. The query strings for the filter. + */ + queries?: string[]; + /** + * Optional. The type of filter. Defaults to FilterType.OR. + */ + type?: string; + } + /** + * Represents a whole calendar date, e.g. date of birth. The time of day and + * time zone are either specified elsewhere or are not significant. The date + * is relative to the Proleptic Gregorian Calendar. The day may be 0 to + * represent a year and month where the day is not significant, e.g. credit + * card expiration date. The year may be 0 to represent a month and day + * independent of year, e.g. anniversary date. Related types are + * google.type.TimeOfDay and `google.protobuf.Timestamp`. + */ + export interface Schema$Date { + /** + * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + * if specifying a year/month where the day is not significant. + */ + day?: number; + /** + * Month of year. Must be from 1 to 12, or 0 if specifying a date without a + * month. + */ + month?: number; + /** + * Year of date. Must be from 1 to 9999, or 0 if specifying a date without a + * year. + */ + year?: number; + } + /** + * Deprecated. Use BatchDeleteJobsRequest instead. Input only. Delete job by + * filter request. The job typically becomes unsearchable within 10 seconds, + * but it may take up to 5 minutes for the job to become unsearchable. + */ + export interface Schema$DeleteJobsByFilterRequest { + /** + * Optional. If set to true, this call waits for all processing steps to + * complete before the job is cleaned up. Otherwise, the call returns while + * some steps are still taking place asynchronously, hence faster. + */ + disableFastProcess?: boolean; + /** + * Required. Restrictions on the scope of the delete request. + */ + filter?: Schema$Filter; + } + /** + * Input only. Device information collected from the job searcher, candidate, + * or other entity conducting the job search. Providing this information + * improves the quality of the search results across devices. + */ + export interface Schema$DeviceInfo { + /** + * Optional. Type of the device. + */ + deviceType?: string; + /** + * Optional. A device-specific ID. It must be a unique identifier, which + * distinguishes the device from other devices. + */ + id?: 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 {} + /** + * Deprecated. Always use CompensationFilter. Input only. Filter on job + * compensation type and amount. + */ + export interface Schema$ExtendedCompensationFilter { + /** + * Optional. Compensation range. + */ + compensationRange?: Schema$ExtendedCompensationInfoCompensationRange; + /** + * Required. Specify desired ** base compensation entry's ** + * ExtendedCompensationInfo.CompensationUnit. + */ + compensationUnits?: string[]; + /** + * Optional. Specify currency in 3-letter [ISO + * 4217](https://www.iso.org/iso-4217-currency-codes.html) format. If + * unspecified, jobs are returned regardless of currency. + */ + currency?: string; + /** + * Optional. Whether to include jobs whose compensation range is + * unspecified. + */ + includeJobWithUnspecifiedCompensationRange?: boolean; + /** + * Required. Type of filter. + */ + type?: string; + } + /** + * Deprecated. Use CompensationInfo. Describes job compensation. + */ + export interface Schema$ExtendedCompensationInfo { + /** + * Output only. Annualized base compensation range. + */ + annualizedBaseCompensationRange?: + Schema$ExtendedCompensationInfoCompensationRange; + /** + * Output only. Indicates annualized base compensation range cannot be + * derived, due to the job's base compensation entry cannot be + * annualized. See CompensationEntry for explanation on annualization and + * base compensation entry. + */ + annualizedBaseCompensationUnspecified?: boolean; + /** + * Output only. Annualized total compensation range. + */ + annualizedTotalCompensationRange?: + Schema$ExtendedCompensationInfoCompensationRange; + /** + * Output only. Indicates annualized total compensation range cannot be + * derived, due to the job's all CompensationEntry cannot be annualized. + * See CompensationEntry for explanation on annualization and base + * compensation entry. + */ + annualizedTotalCompensationUnspecified?: boolean; + /** + * Optional. A 3-letter [ISO + * 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. + */ + currency?: string; + /** + * Optional. Job compensation information. At most one entry can be of + * type ExtendedCompensationInfo.CompensationType.BASE, which is referred as + * ** base compensation entry ** for the job. + */ + entries?: Schema$ExtendedCompensationInfoCompensationEntry[]; + } + /** + * Deprecated. See CompensationInfo. A compensation entry that represents one + * component of compensation, such as base pay, bonus, or other compensation + * type. Annualization: One compensation entry can be annualized if - it + * contains valid amount or range. - and its expected_units_per_year is set or + * can be derived. Its annualized range is determined as (amount or range) + * times expected_units_per_year. + */ + export interface Schema$ExtendedCompensationInfoCompensationEntry { + /** + * Optional. Monetary amount. + */ + amount?: Schema$ExtendedCompensationInfoDecimal; + /** + * Optional. Compensation description. + */ + description?: string; + /** + * Optional. Expected number of units paid each year. If not specified, + * when Job.employment_types is FULLTIME, a default value is inferred based + * on unit. Default values: - HOURLY: 2080 - DAILY: 260 - WEEKLY: 52 - + * MONTHLY: 12 - ANNUAL: 1 + */ + expectedUnitsPerYear?: Schema$ExtendedCompensationInfoDecimal; + /** + * Optional. Compensation range. + */ + range?: Schema$ExtendedCompensationInfoCompensationRange; + /** + * Required. Compensation type. + */ + type?: string; + /** + * Optional. Frequency of the specified amount. Default is + * CompensationUnit.OTHER_COMPENSATION_UNIT. + */ + unit?: string; + /** + * Optional. Indicates compensation amount and range are unset. + */ + unspecified?: boolean; + } + /** + * Deprecated. See CompensationInfo. Compensation range. + */ + export interface Schema$ExtendedCompensationInfoCompensationRange { + /** + * Required. Maximum value. + */ + max?: Schema$ExtendedCompensationInfoDecimal; + /** + * Required. Minimum value. + */ + min?: Schema$ExtendedCompensationInfoDecimal; + } + /** + * Deprecated. See CompensationInfo. Decimal number. + */ + export interface Schema$ExtendedCompensationInfoDecimal { + /** + * Micro (10^-6) units. The value must be between -999,999 and +999,999 + * inclusive. If `units` is positive, `micros` must be positive or zero. If + * `units` is zero, `micros` can be positive, zero, or negative. If `units` + * is negative, `micros` must be negative or zero. For example -1.75 is + * represented as `units`=-1 and `micros`=-750,000. + */ + micros?: number; + /** + * Whole units. + */ + units?: string; + } + /** + * Deprecated. Use BatchDeleteJobsRequest instead. Input only. Filter for + * jobs to be deleted. + */ + export interface Schema$Filter { + /** + * Required. The requisition ID (or posting ID) assigned by the client to + * identify a job. This is intended for client identification and tracking + * of listings. name takes precedence over this field The maximum number of + * allowed characters is 225. + */ + requisitionId?: string; + } + /** + * Deprecated. Use SearchJobsRequest.histogram_facets instead to make a single + * call with both search and histogram. Input only. A request for the + * `GetHistogram` method. + */ + export interface Schema$GetHistogramRequest { + /** + * Optional. Controls whether to broaden the search to avoid too few + * results for a given query in instances where a search has sparse results. + * Results from a broadened query is a superset of the results from the + * original query. Defaults to false. + */ + allowBroadening?: boolean; + /** + * Deprecated. Use query instead. Optional. Restrictions on the scope of + * the histogram. + */ + filters?: Schema$JobFilters; + /** + * Optional. Query used to search against jobs, such as keyword, location + * filters, etc. + */ + query?: Schema$JobQuery; + /** + * Meta information, such as `user_id`, collected from the job searcher or + * other entity conducting the job search, which is used to improve the + * search quality of the service. Users determine identifier values, which + * must be unique and consist. + */ + requestMetadata?: Schema$RequestMetadata; + /** + * Required. A list of facets that specify the histogram data to be + * calculated against and returned. Histogram response times can be slow, + * and counts can be approximations. This call may be temporarily or + * permanently removed prior to the production release of Cloud Job + * Discovery. + */ + searchTypes?: string[]; + } + /** + * Deprecated. Use SearchJobsRequest.histogram_facets instead to make a single + * call with both search and histogram. Output only. The response of the + * GetHistogram method. + */ + export interface Schema$GetHistogramResponse { + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * The Histogram results. + */ + results?: Schema$HistogramResult[]; + } + /** + * Input only. Histogram facets to be specified in SearchJobsRequest. + */ + export interface Schema$HistogramFacets { + /** + * Optional. Specifies compensation field-based histogram requests. + * Duplicate CompensationHistogramRequest.types are not allowed. + */ + compensationHistogramFacets?: Schema$CompensationHistogramRequest[]; + /** + * Optional. Specifies the custom attributes histogram requests. Duplicate + * CustomAttributeHistogramRequest.keys are not allowed. + */ + customAttributeHistogramFacets?: Schema$CustomAttributeHistogramRequest[]; + /** + * Optional. Specifies the simple type of histogram facets, e.g, + * `COMPANY_SIZE`, `EMPLOYMENT_TYPE` etc. This field is equivalent to + * GetHistogramRequest. + */ + simpleHistogramFacets?: string[]; + } + /** + * Output only. Result of a histogram call. The response contains the + * histogram map for the search type specified by HistogramResult.field. The + * response is a map of each filter value to the corresponding count of jobs + * for that filter. + */ + export interface Schema$HistogramResult { + /** + * The Histogram search filters. + */ + searchType?: string; + /** + * A map from the values of field to the number of jobs with that value in + * this search result. Key: search type (filter names, such as the + * companyName). Values: the count of jobs that match the filter for this + * search. + */ + values?: any; + } + /** + * Output only. Histogram results that matches HistogramFacets specified in + * SearchJobsRequest. + */ + export interface Schema$HistogramResults { + /** + * Specifies compensation field-based histogram results that matches + * HistogramFacets.compensation_histogram_requests. + */ + compensationHistogramResults?: Schema$CompensationHistogramResult[]; + /** + * Specifies histogram results for custom attributes that matches + * HistogramFacets.custom_attribute_histogram_facets. + */ + customAttributeHistogramResults?: Schema$CustomAttributeHistogramResult[]; + /** + * Specifies histogram results that matches + * HistogramFacets.simple_histogram_facets. + */ + simpleHistogramResults?: Schema$HistogramResult[]; + } + /** + * A Job resource represents a job posting (also referred to as a "job + * listing" or "job requisition"). A job belongs to a Company, + * which is the hiring entity responsible for the job. + */ + export interface Schema$Job { + /** + * Optional but at least one of application_urls, application_email_list or + * application_instruction must be specified. Use this field to specify + * email address(es) to which resumes or applications can be sent. The + * maximum number of allowed characters is 255. + */ + applicationEmailList?: string[]; + /** + * Optional but at least one of application_urls, application_email_list or + * application_instruction must be specified. Use this field to provide + * instructions, such as "Mail your application to ...", that a + * candidate can follow to apply for the job. This field accepts and + * sanitizes HTML input, and also accepts bold, italic, ordered list, and + * unordered list markup tags. The maximum number of allowed characters is + * 3,000. + */ + applicationInstruction?: string; + /** + * Optional but at least one of application_urls, application_email_list or + * application_instruction must be specified. Use this URL field to direct + * an applicant to a website, for example to link to an online application + * form. The maximum number of allowed characters is 2,000. + */ + applicationUrls?: string[]; + /** + * Optional. The benefits included with the job. + */ + benefits?: string[]; + /** + * Output only. The name of the company listing the job. + */ + companyDisplayName?: string; + /** + * Optional but one of company_name or distributor_company_id must be + * provided. The resource name of the company listing the job, such as + * /companies/foo. This field takes precedence over the distributor-assigned + * company identifier, distributor_company_id. + */ + companyName?: string; + /** + * Deprecated. Use company_display_name instead. Output only. The name of + * the company listing the job. + */ + companyTitle?: string; + /** + * Optional. Job compensation information. + */ + compensationInfo?: Schema$CompensationInfo; + /** + * Output only. The timestamp when this job was created. + */ + createTime?: string; + /** + * Optional. A map of fields to hold both filterable and non-filterable + * custom job attributes that are not covered by the provided structured + * fields. This field is a more general combination of the deprecated + * id-based filterable_custom_fields and string-based + * non_filterable_custom_fields. The keys of the map are strings up to 64 + * bytes and must match the pattern: a-zA-Z*. At most 100 filterable and at + * most 100 unfilterable keys are supported. For filterable `string_values`, + * across all keys at most 200 values are allowed, with each string no more + * than 255 characters. For unfilterable `string_values`, the maximum total + * size of `string_values` across all keys is 50KB. + */ + customAttributes?: any; + /** + * Optional. The department or functional area within the company with the + * open position. The maximum number of allowed characters is 255. + */ + department?: string; + /** + * Required. The description of the job, which typically includes a + * multi-paragraph description of the company and related information. + * Separate fields are provided on the job object for responsibilities, + * qualifications, and other job characteristics. Use of these separate job + * fields is recommended. This field accepts and sanitizes HTML input, and + * also accepts bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 100,000. + */ + description?: string; + /** + * Optional but one of company_name or distributor_company_id must be + * provided. A unique company identifier that used by job distributors to + * identify an employer's company entity. company_name takes precedence + * over this field, and is the recommended field to use to identify + * companies. The maximum number of allowed characters is 255. + */ + distributorCompanyId?: string; + /** + * Optional. The desired education level for the job, such as + * "Bachelors", "Masters", "Doctorate". + */ + educationLevels?: string[]; + /** + * Optional. The employment type(s) of a job, for example, full time or + * part time. + */ + employmentTypes?: string[]; + /** + * Optional. The end date of the job in UTC time zone. Typically this field + * is used for contracting engagements. Dates prior to 1970/1/1 and invalid + * date formats are ignored. + */ + endDate?: Schema$Date; + /** + * Optional but strongly recommended to be provided for the best service + * experience. The expiration timestamp of the job. After this timestamp, + * the job is marked as expired, and it no longer appears in search results. + * The expired job can't be deleted or listed by the DeleteJob and + * ListJobs APIs, but it can be retrieved with the GetJob API or updated + * with the UpdateJob API. An expired job can be updated and opened again by + * using a future expiration timestamp. It can also remain expired. Updating + * an expired job to be open fails if there is another existing open job + * with same requisition_id, company_name and language_code. The expired + * jobs are retained in our system for 90 days. However, the overall expired + * job count cannot exceed 3 times the maximum of open jobs count over the + * past week, otherwise jobs with earlier expire time are cleaned first. + * Expired jobs are no longer accessible after they are cleaned out. The + * format of this field is RFC 3339 date strings. Example: + * 2000-01-01T00:00:00.999999999Z See + * [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + * A valid date range is between 1970-01-01T00:00:00.0Z and + * 2100-12-31T23:59:59.999Z. Invalid dates are ignored and treated as expire + * time not provided. If this value is not provided on job creation or + * invalid, the job posting expires after 30 days from the job's + * creation time. For example, if the job was created on 2017/01/01 13:00AM + * UTC with an unspecified expiration date, the job expires after 2017/01/31 + * 13:00AM UTC. If this value is not provided but expiry_date is, + * expiry_date is used. If this value is not provided on job update, it + * depends on the field masks set by UpdateJobRequest.update_job_fields. If + * the field masks include expiry_time, or the masks are empty meaning that + * every field is updated, the job posting expires after 30 days from the + * job's last update time. Otherwise the expiration date isn't + * updated. + */ + expireTime?: string; + /** + * Deprecated. Use expire_time instead. Optional but strongly recommended + * to be provided for the best service experience. The expiration date of + * the job in UTC time. After 12 am on this date, the job is marked as + * expired, and it no longer appears in search results. The expired job + * can't be deleted or listed by the DeleteJob and ListJobs APIs, but it + * can be retrieved with the GetJob API or updated with the UpdateJob API. + * An expired job can be updated and opened again by using a future + * expiration date. It can also remain expired. Updating an expired job to + * be open fails if there is another existing open job with same + * requisition_id, company_name and language_code. The expired jobs are + * retained in our system for 90 days. However, the overall expired job + * count cannot exceed 3 times the maximum of open jobs count over the past + * week, otherwise jobs with earlier expire time are removed first. Expired + * jobs are no longer accessible after they are cleaned out. A valid date + * range is between 1970/1/1 and 2100/12/31. Invalid dates are ignored and + * treated as expiry date not provided. If this value is not provided on + * job creation or is invalid, the job posting expires after 30 days from + * the job's creation time. For example, if the job was created on + * 2017/01/01 13:00AM UTC with an unspecified expiration date, the job + * expires after 2017/01/31 13:00AM UTC. If this value is not provided on + * job update, it depends on the field masks set by + * UpdateJobRequest.update_job_fields. If the field masks include + * expiry_date, or the masks are empty meaning that every field is updated, + * the job expires after 30 days from the job's last update time. + * Otherwise the expiration date isn't updated. + */ + expiryDate?: Schema$Date; + /** + * Deprecated. Always use compensation_info. Optional. Job compensation + * information. This field replaces compensation_info. + */ + extendedCompensationInfo?: Schema$ExtendedCompensationInfo; + /** + * Deprecated. Use custom_attributes instead. Optional. A map of fields to + * hold filterable custom job attributes not captured by the standard fields + * such as job_title, company_name, or level. These custom fields store + * arbitrary string values, and can be used for purposes not covered by the + * structured fields. For the best search experience, use of the structured + * rather than custom fields is recommended. Data stored in these custom + * fields fields are indexed and searched against by keyword searches (see + * SearchJobsRequest.custom_field_filters][]). To list jobs by custom + * fields, see ListCustomFieldsRequest.field_id. The map key must be a + * number between 1-20. If an invalid key is provided on job create or + * update, an error is returned. + */ + filterableCustomFields?: any; + /** + * Optional. A description of bonus, commission, and other compensation + * incentives associated with the job not including salary or pay. The + * maximum number of allowed characters is 10,000. + */ + incentives?: string; + /** + * Output only. Structured locations of the job, resolved from locations. + */ + jobLocations?: Schema$JobLocation[]; + /** + * Required. The title of the job, such as "Software Engineer" + * The maximum number of allowed characters is 500. + */ + jobTitle?: string; + /** + * Optional. The language of the posting. This field is distinct from any + * requirements for fluency that are associated with the job. Language + * codes must be in BCP-47 format, such as "en-US" or + * "sr-Latn". For more information, see [Tags for Identifying + * Languages](https://tools.ietf.org/html/bcp47). The default value is + * `en-US`. + */ + languageCode?: string; + /** + * Optional. The experience level associated with the job, such as + * "Entry Level". + */ + level?: string; + /** + * Optional but strongly recommended to be provided for the best service + * experience. Location(s) where the job is hiring. Providing the full + * street address(es) of the hiring location is recommended to enable better + * API results, including job searches by commute time. At most 50 + * locations are allowed for best search performance. If a job has more + * locations, it is suggested to split it into multiple jobs with unique + * requisition_ids (e.g. 'ReqA' becomes 'ReqA-1', + * 'ReqA-2', etc.) as multiple jobs with the same requisition_id, + * company_name and language_code are not allowed. If the original + * requisition_id must be preserved, a custom field should be used for + * storage. It is also suggested to group the locations that close to each + * other in the same job for better search experience. The maximum number + * of allowed characters is 500. + */ + locations?: string[]; + /** + * Required during job update. Resource name assigned to a job by the API, + * for example, "/jobs/foo". Use of this field in job queries and + * API calls is preferred over the use of requisition_id since this value is + * unique. + */ + name?: string; + /** + * Optional. A promotion value of the job, as determined by the client. The + * value determines the sort order of the jobs returned when searching for + * jobs using the featured jobs search call, with higher promotional values + * being returned first and ties being resolved by relevance sort. Only the + * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + * Default value is 0, and negative values are treated as 0. + */ + promotionValue?: number; + /** + * Optional. The date this job was most recently published in UTC format. + * The default value is the time the request arrives at the server. + */ + publishDate?: Schema$Date; + /** + * Optional. A description of the qualifications required to perform the + * job. The use of this field is recommended as an alternative to using the + * more general description field. This field accepts and sanitizes HTML + * input, and also accepts bold, italic, ordered list, and unordered list + * markup tags. The maximum number of allowed characters is 10,000. + */ + qualifications?: string; + /** + * Output only. The URL of a web page that displays job details. + */ + referenceUrl?: string; + /** + * Optional. The job Region (for example, state, country) throughout which + * the job is available. If this field is set, a LocationFilter in a search + * query within the job region finds this job if an exact location match is + * not specified. If this field is set, setting job locations to the same + * location level as this field is strongly recommended. + */ + region?: string; + /** + * Required. The requisition ID, also referred to as the posting ID, + * assigned by the client to identify a job. This field is intended to be + * used by clients for client identification and tracking of listings. A job + * is not allowed to be created if there is another job with the same + * requisition_id, company_name and language_code. The maximum number of + * allowed characters is 225. + */ + requisitionId?: string; + /** + * Optional. A description of job responsibilities. The use of this field + * is recommended as an alternative to using the more general description + * field. This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. The maximum + * number of allowed characters is 10,000. + */ + responsibilities?: string; + /** + * Optional. The start date of the job in UTC time zone. Typically this + * field is used for contracting engagements. Dates prior to 1970/1/1 and + * invalid date formats are ignored. + */ + startDate?: Schema$Date; + /** + * Deprecated. Use custom_attributes instead. Optional. A map of fields to + * hold non-filterable custom job attributes, similar to + * filterable_custom_fields. These fields are distinct in that the data in + * these fields are not indexed. Therefore, the client cannot search against + * them, nor can the client use them to list jobs. The key of the map can + * be any valid string. + */ + unindexedCustomFields?: any; + /** + * Output only. The timestamp when this job was last updated. + */ + updateTime?: string; + /** + * Optional. The visibility of the job. Defaults to JobVisibility.PRIVATE + * if not specified. Currently only JobVisibility.PRIVATE is supported. + */ + visibility?: string; + } + /** + * Input only. Deprecated. Use JobQuery instead. The filters required to + * perform a search query or histogram. + */ + export interface Schema$JobFilters { + /** + * Optional. The category filter specifies the categories of jobs to search + * against. See Category for more information. If a value is not specified, + * jobs from any category are searched against. If multiple values are + * specified, jobs from any of the specified categories are searched + * against. + */ + categories?: string[]; + /** + * Optional. Allows filtering jobs by commute time with different travel + * methods (e.g. driving or public transit). Note: this only works with + * COMMUTE MODE. When specified, [JobFilters.location_filters] will be + * ignored. Currently we do not support sorting by commute time. + */ + commuteFilter?: Schema$CommutePreference; + /** + * Optional. The company names filter specifies the company entities to + * search against. If a value is not specified, jobs are searched for + * against all companies. If multiple values are specified, jobs are + * searched against the specified companies. At most 20 company filters are + * allowed. + */ + companyNames?: string[]; + /** + * Optional. This filter specifies the exact company titles of jobs to + * search against. If a value is not specified, jobs within the search + * results can be associated with any company. If multiple values are + * specified, jobs within the search results may be associated with any of + * the specified companies. At most 20 company title filters are allowed. + */ + companyTitles?: string[]; + /** + * Optional. This search filter is applied only to Job.compensation_info. + * For example, if the filter is specified as "Hourly job with per-hour + * compensation > $15", only jobs that meet this criteria are + * searched. If a filter is not defined, all open jobs are searched. + */ + compensationFilter?: Schema$CompensationFilter; + /** + * Optional. This filter specifies a structured syntax to match against the + * Job.custom_attributes that are marked as `filterable`. The syntax for + * this expression is a subset of Google SQL syntax. Supported operators + * are: =, !=, <, <=, >, >= where the left of the operator is a + * custom field key and the right of the operator is a number or string + * (surrounded by quotes) value. Supported functions are + * LOWER(<field_name>) to perform case insensitive match and + * EMPTY(<field_name>) to filter on the existence of a key. Boolean + * expressions (AND/OR/NOT) are supported up to 3 levels of nesting (For + * example, "((A AND B AND C) OR NOT D) AND E"), and there can be + * a maximum of 50 comparisons/functions in the expression. The expression + * must be < 2000 characters in length. Sample Query: (key1 = + * "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1)) AND + * key2 > 100 + */ + customAttributeFilter?: string; + /** + * Deprecated. Use custom_attribute_filter instead. Optional. This filter + * specifies searching against custom field values. See + * Job.filterable_custom_fields for information. The key value specifies a + * number between 1-20 (the service supports 20 custom fields) corresponding + * to the desired custom field map value. If an invalid key is provided or + * specified together with custom_attribute_filter, an error is thrown. + */ + customFieldFilters?: any; + /** + * Optional. This flag controls the spell-check feature. If false, the + * service attempts to correct a misspelled query, for example, + * "enginee" is corrected to "engineer". Defaults to + * false: a spell check is performed. + */ + disableSpellCheck?: boolean; + /** + * Optional. The employment type filter specifies the employment type of + * jobs to search against, such as EmploymentType.FULL_TIME. If a value is + * not specified, jobs in the search results include any employment type. If + * multiple values are specified, jobs in the search results include any of + * the specified employment types. + */ + employmentTypes?: string[]; + /** + * Deprecated. Always use compensation_filter. Optional. This search + * filter is applied only to Job.extended_compensation_info. For example, if + * the filter is specified as "Hourly job with per-hour compensation + * > $15", only jobs that meet these criteria are searched. If a + * filter is not defined, all open jobs are searched. + */ + extendedCompensationFilter?: Schema$ExtendedCompensationFilter; + /** + * Optional. This filter specifies the locale of jobs to search against, + * for example, "en-US". If a value is not specified, the search + * results can contain jobs in any locale. Language codes should be in + * BCP-47 format, such as "en-US" or "sr-Latn". For more + * information, see [Tags for Identifying + * Languages](https://tools.ietf.org/html/bcp47). At most 10 language code + * filters are allowed. + */ + languageCodes?: string[]; + /** + * Optional. The location filter specifies geo-regions containing the jobs + * to search against. See LocationFilter for more information. If a + * location value is not specified, jobs are be retrieved from all + * locations. If multiple values are specified, jobs are retrieved from any + * of the specified locations, and, if different values are specified for + * the LocationFilter.distance_in_miles parameter, the maximum provided + * distance is used for all locations. At most 5 location filters are + * allowed. + */ + locationFilters?: Schema$LocationFilter[]; + /** + * Optional. Jobs published within a range specified by this filter are + * searched against, for example, DateRange.PAST_MONTH. If a value is not + * specified, all open jobs are searched against regardless of the date on + * which they were published. + */ + publishDateRange?: string; + /** + * Optional. The query filter contains the keywords that match against the + * job title, description, and location fields. The maximum query size is + * 255 bytes. + */ + query?: string; + /** + * Optional. This flag controls whether the job search should be restricted + * to jobs owned by the current user. Defaults to false that all jobs + * accessible to the user are searched against. + */ + tenantJobOnly?: boolean; + } + /** + * Output only. A resource that represents a location with full geographic + * information. + */ + export interface Schema$JobLocation { + /** + * An object representing a latitude/longitude pair. + */ + latLng?: Schema$LatLng; + /** + * The type of a location, which corresponds to the address lines field of + * PostalAddress. For example, "Downtown, Atlanta, GA, USA" has a + * type of LocationType#NEIGHBORHOOD, and "Kansas City, KS, USA" + * has a type of LocationType#LOCALITY. + */ + locationType?: string; + /** + * Postal address of the location that includes human readable information, + * such as postal delivery and payments addresses. Given a postal address, a + * postal service can deliver items to a premises, P.O. Box, or other + * delivery location. + */ + postalAddress?: Schema$PostalAddress; + /** + * Radius in meters of the job location. This value is derived from the + * location bounding box in which a circle with the specified radius + * centered from LatLng coves the area associated with the job location. For + * example, currently, "Mountain View, CA, USA" has a radius of + * 7885.79 meters. + */ + radiusMeters?: number; + } + /** + * Input only. The query required to perform a search query or histogram. + */ + export interface Schema$JobQuery { + /** + * Optional. The category filter specifies the categories of jobs to search + * against. See Category for more information. If a value is not specified, + * jobs from any category are searched against. If multiple values are + * specified, jobs from any of the specified categories are searched + * against. + */ + categories?: string[]; + /** + * Optional. Allows filtering jobs by commute time with different travel + * methods (e.g. driving or public transit). Note: this only works with + * COMMUTE MODE. When specified, [JobQuery.location_filters] will be + * ignored. Currently we do not support sorting by commute time. + */ + commuteFilter?: Schema$CommutePreference; + /** + * Optional. This filter specifies the exact company display name of jobs + * to search against. If a value is not specified, jobs within the search + * results can be associated with any company. If multiple values are + * specified, jobs within the search results may be associated with any of + * the specified companies. At most 20 company display name filters are + * allowed. + */ + companyDisplayNames?: string[]; + /** + * Optional. The company names filter specifies the company entities to + * search against. If a value is not specified, jobs are searched for + * against all companies. If multiple values are specified, jobs are + * searched against the specified companies. At most 20 company filters are + * allowed. + */ + companyNames?: string[]; + /** + * Optional. This search filter is applied only to Job.compensation_info. + * For example, if the filter is specified as "Hourly job with per-hour + * compensation > $15", only jobs that meet these criteria are + * searched. If a filter is not defined, all open jobs are searched. + */ + compensationFilter?: Schema$CompensationFilter; + /** + * Optional. This filter specifies a structured syntax to match against the + * Job.custom_attributes that are marked as `filterable`. The syntax for + * this expression is a subset of Google SQL syntax. Supported operators + * are: =, !=, <, <=, >, >= where the left of the operator is a + * custom field key and the right of the operator is a number or string + * (surrounded by quotes) value. Supported functions are + * LOWER(<field_name>) to perform case insensitive match and + * EMPTY(<field_name>) to filter on the existence of a key. Boolean + * expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for + * example, "((A AND B AND C) OR NOT D) AND E"), and there can be + * a maximum of 50 comparisons/functions in the expression. The expression + * must be < 2000 characters in length. Sample Query: (key1 = + * "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1)) AND + * key2 > 100 + */ + customAttributeFilter?: string; + /** + * Optional. This flag controls the spell-check feature. If false, the + * service attempts to correct a misspelled query, for example, + * "enginee" is corrected to "engineer". Defaults to + * false: a spell check is performed. + */ + disableSpellCheck?: boolean; + /** + * Optional. The employment type filter specifies the employment type of + * jobs to search against, such as EmploymentType.FULL_TIME. If a value is + * not specified, jobs in the search results will include any employment + * type. If multiple values are specified, jobs in the search results + * include any of the specified employment types. + */ + employmentTypes?: string[]; + /** + * Optional. This filter specifies the locale of jobs to search against, + * for example, "en-US". If a value is not specified, the search + * results can contain jobs in any locale. Language codes should be in + * BCP-47 format, such as "en-US" or "sr-Latn". For more + * information, see [Tags for Identifying + * Languages](https://tools.ietf.org/html/bcp47). At most 10 language code + * filters are allowed. + */ + languageCodes?: string[]; + /** + * Optional. The location filter specifies geo-regions containing the jobs + * to search against. See LocationFilter for more information. If a + * location value is not specified, jobs that fit the other search criteria + * are retrieved regardless of where they're located. If multiple + * values are specified, jobs are retrieved from any of the specified + * locations, and, if different values are specified for the + * LocationFilter.distance_in_miles parameter, the maximum provided distance + * is used for all locations. At most 5 location filters are allowed. + */ + locationFilters?: Schema$LocationFilter[]; + /** + * Optional. Jobs published within a range specified by this filter are + * searched against, for example, DateRange.PAST_MONTH. If a value is not + * specified, all open jobs are searched against regardless of the date on + * which they were published. + */ + publishDateRange?: string; + /** + * Optional. The query string that matches against the job title, + * description, and location fields. The maximum query size is 255 bytes. + */ + query?: string; + /** + * Optional. This flag controls whether the job search should be restricted + * to jobs owned by the current user. Defaults to false: all jobs + * accessible to the user are searched against. + */ + tenantJobOnly?: boolean; + } + /** + * 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; + } + /** + * Output only. The List companies response object. + */ + export interface Schema$ListCompaniesResponse { + /** + * Companies for the current client. + */ + companies?: Schema$Company[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * A token to retrieve the next page of results. + */ + nextPageToken?: string; + } + /** + * Deprecated. Use ListJobsResponse instead. Output only. The List jobs + * response object. + */ + export interface Schema$ListCompanyJobsResponse { + /** + * The Jobs for a given company. The maximum number of items returned is + * based on the limit field provided in the request. + */ + jobs?: Schema$Job[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * A token to retrieve the next page of results. + */ + nextPageToken?: string; + /** + * The total number of open jobs. The result will be empty if + * ListCompanyJobsRequest.include_jobs_count is not enabled or if no open + * jobs are available. + */ + totalSize?: string; + } + /** + * Output only. List jobs response. + */ + export interface Schema$ListJobsResponse { + /** + * The Jobs for a given company. The maximum number of items returned is + * based on the limit field provided in the request. + */ + jobs?: Schema$Job[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * A token to retrieve the next page of results. + */ + nextPageToken?: string; + } + /** + * Input only. Geographic region of the search. + */ + export interface Schema$LocationFilter { + /** + * Optional. The distance from the address in miles to search. The default + * distance is 20 miles and maximum distance is 5,000 miles. + */ + distanceInMiles?: number; + /** + * Optional. Allows the client to return jobs without a set location, + * specifically, telecommuting jobs (telecomuting is considered by the + * service as a special location. Job.allow_telecommute indicates if a job + * permits telecommuting. If this field is true, telecommuting jobs are + * searched, and name and lat_lng are ignored. This filter can be used by + * itself to search exclusively for telecommuting jobs, or it can be + * combined with another location filter to search for a combination of job + * locations, such as "Mountain View" or "telecommuting" + * jobs. However, when used in combination with other location filters, + * telecommuting jobs can be treated as less relevant than other jobs in the + * search response. + */ + isTelecommute?: boolean; + /** + * Optional. The latitude and longitude of the geographic center from which + * to search. This field is ignored if `location_name` is provided. + */ + latLng?: Schema$LatLng; + /** + * Optional. The address name, such as "Mountain View" or + * "Bay Area". + */ + name?: string; + /** + * Optional. CLDR region code of the country/region of the address. This + * will be used to address ambiguity of the user-input location, e.g. + * "Liverpool" against "Liverpool, NY, US" or + * "Liverpool, UK". Set this field if all the jobs to search + * against are from a same region, or jobs are world-wide but the job seeker + * is from a specific region. See http://cldr.unicode.org/ and + * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + */ + regionCode?: string; + } + /** + * Output only. Job entry with metadata inside SearchJobsResponse. + */ + export interface Schema$MatchingJob { + /** + * Commute information which is generated based on specified + * CommutePreference. + */ + commuteInfo?: Schema$CommuteInfo; + /** + * Job resource that matches the specified SearchJobsRequest. + */ + job?: Schema$Job; + /** + * A summary of the job with core information that's displayed on the + * search results listing page. + */ + jobSummary?: string; + /** + * Contains snippets of text from the Job.job_title field that most closely + * match a search query's keywords, if available. The matching query + * keywords are enclosed in HTML bold tags. + */ + jobTitleSnippet?: string; + /** + * Contains snippets of text from the Job.description and similar fields + * that most closely match a search query's keywords, if available. All + * HTML tags in the original fields are stripped when returned in this + * field, and matching query keywords are enclosed in HTML bold tags. + */ + searchTextSnippet?: string; + } + /** + * Represents an amount of money with its currency type. + */ + export interface Schema$Money { + /** + * The 3-letter currency code defined in ISO 4217. + */ + currencyCode?: string; + /** + * Number of nano (10^-9) units of the amount. The value must be between + * -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` + * must be positive or zero. If `units` is zero, `nanos` can be positive, + * zero, or negative. If `units` is negative, `nanos` must be negative or + * zero. For example $-1.75 is represented as `units`=-1 and + * `nanos`=-750,000,000. + */ + nanos?: number; + /** + * The whole units of the amount. For example if `currencyCode` is + * `"USD"`, then 1 unit is one US dollar. + */ + units?: string; + } + /** + * Input only. Use this field to specify bucketing option for the histogram + * search response. + */ + export interface Schema$NumericBucketingOption { + /** + * Required. Two adjacent values form a histogram bucket. Values should be + * in ascending order. For example, if [5, 10, 15] are provided, four + * buckets are created: (-inf, 5), 5, 10), [10, 15), [15, inf). At most 20 + * [buckets_bound is supported. + */ + bucketBounds?: number[]; + /** + * Optional. If set to true, the histogram result includes minimum/maximum + * value of the numeric field. + */ + requiresMinMax?: boolean; + } + /** + * Output only. Custom numeric bucketing result. + */ + export interface Schema$NumericBucketingResult { + /** + * Count within each bucket. Its size is the length of + * NumericBucketingOption.bucket_bounds plus 1. + */ + counts?: Schema$BucketizedCount[]; + /** + * Stores the maximum value of the numeric field. Will be populated only if + * [NumericBucketingOption.requires_min_max] is set to true. + */ + maxValue?: number; + /** + * Stores the minimum value of the numeric field. Will be populated only if + * [NumericBucketingOption.requires_min_max] is set to true. + */ + minValue?: number; + } + /** + * Represents a postal address, e.g. for postal delivery or payments + * addresses. Given a postal address, a postal service can deliver items to a + * premise, P.O. Box or similar. It is not intended to model geographical + * locations (roads, towns, mountains). In typical usage an address would be + * created via user input or from importing existing data, depending on the + * type of process. Advice on address input / editing: - Use an i18n-ready + * address widget such as https://github.com/googlei18n/libaddressinput) - + * Users should not be presented with UI elements for input or editing of + * fields outside countries where that field is used. For more guidance on + * how to use this schema, please see: + * https://support.google.com/business/answer/6397478 + */ + export interface Schema$PostalAddress { + /** + * Unstructured address lines describing the lower levels of an address. + * Because values in address_lines do not have type information and may + * sometimes contain multiple values in a single field (e.g. "Austin, + * TX"), it is important that the line order is clear. The order of + * address lines should be "envelope order" for the country/region + * of the address. In places where this can vary (e.g. Japan), + * address_language is used to make it explicit (e.g. "ja" for + * large-to-small ordering and "ja-Latn" or "en" for + * small-to-large). This way, the most specific line of an address can be + * selected based on the language. The minimum permitted structural + * representation of an address consists of a region_code with all remaining + * information placed in the address_lines. It would be possible to format + * such an address very approximately without geocoding, but no semantic + * reasoning could be made about any of the address components until it was + * at least partially resolved. Creating an address only containing a + * region_code and address_lines, and then geocoding is the recommended way + * to handle completely unstructured addresses (as opposed to guessing which + * parts of the address should be localities or administrative areas). + */ + addressLines?: string[]; + /** + * Optional. Highest administrative subdivision which is used for postal + * addresses of a country or region. For example, this can be a state, a + * province, an oblast, or a prefecture. Specifically, for Spain this is the + * province and not the autonomous community (e.g. "Barcelona" and + * not "Catalonia"). Many countries don't use an + * administrative area in postal addresses. E.g. in Switzerland this should + * be left unpopulated. + */ + administrativeArea?: string; + /** + * Optional. BCP-47 language code of the contents of this address (if + * known). This is often the UI language of the input form or is expected to + * match one of the languages used in the address' country/region, or + * their transliterated equivalents. This can affect formatting in certain + * countries, but is not critical to the correctness of the data and will + * never affect any validation or other non-formatting related operations. + * If this value is not known, it should be omitted (rather than specifying + * a possibly incorrect default). Examples: "zh-Hant", + * "ja", "ja-Latn", "en". + */ + languageCode?: string; + /** + * Optional. Generally refers to the city/town portion of the address. + * Examples: US city, IT comune, UK post town. In regions of the world where + * localities are not well defined or do not fit into this structure well, + * leave locality empty and use address_lines. + */ + locality?: string; + /** + * Optional. The name of the organization at the address. + */ + organization?: string; + /** + * Optional. Postal code of the address. Not all countries use or require + * postal codes to be present, but where they are used, they may trigger + * additional validation with other parts of the address (e.g. state/zip + * validation in the U.S.A.). + */ + postalCode?: string; + /** + * Optional. The recipient at the address. This field may, under certain + * circumstances, contain multiline information. For example, it might + * contain "care of" information. + */ + recipients?: string[]; + /** + * Required. CLDR region code of the country/region of the address. This is + * never inferred and it is up to the user to ensure the value is correct. + * See http://cldr.unicode.org/ and + * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + */ + regionCode?: string; + /** + * The schema revision of the `PostalAddress`. This must be set to 0, which + * is the latest revision. All new revisions **must** be backward + * compatible with old revisions. + */ + revision?: number; + /** + * Optional. Additional, country-specific, sorting code. This is not used in + * most regions. Where it is used, the value is either a string like + * "CEDEX", optionally followed by a number (e.g. "CEDEX + * 7"), or just a number alone, representing the "sector + * code" (Jamaica), "delivery area indicator" (Malawi) or + * "post office indicator" (e.g. Côte d'Ivoire). + */ + sortingCode?: string; + /** + * Optional. Sublocality of the address. For example, this can be + * neighborhoods, boroughs, districts. + */ + sublocality?: string; + } + /** + * Input only. Meta information related to the job searcher or entity + * conducting the job search. This information is used to improve the + * performance of the service. + */ + export interface Schema$RequestMetadata { + /** + * Optional. The type of device used by the job seeker at the time of the + * call to the service. + */ + deviceInfo?: Schema$DeviceInfo; + /** + * Required. The client-defined scope or source of the service call, which + * typically is the domain on which the service has been implemented and is + * currently being run. For example, if the service is being run by client + * <em>Foo, Inc.</em>, on job board www.foo.com and career site + * www.bar.com, then this field is set to "foo.com" for use on the + * job board, and "bar.com" for use on the career site. If this + * field is not available for some reason, please send "UNKNOWN". + */ + domain?: string; + /** + * Required. A unique session identification string. A session is defined + * as the duration of an end user's interaction with the service over a + * period. Obfuscate this field for privacy concerns before providing it to + * the API. If this field is not available for some reason, please send + * "UNKNOWN". + */ + sessionId?: string; + /** + * Required. A unique user identification string, as determined by the + * client. The client is responsible for ensuring client-level uniqueness of + * this value in order to have the strongest positive impact on search + * quality. Obfuscate this field for privacy concerns before providing it to + * the service. If this field is not available for some reason, please send + * "UNKNOWN". + */ + userId?: string; + } + /** + * Output only. Additional information returned to client, such as debugging + * information. + */ + export interface Schema$ResponseMetadata { + /** + * Identifiers for the versions of the search algorithm used during this API + * invocation if multiple algorithms are used. The default value is empty. + * For search response only. + */ + experimentIdList?: number[]; + /** + * For search response only. Indicates the mode of a performed search. + */ + mode?: string; + /** + * A unique id associated with this call. This id is logged for tracking + * purposes. + */ + requestId?: string; + } + /** + * Input only. The Request body of the `SearchJobs` call. + */ + export interface Schema$SearchJobsRequest { + /** + * Deprecated. Any value provided in this field will be ignored. Optional. + * Controls whether to disable relevance thresholding. Relevance + * thresholding removes jobs that have low relevance in search results, for + * example, removing "Assistant to the CEO" positions from the + * search results of a search for "CEO". Disabling relevance + * thresholding improves the accuracy of subsequent search requests. + * Defaults to false. + */ + disableRelevanceThresholding?: boolean; + /** + * Optional. Controls whether to broaden the search when it produces sparse + * results. Broadened queries append results to the end of the matching + * results list. Defaults to false. + */ + enableBroadening?: boolean; + /** + * Optional. Controls if the search job request requires the return of a + * precise count of the first 300 results. Setting this to `true` ensures + * consistency in the number of results per page. Best practice is to set + * this value to true if a client allows users to jump directly to a + * non-sequential search results page. Enabling this flag may adversely + * impact performance. Defaults to false. + */ + enablePreciseResultSize?: boolean; + /** + * Deprecated. Use query instead. Optional. Restrictions on the scope of + * the search request, such as filtering by location. + */ + filters?: Schema$JobFilters; + /** + * Optional. Restrictions on what fields to perform histogram on, such as + * `COMPANY_SIZE` etc. + */ + histogramFacets?: Schema$HistogramFacets; + /** + * Optional. The number of job attributes that is returned for jobs in the + * search response. Defaults to JobView.SMALL if no value is specified. + */ + jobView?: string; + /** + * Required. Mode of a search. + */ + mode?: string; + /** + * Optional. An integer that specifies the current offset (i.e. starting + * result) in search results. This field is only considered if page_token is + * unset. For example, 0 means to return results starting from the first + * matching job, and 10 means to return from the 11th job. This can be used + * for pagination, (for example, pageSize = 10 and offset = 10 means to + * return from the second page). + */ + offset?: number; + /** + * Deprecated. Use sort_by instead. Optional. The criteria that determine + * how search results are sorted. Defaults to SortBy.RELEVANCE_DESC if no + * value is specified. + */ + orderBy?: string; + /** + * Optional. A limit on the number of jobs returned in the search results. + * Increasing this value above the default value of 10 can increase search + * response time. The value can be between 1 and 100. + */ + pageSize?: number; + /** + * Optional. The token that specifies the current offset within search + * results. See SearchJobsResponse.next_page_token for an explanation of how + * to obtain the next set of query results. + */ + pageToken?: string; + /** + * Optional. Query used to search against jobs, such as keyword, location + * filters, etc. + */ + query?: Schema$JobQuery; + /** + * Required. The meta information collected about the job searcher, used to + * improve the search quality of the service.. The identifiers, (such as + * `user_id`) are provided by users, and must be unique and consistent. + */ + requestMetadata?: Schema$RequestMetadata; + /** + * Optional. The criteria that determine how search results are sorted. + * Defaults to SortBy.RELEVANCE_DESC if no value is specified. + */ + sortBy?: string; + } + /** + * Output only. Response for SearchJob method. + */ + export interface Schema$SearchJobsResponse { + /** + * The commute filter that the service applied to the specified query. This + * information is only available when query has a valid CommutePreference. + */ + appliedCommuteFilter?: Schema$CommutePreference; + /** + * The location filters that the service applied to the specified query. If + * any filters are lat-lng based, the JobLocation.location_type is + * JobLocation.LocationType#LOCATION_TYPE_UNSPECIFIED. + */ + appliedJobLocationFilters?: Schema$JobLocation[]; + /** + * An estimation of the number of jobs that match the specified query. This + * number is not guaranteed to be accurate. For accurate results, + * seenenable_precise_result_size. + */ + estimatedTotalSize?: string; + /** + * The histogram results that match with specified + * SearchJobsRequest.HistogramFacets. + */ + histogramResults?: Schema$HistogramResults; + /** + * Corresponds to SearchJobsRequest.job_view. + */ + jobView?: string; + /** + * The Job entities that match the specified SearchJobsRequest. + */ + matchingJobs?: Schema$MatchingJob[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * The token that specifies the starting position of the next page of + * results. This field is empty if there are no more results. + */ + nextPageToken?: string; + /** + * If query broadening is enabled, we may append additional results from the + * broadened query. This number indicates how many of the jobs returned in + * the jobs field are from the broadened query. These results are always at + * the end of the jobs list. In particular, a value of 0 means all the jobs + * in the jobs list are from the original (without broadening) query. If + * this field is non-zero, subsequent requests with offset after this result + * set should contain all broadened results. + */ + numJobsFromBroadenedQuery?: number; + /** + * The spell checking result, and correction. + */ + spellResult?: Schema$SpellingCorrection; + /** + * The precise result count, which is available only if the client set + * enable_precise_result_size to `true` or if the response is the last page + * of results. Otherwise, the value will be `-1`. + */ + totalSize?: string; + } + /** + * Output only. Spell check result. + */ + export interface Schema$SpellingCorrection { + /** + * Indicates if the query was corrected by the spell checker. + */ + corrected?: boolean; + /** + * Correction output consisting of the corrected keyword string. + */ + correctedText?: string; + } + /** + * Represents array of string values. + */ + export interface Schema$StringValues { + /** + * Required. String values. + */ + values?: string[]; + } + /** + * Input only. Update job request. The job typically becomes searchable + * within 10 seconds, but it may take up to 5 minutes for the job to become + * searchable. + */ + export interface Schema$UpdateJobRequest { + /** + * If set to `true`, the service will not attempt resolve a more precise + * address for the job. + */ + disableStreetAddressResolution?: boolean; + /** + * Required. The Job to be updated. + */ + job?: Schema$Job; + /** + * Optional but strongly recommended to be provided for the best service + * experience. If update_job_fields is provided, only the specified fields + * in job are updated. Otherwise all the fields are updated. A field mask + * to restrict the fields that are updated. Valid values are: * jobTitle * + * employmentTypes * description * applicationUrls * applicationEmailList * + * applicationInstruction * responsibilities * qualifications * + * educationLevels * level * department * startDate * endDate * + * compensationInfo * incentives * languageCode * benefits * expireTime * + * customAttributes * visibility * publishDate * promotionValue * locations + * * region * expiryDate (deprecated) * filterableCustomFields (deprecated) + * * unindexedCustomFields (deprecated) + */ + updateJobFields?: string; + } + + + export class Resource$Companies { + root: Jobs; + jobs: Resource$Companies$Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + this.jobs = new Resource$Companies$Jobs(root); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.companies.create + * @desc Creates a new company entity. + * @alias jobs.companies.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().Company} params.resource Request body data + * @param {object} [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$Companies$Create, options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Companies$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Companies$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Companies$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Companies$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Companies$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/companies').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.companies.delete + * @desc Deletes the specified company. + * @alias jobs.companies.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the company to be deleted, such as, "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + * @param {object} [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$Companies$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Companies$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Companies$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Companies$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Companies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Companies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.companies.get + * @desc Retrieves the specified company. + * @alias jobs.companies.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name of the company to retrieve, such as "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + * @param {object} [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$Companies$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Companies$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Companies$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Companies$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Companies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Companies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.companies.list + * @desc Lists all companies associated with a Cloud Job Discovery account. + * @alias jobs.companies.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.mustHaveOpenJobs Optional. Set to true if the companies request must have open jobs. Defaults to false. If true, at most page_size of companies are fetched, among which only those with open jobs are returned. + * @param {integer=} params.pageSize Optional. The maximum number of companies to be returned, at most 100. Default is 100 if a non-positive number is provided. + * @param {string=} params.pageToken Optional. The starting indicator from which to return results. + * @param {object} [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$Companies$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Companies$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Companies$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Companies$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Companies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Companies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/companies').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.companies.patch + * @desc Updates the specified company. Company names can't be updated. To + * update a company name, delete the company and all jobs associated with + * it, and only then re-create them. + * @alias jobs.companies.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required during company update. The resource name for a company. This is generated by the service when a company is created, for example, "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + * @param {string=} params.updateCompanyFields Optional but strongly recommended to be provided for the best service experience. If update_company_fields is provided, only the specified fields in company are updated. Otherwise all the fields are updated. A field mask to specify the company fields to update. Valid values are: * displayName * website * imageUrl * companySize * distributorBillingCompanyId * companyInfoSources * careerPageLink * hiringAgency * hqLocation * eeoText * keywordSearchableCustomAttributes * title (deprecated) * keywordSearchableCustomFields (deprecated) + * @param {().Company} params.resource Request body data + * @param {object} [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$Companies$Patch, options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Companies$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Companies$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Companies$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Companies$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Companies$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Companies$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$Company; + } + export interface Params$Resource$Companies$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the company to be deleted, such as, + * "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + */ + name?: string; + } + export interface Params$Resource$Companies$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name of the company to retrieve, such as + * "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + */ + name?: string; + } + export interface Params$Resource$Companies$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. Set to true if the companies request must have open jobs. + * Defaults to false. If true, at most page_size of companies are fetched, + * among which only those with open jobs are returned. + */ + mustHaveOpenJobs?: boolean; + /** + * Optional. The maximum number of companies to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + */ + pageSize?: number; + /** + * Optional. The starting indicator from which to return results. + */ + pageToken?: string; + } + export interface Params$Resource$Companies$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required during company update. The resource name for a company. This is + * generated by the service when a company is created, for example, + * "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + */ + name?: string; + /** + * Optional but strongly recommended to be provided for the best service + * experience. If update_company_fields is provided, only the specified + * fields in company are updated. Otherwise all the fields are updated. A + * field mask to specify the company fields to update. Valid values are: * + * displayName * website * imageUrl * companySize * + * distributorBillingCompanyId * companyInfoSources * careerPageLink * + * hiringAgency * hqLocation * eeoText * keywordSearchableCustomAttributes * + * title (deprecated) * keywordSearchableCustomFields (deprecated) + */ + updateCompanyFields?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Company; + } + + export class Resource$Companies$Jobs { + root: Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.companies.jobs.list + * @desc Deprecated. Use ListJobs instead. Lists all jobs associated with a + * company. + * @alias jobs.companies.jobs.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.companyName Required. The resource name of the company that owns the jobs to be listed, such as, "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + * @param {boolean=} params.idsOnly Optional. If set to `true`, only job ID, job requisition ID and language code will be returned. A typical use is to synchronize job repositories. Defaults to false. + * @param {boolean=} params.includeJobsCount Deprecated. Please DO NOT use this field except for small companies. Suggest counting jobs page by page instead. Optional. Set to true if the total number of open jobs is to be returned. Defaults to false. + * @param {string=} params.jobRequisitionId Optional. The requisition ID, also known as posting ID, assigned by the company to the job. The number of allowable characters is 225. + * @param {integer=} params.pageSize Optional. The maximum number of jobs to be returned per page of results. If ids_only is set to true, the maximum allowed page size is 1000. Otherwise, the maximum allowed page size is 100. Default is 100 if empty or a number < 1 is specified. + * @param {string=} params.pageToken Optional. The starting point of a query result. + * @param {object} [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$Companies$Jobs$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Companies$Jobs$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Companies$Jobs$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Companies$Jobs$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Companies$Jobs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Companies$Jobs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+companyName}/jobs') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['companyName'], + pathParams: ['companyName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Companies$Jobs$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the company that owns the jobs to be + * listed, such as, "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". + */ + companyName?: string; + /** + * Optional. If set to `true`, only job ID, job requisition ID and language + * code will be returned. A typical use is to synchronize job repositories. + * Defaults to false. + */ + idsOnly?: boolean; + /** + * Deprecated. Please DO NOT use this field except for small companies. + * Suggest counting jobs page by page instead. Optional. Set to true if + * the total number of open jobs is to be returned. Defaults to false. + */ + includeJobsCount?: boolean; + /** + * Optional. The requisition ID, also known as posting ID, assigned by the + * company to the job. The number of allowable characters is 225. + */ + jobRequisitionId?: string; + /** + * Optional. The maximum number of jobs to be returned per page of results. + * If ids_only is set to true, the maximum allowed page size is 1000. + * Otherwise, the maximum allowed page size is 100. Default is 100 if empty + * or a number < 1 is specified. + */ + pageSize?: number; + /** + * Optional. The starting point of a query result. + */ + pageToken?: string; + } + + + + export class Resource$Jobs { + root: Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.jobs.batchDelete + * @desc Deletes a list of Jobs by filter. + * @alias jobs.jobs.batchDelete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().BatchDeleteJobsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + batchDelete( + params?: Params$Resource$Jobs$Batchdelete, + options?: MethodOptions): AxiosPromise; + batchDelete( + params: Params$Resource$Jobs$Batchdelete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + batchDelete( + params: Params$Resource$Jobs$Batchdelete, + callback: BodyResponseCallback): void; + batchDelete(callback: BodyResponseCallback): void; + batchDelete( + paramsOrCallback?: Params$Resource$Jobs$Batchdelete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/jobs:batchDelete') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.create + * @desc Creates a new job. + * @alias jobs.jobs.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().CreateJobRequest} params.resource Request body data + * @param {object} [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$Jobs$Create, options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Jobs$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Jobs$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Jobs$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/jobs').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.delete + * @desc Deletes the specified job. You can specify whether to synchronously + * wait for validation, indexing, and general processing to be completed + * before the response is returned. + * @alias jobs.jobs.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.disableFastProcess Deprecated. This field is not working anymore. Optional. If set to true, this call waits for all processing steps to complete before the job is cleaned up. Otherwise, the call returns while some steps are still taking place asynchronously, hence faster. + * @param {string} params.name Required. The resource name of the job to be deleted, such as "jobs/11111111". + * @param {object} [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$Jobs$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Jobs$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Jobs$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Jobs$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.deleteByFilter + * @desc Deprecated. Use BatchDeleteJobs instead. Deletes the specified job + * by filter. You can specify whether to synchronously wait for validation, + * indexing, and general processing to be completed before the response is + * returned. + * @alias jobs.jobs.deleteByFilter + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().DeleteJobsByFilterRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + deleteByFilter( + params?: Params$Resource$Jobs$Deletebyfilter, + options?: MethodOptions): AxiosPromise; + deleteByFilter( + params: Params$Resource$Jobs$Deletebyfilter, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + deleteByFilter( + params: Params$Resource$Jobs$Deletebyfilter, + callback: BodyResponseCallback): void; + deleteByFilter(callback: BodyResponseCallback): void; + deleteByFilter( + paramsOrCallback?: Params$Resource$Jobs$Deletebyfilter| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Jobs$Deletebyfilter; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Deletebyfilter; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/jobs:deleteByFilter') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.get + * @desc Retrieves the specified job, whose status is OPEN or recently + * EXPIRED in 60 days. + * @alias jobs.jobs.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the job to retrieve, such as "jobs/11111111". + * @param {object} [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$Jobs$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Jobs$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Jobs$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Jobs$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.histogram + * @desc Deprecated. Use SearchJobsRequest.histogram_facets instead to make + * a single call with both search and histogram. Retrieves a histogram for + * the given GetHistogramRequest. This call provides a structured count of + * jobs that match against the search query, grouped by specified facets. + * This call constrains the visibility of jobs present in the database, and + * only counts jobs the caller has permission to search against. For + * example, use this call to generate the number of jobs in the U.S. by + * state. + * @alias jobs.jobs.histogram + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().GetHistogramRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + histogram(params?: Params$Resource$Jobs$Histogram, options?: MethodOptions): + AxiosPromise; + histogram( + params: Params$Resource$Jobs$Histogram, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + histogram( + params: Params$Resource$Jobs$Histogram, + callback: BodyResponseCallback): void; + histogram(callback: BodyResponseCallback): + void; + histogram( + paramsOrCallback?: Params$Resource$Jobs$Histogram| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$Histogram; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Histogram; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/jobs:histogram') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.list + * @desc Lists jobs by filter. + * @alias jobs.jobs.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter Required. The filter string specifies the jobs to be enumerated. Supported operator: =, AND The fields eligible for filtering are: * `companyName` (Required) * `requisitionId` (Optional) Sample Query: * companyName = "companies/123" * companyName = "companies/123" AND requisitionId = "req-1" + * @param {boolean=} params.idsOnly Optional. If set to `true`, only Job.name, Job.requisition_id and Job.language_code will be returned. A typical use case is to synchronize job repositories. Defaults to false. + * @param {integer=} params.pageSize Optional. The maximum number of jobs to be returned per page of results. If ids_only is set to true, the maximum allowed page size is 1000. Otherwise, the maximum allowed page size is 100. Default is 100 if empty or a number < 1 is specified. + * @param {string=} params.pageToken Optional. The starting point of a query result. + * @param {object} [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$Jobs$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Jobs$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Jobs$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Jobs$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/jobs').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.patch + * @desc Updates the specified job. You can specify whether to synchronously + * wait for validation, indexing, and general processing to be completed + * before the response is returned. If this call is executed synchronously, + * the returned job is guaranteed to be fully processed and complete upon + * response. The `companyName` and `distributorCompanyId` job fields cannot + * be updated. + * @alias jobs.jobs.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required during job update. Resource name assigned to a job by the API, for example, "/jobs/foo". Use of this field in job queries and API calls is preferred over the use of requisition_id since this value is unique. + * @param {().UpdateJobRequest} params.resource Request body data + * @param {object} [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$Jobs$Patch, options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Jobs$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Jobs$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Jobs$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.search + * @desc Searches for jobs using the provided SearchJobsRequest. This call + * constrains the visibility of jobs present in the database, and only + * returns jobs that the caller has permission to search against. + * @alias jobs.jobs.search + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().SearchJobsRequest} params.resource Request body data + * @param {object} [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$Jobs$Search, options?: MethodOptions): + AxiosPromise; + search( + params: Params$Resource$Jobs$Search, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + search( + params: Params$Resource$Jobs$Search, + callback: BodyResponseCallback): void; + search(callback: BodyResponseCallback): void; + search( + paramsOrCallback?: Params$Resource$Jobs$Search| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Jobs$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/jobs:search').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.jobs.searchForAlert + * @desc Searches for jobs using the provided SearchJobsRequest. This call + * is intended to use for large, periodic tasks such as email alert + * processing, and has different algorithmic adjustments that are targeted + * to passive job seekers. This call constrains the visibility of jobs + * present in the database, and only returns jobs the caller has permission + * to search against. + * @alias jobs.jobs.searchForAlert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().SearchJobsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + searchForAlert( + params?: Params$Resource$Jobs$Searchforalert, + options?: MethodOptions): AxiosPromise; + searchForAlert( + params: Params$Resource$Jobs$Searchforalert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + searchForAlert( + params: Params$Resource$Jobs$Searchforalert, + callback: BodyResponseCallback): void; + searchForAlert(callback: BodyResponseCallback): + void; + searchForAlert( + paramsOrCallback?: Params$Resource$Jobs$Searchforalert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Jobs$Searchforalert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Jobs$Searchforalert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/jobs:searchForAlert') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Jobs$Batchdelete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$BatchDeleteJobsRequest; + } + export interface Params$Resource$Jobs$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$CreateJobRequest; + } + export interface Params$Resource$Jobs$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Deprecated. This field is not working anymore. Optional. If set to + * true, this call waits for all processing steps to complete before the job + * is cleaned up. Otherwise, the call returns while some steps are still + * taking place asynchronously, hence faster. + */ + disableFastProcess?: boolean; + /** + * Required. The resource name of the job to be deleted, such as + * "jobs/11111111". + */ + name?: string; + } + export interface Params$Resource$Jobs$Deletebyfilter { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$DeleteJobsByFilterRequest; + } + export interface Params$Resource$Jobs$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the job to retrieve, such as + * "jobs/11111111". + */ + name?: string; + } + export interface Params$Resource$Jobs$Histogram { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$GetHistogramRequest; + } + export interface Params$Resource$Jobs$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The filter string specifies the jobs to be enumerated. + * Supported operator: =, AND The fields eligible for filtering are: * + * `companyName` (Required) * `requisitionId` (Optional) Sample Query: * + * companyName = "companies/123" * companyName = "companies/123" AND + * requisitionId = "req-1" + */ + filter?: string; + /** + * Optional. If set to `true`, only Job.name, Job.requisition_id and + * Job.language_code will be returned. A typical use case is to synchronize + * job repositories. Defaults to false. + */ + idsOnly?: boolean; + /** + * Optional. The maximum number of jobs to be returned per page of results. + * If ids_only is set to true, the maximum allowed page size is 1000. + * Otherwise, the maximum allowed page size is 100. Default is 100 if empty + * or a number < 1 is specified. + */ + pageSize?: number; + /** + * Optional. The starting point of a query result. + */ + pageToken?: string; + } + export interface Params$Resource$Jobs$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required during job update. Resource name assigned to a job by the API, + * for example, "/jobs/foo". Use of this field in job queries and API calls + * is preferred over the use of requisition_id since this value is unique. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UpdateJobRequest; + } + export interface Params$Resource$Jobs$Search { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$SearchJobsRequest; + } + export interface Params$Resource$Jobs$Searchforalert { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$SearchJobsRequest; + } + + + export class Resource$V2 { + root: Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.complete + * @desc Completes the specified prefix with job keyword suggestions. + * Intended for use by a job search auto-complete search box. + * @alias jobs.complete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.companyName Optional. If provided, restricts completion to the specified company. + * @param {string=} params.languageCode Required. The language of the query. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). For CompletionType.JOB_TITLE type, only open jobs with same language_code are returned. For CompletionType.COMPANY_NAME type, only companies having open jobs with same language_code are returned. For CompletionType.COMBINED type, only open jobs with same language_code or companies having open jobs with same language_code are returned. + * @param {integer=} params.pageSize Required. Completion result count. The maximum allowed page size is 10. + * @param {string=} params.query Required. The query used to generate suggestions. + * @param {string=} params.scope Optional. The scope of the completion. The defaults is CompletionScope.PUBLIC. + * @param {string=} params.type Optional. The completion topic. The default is CompletionType.COMBINED. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + complete(params?: Params$Resource$V2$Complete, options?: MethodOptions): + AxiosPromise; + complete( + params: Params$Resource$V2$Complete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + complete( + params: Params$Resource$V2$Complete, + callback: BodyResponseCallback): void; + complete(callback: BodyResponseCallback): + void; + complete( + paramsOrCallback?: Params$Resource$V2$Complete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$V2$Complete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$V2$Complete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2:complete').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$V2$Complete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. If provided, restricts completion to the specified company. + */ + companyName?: string; + /** + * Required. The language of the query. This is the BCP-47 language code, + * such as "en-US" or "sr-Latn". For more information, see [Tags for + * Identifying Languages](https://tools.ietf.org/html/bcp47). For + * CompletionType.JOB_TITLE type, only open jobs with same language_code are + * returned. For CompletionType.COMPANY_NAME type, only companies having + * open jobs with same language_code are returned. For + * CompletionType.COMBINED type, only open jobs with same language_code or + * companies having open jobs with same language_code are returned. + */ + languageCode?: string; + /** + * Required. Completion result count. The maximum allowed page size is 10. + */ + pageSize?: number; + /** + * Required. The query used to generate suggestions. + */ + query?: string; + /** + * Optional. The scope of the completion. The defaults is + * CompletionScope.PUBLIC. + */ + scope?: string; + /** + * Optional. The completion topic. The default is CompletionType.COMBINED. + */ + type?: string; + } +} diff --git a/src/apis/kgsearch/v1.ts b/src/apis/kgsearch/v1.ts index 2dc11efc5b6..80af0a27a58 100644 --- a/src/apis/kgsearch/v1.ts +++ b/src/apis/kgsearch/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/language/v1.ts b/src/apis/language/v1.ts index c4ad832ccf2..a28844f912a 100644 --- a/src/apis/language/v1.ts +++ b/src/apis/language/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/language/v1beta1.ts b/src/apis/language/v1beta1.ts index 92bcd46d7fc..08063e48716 100644 --- a/src/apis/language/v1beta1.ts +++ b/src/apis/language/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/language/v1beta2.ts b/src/apis/language/v1beta2.ts index 31db39c5d6e..22d4fff3648 100644 --- a/src/apis/language/v1beta2.ts +++ b/src/apis/language/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/licensing/v1.ts b/src/apis/licensing/v1.ts index 68d3f3f6c20..61ed0b9ced1 100644 --- a/src/apis/licensing/v1.ts +++ b/src/apis/licensing/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/logging/v2.ts b/src/apis/logging/v2.ts index 4d0462ecad6..583c8d2e7aa 100644 --- a/src/apis/logging/v2.ts +++ b/src/apis/logging/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/logging/v2beta1.ts b/src/apis/logging/v2beta1.ts index 6f9f638ace6..c12dd2a0a80 100644 --- a/src/apis/logging/v2beta1.ts +++ b/src/apis/logging/v2beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/manufacturers/v1.ts b/src/apis/manufacturers/v1.ts index 1ce5bc41940..69df2d8e1d0 100644 --- a/src/apis/manufacturers/v1.ts +++ b/src/apis/manufacturers/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/mirror/v1.ts b/src/apis/mirror/v1.ts index 2cdae827f47..e6900c85669 100644 --- a/src/apis/mirror/v1.ts +++ b/src/apis/mirror/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/ml/v1.ts b/src/apis/ml/v1.ts index 275d2c414c8..3273d240f37 100644 --- a/src/apis/ml/v1.ts +++ b/src/apis/ml/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/monitoring/v3.ts b/src/apis/monitoring/v3.ts index 844f9327d85..43c93b802ee 100644 --- a/src/apis/monitoring/v3.ts +++ b/src/apis/monitoring/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/oauth2/v1.ts b/src/apis/oauth2/v1.ts index 563c7e063e6..d54b963e2ce 100644 --- a/src/apis/oauth2/v1.ts +++ b/src/apis/oauth2/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/oauth2/v2.ts b/src/apis/oauth2/v2.ts index 2940458e676..6ba80f978b0 100644 --- a/src/apis/oauth2/v2.ts +++ b/src/apis/oauth2/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/oslogin/v1.ts b/src/apis/oslogin/v1.ts index e550ff9ba97..5e94d632383 100644 --- a/src/apis/oslogin/v1.ts +++ b/src/apis/oslogin/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/oslogin/v1alpha.ts b/src/apis/oslogin/v1alpha.ts index 7923785d664..ad8df947825 100644 --- a/src/apis/oslogin/v1alpha.ts +++ b/src/apis/oslogin/v1alpha.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/oslogin/v1beta.ts b/src/apis/oslogin/v1beta.ts index 04520f849c2..8442e20f5c3 100644 --- a/src/apis/oslogin/v1beta.ts +++ b/src/apis/oslogin/v1beta.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/pagespeedonline/v1.ts b/src/apis/pagespeedonline/v1.ts index 486486a8103..a6284f1d008 100644 --- a/src/apis/pagespeedonline/v1.ts +++ b/src/apis/pagespeedonline/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/pagespeedonline/v2.ts b/src/apis/pagespeedonline/v2.ts index 11d54f85677..6afed009a16 100644 --- a/src/apis/pagespeedonline/v2.ts +++ b/src/apis/pagespeedonline/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/pagespeedonline/v4.ts b/src/apis/pagespeedonline/v4.ts index 22586b8c6b4..5f17f77eec7 100644 --- a/src/apis/pagespeedonline/v4.ts +++ b/src/apis/pagespeedonline/v4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/partners/v2.ts b/src/apis/partners/v2.ts index 7585c3ea49d..ff4e12f7910 100644 --- a/src/apis/partners/v2.ts +++ b/src/apis/partners/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/people/v1.ts b/src/apis/people/v1.ts index d5a43c5a9ae..80241b01661 100644 --- a/src/apis/people/v1.ts +++ b/src/apis/people/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/photoslibrary/v1.ts b/src/apis/photoslibrary/v1.ts new file mode 100644 index 00000000000..a771718e292 --- /dev/null +++ b/src/apis/photoslibrary/v1.ts @@ -0,0 +1,1655 @@ +/** + * 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 {GoogleApis} from '../..'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; + +// TODO: We will eventually get the `any` in here cleared out, but in the +// interim we want to turn on no-implicit-any. + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace photoslibrary_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + /** + * Photos Library API + * + * Manage photos, videos, and albums in Google Photos + * + * @example + * const google = require('googleapis'); + * const photoslibrary = google.photoslibrary('v1'); + * + * @namespace photoslibrary + * @type {Function} + * @version v1 + * @variation v1 + * @param {object=} options Options for Photoslibrary + */ + export class Photoslibrary { + _options: GlobalOptions; + google: GoogleApis; + root = this; + + albums: Resource$Albums; + mediaItems: Resource$Mediaitems; + sharedAlbums: Resource$Sharedalbums; + + constructor(options: GlobalOptions, google: GoogleApis) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.albums = new Resource$Albums(this); + this.mediaItems = new Resource$Mediaitems(this); + this.sharedAlbums = new Resource$Sharedalbums(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Request to add an enrichment to a specific album at a specific position. + */ + export interface Schema$AddEnrichmentToAlbumRequest { + /** + * The position where the enrichment will be inserted. + */ + albumPosition?: Schema$AlbumPosition; + /** + * The enrichment to be added. + */ + newEnrichmentItem?: Schema$NewEnrichmentItem; + } + export interface Schema$AddEnrichmentToAlbumResponse { + /** + * [Output only] Enrichment which was added. + */ + enrichmentItem?: Schema$EnrichmentItem; + } + /** + * Representation of an album in Google Photos. Albums are a container for + * media items. They contain an additional shareInfo property if they have + * been shared by the application. + */ + export interface Schema$Album { + /** + * [Output only] A URL to the cover photo's bytes. This should not be + * used as is. Parameters should be appended to this URL before use. For + * example, '=w2048-h1024' will set the dimensions of the cover + * photo to have a width of 2048 px and height of 1024 px. + */ + coverPhotoBaseUrl?: string; + /** + * [Ouput only] Identifier for the album. This is a persistent identifier + * that can be used between sessions to identify this album. + */ + id?: string; + /** + * [Output only] True if media items can be created in the album. This field + * is based on the scopes granted and permissions of the album. If the + * scopes are changed or permissions of the album are changed, this field + * will be updated. + */ + isWriteable?: boolean; + /** + * [Output only] Google Photos URL for the album. The user needs to be + * signed in to their Google Photos account to access this link. + */ + productUrl?: string; + /** + * [Output only] Information related to shared albums. This field is only + * populated if the album is a shared album, the developer created the album + * and the user has granted photoslibrary.sharing scope. + */ + shareInfo?: Schema$ShareInfo; + /** + * Name of the album displayed to the user in their Google Photos account. + * This string should not be more than 500 characters. + */ + title?: string; + /** + * [Output only] The number of media items in the album + */ + totalMediaItems?: string; + } + /** + * Specifies a position in an album. + */ + export interface Schema$AlbumPosition { + /** + * Type of position, for a media or enrichment item. + */ + position?: string; + /** + * The enrichment item to which the position is relative to. Only used when + * position type is AFTER_ENRICHMENT_ITEM. + */ + relativeEnrichmentItemId?: string; + /** + * The media item to which the position is relative to. Only used when + * position type is AFTER_MEDIA_ITEM. + */ + relativeMediaItemId?: string; + } + /** + * Request to create one or more media items in a user's Google Photos + * library. If an <code>albumid</code> is specified, the media + * items are also added to that album. <code>albumPosition</code> + * is optional and can only be specified if an + * <code>albumId</code> is set. + */ + export interface Schema$BatchCreateMediaItemsRequest { + /** + * Identifier of the album where the media item(s) will be added. They will + * also be added to the user's library. This is an optional field. + */ + albumId?: string; + /** + * Position in the album where the media item(s) will be added. If not + * specified, the media item(s) will be added to the end of the album (as + * per the default value which is LAST_IN_ALBUM). The request will fail if + * this field is present but no album_id is specified. + */ + albumPosition?: Schema$AlbumPosition; + /** + * List of media items to be created. + */ + newMediaItems?: Schema$NewMediaItem[]; + } + export interface Schema$BatchCreateMediaItemsResponse { + /** + * [Output only] List of media items which were created. + */ + newMediaItemResults?: Schema$NewMediaItemResult[]; + } + /** + * This filter is used to define which results to return based on the contents + * of the media item. It is possible to specify a list of categories to + * include, and/or a list of categories to exclude. Within each list, the + * categories are combined with an OR. For example, if the content filter + * looks like: included_content_categories: [c1, c2, c3] It would get + * media items that contain (c1 OR c2 OR c3). And if the content filter looks + * like: excluded_content_categories: [c1, c2, c3] It would get media + * items that contain NOT (c1 OR c2 OR c3). You can also include some + * categories while excluding others, as in this proto: + * included_content_categories: [c1, c2], excluded_content_category: [c3, + * c4] It would get media items that contain (c1 OR c2) AND NOT (c3 OR c4). + * A category that appears in + * <code>includedContentategories</code> must not appear in + * <code>excludedContentCategories</code>. + */ + export interface Schema$ContentFilter { + /** + * The set of categories that must NOT be present in the media items in the + * result. The items in the set are ORed. There is a maximum of 10 + * excludedContentCategories per request. + */ + excludedContentCategories?: string[]; + /** + * The set of categories that must be present in the media items in the + * result. The items in the set are ORed. There is a maximum of 10 + * includedContentCategories per request. + */ + includedContentCategories?: string[]; + } + /** + * Information about a user who contributed the media item. Note that this + * information is only included if the album containing the media item is + * shared, was created by you and you have the sharing scope. + */ + export interface Schema$ContributorInfo { + /** + * Display name of the contributor. + */ + displayName?: string; + /** + * URL to the profile picture of the contributor. + */ + profilePictureBaseUrl?: string; + } + /** + * Request to create an album in Google Photos. + */ + export interface Schema$CreateAlbumRequest { + /** + * The album to be created. + */ + album?: Schema$Album; + } + /** + * Represents a whole calendar date. The day may be 0 to represent a year and + * month where the day is not significant, e.g. a whole calendar month. The + * month may be 0 to represent a a day and a year where the month is not + * signficant, e.g. when you want to specify the same day in every month of a + * year or a specific year. The year may be 0 to represent a month and day + * independent of year, e.g. anniversary date. + */ + export interface Schema$Date { + /** + * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + * if specifying a year/month where the day is not significant. + */ + day?: number; + /** + * Month of year. Must be from 1 to 12, or 0 if specifying a date without a + * month. + */ + month?: number; + /** + * Year of date. Must be from 1 to 9999, or 0 if specifying a date without a + * year. + */ + year?: number; + } + /** + * This filter defines the allowed dates or date ranges for the media + * returned. It is possible to pick a set of specific dates and a set of date + * ranges. + */ + export interface Schema$DateFilter { + /** + * List of dates that the media items must have been created on. There is a + * maximum of 5 dates that can be included per request. + */ + dates?: Schema$Date[]; + /** + * List of dates ranges that the media items must have been created in. + * There is a maximum of 5 dates ranges that can be included per request. + */ + ranges?: Schema$DateRange[]; + } + /** + * Defines a range of dates. Both dates must be of the same format (see Date + * definition for more). + */ + export interface Schema$DateRange { + /** + * The end date (included as part of the range) in the same format as the + * start date. + */ + endDate?: Schema$Date; + /** + * The start date (included as part of the range) in one of the formats + * described. + */ + startDate?: Schema$Date; + } + /** + * An enrichment item. + */ + export interface Schema$EnrichmentItem { + /** + * Identifier of the enrichment item. + */ + id?: string; + } + /** + * Filters that can be applied to a media item search. If multiple filter + * options are specified, they are treated as AND with each other. + */ + export interface Schema$Filters { + /** + * Filters the media items based on their content. + */ + contentFilter?: Schema$ContentFilter; + /** + * Filters the media items based on their creation date. + */ + dateFilter?: Schema$DateFilter; + /** + * If set, the results will include media items that the user has archived. + * Defaults to false (archived media items are not included). + */ + includeArchivedMedia?: boolean; + /** + * Filters the media items based on the type of media. + */ + mediaTypeFilter?: Schema$MediaTypeFilter; + } + /** + * Request to join a shared album on behalf of the user. This uses a + * shareToken which can be acquired via the shareAlbum or listSharedAlbums + * calls. + */ + export interface Schema$JoinSharedAlbumRequest { + /** + * Token indicating the shared album to join on behalf of the user. + */ + shareToken?: string; + } + /** + * Response to successfully joining the shared album on behalf of the user. + */ + export interface Schema$JoinSharedAlbumResponse {} + /** + * 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; + } + export interface Schema$ListAlbumsResponse { + /** + * [Output only] List of albums that were created by the user. + */ + albums?: Schema$Album[]; + /** + * [Output only] Token to use to get the next set of albums. Populated if + * there are more albums to retrieve for this request. + */ + nextPageToken?: string; + } + export interface Schema$ListSharedAlbumsResponse { + /** + * [Output only] Token to use to get the next set of shared albums. + * Populated if there are more shared albums to retrieve for this request. + */ + nextPageToken?: string; + /** + * [Output only] List of shared albums that were requested. + */ + sharedAlbums?: Schema$Album[]; + } + /** + * Represents a physical location. + */ + export interface Schema$Location { + /** + * Position of the location on the map. + */ + latlng?: Schema$LatLng; + /** + * Name of the location to be displayed. + */ + locationName?: string; + } + /** + * An enrichment containing a single location. + */ + export interface Schema$LocationEnrichment { + /** + * Location for this enrichment item. + */ + location?: Schema$Location; + } + /** + * An enrichment containing a map, showing origin and destination locations. + */ + export interface Schema$MapEnrichment { + /** + * Destination location for this enrichemt item. + */ + destination?: Schema$Location; + /** + * Origin location for this enrichment item. + */ + origin?: Schema$Location; + } + /** + * Representation of a media item (e.g. photo, video etc.) in Google Photos. + */ + export interface Schema$MediaItem { + /** + * A URL to the media item's bytes. This should not be used as is. For + * example, '=w2048-h1024' will set the dimensions of a media item + * of type photo to have a width of 2048 px and height of 1024 px. + */ + baseUrl?: string; + /** + * Information about the user who created this media item. + */ + contributorInfo?: Schema$ContributorInfo; + /** + * Description of the media item. This is shown to the user in the + * item's info section in the Google Photos app. + */ + description?: string; + /** + * Identifier for the media item. This is a persistent identifier that can + * be used between sessions to identify this media item. + */ + id?: string; + /** + * Metadata related to the media item, for example the height, width or + * creation time. + */ + mediaMetadata?: Schema$MediaMetadata; + /** + * MIME type of the media item. + */ + mimeType?: string; + /** + * Google Photos URL for the media item. This link will only be available to + * the user if they're signed in. + */ + productUrl?: string; + } + /** + * Metadata for a media item. + */ + export interface Schema$MediaMetadata { + /** + * Time when the media item was first created (not when it was uploaded to + * Google Photos). + */ + creationTime?: string; + /** + * Original height (in pixels) of the media item. + */ + height?: string; + /** + * Metadata for a photo media type. + */ + photo?: Schema$Photo; + /** + * Metadata for a video media type. + */ + video?: Schema$Video; + /** + * Original width (in pixels) of the media item. + */ + width?: string; + } + /** + * This filter defines the type of media items to be returned, for example + * videos or photos. All the specified media types are treated as an OR with + * each other. + */ + export interface Schema$MediaTypeFilter { + /** + * The types of media items to be included. This field should only be + * populated with one media type, multiple media types will result in an + * error response. + */ + mediaTypes?: string[]; + } + /** + * A new enrichment item to be added to an album, used by the + * AddEnrichmentToAlbum call. + */ + export interface Schema$NewEnrichmentItem { + /** + * Location to be added to the album. + */ + locationEnrichment?: Schema$LocationEnrichment; + /** + * Map to be added to the album. + */ + mapEnrichment?: Schema$MapEnrichment; + /** + * Text to be added to the album. + */ + textEnrichment?: Schema$TextEnrichment; + } + /** + * New media item that will be created in a user's Google Photos account. + */ + export interface Schema$NewMediaItem { + /** + * Description of the media item. This will be shown to the user in the + * item's info section in the Google Photos app. This string should not + * be more than 1000 characters. + */ + description?: string; + /** + * A new media item that has been uploaded via the included uploadToken. + */ + simpleMediaItem?: Schema$SimpleMediaItem; + } + /** + * Result of creating a new media item. + */ + export interface Schema$NewMediaItemResult { + /** + * Media item created with the upload token. It is populated if no errors + * occurred and the media item was created successfully. + */ + mediaItem?: Schema$MediaItem; + /** + * If an error occurred during the creation of this media item, this field + * will be populated with information related to the error. Details of this + * status can be found down below. + */ + status?: Schema$Status; + /** + * The upload token used to create this new media item. + */ + uploadToken?: string; + } + /** + * Metadata that is specific to a photo, for example, ISO, focal length and + * exposure time. Some of these fields may be null or not included. + */ + export interface Schema$Photo { + /** + * Apeture f number of the photo. + */ + apertureFNumber?: number; + /** + * Brand of the camera which took the photo. + */ + cameraMake?: string; + /** + * Model of the camera which took the photo. + */ + cameraModel?: string; + /** + * Exposure time of the photo. + */ + exposureTime?: string; + /** + * Focal length of the photo. + */ + focalLength?: number; + /** + * ISO of the photo. + */ + isoEquivalent?: number; + } + /** + * Request to search for media items in a user's library. If the album id + * is specified, this call will return the list of media items in the album. + * If neither filters nor album id are specified, this call will return all + * media items in a user's Google Photos library. If filters are + * specified, this call will return all media items in the user's library + * which fulfills the criteria based upon the filters. Filters and album id + * must not both be set, as this will result in an invalid request. + */ + export interface Schema$SearchMediaItemsRequest { + /** + * Identifier of an album. If populated will list all media items in + * specified album. Cannot be set in conjunction with any filters. + */ + albumId?: string; + /** + * Filters to apply to the request. Cannot be set in conjuction with an + * albumId. + */ + filters?: Schema$Filters; + /** + * Maximum number of media items to return in the response. The default + * number of media items to return at a time is 100. The maximum page size + * is 500. + */ + pageSize?: number; + /** + * A continuation token to get the next page of the results. Adding this to + * the request will return the rows after the pageToken. The pageToken + * should be the value returned in the nextPageToken parameter in the + * response to the searchMediaItems request. + */ + pageToken?: string; + } + export interface Schema$SearchMediaItemsResponse { + /** + * [Output only] List of media items that match the search parameters. + */ + mediaItems?: Schema$MediaItem[]; + /** + * [Output only] Token to use to get the next set of media items. Its + * presence is the only reliable indicator of more media items being + * available in the next request. + */ + nextPageToken?: string; + } + /** + * Request to make an album shared in Google Photos. + */ + export interface Schema$ShareAlbumRequest { + /** + * Options to be set when converting the album to a shared album. + */ + sharedAlbumOptions?: Schema$SharedAlbumOptions; + } + export interface Schema$ShareAlbumResponse { + /** + * [Output only] Information about the shared album. + */ + shareInfo?: Schema$ShareInfo; + } + /** + * Options that control the sharing of an album. + */ + export interface Schema$SharedAlbumOptions { + /** + * True if the shared album allows collaborators (users who have joined the + * album) to add media items to it. Defaults to false. + */ + isCollaborative?: boolean; + /** + * True if the shared album allows the owner and the collaborators (users + * who have joined the album) to add comments to the album. Defaults to + * false. + */ + isCommentable?: boolean; + } + /** + * Information about albums that are shared. Note that this information is + * only included if the album was created by you and you have the sharing + * scope. + */ + export interface Schema$ShareInfo { + /** + * A link to the album that's now shared on the Google Photos website + * and app. Anyone with the link can access this shared album and see all of + * the items present in the album. + */ + shareableUrl?: string; + /** + * Options set for the shared album. + */ + sharedAlbumOptions?: Schema$SharedAlbumOptions; + /** + * A token which can be used to join this shared album on behalf of other + * users via the API. + */ + shareToken?: string; + } + /** + * A simple media item to be created in Google Photos via an upload token. + */ + export interface Schema$SimpleMediaItem { + /** + * Token identifying the media bytes which have been uploaded to Google. + */ + uploadToken?: string; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: any[]; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + /** + * An enrichment containing text. + */ + export interface Schema$TextEnrichment { + /** + * Text for this text enrichment item. + */ + text?: string; + } + /** + * Metadata that is specific to a video, for example, fps and processing + * status. Some of these fields may be null or not included. + */ + export interface Schema$Video { + /** + * Brand of the camera which took the video. + */ + cameraMake?: string; + /** + * Model of the camera which took the video. + */ + cameraModel?: string; + /** + * Frame rate of the video. + */ + fps?: number; + /** + * Processing status of the video. + */ + status?: string; + } + + + export class Resource$Albums { + root: Photoslibrary; + constructor(root: Photoslibrary) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * photoslibrary.albums.addEnrichment + * @desc Adds an enrichment to a specified position in a defined album. + * @alias photoslibrary.albums.addEnrichment + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.albumId Identifier of the album where the enrichment will be added. + * @param {().AddEnrichmentToAlbumRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + addEnrichment( + params?: Params$Resource$Albums$Addenrichment, options?: MethodOptions): + AxiosPromise; + addEnrichment( + params: Params$Resource$Albums$Addenrichment, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + addEnrichment( + params: Params$Resource$Albums$Addenrichment, + callback: BodyResponseCallback): + void; + addEnrichment( + callback: BodyResponseCallback): + void; + addEnrichment( + paramsOrCallback?: Params$Resource$Albums$Addenrichment| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Albums$Addenrichment; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Albums$Addenrichment; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/albums/{+albumId}:addEnrichment') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['albumId'], + pathParams: ['albumId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * photoslibrary.albums.create + * @desc Creates an album in a user's Google Photos library. + * @alias photoslibrary.albums.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().CreateAlbumRequest} params.resource Request body data + * @param {object} [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$Albums$Create, options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Albums$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Albums$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Albums$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Albums$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Albums$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/albums').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * photoslibrary.albums.get + * @desc Returns the album specified by the given album id. + * @alias photoslibrary.albums.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.albumId Identifier of the album to be requested. + * @param {object} [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$Albums$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Albums$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Albums$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Albums$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Albums$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Albums$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/albums/{+albumId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['albumId'], + pathParams: ['albumId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * photoslibrary.albums.list + * @desc Lists all albums shown to a user in the 'Albums' tab of the Google + * Photos app. + * @alias photoslibrary.albums.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of albums to return in the response. The default number of albums to return at a time is 20. The maximum page size is 50. + * @param {string=} params.pageToken A continuation token to get the next page of the results. Adding this to the request will return the rows after the pageToken. The pageToken should be the value returned in the nextPageToken parameter in the response to the listAlbums 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$Albums$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Albums$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Albums$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Albums$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Albums$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Albums$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/albums').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * photoslibrary.albums.share + * @desc Marks an album as 'shared' and accessible to other users. This + * action can only be performed on albums which were created by the + * developer via the API. + * @alias photoslibrary.albums.share + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.albumId Identifier of the album to be shared. This album id must belong to an album created by the developer. . + * @param {().ShareAlbumRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + share(params?: Params$Resource$Albums$Share, options?: MethodOptions): + AxiosPromise; + share( + params: Params$Resource$Albums$Share, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + share( + params: Params$Resource$Albums$Share, + callback: BodyResponseCallback): void; + share(callback: BodyResponseCallback): void; + share( + paramsOrCallback?: Params$Resource$Albums$Share| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Albums$Share; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Albums$Share; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/albums/{+albumId}:share') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['albumId'], + pathParams: ['albumId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Albums$Addenrichment { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Identifier of the album where the enrichment will be added. + */ + albumId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AddEnrichmentToAlbumRequest; + } + export interface Params$Resource$Albums$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$CreateAlbumRequest; + } + export interface Params$Resource$Albums$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Identifier of the album to be requested. + */ + albumId?: string; + } + export interface Params$Resource$Albums$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of albums to return in the response. The default number of + * albums to return at a time is 20. The maximum page size is 50. + */ + pageSize?: number; + /** + * A continuation token to get the next page of the results. Adding this to + * the request will return the rows after the pageToken. The pageToken + * should be the value returned in the nextPageToken parameter in the + * response to the listAlbums request. + */ + pageToken?: string; + } + export interface Params$Resource$Albums$Share { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Identifier of the album to be shared. This album id must belong to an + * album created by the developer. . + */ + albumId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ShareAlbumRequest; + } + + + export class Resource$Mediaitems { + root: Photoslibrary; + constructor(root: Photoslibrary) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * photoslibrary.mediaItems.batchCreate + * @desc Creates one or more media items in a user's Google Photos library. + * If an album id is specified, the media item(s) are also added to the + * album. By default the media item(s) will be added to the end of the + * library or album. If an album id and position are both defined, then the + * media items will be added to the album at the specified position. If + * multiple media items are given, they will be inserted at the specified + * position. + * @alias photoslibrary.mediaItems.batchCreate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().BatchCreateMediaItemsRequest} params.resource Request body data + * @param {object} [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$Mediaitems$Batchcreate, + options?: MethodOptions): + AxiosPromise; + batchCreate( + params: Params$Resource$Mediaitems$Batchcreate, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + batchCreate( + params: Params$Resource$Mediaitems$Batchcreate, + callback: BodyResponseCallback): + void; + batchCreate(callback: + BodyResponseCallback): + void; + batchCreate( + paramsOrCallback?: Params$Resource$Mediaitems$Batchcreate| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Mediaitems$Batchcreate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Mediaitems$Batchcreate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/mediaItems:batchCreate') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * photoslibrary.mediaItems.get + * @desc Returns the media item specified based on a given media item id. + * @alias photoslibrary.mediaItems.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.mediaItemId Identifier of media item to be requested. + * @param {object} [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$Mediaitems$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Mediaitems$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Mediaitems$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Mediaitems$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Mediaitems$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Mediaitems$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/mediaItems/{+mediaItemId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['mediaItemId'], + pathParams: ['mediaItemId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * photoslibrary.mediaItems.search + * @desc Searches for media items in a user's Google Photos library. If no + * filters are set, then all media items in the user's library will be + * returned. If an album is set, all media items in the specified album + * will be returned. If filters are specified, anything that matches the + * filters from the user's library will be listed. If an album and filters + * are set, then this will result in an error. + * @alias photoslibrary.mediaItems.search + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().SearchMediaItemsRequest} params.resource Request body data + * @param {object} [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$Mediaitems$Search, options?: MethodOptions): + AxiosPromise; + search( + params: Params$Resource$Mediaitems$Search, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + search( + params: Params$Resource$Mediaitems$Search, + callback: BodyResponseCallback): void; + search(callback: BodyResponseCallback): + void; + search( + paramsOrCallback?: Params$Resource$Mediaitems$Search| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Mediaitems$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Mediaitems$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/mediaItems:search') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Mediaitems$Batchcreate { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$BatchCreateMediaItemsRequest; + } + export interface Params$Resource$Mediaitems$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Identifier of media item to be requested. + */ + mediaItemId?: string; + } + export interface Params$Resource$Mediaitems$Search { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$SearchMediaItemsRequest; + } + + + export class Resource$Sharedalbums { + root: Photoslibrary; + constructor(root: Photoslibrary) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * photoslibrary.sharedAlbums.join + * @desc Joins a shared album on behalf of the Google Photos user. + * @alias photoslibrary.sharedAlbums.join + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().JoinSharedAlbumRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + join(params?: Params$Resource$Sharedalbums$Join, options?: MethodOptions): + AxiosPromise; + join( + params: Params$Resource$Sharedalbums$Join, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + join( + params: Params$Resource$Sharedalbums$Join, + callback: BodyResponseCallback): void; + join(callback: BodyResponseCallback): void; + join( + paramsOrCallback?: Params$Resource$Sharedalbums$Join| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sharedalbums$Join; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sharedalbums$Join; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/sharedAlbums:join') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * photoslibrary.sharedAlbums.list + * @desc Lists all shared albums shown to a user in the 'Sharing' tab of the + * Google Photos app. + * @alias photoslibrary.sharedAlbums.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Maximum number of albums to return in the response. The default number of albums to return at a time is 20. The maximum page size is 50. + * @param {string=} params.pageToken A continuation token to get the next page of the results. Adding this to the request will return the rows after the pageToken. The pageToken should be the value returned in the nextPageToken parameter in the response to the listSharedAlbums 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$Sharedalbums$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Sharedalbums$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Sharedalbums$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Sharedalbums$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sharedalbums$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sharedalbums$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://photoslibrary.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/sharedAlbums').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sharedalbums$Join { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$JoinSharedAlbumRequest; + } + export interface Params$Resource$Sharedalbums$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Maximum number of albums to return in the response. The default number of + * albums to return at a time is 20. The maximum page size is 50. + */ + pageSize?: number; + /** + * A continuation token to get the next page of the results. Adding this to + * the request will return the rows after the pageToken. The pageToken + * should be the value returned in the nextPageToken parameter in the + * response to the listSharedAlbums request. + */ + pageToken?: string; + } +} diff --git a/src/apis/playcustomapp/v1.ts b/src/apis/playcustomapp/v1.ts index 8adff324094..34ac57b1105 100644 --- a/src/apis/playcustomapp/v1.ts +++ b/src/apis/playcustomapp/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/plus/v1.ts b/src/apis/plus/v1.ts index d9ad7b837c5..3abc22332e9 100644 --- a/src/apis/plus/v1.ts +++ b/src/apis/plus/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/plusDomains/v1.ts b/src/apis/plusDomains/v1.ts index f1f9954a859..2a559521afd 100644 --- a/src/apis/plusDomains/v1.ts +++ b/src/apis/plusDomains/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/poly/v1.ts b/src/apis/poly/v1.ts index daff32eda79..f85cb41dd9d 100644 --- a/src/apis/poly/v1.ts +++ b/src/apis/poly/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/proximitybeacon/v1beta1.ts b/src/apis/proximitybeacon/v1beta1.ts index b95b5ca433b..be3999f705c 100644 --- a/src/apis/proximitybeacon/v1beta1.ts +++ b/src/apis/proximitybeacon/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/pubsub/v1.ts b/src/apis/pubsub/v1.ts index 26efbbbc310..a1e4da07d7b 100644 --- a/src/apis/pubsub/v1.ts +++ b/src/apis/pubsub/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/pubsub/v1beta1a.ts b/src/apis/pubsub/v1beta1a.ts index c84a6285c3a..c43a25d713f 100644 --- a/src/apis/pubsub/v1beta1a.ts +++ b/src/apis/pubsub/v1beta1a.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/pubsub/v1beta2.ts b/src/apis/pubsub/v1beta2.ts index 291c090a59a..c27cef27c1a 100644 --- a/src/apis/pubsub/v1beta2.ts +++ b/src/apis/pubsub/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/redis/v1beta1.ts b/src/apis/redis/v1beta1.ts index 1c471ca57b0..efb85170758 100644 --- a/src/apis/redis/v1beta1.ts +++ b/src/apis/redis/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/replicapool/v1beta1.ts b/src/apis/replicapool/v1beta1.ts index eecc405f661..1b7404bdc2b 100644 --- a/src/apis/replicapool/v1beta1.ts +++ b/src/apis/replicapool/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/replicapool/v1beta2.ts b/src/apis/replicapool/v1beta2.ts index 3cd3c40348a..2ea42246f6b 100644 --- a/src/apis/replicapool/v1beta2.ts +++ b/src/apis/replicapool/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/replicapoolupdater/v1beta1.ts b/src/apis/replicapoolupdater/v1beta1.ts index eda5467a719..f66a833c55a 100644 --- a/src/apis/replicapoolupdater/v1beta1.ts +++ b/src/apis/replicapoolupdater/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/reseller/v1.ts b/src/apis/reseller/v1.ts index 44701d474dc..51efe853ce4 100644 --- a/src/apis/reseller/v1.ts +++ b/src/apis/reseller/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/resourceviews/v1beta1.ts b/src/apis/resourceviews/v1beta1.ts index 4ff60147ad2..6b3843c1532 100644 --- a/src/apis/resourceviews/v1beta1.ts +++ b/src/apis/resourceviews/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/resourceviews/v1beta2.ts b/src/apis/resourceviews/v1beta2.ts index ddacf6d1ba4..97165ad2e2e 100644 --- a/src/apis/resourceviews/v1beta2.ts +++ b/src/apis/resourceviews/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/runtimeconfig/v1.ts b/src/apis/runtimeconfig/v1.ts index bd76e8327a5..d007c114d1f 100644 --- a/src/apis/runtimeconfig/v1.ts +++ b/src/apis/runtimeconfig/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/runtimeconfig/v1beta1.ts b/src/apis/runtimeconfig/v1beta1.ts index 47c465e4897..a0ca68eb39f 100644 --- a/src/apis/runtimeconfig/v1beta1.ts +++ b/src/apis/runtimeconfig/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/safebrowsing/v4.ts b/src/apis/safebrowsing/v4.ts index 492b1c4c4aa..bc82737522d 100644 --- a/src/apis/safebrowsing/v4.ts +++ b/src/apis/safebrowsing/v4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/script/v1.ts b/src/apis/script/v1.ts index 52c1a2662a3..a4e6a4fbe37 100644 --- a/src/apis/script/v1.ts +++ b/src/apis/script/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/searchconsole/v1.ts b/src/apis/searchconsole/v1.ts index 4a7640fc6c8..36034d3b40e 100644 --- a/src/apis/searchconsole/v1.ts +++ b/src/apis/searchconsole/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/servicebroker/v1.ts b/src/apis/servicebroker/v1.ts index 46b163f506b..c9dee061660 100644 --- a/src/apis/servicebroker/v1.ts +++ b/src/apis/servicebroker/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/servicebroker/v1alpha1.ts b/src/apis/servicebroker/v1alpha1.ts index 820b7ef42bf..cf24b2f4f98 100644 --- a/src/apis/servicebroker/v1alpha1.ts +++ b/src/apis/servicebroker/v1alpha1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/servicebroker/v1beta1.ts b/src/apis/servicebroker/v1beta1.ts index f7a492f98da..7ad1515e948 100644 --- a/src/apis/servicebroker/v1beta1.ts +++ b/src/apis/servicebroker/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/serviceconsumermanagement/v1.ts b/src/apis/serviceconsumermanagement/v1.ts index 0ac9125dda9..a28489072ca 100644 --- a/src/apis/serviceconsumermanagement/v1.ts +++ b/src/apis/serviceconsumermanagement/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/servicecontrol/v1.ts b/src/apis/servicecontrol/v1.ts index 21a73c33b77..66bc4e34aac 100644 --- a/src/apis/servicecontrol/v1.ts +++ b/src/apis/servicecontrol/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/servicemanagement/v1.ts b/src/apis/servicemanagement/v1.ts index 88482a94888..0e58e94a5fe 100644 --- a/src/apis/servicemanagement/v1.ts +++ b/src/apis/servicemanagement/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/serviceusage/v1beta1.ts b/src/apis/serviceusage/v1beta1.ts index 62309521481..9466b2e5dc2 100644 --- a/src/apis/serviceusage/v1beta1.ts +++ b/src/apis/serviceusage/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -346,6 +346,22 @@ export namespace serviceusage_v1beta1 { */ serviceIds?: string[]; } + /** + * Response message for the `BatchEnableServices` method. This response + * message is assigned to the `response` field of the returned Operation when + * that operation is done. + */ + export interface Schema$BatchEnableServicesResponse { + /** + * If allow_partial_success is true, and one or more services could not be + * enabled, this field contains the details about each failure. + */ + failures?: Schema$EnableFailure[]; + /** + * The new state of the services after enabling. + */ + services?: Schema$GoogleApiServiceusageV1Service[]; + } /** * Billing related configuration of the service. The following example shows * how to configure monitored resources and metrics for billing: @@ -512,6 +528,17 @@ export namespace serviceusage_v1beta1 { * Request message for the `DisableService` method. */ export interface Schema$DisableServiceRequest {} + /** + * Response message for the `DisableService` method. This response message is + * assigned to the `response` field of the returned Operation when that + * operation is done. + */ + export interface Schema$DisableServiceResponse { + /** + * The new state of the service after disabling. + */ + service?: Schema$GoogleApiServiceusageV1Service; + } /** * `Documentation` provides the information for describing a service. Example: * <pre><code>documentation: summary: > The Google @@ -605,10 +632,31 @@ export namespace serviceusage_v1beta1 { */ selector?: string; } + export interface Schema$EnableFailure { + /** + * An error message describing why the service could not be enabled. + */ + errorMessage?: string; + /** + * The service id of a service that could not be enabled. + */ + serviceId?: string; + } /** * Request message for the `EnableService` method. */ export interface Schema$EnableServiceRequest {} + /** + * Response message for the `EnableService` method. This response message is + * assigned to the `response` field of the returned Operation when that + * operation is done. + */ + export interface Schema$EnableServiceResponse { + /** + * The new state of the service after enabling. + */ + service?: Schema$GoogleApiServiceusageV1Service; + } /** * `Endpoint` describes a network endpoint that serves a set of APIs. A * service may expose any number of endpoints, and all endpoints share the @@ -906,6 +954,72 @@ export namespace serviceusage_v1beta1 { */ usage?: Schema$Usage; } + /** + * A service that is available for use by the consumer. + */ + export interface Schema$GoogleApiServiceusageV1Service { + /** + * The service configuration of the available service. Some fields may be + * filtered out of the configuration in responses to the `ListServices` + * method. These fields are present only in responses to the `GetService` + * method. + */ + config?: Schema$GoogleApiServiceusageV1ServiceConfig; + /** + * The resource name of the consumer and service. A valid name would be: - + * projects/123/services/serviceusage.googleapis.com + */ + name?: string; + /** + * The resource name of the consumer. A valid name would be: - projects/123 + */ + parent?: string; + /** + * Whether or not the service has been enabled for use by the consumer. + */ + state?: string; + } + /** + * The configuration of the service. + */ + export interface Schema$GoogleApiServiceusageV1ServiceConfig { + /** + * A list of API interfaces exported by this service. Contains only the + * names, versions, and method names of the interfaces. + */ + apis?: Schema$Api[]; + /** + * Auth configuration. Contains only the OAuth rules. + */ + authentication?: Schema$Authentication; + /** + * Additional API documentation. Contains only the summary and the + * documentation URL. + */ + documentation?: Schema$Documentation; + /** + * Configuration for network endpoints. Contains only the names and aliases + * of the endpoints. + */ + endpoints?: Schema$Endpoint[]; + /** + * The DNS address at which this service is available. An example DNS + * address would be: `calendar.googleapis.com`. + */ + name?: string; + /** + * Quota configuration. + */ + quota?: Schema$Quota; + /** + * The product title for this service. + */ + title?: string; + /** + * Configuration controlling usage of this service. + */ + usage?: Schema$Usage; + } /** * Defines the HTTP configuration for an API service. It contains a list of * HttpRule, each specifying the mapping of an RPC method to one or more HTTP diff --git a/src/apis/serviceuser/v1.ts b/src/apis/serviceuser/v1.ts index 301f8c2058f..86ba19e8e83 100644 --- a/src/apis/serviceuser/v1.ts +++ b/src/apis/serviceuser/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/sheets/v4.ts b/src/apis/sheets/v4.ts index 6122672586b..b32a41b0644 100644 --- a/src/apis/sheets/v4.ts +++ b/src/apis/sheets/v4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -125,6 +125,37 @@ export namespace sheets_v4 { */ rule?: Schema$ConditionalFormatRule; } + /** + * Creates a group over the specified range. If the requested range is a + * superset of the range of an existing group G, then the depth of G will be + * incremented and this new group G' will have the depth of that group. + * For example, a group [C:D, depth 1] + [B:E] results in groups [B:E, depth + * 1] and [C:D, depth 2]. If the requested range is a subset of the range of + * an existing group G, then the depth of the new group G' will be one + * greater than the depth of G. For example, a group [B:E, depth 1] + [C:D] + * results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range + * starts before and ends within, or starts within and ends after, the range + * of an existing group G, then the range of the existing group G will become + * the union of the ranges, and the new group G' will have depth one + * greater than the depth of G and range as the intersection of the ranges. + * For example, a group [B:D, depth 1] + [C:E] results in groups [B:E, depth + * 1] and [C:D, depth 2]. + */ + export interface Schema$AddDimensionGroupRequest { + /** + * The range over which to create a group. + */ + range?: Schema$DimensionRange; + } + /** + * The result of adding a group. + */ + export interface Schema$AddDimensionGroupResponse { + /** + * All groups of a dimension after adding a group to that dimension. + */ + dimensionGroups?: Schema$DimensionGroup[]; + } /** * Adds a filter view. */ @@ -1512,6 +1543,26 @@ export namespace sheets_v4 { */ strict?: boolean; } + /** + * Allows you to organize the date-time values in a source data column into + * buckets based on selected parts of their date or time values. For example, + * consider a pivot table showing sales transactions by date: + * +----------+--------------+ | Date | SUM of Sales | + * +----------+--------------+ | 1/1/2017 | $621.14 | | 2/3/2017 + * | $708.84 | | 5/8/2017 | $326.84 | ... + * +----------+--------------+ Applying a date-time group rule with a + * DateTimeRuleType of YEAR_MONTH results in the following pivot table. + * +--------------+--------------+ | Grouped Date | SUM of Sales | + * +--------------+--------------+ | 2017-Jan | $53,731.78 | | + * 2017-Feb | $83,475.32 | | 2017-Mar | $94,385.05 | ... + * +--------------+--------------+ + */ + export interface Schema$DateTimeRule { + /** + * The type of date-time grouping to apply. + */ + type?: string; + } /** * Removes the banded range with the given ID from the spreadsheet. */ @@ -1563,6 +1614,27 @@ export namespace sheets_v4 { */ deletedDeveloperMetadata?: Schema$DeveloperMetadata[]; } + /** + * Deletes a group over the specified range by decrementing the depth of the + * dimensions in the range. For example, assume the sheet has a depth-1 group + * over B:E and a depth-2 group over C:D. Deleting a group over D:E would + * leave the sheet with a depth-1 group over B:D and a depth-2 group over C:C. + */ + export interface Schema$DeleteDimensionGroupRequest { + /** + * The range of the group to be deleted. + */ + range?: Schema$DimensionRange; + } + /** + * The result of deleting a group. + */ + export interface Schema$DeleteDimensionGroupResponse { + /** + * All groups of a dimension after deleting a group from that dimension. + */ + dimensionGroups?: Schema$DimensionGroup[]; + } /** * Deletes the dimensions from the sheet. */ @@ -1755,6 +1827,32 @@ export namespace sheets_v4 { */ visibility?: string; } + /** + * A group over an interval of rows or columns on a sheet, which can contain + * or be contained within other groups. A group can be collapsed or expanded + * as a unit on the sheet. + */ + export interface Schema$DimensionGroup { + /** + * True if this group is collapsed. A collapsed group will remain collapsed + * if an overlapping group at a shallower depth is expanded. collapsed == + * true does not imply that all dimensions within the group are hidden, + * since a dimension's visibility can change independently from this + * group property. However, when this property is updated, all dimensions + * within it will be set to hidden if collapsed == true, or set to visible + * if collapsed == false. + */ + collapsed?: boolean; + /** + * The depth of the group, representing how many groups have a range that + * wholly contains the range of this group. + */ + depth?: number; + /** + * The range over which this group exists. + */ + range?: Schema$DimensionRange; + } /** * Properties about a dimension. */ @@ -2161,6 +2259,10 @@ export namespace sheets_v4 { * The number of columns in the grid. */ columnCount?: number; + /** + * True if the column grouping control toggle is shown after the group. + */ + columnGroupControlAfter?: boolean; /** * The number of columns that are frozen in the grid. */ @@ -2177,6 +2279,10 @@ export namespace sheets_v4 { * The number of rows in the grid. */ rowCount?: number; + /** + * True if the row grouping control toggle is shown after the group. + */ + rowGroupControlAfter?: boolean; } /** * A range on a sheet. All indexes are zero-based. Indexes are half open, e.g @@ -2755,6 +2861,10 @@ export namespace sheets_v4 { * rule and a PivotGroup that does not. */ export interface Schema$PivotGroupRule { + /** + * A DateTimeRule. + */ + dateTimeRule?: Schema$DateTimeRule; /** * A HistogramRule. */ @@ -2972,6 +3082,10 @@ export namespace sheets_v4 { * Adds a new conditional format rule. */ addConditionalFormatRule?: Schema$AddConditionalFormatRuleRequest; + /** + * Creates a group over the specified range. + */ + addDimensionGroup?: Schema$AddDimensionGroupRequest; /** * Adds a filter view. */ @@ -3037,6 +3151,10 @@ export namespace sheets_v4 { * Deletes rows or columns in a sheet. */ deleteDimension?: Schema$DeleteDimensionRequest; + /** + * Deletes a group over the specified range. + */ + deleteDimensionGroup?: Schema$DeleteDimensionGroupRequest; /** * Deletes an embedded object (e.g, chart, image) in a sheet. */ @@ -3145,6 +3263,10 @@ export namespace sheets_v4 { * Updates an existing developer metadata entry */ updateDeveloperMetadata?: Schema$UpdateDeveloperMetadataRequest; + /** + * Updates the state of the specified group. + */ + updateDimensionGroup?: Schema$UpdateDimensionGroupRequest; /** * Updates dimensions' properties. */ @@ -3186,6 +3308,10 @@ export namespace sheets_v4 { * A reply from adding a chart. */ addChart?: Schema$AddChartResponse; + /** + * A reply from adding a dimension group. + */ + addDimensionGroup?: Schema$AddDimensionGroupResponse; /** * A reply from adding a filter view. */ @@ -3214,6 +3340,10 @@ export namespace sheets_v4 { * A reply from deleting a developer metadata entry. */ deleteDeveloperMetadata?: Schema$DeleteDeveloperMetadataResponse; + /** + * A reply from deleting a dimension group. + */ + deleteDimensionGroup?: Schema$DeleteDimensionGroupResponse; /** * A reply from duplicating a filter view. */ @@ -3309,6 +3439,11 @@ export namespace sheets_v4 { * The specifications of every chart on this sheet. */ charts?: Schema$EmbeddedChart[]; + /** + * All column groups on this sheet, ordered by increasing range start index, + * then by group depth. + */ + columnGroups?: Schema$DimensionGroup[]; /** * The conditional format rules in this sheet. */ @@ -3343,6 +3478,11 @@ export namespace sheets_v4 { * The protected ranges in this sheet. */ protectedRanges?: Schema$ProtectedRange[]; + /** + * All row groups on this sheet, ordered by increasing range start index, + * then by group depth. + */ + rowGroups?: Schema$DimensionGroup[]; } /** * Properties of a sheet. @@ -3892,6 +4032,22 @@ export namespace sheets_v4 { */ developerMetadata?: Schema$DeveloperMetadata[]; } + /** + * Updates the state of the specified group. + */ + export interface Schema$UpdateDimensionGroupRequest { + /** + * The group whose state should be updated. The range and depth of the group + * should specify a valid group on the sheet, and all other fields updated. + */ + dimensionGroup?: Schema$DimensionGroup; + /** + * The fields that should be updated. At least one field must be specified. + * The root `dimensionGroup` is implied and should not be specified. A + * single `"*"` can be used as short-hand for listing every field. + */ + fields?: string; + } /** * Updates properties of dimensions within the specified range. */ diff --git a/src/apis/siteVerification/v1.ts b/src/apis/siteVerification/v1.ts index 96b913cfdbc..5a1a13cc992 100644 --- a/src/apis/siteVerification/v1.ts +++ b/src/apis/siteVerification/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/slides/v1.ts b/src/apis/slides/v1.ts index c8c3a70e3ac..134cc0c5712 100644 --- a/src/apis/slides/v1.ts +++ b/src/apis/slides/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/sourcerepo/v1.ts b/src/apis/sourcerepo/v1.ts index 005f72a88c4..e7e43e1430f 100644 --- a/src/apis/sourcerepo/v1.ts +++ b/src/apis/sourcerepo/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/spanner/v1.ts b/src/apis/spanner/v1.ts index 55fcd4bc929..1a57a7f81f3 100644 --- a/src/apis/spanner/v1.ts +++ b/src/apis/spanner/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/spectrum/v1explorer.ts b/src/apis/spectrum/v1explorer.ts index 4f192852f59..4f7adc1e253 100644 --- a/src/apis/spectrum/v1explorer.ts +++ b/src/apis/spectrum/v1explorer.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/speech/v1.ts b/src/apis/speech/v1.ts index e169ef22844..2a7961c9f36 100644 --- a/src/apis/speech/v1.ts +++ b/src/apis/speech/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/speech/v1beta1.ts b/src/apis/speech/v1beta1.ts index 01e378ca77d..3cd7ffaf5d9 100644 --- a/src/apis/speech/v1beta1.ts +++ b/src/apis/speech/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/sqladmin/v1beta3.ts b/src/apis/sqladmin/v1beta3.ts index 0f6fbb59ee7..b331a87d2c0 100644 --- a/src/apis/sqladmin/v1beta3.ts +++ b/src/apis/sqladmin/v1beta3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -1619,21 +1619,21 @@ export namespace sqladmin_v1beta3 { } - /** - * sql.instances.import - * @desc Imports data into a Cloud SQL instance from a MySQL dump file - * stored in a Google Cloud Storage bucket. - * @alias sql.instances.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string} params.project Project ID of the project that contains the instance. - * @param {().InstancesImportRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * sql.instances.import + * @desc Imports data into a Cloud SQL instance from a MySQL dump file stored in + * a Google Cloud Storage bucket. + * @alias sql.instances.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. + * @param {string} params.project Project ID of the project that contains the instance. + * @param {().InstancesImportRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Instances$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Instances$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Instances$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/sqladmin/v1beta4.ts b/src/apis/sqladmin/v1beta4.ts index 3a858c2674c..21daa8241a6 100644 --- a/src/apis/sqladmin/v1beta4.ts +++ b/src/apis/sqladmin/v1beta4.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -2879,21 +2879,21 @@ export namespace sqladmin_v1beta4 { } - /** - * sql.instances.import - * @desc Imports data into a Cloud SQL instance from a MySQL dump file in - * Google Cloud Storage. - * @alias sql.instances.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string} params.project Project ID of the project that contains the instance. - * @param {().InstancesImportRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ +/** + * sql.instances.import + * @desc Imports data into a Cloud SQL instance from a MySQL dump file in Google + * Cloud Storage. + * @alias sql.instances.import + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. + * @param {string} params.project Project ID of the project that contains the instance. + * @param {().InstancesImportRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ import(params?: Params$Resource$Instances$Import, options?: MethodOptions): AxiosPromise; import(params: Params$Resource$Instances$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; import(params: Params$Resource$Instances$Import, callback: BodyResponseCallback): void; diff --git a/src/apis/storage/v1.ts b/src/apis/storage/v1.ts index da83cfbaf24..f17a604d056 100644 --- a/src/apis/storage/v1.ts +++ b/src/apis/storage/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -120,8 +120,7 @@ export namespace storage_v1 { */ defaultObjectAcl?: Schema$ObjectAccessControl[]; /** - * Encryption configuration used by default for newly inserted objects, when - * no encryption config is specified. + * Encryption configuration for a bucket. */ encryption?: any; /** diff --git a/src/apis/storage/v1beta1.ts b/src/apis/storage/v1beta1.ts index b5f89c09666..6925e2c7dd3 100644 --- a/src/apis/storage/v1beta1.ts +++ b/src/apis/storage/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/storage/v1beta2.ts b/src/apis/storage/v1beta2.ts index d4a772ab1e0..487c9194ffa 100644 --- a/src/apis/storage/v1beta2.ts +++ b/src/apis/storage/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/storagetransfer/v1.ts b/src/apis/storagetransfer/v1.ts index 7cfbfa13ea6..a2516ef38f4 100644 --- a/src/apis/storagetransfer/v1.ts +++ b/src/apis/storagetransfer/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/streetviewpublish/v1.ts b/src/apis/streetviewpublish/v1.ts index 6f1d9f10cc4..7d577f0e764 100644 --- a/src/apis/streetviewpublish/v1.ts +++ b/src/apis/streetviewpublish/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/surveys/v2.ts b/src/apis/surveys/v2.ts index 7b297b65a64..84cf432e157 100644 --- a/src/apis/surveys/v2.ts +++ b/src/apis/surveys/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -56,7 +56,6 @@ export namespace surveys_v2 { google: GoogleApis; root = this; - mobileapppanels: Resource$Mobileapppanels; results: Resource$Results; surveys: Resource$Surveys; @@ -65,7 +64,6 @@ export namespace surveys_v2 { this.google = google; this.getRoot.bind(this); - this.mobileapppanels = new Resource$Mobileapppanels(this); this.results = new Resource$Results(this); this.surveys = new Resource$Surveys(this); } @@ -79,58 +77,6 @@ export namespace surveys_v2 { fields?: Schema$FieldMask[]; id?: number; } - /** - * Representation of an individual pre-defined panel object defining a - * targeted audience of opinion rewards mobile app users. - */ - export interface Schema$MobileAppPanel { - /** - * Country code for the country of the users that the panel contains. Uses - * standard ISO 3166-1 2-character language codes. For instance, - * 'US' for the United States, and 'GB' for the United - * Kingdom. Any survey created targeting this panel must also target the - * corresponding country. - */ - country?: string; - /** - * Whether or not the panel is accessible to all API users. - */ - isPublicPanel?: boolean; - /** - * Language code that the panel can target. For instance, 'en-US'. - * Uses standard BCP47 language codes. See specification. Any survey created - * targeting this panel must also target the corresponding language. - */ - language?: string; - /** - * Unique panel ID string. This corresponds to the mobile_app_panel_id used - * in Survey Insert requests. - */ - mobileAppPanelId?: string; - /** - * Human readable name of the audience panel. - */ - name?: string; - /** - * List of email addresses for users who can target members of this panel. - * Must contain at least the address of the user making the API call for - * panels that are not public. This field will be empty for public panels. - */ - owners?: string[]; - } - export interface Schema$MobileAppPanelsListResponse { - pageInfo?: Schema$PageInfo; - /** - * Unique request ID used for logging and debugging. Please include in any - * error reporting or troubleshooting requests. - */ - requestId?: string; - /** - * An individual predefined panel of Opinion Rewards mobile users. - */ - resources?: Schema$MobileAppPanel[]; - tokenPagination?: Schema$TokenPagination; - } export interface Schema$PageInfo { resultPerPage?: number; startIndex?: number; @@ -234,12 +180,6 @@ export namespace surveys_v2 { * Accepts standard BCP47 language codes. See specification. */ languages?: string[]; - /** - * Key for predefined panel that causes survey to be sent to a predefined - * set of Opinion Rewards App users. You must set PopulationSource to - * ANDROID_APP_PANEL to use this field. - */ - mobileAppPanelId?: string; /** * Online population source where the respondents are sampled from. */ @@ -259,22 +199,23 @@ export namespace surveys_v2 { */ currencyCode?: string; /** - * Threshold to start a survey automatically if the quoted price is at most - * this value. When a survey has a Screener (threshold) question, it must go - * through an incidence pricing test to determine the final cost per - * response. Typically you will have to make a followup call to start the - * survey giving the final computed cost per response. If the survey has no - * threshold_answers, setting this property will return an error. By - * specifying this property, you indicate the max price per response you are - * willing to pay in advance of the incidence test. If the price turns out - * to be lower than the specified value, the survey will begin immediately - * and you will be charged at the rate determined by the incidence pricing - * test. If the price turns out to be greater than the specified value the - * survey will not be started and you will instead be notified what price - * was determined by the incidence test. At that point, you must raise the - * value of this property to be greater than or equal to that cost before - * attempting to start the survey again. This will immediately start the - * survey as long the incidence test was run within the last 21 days. + * *Deprecated* Threshold to start a survey automatically if the quoted + * price is at most this value. When a survey has a Screener (threshold) + * question, it must go through an incidence pricing test to determine the + * final cost per response. Typically you will have to make a followup call + * to start the survey giving the final computed cost per response. If the + * survey has no threshold_answers, setting this property will return an + * error. By specifying this property, you indicate the max price per + * response you are willing to pay in advance of the incidence test. If the + * price turns out to be lower than the specified value, the survey will + * begin immediately and you will be charged at the rate determined by the + * incidence pricing test. If the price turns out to be greater than the + * specified value the survey will not be started and you will instead be + * notified what price was determined by the incidence test. At that point, + * you must raise the value of this property to be greater than or equal to + * that cost before attempting to start the survey again. This will + * immediately start the survey as long the incidence test was run within + * the last 21 days. This will no longer be available after June 2018. */ maxCostPerResponseNanos?: string; /** @@ -441,8 +382,9 @@ export namespace surveys_v2 { } export interface Schema$SurveysStartRequest { /** - * Threshold to start a survey automically if the quoted prices is less than - * or equal to this value. See Survey.Cost for more details. + * *Deprecated* Threshold to start a survey automatically if the quoted + * prices is less than or equal to this value. See Survey.Cost for more + * details. This will no longer be available after June 2018. */ maxCostPerResponseNanos?: string; } @@ -466,273 +408,6 @@ export namespace surveys_v2 { } - export class Resource$Mobileapppanels { - root: Surveys; - constructor(root: Surveys) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * surveys.mobileapppanels.get - * @desc Retrieves a MobileAppPanel that is available to the authenticated - * user. - * @alias surveys.mobileapppanels.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.panelId External URL ID for the panel. - * @param {object} [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$Mobileapppanels$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Mobileapppanels$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Mobileapppanels$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Mobileapppanels$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Mobileapppanels$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Mobileapppanels$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/surveys/v2/mobileAppPanels/{panelId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['panelId'], - pathParams: ['panelId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * surveys.mobileapppanels.list - * @desc Lists the MobileAppPanels available to the authenticated user. - * @alias surveys.mobileapppanels.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {integer=} params.maxResults - * @param {integer=} params.startIndex - * @param {string=} params.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$Mobileapppanels$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Mobileapppanels$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - list( - params: Params$Resource$Mobileapppanels$List, - callback: BodyResponseCallback): - void; - list(callback: BodyResponseCallback): - void; - list( - paramsOrCallback?: Params$Resource$Mobileapppanels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Mobileapppanels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Mobileapppanels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/surveys/v2/mobileAppPanels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * surveys.mobileapppanels.update - * @desc Updates a MobileAppPanel. Currently the only property that can be - * updated is the owners property. - * @alias surveys.mobileapppanels.update - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.panelId External URL ID for the panel. - * @param {().MobileAppPanel} params.resource Request body data - * @param {object} [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$Mobileapppanels$Update, - options?: MethodOptions): AxiosPromise; - update( - params: Params$Resource$Mobileapppanels$Update, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - update( - params: Params$Resource$Mobileapppanels$Update, - callback: BodyResponseCallback): void; - update(callback: BodyResponseCallback): void; - update( - paramsOrCallback?: Params$Resource$Mobileapppanels$Update| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Mobileapppanels$Update; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Mobileapppanels$Update; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/surveys/v2/mobileAppPanels/{panelId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'PUT' - }, - options), - params, - requiredParams: ['panelId'], - pathParams: ['panelId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Mobileapppanels$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * External URL ID for the panel. - */ - panelId?: string; - } - export interface Params$Resource$Mobileapppanels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * - */ - maxResults?: number; - /** - * - */ - startIndex?: number; - /** - * - */ - token?: string; - } - export interface Params$Resource$Mobileapppanels$Update { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * External URL ID for the panel. - */ - panelId?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$MobileAppPanel; - } - - export class Resource$Results { root: Surveys; constructor(root: Surveys) { diff --git a/src/apis/tagmanager/v1.ts b/src/apis/tagmanager/v1.ts index f5351b3c622..192c8bed71d 100644 --- a/src/apis/tagmanager/v1.ts +++ b/src/apis/tagmanager/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/tagmanager/v2.ts b/src/apis/tagmanager/v2.ts index b579ee76f0b..fb4171520ee 100644 --- a/src/apis/tagmanager/v2.ts +++ b/src/apis/tagmanager/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/tasks/v1.ts b/src/apis/tasks/v1.ts index 60fb51fbf7f..e985b05db32 100644 --- a/src/apis/tasks/v1.ts +++ b/src/apis/tasks/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/testing/v1.ts b/src/apis/testing/v1.ts index c5f5a450166..2614b6f3867 100644 --- a/src/apis/testing/v1.ts +++ b/src/apis/testing/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/texttospeech/v1beta1.ts b/src/apis/texttospeech/v1beta1.ts index 2a32e218f26..8fe2870c9b8 100644 --- a/src/apis/texttospeech/v1beta1.ts +++ b/src/apis/texttospeech/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/toolresults/v1beta3.ts b/src/apis/toolresults/v1beta3.ts index 7cb28d45bd0..539e701607c 100644 --- a/src/apis/toolresults/v1beta3.ts +++ b/src/apis/toolresults/v1beta3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/tpu/v1alpha1.ts b/src/apis/tpu/v1alpha1.ts index 8027bb929d2..34b18e1246f 100644 --- a/src/apis/tpu/v1alpha1.ts +++ b/src/apis/tpu/v1alpha1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/translate/v2.ts b/src/apis/translate/v2.ts index c18cf1baa29..33576f9e3bf 100644 --- a/src/apis/translate/v2.ts +++ b/src/apis/translate/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/urlshortener/v1.ts b/src/apis/urlshortener/v1.ts index 72757a53fdd..0bfce0f12fe 100644 --- a/src/apis/urlshortener/v1.ts +++ b/src/apis/urlshortener/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/vault/v1.ts b/src/apis/vault/v1.ts index 46ec6f0faff..3e5446c2d0b 100644 --- a/src/apis/vault/v1.ts +++ b/src/apis/vault/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/videointelligence/v1.ts b/src/apis/videointelligence/v1.ts index 3bec627ed38..5f8b3c2cbbb 100644 --- a/src/apis/videointelligence/v1.ts +++ b/src/apis/videointelligence/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -669,9 +669,8 @@ export namespace videointelligence_v1 { * in terms of accuracy, with the top (first) alternative being the most * probable, as ranked by the recognizer. */ - // clang-format off - alternatives?: Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative[]; - // clang-format off + alternatives?: + Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative[]; } /** * Annotation progress for a single video. diff --git a/src/apis/videointelligence/v1beta1.ts b/src/apis/videointelligence/v1beta1.ts index a906a1ebfff..bcf7b80563b 100644 --- a/src/apis/videointelligence/v1beta1.ts +++ b/src/apis/videointelligence/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -752,9 +752,8 @@ export namespace videointelligence_v1beta1 { * in terms of accuracy, with the top (first) alternative being the most * probable, as ranked by the recognizer. */ - // clang-format off - alternatives?: Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative[]; - // clang-format on + alternatives?: + Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative[]; } /** * Annotation progress for a single video. diff --git a/src/apis/videointelligence/v1beta2.ts b/src/apis/videointelligence/v1beta2.ts index 5b096c8a3d5..bf3c9d6f5f0 100644 --- a/src/apis/videointelligence/v1beta2.ts +++ b/src/apis/videointelligence/v1beta2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. @@ -785,9 +785,8 @@ export namespace videointelligence_v1beta2 { * in terms of accuracy, with the top (first) alternative being the most * probable, as ranked by the recognizer. */ - // clang-format off - alternatives?: Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative[]; - // clang-format o + alternatives?: + Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative[]; } /** * Annotation progress for a single video. diff --git a/src/apis/vision/v1.ts b/src/apis/vision/v1.ts index 46bbb7bab8f..dbe17eae63b 100644 --- a/src/apis/vision/v1.ts +++ b/src/apis/vision/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/vision/v1p1beta1.ts b/src/apis/vision/v1p1beta1.ts index 9920a8fccdc..a22f60cce4d 100644 --- a/src/apis/vision/v1p1beta1.ts +++ b/src/apis/vision/v1p1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/vision/v1p2beta1.ts b/src/apis/vision/v1p2beta1.ts index 135e5b903c1..8df66ef832d 100644 --- a/src/apis/vision/v1p2beta1.ts +++ b/src/apis/vision/v1p2beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/webfonts/v1.ts b/src/apis/webfonts/v1.ts index 0287f785a49..175046fec1a 100644 --- a/src/apis/webfonts/v1.ts +++ b/src/apis/webfonts/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/webmasters/v3.ts b/src/apis/webmasters/v3.ts index 9b0a3966fe4..6ededdf6aa6 100644 --- a/src/apis/webmasters/v3.ts +++ b/src/apis/webmasters/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/websecurityscanner/v1alpha.ts b/src/apis/websecurityscanner/v1alpha.ts index c76614eb963..8aa98518bec 100644 --- a/src/apis/websecurityscanner/v1alpha.ts +++ b/src/apis/websecurityscanner/v1alpha.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/youtube/v3.ts b/src/apis/youtube/v3.ts index 912dd288a1d..020a109ae95 100644 --- a/src/apis/youtube/v3.ts +++ b/src/apis/youtube/v3.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/youtubeAnalytics/v1.ts b/src/apis/youtubeAnalytics/v1.ts index 22076263dc3..27c1e1994d0 100644 --- a/src/apis/youtubeAnalytics/v1.ts +++ b/src/apis/youtubeAnalytics/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/youtubeAnalytics/v1beta1.ts b/src/apis/youtubeAnalytics/v1beta1.ts index b3e93021ae7..b72a3fa175e 100644 --- a/src/apis/youtubeAnalytics/v1beta1.ts +++ b/src/apis/youtubeAnalytics/v1beta1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/youtubeAnalytics/v2.ts b/src/apis/youtubeAnalytics/v2.ts index c206a3cb2b1..3cc8e379944 100644 --- a/src/apis/youtubeAnalytics/v2.ts +++ b/src/apis/youtubeAnalytics/v2.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/apis/youtubereporting/v1.ts b/src/apis/youtubereporting/v1.ts index e78fdd31a5c..6fde35afb2f 100644 --- a/src/apis/youtubereporting/v1.ts +++ b/src/apis/youtubereporting/v1.ts @@ -18,8 +18,8 @@ import {AxiosPromise} from 'axios'; import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; import {GoogleApis} from '../..'; -import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api'; -import {createAPIRequest} from '../../lib/apirequest'; +import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../shared/api'; +import {createAPIRequest} from '../../shared/apirequest'; // TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. diff --git a/src/scripts/generate.ts b/src/generator/generate.ts similarity index 88% rename from src/scripts/generate.ts rename to src/generator/generate.ts index 1b7786efa08..17547967af7 100644 --- a/src/scripts/generate.ts +++ b/src/generator/generate.ts @@ -15,9 +15,10 @@ */ import * as path from 'path'; -import pify from 'pify'; -import * as rimraf from 'rimraf'; +import rimraf from 'rimraf'; import {install} from 'source-map-support'; +import * as util from 'util'; + import {Generator} from './generator'; // enable source map support @@ -35,7 +36,8 @@ async function main() { }); } else { console.log('Removing old APIs...'); - await pify(rimraf)(path.join(__dirname, '../../../src/apis')); + const apiPath = path.join(__dirname, '../../../src/apis'); + await util.promisify(rimraf)(apiPath); console.log('Generating APIs...'); await gen.generateAllAPIs(); console.log('Finished generating APIs!'); diff --git a/src/scripts/generator.ts b/src/generator/generator.ts similarity index 90% rename from src/scripts/generator.ts rename to src/generator/generator.ts index 93e6973f76b..d98dd96f589 100644 --- a/src/scripts/generator.ts +++ b/src/generator/generator.ts @@ -15,21 +15,19 @@ import {AxiosRequestConfig} from 'axios'; import * as fs from 'fs'; import {DefaultTransporter} from 'google-auth-library'; import minimist from 'minimist'; -import * as mkdirp from 'mkdirp'; +import mkdirp from 'mkdirp'; import * as nunjucks from 'nunjucks'; import Q from 'p-queue'; import * as path from 'path'; -import pify from 'pify'; import * as url from 'url'; import * as util from 'util'; -import {FragmentResponse, Schema, SchemaItem, SchemaMethod, SchemaParameters, SchemaResource, Schemas, SchemaType} from '../lib/schema'; - -import {buildurl} from './generator_utils'; +import {FragmentResponse, Schema, SchemaItem, SchemaMethod, SchemaParameters, SchemaResource, Schemas, SchemaType} from '../shared/schema'; const argv = minimist(process.argv.slice(2)); const cliArgs = argv._; -const fsp = pify(fs); +const writeFile = util.promisify(fs.writeFile); +const readDir = util.promisify(fs.readdir); const DISCOVERY_URL = argv['discovery-url'] ? argv['discovery-url'] : @@ -39,7 +37,7 @@ const FRAGMENT_URL = 'https://storage.googleapis.com/apisnippets-staging/public/'; const srcPath = path.join(__dirname, '../../../src'); -const TEMPLATES_DIR = path.join(srcPath, 'templates'); +const TEMPLATES_DIR = path.join(srcPath, 'generator/templates'); const API_TEMPLATE = path.join(TEMPLATES_DIR, 'api-endpoint.njk'); const INDEX_TEMPLATE = path.join(TEMPLATES_DIR, 'index.njk'); const RESERVED_PARAMS = ['resource', 'media', 'auth']; @@ -223,14 +221,14 @@ export class Generator { const rootIndexPath = path.join(apisPath, '../', 'index.ts'); // Dynamically discover available APIs - const files: string[] = await fsp.readdir(apisPath); + const files: string[] = await readDir(apisPath); for (const file of files) { const filePath = path.join(apisPath, file); - if (!(await fsp.stat(filePath)).isDirectory()) { + if (!(await util.promisify(fs.stat)(filePath)).isDirectory()) { continue; } apis[file] = {}; - const files: string[] = await fsp.readdir(path.join(apisPath, file)); + const files: string[] = await readDir(path.join(apisPath, file)); for (const version of files) { const parts = path.parse(version); if (!version.endsWith('.d.ts') && parts.ext === '.ts') { @@ -240,10 +238,10 @@ export class Generator { } const result = this.env.render('index.njk', {apis}); - await fsp.writeFile(indexPath, result, {encoding: 'utf8'}); + await writeFile(indexPath, result, {encoding: 'utf8'}); const res2 = this.env.render('root-index.njk', {apis}); - await fsp.writeFile(rootIndexPath, res2, {encoding: 'utf8'}); + await writeFile(rootIndexPath, res2, {encoding: 'utf8'}); } /** @@ -309,8 +307,8 @@ export class Generator { const parts = url.parse(apiDiscoveryUrl); if (apiDiscoveryUrl && !parts.protocol) { this.log('Reading from file ' + apiDiscoveryUrl); - const file: string = - await fsp.readFile(apiDiscoveryUrl, {encoding: 'utf-8'}); + const file = await util.promisify(fs.readFile)( + apiDiscoveryUrl, {encoding: 'utf-8'}); await this.generate(apiDiscoveryUrl, JSON.parse(file)); } else { this.logResult(apiDiscoveryUrl, `Starting discovery doc request...`); @@ -336,10 +334,21 @@ export class Generator { await Promise.all(tasks.map(t => t())); this.logResult(apiDiscoveryUrl, `Step 2...`); const contents = this.env.render(API_TEMPLATE, {api: schema}); - await pify(mkdirp)(path.dirname(exportFilename)); + await util.promisify(mkdirp)(path.dirname(exportFilename)); this.logResult(apiDiscoveryUrl, `Step 3...`); - await fsp.writeFile(exportFilename, contents, {encoding: 'utf8'}); + await writeFile(exportFilename, contents, {encoding: 'utf8'}); this.logResult(apiDiscoveryUrl, `Template generation complete.`); return exportFilename; } } + +/** + * Build a string used to create a URL from the discovery doc provided URL. + * replace double slashes with single slash (except in https://) + * @private + * @param input URL to build from + * @return Resulting built URL + */ +function buildurl(input?: string) { + return input ? `'${input}'`.replace(/([^:]\/)\/+/g, '$1') : ''; +} diff --git a/src/templates/api-endpoint.njk b/src/generator/templates/api-endpoint.njk similarity index 98% rename from src/templates/api-endpoint.njk rename to src/generator/templates/api-endpoint.njk index b57824b6c32..2e54da92df3 100644 --- a/src/templates/api-endpoint.njk +++ b/src/generator/templates/api-endpoint.njk @@ -20,8 +20,8 @@ import { GoogleApis } from '../..'; import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library'; -import { createAPIRequest } from '../../lib/apirequest'; -import { MethodOptions, GlobalOptions, BodyResponseCallback } from '../../lib/api'; +import { createAPIRequest } from '../../shared/apirequest'; +import { MethodOptions, GlobalOptions, BodyResponseCallback } from '../../shared/api'; import { AxiosPromise } from 'axios'; // TODO: We will eventually get the `any` in here cleared out, but in the interim we diff --git a/src/templates/index.njk b/src/generator/templates/index.njk similarity index 98% rename from src/templates/index.njk rename to src/generator/templates/index.njk index 6eb190b7d28..b67e6c28297 100644 --- a/src/templates/index.njk +++ b/src/generator/templates/index.njk @@ -15,7 +15,7 @@ import * as path from 'path'; import * as util from 'util'; -import { ServiceOptions } from '../lib/api'; +import { ServiceOptions } from '../shared/api'; {% for apiName, api in apis %} {% for versionName, version in api %}import { {{ apiName }}_{{ version|replace('.','_') }} } from './{{ apiName }}/{{ version }}'; {% endfor %} diff --git a/src/templates/method-partial.njk b/src/generator/templates/method-partial.njk similarity index 100% rename from src/templates/method-partial.njk rename to src/generator/templates/method-partial.njk diff --git a/src/templates/resource-partial.njk b/src/generator/templates/resource-partial.njk similarity index 100% rename from src/templates/resource-partial.njk rename to src/generator/templates/resource-partial.njk diff --git a/src/templates/root-index.njk b/src/generator/templates/root-index.njk similarity index 95% rename from src/templates/root-index.njk rename to src/generator/templates/root-index.njk index c26f25e8a6b..32e5727fbed 100644 --- a/src/templates/root-index.njk +++ b/src/generator/templates/root-index.njk @@ -16,7 +16,7 @@ /*! THIS FILE IS AUTO-GENERATED */ -import {GoogleApis} from './lib/googleapis'; +import {GoogleApis} from './shared/googleapis'; const google = new GoogleApis(); export {google, GoogleApis}; diff --git a/src/index.ts b/src/index.ts index c84250593d7..98d941393eb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,7 +16,7 @@ /*! THIS FILE IS AUTO-GENERATED */ -import {GoogleApis} from './lib/googleapis'; +import {GoogleApis} from './shared/googleapis'; const google = new GoogleApis(); export {google, GoogleApis}; @@ -44,6 +44,7 @@ export {androidmanagement_v1} from './apis/androidmanagement/v1'; export {androidpublisher_v1_1} from './apis/androidpublisher/v1.1'; export {androidpublisher_v1} from './apis/androidpublisher/v1'; export {androidpublisher_v2} from './apis/androidpublisher/v2'; +export {androidpublisher_v3} from './apis/androidpublisher/v3'; export {appengine_v1} from './apis/appengine/v1'; export {appengine_v1alpha} from './apis/appengine/v1alpha'; export {appengine_v1beta} from './apis/appengine/v1beta'; @@ -126,6 +127,7 @@ export {groupsmigration_v1} from './apis/groupsmigration/v1'; export {groupssettings_v1} from './apis/groupssettings/v1'; export {iam_v1} from './apis/iam/v1'; export {identitytoolkit_v3} from './apis/identitytoolkit/v3'; +export {jobs_v2} from './apis/jobs/v2'; export {kgsearch_v1} from './apis/kgsearch/v1'; export {language_v1} from './apis/language/v1'; export {language_v1beta1} from './apis/language/v1beta1'; @@ -147,6 +149,7 @@ export {pagespeedonline_v2} from './apis/pagespeedonline/v2'; export {pagespeedonline_v4} from './apis/pagespeedonline/v4'; export {partners_v2} from './apis/partners/v2'; export {people_v1} from './apis/people/v1'; +export {photoslibrary_v1} from './apis/photoslibrary/v1'; export {playcustomapp_v1} from './apis/playcustomapp/v1'; export {plus_v1} from './apis/plus/v1'; export {plusDomains_v1} from './apis/plusDomains/v1'; diff --git a/src/scripts/generator_utils.ts b/src/scripts/generator_utils.ts deleted file mode 100644 index f6662555def..00000000000 --- a/src/scripts/generator_utils.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2014-2016, Google, Inc. -// 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. - -/** - * Build a string used to create a URL from the discovery doc provided URL. - * - * @private - * @param input URL to build from - * @return Resulting built URL - */ -export function buildurl(input?: string) { - return input ? - ('\'' + input + '\'') - // replace double slashes with single slash (except in https://) - .replace(/([^:]\/)\/+/g, '$1') : - ''; -} diff --git a/src/lib/api.ts b/src/shared/api.ts similarity index 100% rename from src/lib/api.ts rename to src/shared/api.ts diff --git a/src/lib/apirequest.ts b/src/shared/apirequest.ts similarity index 100% rename from src/lib/apirequest.ts rename to src/shared/apirequest.ts diff --git a/src/lib/discovery.ts b/src/shared/discovery.ts similarity index 100% rename from src/lib/discovery.ts rename to src/shared/discovery.ts diff --git a/src/lib/endpoint.ts b/src/shared/endpoint.ts similarity index 93% rename from src/lib/endpoint.ts rename to src/shared/endpoint.ts index 918a80ac64a..d996f2b462d 100644 --- a/src/lib/endpoint.ts +++ b/src/shared/endpoint.ts @@ -14,8 +14,6 @@ import {BodyResponseCallback} from 'google-auth-library/build/src/transporters'; import {GoogleApis} from '../index'; -import {buildurl} from '../scripts/generator_utils'; - import {APIRequestContext, APIRequestParams, GlobalOptions} from './api'; import {createAPIRequest} from './apirequest'; import {Discovery} from './discovery'; @@ -143,3 +141,14 @@ export class Endpoint implements Target, APIRequestContext { return pathParams; } } + +/** + * Build a string used to create a URL from the discovery doc provided URL. + * replace double slashes with single slash (except in https://) + * @private + * @param input URL to build from + * @return Resulting built URL + */ +function buildurl(input?: string) { + return input ? `'${input}'`.replace(/([^:]\/)\/+/g, '$1') : ''; +} diff --git a/src/lib/googleapis.ts b/src/shared/googleapis.ts similarity index 100% rename from src/lib/googleapis.ts rename to src/shared/googleapis.ts diff --git a/src/lib/schema.ts b/src/shared/schema.ts similarity index 100% rename from src/lib/schema.ts rename to src/shared/schema.ts diff --git a/test/test.apikey.ts b/test/test.apikey.ts index 4caebc4acd2..004091b997e 100644 --- a/test/test.apikey.ts +++ b/test/test.apikey.ts @@ -17,7 +17,7 @@ import nock from 'nock'; import {drive_v2, GoogleApis, urlshortener_v1} from '../src'; import {google} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; diff --git a/test/test.auth.ts b/test/test.auth.ts index 63b5621c179..c46c545ac9d 100644 --- a/test/test.auth.ts +++ b/test/test.auth.ts @@ -15,7 +15,7 @@ import assert from 'assert'; import {OAuth2Client} from 'google-auth-library'; import nock from 'nock'; import {GoogleApis} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; const googleapis = new GoogleApis(); diff --git a/test/test.clients.ts b/test/test.clients.ts index 574dabc5a25..32ad9d7800a 100644 --- a/test/test.clients.ts +++ b/test/test.clients.ts @@ -18,7 +18,7 @@ import * as path from 'path'; import * as url from 'url'; import {datastore_v1, GoogleApis} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; diff --git a/test/test.discover.ts b/test/test.discover.ts index 2a61c930d53..acbf29c2da2 100644 --- a/test/test.discover.ts +++ b/test/test.discover.ts @@ -17,7 +17,7 @@ import * as path from 'path'; import {GoogleApis} from '../src'; import {APIS} from '../src/apis'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; describe('GoogleApis#discover', () => { it('should get a list of supported apis', () => { diff --git a/test/test.drive.v2.ts b/test/test.drive.v2.ts index 6c654a45a9e..7fab322a1fc 100644 --- a/test/test.drive.v2.ts +++ b/test/test.drive.v2.ts @@ -15,7 +15,7 @@ import assert from 'assert'; import nock from 'nock'; import {drive_v2, GoogleApis} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; diff --git a/test/test.path.ts b/test/test.path.ts index ba1cfef8398..9c51027405f 100644 --- a/test/test.path.ts +++ b/test/test.path.ts @@ -17,7 +17,7 @@ import nock from 'nock'; import * as url from 'url'; import {GoogleApis} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; diff --git a/test/test.query.ts b/test/test.query.ts index 5a981537c99..02ecb9c7859 100644 --- a/test/test.query.ts +++ b/test/test.query.ts @@ -15,7 +15,7 @@ import assert from 'assert'; import nock from 'nock'; import * as url from 'url'; import {google, GoogleApis} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; diff --git a/test/test.transporters.ts b/test/test.transporters.ts index 6dfc65946c7..0bcc2781882 100644 --- a/test/test.transporters.ts +++ b/test/test.transporters.ts @@ -14,7 +14,7 @@ import assert from 'assert'; import nock from 'nock'; import {GoogleApis} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; diff --git a/test/test.urlshortener.v1.ts b/test/test.urlshortener.v1.ts index cd065f021be..58b9d86bab9 100644 --- a/test/test.urlshortener.v1.ts +++ b/test/test.urlshortener.v1.ts @@ -17,7 +17,7 @@ import * as path from 'path'; import * as url from 'url'; import {GoogleApis, urlshortener_v1} from '../src'; -import {APIEndpoint} from '../src/lib/api'; +import {APIEndpoint} from '../src/shared/api'; import {Utils} from './utils'; diff --git a/test/utils.ts b/test/utils.ts index 6d612806351..d3bb11c561f 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -14,7 +14,7 @@ import {AxiosResponse} from 'axios'; import * as url from 'url'; import {GoogleApis} from '../src'; -import {Endpoint} from '../src/lib/endpoint'; +import {Endpoint} from '../src/shared/endpoint'; export abstract class Utils { static getQs(res: AxiosResponse) { diff --git a/tsconfig.tools.json b/tsconfig.tools.json index d7bf15abdfc..d5b942aa6dc 100644 --- a/tsconfig.tools.json +++ b/tsconfig.tools.json @@ -3,9 +3,9 @@ "compilerOptions": { "rootDir": ".", "outDir": "build", - "target": "es6" + "target": "es2017" }, "include": [ - "src/scripts/*.ts" + "src/generator/*.ts" ] }