From 4f8a3d571bb2817343558394a2e5f3adc651432e Mon Sep 17 00:00:00 2001 From: Alexey Bolisov Date: Tue, 10 Oct 2017 00:55:04 +0300 Subject: [PATCH] Add Google APIs typings (#19083) * Add Google APIs typings * [gapi.cliebt.* ] Add version as part of typings name and fix gapi.client tslint errors * versions should not get their own folders fixing a few typos using /** syntax so comments show up in editors export only actual (last) version for now * export only actual (last) version for now * merge namespaces and remove unnecessary namespace qualifiers * remove namespace qualifier for gapi.client.Request from nested namespaces and change Request base interface to Promise * disable await-promise rule * fix collision between gapi.client.Request and Request from nested namespace disable no-irregular-whitespace rule * sort properties and namespace resources * remove empty comments sort resources amd methods in tests and readme.md * update 'this is autogenerated file' banner to remove this text from gapi.client namespace hint use multiline comments when comment has several lines * implement no-trailing-whitespace, no-padding, max-line-length, await-promise, no-irregular-whitespace rules * add strictFunctionTypes to tsconfig * fix "Whitespace within parentheses is not allowed" rule * fix ts-lint rules * fixes * remove deprecated replicapool and replicapoolupdater api * fix no-irregular-whitespace * fix no-irregular-whitespace --- ...i.client.acceleratedmobilepageurl-tests.ts | 22 + .../index.d.ts | 97 + .../readme.md | 42 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.adexchangebuyer-tests.ts | 213 + types/gapi.client.adexchangebuyer/index.d.ts | 1989 ++ types/gapi.client.adexchangebuyer/readme.md | 244 + .../gapi.client.adexchangebuyer/tsconfig.json | 24 + types/gapi.client.adexchangebuyer/tslint.json | 8 + .../gapi.client.adexchangebuyer2-tests.ts | 32 + types/gapi.client.adexchangebuyer2/index.d.ts | 2400 +++ types/gapi.client.adexchangebuyer2/readme.md | 54 + .../tsconfig.json | 24 + .../gapi.client.adexchangebuyer2/tslint.json | 8 + .../gapi.client.adexchangeseller-tests.ts | 43 + types/gapi.client.adexchangeseller/index.d.ts | 664 + types/gapi.client.adexchangeseller/readme.md | 67 + .../tsconfig.json | 24 + .../gapi.client.adexchangeseller/tslint.json | 8 + .../gapi.client.adexperiencereport-tests.ts | 39 + .../gapi.client.adexperiencereport/index.d.ts | 125 + .../gapi.client.adexperiencereport/readme.md | 64 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.admin-tests.ts | 80 + types/gapi.client.admin/index.d.ts | 349 + types/gapi.client.admin/readme.md | 82 + types/gapi.client.admin/tsconfig.json | 24 + types/gapi.client.admin/tslint.json | 8 + .../gapi.client.adsense-tests.ts | 121 + types/gapi.client.adsense/index.d.ts | 1529 ++ types/gapi.client.adsense/readme.md | 132 + types/gapi.client.adsense/tsconfig.json | 24 + types/gapi.client.adsense/tslint.json | 8 + .../gapi.client.adsensehost-tests.ts | 119 + types/gapi.client.adsensehost/index.d.ts | 967 + types/gapi.client.adsensehost/readme.md | 134 + types/gapi.client.adsensehost/tsconfig.json | 24 + types/gapi.client.adsensehost/tslint.json | 8 + .../gapi.client.analytics-tests.ts | 45 + types/gapi.client.analytics/index.d.ts | 4071 ++++ types/gapi.client.analytics/readme.md | 74 + types/gapi.client.analytics/tsconfig.json | 24 + types/gapi.client.analytics/tslint.json | 8 + .../gapi.client.analyticsreporting-tests.ts | 37 + .../gapi.client.analyticsreporting/index.d.ts | 698 + .../gapi.client.analyticsreporting/readme.md | 62 + .../tsconfig.json | 24 + .../tslint.json | 8 + ....client.androiddeviceprovisioning-tests.ts | 24 + .../index.d.ts | 683 + .../readme.md | 42 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.androidenterprise-tests.ts | 559 + .../gapi.client.androidenterprise/index.d.ts | 2830 +++ types/gapi.client.androidenterprise/readme.md | 476 + .../tsconfig.json | 24 + .../gapi.client.androidenterprise/tslint.json | 8 + .../gapi.client.androidmanagement-tests.ts | 52 + .../gapi.client.androidmanagement/index.d.ts | 1385 ++ types/gapi.client.androidmanagement/readme.md | 74 + .../tsconfig.json | 24 + .../gapi.client.androidmanagement/tslint.json | 8 + .../gapi.client.androidpublisher-tests.ts | 122 + types/gapi.client.androidpublisher/index.d.ts | 2062 ++ types/gapi.client.androidpublisher/readme.md | 134 + .../tsconfig.json | 24 + .../gapi.client.androidpublisher/tslint.json | 8 + .../gapi.client.appengine-tests.ts | 64 + types/gapi.client.appengine/index.d.ts | 2263 ++ types/gapi.client.appengine/readme.md | 84 + types/gapi.client.appengine/tsconfig.json | 24 + types/gapi.client.appengine/tslint.json | 8 + .../gapi.client.appsactivity-tests.ts | 54 + types/gapi.client.appsactivity/index.d.ts | 168 + types/gapi.client.appsactivity/readme.md | 71 + types/gapi.client.appsactivity/tsconfig.json | 24 + types/gapi.client.appsactivity/tslint.json | 8 + .../gapi.client.appstate-tests.ts | 64 + types/gapi.client.appstate/index.d.ts | 184 + types/gapi.client.appstate/readme.md | 79 + types/gapi.client.appstate/tsconfig.json | 24 + types/gapi.client.appstate/tslint.json | 8 + .../gapi.client.bigquery-tests.ts | 202 + types/gapi.client.bigquery/index.d.ts | 1810 ++ types/gapi.client.bigquery/readme.md | 182 + types/gapi.client.bigquery/tsconfig.json | 24 + types/gapi.client.bigquery/tslint.json | 8 + .../gapi.client.bigquerydatatransfer-tests.ts | 36 + .../index.d.ts | 1579 ++ .../readme.md | 60 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.blogger-tests.ts | 277 + types/gapi.client.blogger/index.d.ts | 1346 ++ types/gapi.client.blogger/readme.md | 222 + types/gapi.client.blogger/tsconfig.json | 24 + types/gapi.client.blogger/tslint.json | 8 + .../gapi.client.books-tests.ts | 193 + types/gapi.client.books/index.d.ts | 2447 +++ types/gapi.client.books/readme.md | 169 + types/gapi.client.books/tsconfig.json | 24 + types/gapi.client.books/tslint.json | 8 + .../gapi.client.calendar-tests.ts | 275 + types/gapi.client.calendar/index.d.ts | 1946 ++ types/gapi.client.calendar/readme.md | 242 + types/gapi.client.calendar/tsconfig.json | 24 + types/gapi.client.calendar/tslint.json | 8 + .../gapi.client.civicinfo-tests.ts | 44 + types/gapi.client.civicinfo/index.d.ts | 599 + types/gapi.client.civicinfo/readme.md | 60 + types/gapi.client.civicinfo/tsconfig.json | 24 + types/gapi.client.civicinfo/tslint.json | 8 + .../gapi.client.classroom-tests.ts | 286 + types/gapi.client.classroom/index.d.ts | 4039 ++++ types/gapi.client.classroom/readme.md | 305 + types/gapi.client.classroom/tsconfig.json | 24 + types/gapi.client.classroom/tslint.json | 8 + .../gapi.client.cloudbilling-tests.ts | 98 + types/gapi.client.cloudbilling/index.d.ts | 640 + types/gapi.client.cloudbilling/readme.md | 116 + types/gapi.client.cloudbilling/tsconfig.json | 24 + types/gapi.client.cloudbilling/tslint.json | 8 + .../gapi.client.cloudbuild-tests.ts | 73 + types/gapi.client.cloudbuild/index.d.ts | 899 + types/gapi.client.cloudbuild/readme.md | 89 + types/gapi.client.cloudbuild/tsconfig.json | 24 + types/gapi.client.cloudbuild/tslint.json | 8 + .../gapi.client.clouddebugger-tests.ts | 34 + types/gapi.client.clouddebugger/index.d.ts | 817 + types/gapi.client.clouddebugger/readme.md | 58 + types/gapi.client.clouddebugger/tsconfig.json | 24 + types/gapi.client.clouddebugger/tslint.json | 8 + .../gapi.client.clouderrorreporting-tests.ts | 36 + .../index.d.ts | 614 + .../gapi.client.clouderrorreporting/readme.md | 60 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.cloudfunctions-tests.ts | 58 + types/gapi.client.cloudfunctions/index.d.ts | 249 + types/gapi.client.cloudfunctions/readme.md | 75 + .../gapi.client.cloudfunctions/tsconfig.json | 24 + types/gapi.client.cloudfunctions/tslint.json | 8 + .../gapi.client.cloudiot-tests.ts | 34 + types/gapi.client.cloudiot/index.d.ts | 1161 ++ types/gapi.client.cloudiot/readme.md | 58 + types/gapi.client.cloudiot/tsconfig.json | 24 + types/gapi.client.cloudiot/tslint.json | 8 + .../gapi.client.cloudkms-tests.ts | 32 + types/gapi.client.cloudkms/index.d.ts | 1285 ++ types/gapi.client.cloudkms/readme.md | 54 + types/gapi.client.cloudkms/tsconfig.json | 24 + types/gapi.client.cloudkms/tslint.json | 8 + .../gapi.client.cloudmonitoring-tests.ts | 97 + types/gapi.client.cloudmonitoring/index.d.ts | 476 + types/gapi.client.cloudmonitoring/readme.md | 87 + .../gapi.client.cloudmonitoring/tsconfig.json | 24 + types/gapi.client.cloudmonitoring/tslint.json | 8 + .../gapi.client.cloudresourcemanager-tests.ts | 404 + .../index.d.ts | 2234 ++ .../readme.md | 409 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.cloudtasks-tests.ts | 32 + types/gapi.client.cloudtasks/index.d.ts | 2100 ++ types/gapi.client.cloudtasks/readme.md | 54 + types/gapi.client.cloudtasks/tsconfig.json | 24 + types/gapi.client.cloudtasks/tslint.json | 8 + .../gapi.client.cloudtrace-tests.ts | 34 + types/gapi.client.cloudtrace/index.d.ts | 378 + types/gapi.client.cloudtrace/readme.md | 58 + types/gapi.client.cloudtrace/tsconfig.json | 24 + types/gapi.client.cloudtrace/tslint.json | 8 + .../gapi.client.clouduseraccounts-tests.ts | 169 + .../gapi.client.clouduseraccounts/index.d.ts | 1084 + types/gapi.client.clouduseraccounts/readme.md | 178 + .../tsconfig.json | 24 + .../gapi.client.clouduseraccounts/tslint.json | 8 + .../gapi.client.compute-tests.ts | 2184 ++ types/gapi.client.compute/index.d.ts | 17367 ++++++++++++++++ types/gapi.client.compute/readme.md | 1557 ++ types/gapi.client.compute/tsconfig.json | 24 + types/gapi.client.compute/tslint.json | 8 + .../gapi.client.consumersurveys-tests.ts | 86 + types/gapi.client.consumersurveys/index.d.ts | 397 + types/gapi.client.consumersurveys/readme.md | 115 + .../gapi.client.consumersurveys/tsconfig.json | 24 + types/gapi.client.consumersurveys/tslint.json | 8 + .../gapi.client.container-tests.ts | 32 + types/gapi.client.container/index.d.ts | 2201 ++ types/gapi.client.container/readme.md | 54 + types/gapi.client.container/tsconfig.json | 24 + types/gapi.client.container/tslint.json | 8 + .../gapi.client.content-tests.ts | 387 + types/gapi.client.content/index.d.ts | 3459 +++ types/gapi.client.content/readme.md | 344 + types/gapi.client.content/tsconfig.json | 24 + types/gapi.client.content/tslint.json | 8 + .../gapi.client.customsearch-tests.ts | 50 + types/gapi.client.customsearch/index.d.ts | 226 + types/gapi.client.customsearch/readme.md | 40 + types/gapi.client.customsearch/tsconfig.json | 24 + types/gapi.client.customsearch/tslint.json | 8 + .../gapi.client.dataflow-tests.ts | 42 + types/gapi.client.dataflow/index.d.ts | 3245 +++ types/gapi.client.dataflow/readme.md | 68 + types/gapi.client.dataflow/tsconfig.json | 24 + types/gapi.client.dataflow/tslint.json | 8 + .../gapi.client.dataproc-tests.ts | 32 + types/gapi.client.dataproc/index.d.ts | 1225 ++ types/gapi.client.dataproc/readme.md | 54 + types/gapi.client.dataproc/tsconfig.json | 24 + types/gapi.client.dataproc/tslint.json | 8 + .../gapi.client.datastore-tests.ts | 64 + types/gapi.client.datastore/index.d.ts | 1027 + types/gapi.client.datastore/readme.md | 90 + types/gapi.client.datastore/tsconfig.json | 24 + types/gapi.client.datastore/tslint.json | 8 + .../gapi.client.deploymentmanager-tests.ts | 154 + .../gapi.client.deploymentmanager/index.d.ts | 1175 ++ types/gapi.client.deploymentmanager/readme.md | 153 + .../tsconfig.json | 24 + .../gapi.client.deploymentmanager/tslint.json | 8 + .../gapi.client.dfareporting-tests.ts | 1301 ++ types/gapi.client.dfareporting/index.d.ts | 9850 +++++++++ types/gapi.client.dfareporting/readme.md | 1070 + types/gapi.client.dfareporting/tsconfig.json | 24 + types/gapi.client.dfareporting/tslint.json | 8 + .../gapi.client.discovery-tests.ts | 26 + types/gapi.client.discovery/index.d.ts | 322 + types/gapi.client.discovery/readme.md | 45 + types/gapi.client.discovery/tsconfig.json | 24 + types/gapi.client.discovery/tslint.json | 8 + .../gapi.client.dlp/gapi.client.dlp-tests.ts | 60 + types/gapi.client.dlp/index.d.ts | 1612 ++ types/gapi.client.dlp/readme.md | 83 + types/gapi.client.dlp/tsconfig.json | 24 + types/gapi.client.dlp/tslint.json | 8 + .../gapi.client.dns/gapi.client.dns-tests.ts | 92 + types/gapi.client.dns/index.d.ts | 392 + types/gapi.client.dns/readme.md | 108 + types/gapi.client.dns/tsconfig.json | 24 + types/gapi.client.dns/tslint.json | 8 + ...gapi.client.doubleclickbidmanager-tests.ts | 63 + .../index.d.ts | 435 + .../readme.md | 99 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.doubleclicksearch-tests.ts | 85 + .../gapi.client.doubleclicksearch/index.d.ts | 578 + types/gapi.client.doubleclicksearch/readme.md | 104 + .../tsconfig.json | 24 + .../gapi.client.doubleclicksearch/tslint.json | 8 + .../gapi.client.drive-tests.ts | 291 + types/gapi.client.drive/index.d.ts | 1831 ++ types/gapi.client.drive/readme.md | 270 + types/gapi.client.drive/tsconfig.json | 24 + types/gapi.client.drive/tslint.json | 8 + .../gapi.client.firebasedynamiclinks-tests.ts | 57 + .../index.d.ts | 430 + .../readme.md | 79 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.firebaseremoteconfig-tests.ts | 48 + .../index.d.ts | 197 + .../readme.md | 64 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.firebaserules-tests.ts | 63 + types/gapi.client.firebaserules/index.d.ts | 828 + types/gapi.client.firebaserules/readme.md | 87 + types/gapi.client.firebaserules/tsconfig.json | 24 + types/gapi.client.firebaserules/tslint.json | 8 + .../gapi.client.firestore-tests.ts | 34 + types/gapi.client.firestore/index.d.ts | 1579 ++ types/gapi.client.firestore/readme.md | 57 + types/gapi.client.firestore/tsconfig.json | 24 + types/gapi.client.firestore/tslint.json | 8 + .../gapi.client.fitness-tests.ts | 66 + types/gapi.client.fitness/index.d.ts | 767 + types/gapi.client.fitness/readme.md | 105 + types/gapi.client.fitness/tsconfig.json | 24 + types/gapi.client.fitness/tslint.json | 8 + .../gapi.client.fusiontables-tests.ts | 225 + types/gapi.client.fusiontables/index.d.ts | 1188 ++ types/gapi.client.fusiontables/readme.md | 232 + types/gapi.client.fusiontables/tsconfig.json | 24 + types/gapi.client.fusiontables/tslint.json | 8 + .../gapi.client.games-tests.ts | 402 + types/gapi.client.games/index.d.ts | 3077 +++ types/gapi.client.games/readme.md | 326 + types/gapi.client.games/tsconfig.json | 24 + types/gapi.client.games/tslint.json | 8 + .../gapi.client.gamesconfiguration-tests.ts | 89 + .../gapi.client.gamesconfiguration/index.d.ts | 490 + .../gapi.client.gamesconfiguration/readme.md | 119 + .../tsconfig.json | 24 + .../tslint.json | 8 + .../gapi.client.gamesmanagement-tests.ts | 190 + types/gapi.client.gamesmanagement/index.d.ts | 835 + types/gapi.client.gamesmanagement/readme.md | 192 + .../gapi.client.gamesmanagement/tsconfig.json | 24 + types/gapi.client.gamesmanagement/tslint.json | 8 + .../gapi.client.genomics-tests.ts | 750 + types/gapi.client.genomics/index.d.ts | 3919 ++++ types/gapi.client.genomics/readme.md | 731 + types/gapi.client.genomics/tsconfig.json | 24 + types/gapi.client.genomics/tslint.json | 8 + .../gapi.client.gmail-tests.ts | 62 + types/gapi.client.gmail/index.d.ts | 2052 ++ types/gapi.client.gmail/readme.md | 96 + types/gapi.client.gmail/tsconfig.json | 24 + types/gapi.client.gmail/tslint.json | 8 + .../gapi.client.groupsmigration-tests.ts | 36 + types/gapi.client.groupsmigration/index.d.ts | 53 + types/gapi.client.groupsmigration/readme.md | 59 + .../gapi.client.groupsmigration/tsconfig.json | 24 + types/gapi.client.groupsmigration/tslint.json | 8 + .../gapi.client.groupssettings-tests.ts | 44 + types/gapi.client.groupssettings/index.d.ts | 164 + types/gapi.client.groupssettings/readme.md | 69 + .../gapi.client.groupssettings/tsconfig.json | 24 + types/gapi.client.groupssettings/tslint.json | 8 + .../gapi.client.iam/gapi.client.iam-tests.ts | 57 + types/gapi.client.iam/index.d.ts | 1608 ++ types/gapi.client.iam/readme.md | 77 + types/gapi.client.iam/tsconfig.json | 24 + types/gapi.client.iam/tslint.json | 8 + .../gapi.client.identitytoolkit-tests.ts | 96 + types/gapi.client.identitytoolkit/index.d.ts | 1163 ++ types/gapi.client.identitytoolkit/readme.md | 157 + .../gapi.client.identitytoolkit/tsconfig.json | 24 + types/gapi.client.identitytoolkit/tslint.json | 8 + .../gapi.client.kgsearch-tests.ts | 30 + types/gapi.client.kgsearch/index.d.ts | 94 + types/gapi.client.kgsearch/readme.md | 42 + types/gapi.client.kgsearch/tsconfig.json | 24 + types/gapi.client.kgsearch/tslint.json | 8 + .../gapi.client.language-tests.ts | 63 + types/gapi.client.language/index.d.ts | 469 + types/gapi.client.language/readme.md | 88 + types/gapi.client.language/tsconfig.json | 24 + types/gapi.client.language/tslint.json | 8 + .../gapi.client.licensing-tests.ts | 76 + types/gapi.client.licensing/index.d.ts | 243 + types/gapi.client.licensing/readme.md | 89 + types/gapi.client.licensing/tsconfig.json | 24 + types/gapi.client.licensing/tslint.json | 8 + .../gapi.client.logging-tests.ts | 54 + types/gapi.client.logging/index.d.ts | 3334 +++ types/gapi.client.logging/readme.md | 81 + types/gapi.client.logging/tsconfig.json | 24 + types/gapi.client.logging/tslint.json | 8 + .../gapi.client.manufacturers-tests.ts | 32 + types/gapi.client.manufacturers/index.d.ts | 550 + types/gapi.client.manufacturers/readme.md | 54 + types/gapi.client.manufacturers/tsconfig.json | 24 + types/gapi.client.manufacturers/tslint.json | 8 + .../gapi.client.mirror-tests.ts | 116 + types/gapi.client.mirror/index.d.ts | 985 + types/gapi.client.mirror/readme.md | 157 + types/gapi.client.mirror/tsconfig.json | 24 + types/gapi.client.mirror/tslint.json | 8 + types/gapi.client.ml/gapi.client.ml-tests.ts | 49 + types/gapi.client.ml/index.d.ts | 1855 ++ types/gapi.client.ml/readme.md | 69 + types/gapi.client.ml/tsconfig.json | 24 + types/gapi.client.ml/tslint.json | 8 + .../gapi.client.monitoring-tests.ts | 38 + types/gapi.client.monitoring/index.d.ts | 1093 + types/gapi.client.monitoring/readme.md | 63 + types/gapi.client.monitoring/tsconfig.json | 24 + types/gapi.client.monitoring/tslint.json | 8 + .../gapi.client.oauth2-tests.ts | 40 + types/gapi.client.oauth2/index.d.ts | 123 + types/gapi.client.oauth2/readme.md | 68 + types/gapi.client.oauth2/tsconfig.json | 24 + types/gapi.client.oauth2/tslint.json | 8 + .../gapi.client.oslogin-tests.ts | 53 + types/gapi.client.oslogin/index.d.ts | 257 + types/gapi.client.oslogin/readme.md | 76 + types/gapi.client.oslogin/tsconfig.json | 24 + types/gapi.client.oslogin/tslint.json | 8 + .../gapi.client.pagespeedonline-tests.ts | 28 + types/gapi.client.pagespeedonline/index.d.ts | 215 + types/gapi.client.pagespeedonline/readme.md | 40 + .../gapi.client.pagespeedonline/tsconfig.json | 24 + types/gapi.client.pagespeedonline/tslint.json | 8 + .../gapi.client.partners-tests.ts | 216 + types/gapi.client.partners/index.d.ts | 1897 ++ types/gapi.client.partners/readme.md | 122 + types/gapi.client.partners/tsconfig.json | 24 + types/gapi.client.partners/tslint.json | 8 + .../gapi.client.people-tests.ts | 140 + types/gapi.client.people/index.d.ts | 1505 ++ types/gapi.client.people/readme.md | 156 + types/gapi.client.people/tsconfig.json | 24 + types/gapi.client.people/tslint.json | 8 + .../gapi.client.playcustomapp-tests.ts | 32 + types/gapi.client.playcustomapp/index.d.ts | 56 + types/gapi.client.playcustomapp/readme.md | 54 + types/gapi.client.playcustomapp/tsconfig.json | 24 + types/gapi.client.playcustomapp/tslint.json | 8 + .../gapi.client.playmoviespartner-tests.ts | 32 + .../gapi.client.playmoviespartner/index.d.ts | 755 + types/gapi.client.playmoviespartner/readme.md | 54 + .../tsconfig.json | 24 + .../gapi.client.playmoviespartner/tslint.json | 8 + .../gapi.client.plus-tests.ts | 94 + types/gapi.client.plus/index.d.ts | 906 + types/gapi.client.plus/readme.md | 108 + types/gapi.client.plus/tsconfig.json | 24 + types/gapi.client.plus/tslint.json | 8 + .../gapi.client.plusdomains-tests.ts | 161 + types/gapi.client.plusdomains/index.d.ts | 1324 ++ types/gapi.client.plusdomains/readme.md | 181 + types/gapi.client.plusdomains/tsconfig.json | 24 + types/gapi.client.plusdomains/tslint.json | 8 + .../gapi.client.prediction-tests.ts | 80 + types/gapi.client.prediction/index.d.ts | 403 + types/gapi.client.prediction/readme.md | 106 + types/gapi.client.prediction/tsconfig.json | 24 + types/gapi.client.prediction/tslint.json | 8 + .../gapi.client.proximitybeacon-tests.ts | 186 + types/gapi.client.proximitybeacon/index.d.ts | 1367 ++ types/gapi.client.proximitybeacon/readme.md | 188 + .../gapi.client.proximitybeacon/tsconfig.json | 24 + types/gapi.client.proximitybeacon/tslint.json | 8 + .../gapi.client.pubsub-tests.ts | 34 + types/gapi.client.pubsub/index.d.ts | 1241 ++ types/gapi.client.pubsub/readme.md | 58 + types/gapi.client.pubsub/tsconfig.json | 24 + types/gapi.client.pubsub/tslint.json | 8 + .../gapi.client.qpxexpress-tests.ts | 19 + types/gapi.client.qpxexpress/index.d.ts | 406 + types/gapi.client.qpxexpress/readme.md | 40 + types/gapi.client.qpxexpress/tsconfig.json | 24 + types/gapi.client.qpxexpress/tslint.json | 8 + .../gapi.client.reseller-tests.ts | 121 + types/gapi.client.reseller/index.d.ts | 793 + types/gapi.client.reseller/readme.md | 142 + types/gapi.client.reseller/tsconfig.json | 24 + types/gapi.client.reseller/tslint.json | 8 + .../gapi.client.resourceviews-tests.ts | 116 + types/gapi.client.resourceviews/index.d.ts | 505 + types/gapi.client.resourceviews/readme.md | 124 + types/gapi.client.resourceviews/tsconfig.json | 24 + types/gapi.client.resourceviews/tslint.json | 8 + .../gapi.client.runtimeconfig-tests.ts | 76 + types/gapi.client.runtimeconfig/index.d.ts | 206 + types/gapi.client.runtimeconfig/readme.md | 93 + types/gapi.client.runtimeconfig/tsconfig.json | 24 + types/gapi.client.runtimeconfig/tslint.json | 8 + .../gapi.client.safebrowsing-tests.ts | 41 + types/gapi.client.safebrowsing/index.d.ts | 499 + types/gapi.client.safebrowsing/readme.md | 66 + types/gapi.client.safebrowsing/tsconfig.json | 24 + types/gapi.client.safebrowsing/tslint.json | 8 + .../gapi.client.script-tests.ts | 66 + types/gapi.client.script/index.d.ts | 166 + types/gapi.client.script/readme.md | 97 + types/gapi.client.script/tsconfig.json | 24 + types/gapi.client.script/tslint.json | 8 + .../gapi.client.searchconsole-tests.ts | 16 + types/gapi.client.searchconsole/index.d.ts | 102 + types/gapi.client.searchconsole/readme.md | 35 + types/gapi.client.searchconsole/tsconfig.json | 24 + types/gapi.client.searchconsole/tslint.json | 8 + .../gapi.client.servicecontrol-tests.ts | 144 + types/gapi.client.servicecontrol/index.d.ts | 1191 ++ types/gapi.client.servicecontrol/readme.md | 161 + .../gapi.client.servicecontrol/tsconfig.json | 24 + types/gapi.client.servicecontrol/tslint.json | 8 + .../gapi.client.servicemanagement-tests.ts | 176 + .../gapi.client.servicemanagement/index.d.ts | 2813 +++ types/gapi.client.servicemanagement/readme.md | 185 + .../tsconfig.json | 24 + .../gapi.client.servicemanagement/tslint.json | 8 + .../gapi.client.serviceuser-tests.ts | 47 + types/gapi.client.serviceuser/index.d.ts | 1585 ++ types/gapi.client.serviceuser/readme.md | 69 + types/gapi.client.serviceuser/tsconfig.json | 24 + types/gapi.client.serviceuser/tslint.json | 8 + .../gapi.client.sheets-tests.ts | 122 + types/gapi.client.sheets/index.d.ts | 3310 +++ types/gapi.client.sheets/readme.md | 145 + types/gapi.client.sheets/tsconfig.json | 24 + types/gapi.client.sheets/tslint.json | 8 + .../gapi.client.siteverification-tests.ts | 60 + types/gapi.client.siteverification/index.d.ts | 213 + types/gapi.client.siteverification/readme.md | 92 + .../tsconfig.json | 24 + .../gapi.client.siteverification/tslint.json | 8 + .../gapi.client.slides-tests.ts | 79 + types/gapi.client.slides/index.d.ts | 2145 ++ types/gapi.client.slides/readme.md | 106 + types/gapi.client.slides/tsconfig.json | 24 + types/gapi.client.slides/tslint.json | 8 + .../gapi.client.sourcerepo-tests.ts | 38 + types/gapi.client.sourcerepo/index.d.ts | 489 + types/gapi.client.sourcerepo/readme.md | 63 + types/gapi.client.sourcerepo/tsconfig.json | 24 + types/gapi.client.sourcerepo/tslint.json | 8 + .../gapi.client.spanner-tests.ts | 36 + types/gapi.client.spanner/index.d.ts | 2705 +++ types/gapi.client.spanner/readme.md | 60 + types/gapi.client.spanner/tsconfig.json | 24 + types/gapi.client.spanner/tslint.json | 8 + .../gapi.client.spectrum-tests.ts | 43 + types/gapi.client.spectrum/index.d.ts | 841 + types/gapi.client.spectrum/readme.md | 65 + types/gapi.client.spectrum/tsconfig.json | 24 + types/gapi.client.spectrum/tslint.json | 8 + .../gapi.client.speech-tests.ts | 96 + types/gapi.client.speech/index.d.ts | 455 + types/gapi.client.speech/readme.md | 111 + types/gapi.client.speech/tsconfig.json | 24 + types/gapi.client.speech/tslint.json | 8 + .../gapi.client.sqladmin-tests.ts | 267 + types/gapi.client.sqladmin/index.d.ts | 1731 ++ types/gapi.client.sqladmin/readme.md | 257 + types/gapi.client.sqladmin/tsconfig.json | 24 + types/gapi.client.sqladmin/tslint.json | 8 + .../gapi.client.storage-tests.ts | 410 + types/gapi.client.storage/index.d.ts | 2019 ++ types/gapi.client.storage/readme.md | 291 + types/gapi.client.storage/tsconfig.json | 24 + types/gapi.client.storage/tslint.json | 8 + .../gapi.client.storagetransfer-tests.ts | 109 + types/gapi.client.storagetransfer/index.d.ts | 856 + types/gapi.client.storagetransfer/readme.md | 129 + .../gapi.client.storagetransfer/tsconfig.json | 24 + types/gapi.client.storagetransfer/tslint.json | 8 + .../gapi.client.streetviewpublish-tests.ts | 214 + .../gapi.client.streetviewpublish/index.d.ts | 787 + types/gapi.client.streetviewpublish/readme.md | 226 + .../tsconfig.json | 24 + .../gapi.client.streetviewpublish/tslint.json | 8 + .../gapi.client.surveys-tests.ts | 86 + types/gapi.client.surveys/index.d.ts | 499 + types/gapi.client.surveys/readme.md | 115 + types/gapi.client.surveys/tsconfig.json | 24 + types/gapi.client.surveys/tslint.json | 8 + .../gapi.client.tagmanager-tests.ts | 57 + types/gapi.client.tagmanager/index.d.ts | 2470 +++ types/gapi.client.tagmanager/readme.md | 87 + types/gapi.client.tagmanager/tsconfig.json | 24 + types/gapi.client.tagmanager/tslint.json | 8 + .../gapi.client.taskqueue-tests.ts | 85 + types/gapi.client.taskqueue/index.d.ts | 300 + types/gapi.client.taskqueue/readme.md | 97 + types/gapi.client.taskqueue/tsconfig.json | 24 + types/gapi.client.taskqueue/tslint.json | 8 + .../gapi.client.tasks-tests.ts | 115 + types/gapi.client.tasks/index.d.ts | 467 + types/gapi.client.tasks/readme.md | 127 + types/gapi.client.tasks/tsconfig.json | 24 + types/gapi.client.tasks/tslint.json | 8 + .../gapi.client.testing-tests.ts | 47 + types/gapi.client.testing/index.d.ts | 997 + types/gapi.client.testing/readme.md | 68 + types/gapi.client.testing/tsconfig.json | 24 + types/gapi.client.testing/tslint.json | 8 + .../gapi.client.toolresults-tests.ts | 64 + types/gapi.client.toolresults/index.d.ts | 2002 ++ types/gapi.client.toolresults/readme.md | 78 + types/gapi.client.toolresults/tsconfig.json | 24 + types/gapi.client.toolresults/tslint.json | 8 + .../gapi.client.translate-tests.ts | 58 + types/gapi.client.translate/index.d.ts | 319 + types/gapi.client.translate/readme.md | 83 + types/gapi.client.translate/tsconfig.json | 24 + types/gapi.client.translate/tslint.json | 8 + .../gapi.client.urlshortener-tests.ts | 45 + types/gapi.client.urlshortener/index.d.ts | 154 + types/gapi.client.urlshortener/readme.md | 69 + types/gapi.client.urlshortener/tsconfig.json | 24 + types/gapi.client.urlshortener/tslint.json | 8 + .../gapi.client.vault-tests.ts | 86 + types/gapi.client.vault/index.d.ts | 804 + types/gapi.client.vault/readme.md | 112 + types/gapi.client.vault/tsconfig.json | 24 + types/gapi.client.vault/tslint.json | 8 + .../gapi.client.videointelligence-tests.ts | 40 + .../gapi.client.videointelligence/index.d.ts | 473 + types/gapi.client.videointelligence/readme.md | 62 + .../tsconfig.json | 24 + .../gapi.client.videointelligence/tslint.json | 8 + .../gapi.client.vision-tests.ts | 37 + types/gapi.client.vision/index.d.ts | 603 + types/gapi.client.vision/readme.md | 62 + types/gapi.client.vision/tsconfig.json | 24 + types/gapi.client.vision/tslint.json | 8 + .../gapi.client.webfonts-tests.ts | 20 + types/gapi.client.webfonts/index.d.ts | 71 + types/gapi.client.webfonts/readme.md | 40 + types/gapi.client.webfonts/tsconfig.json | 24 + types/gapi.client.webfonts/tslint.json | 8 + .../gapi.client.webmasters-tests.ts | 106 + types/gapi.client.webmasters/index.d.ts | 510 + types/gapi.client.webmasters/readme.md | 124 + types/gapi.client.webmasters/tsconfig.json | 24 + types/gapi.client.webmasters/tslint.json | 8 + .../gapi.client.youtube-tests.ts | 589 + types/gapi.client.youtube/index.d.ts | 5732 +++++ types/gapi.client.youtube/readme.md | 435 + types/gapi.client.youtube/tsconfig.json | 24 + types/gapi.client.youtube/tslint.json | 8 + .../gapi.client.youtubeanalytics-tests.ts | 91 + types/gapi.client.youtubeanalytics/index.d.ts | 381 + types/gapi.client.youtubeanalytics/readme.md | 106 + .../tsconfig.json | 24 + .../gapi.client.youtubeanalytics/tslint.json | 8 + .../gapi.client.youtubereporting-tests.ts | 69 + types/gapi.client.youtubereporting/index.d.ts | 483 + types/gapi.client.youtubereporting/readme.md | 88 + .../tsconfig.json | 24 + .../gapi.client.youtubereporting/tslint.json | 8 + types/gapi.client/gapi.client-tests.ts | 12 + types/gapi.client/index.d.ts | 216 + types/gapi.client/readme.md | 8 + types/gapi.client/tsconfig.json | 24 + types/gapi.client/tslint.json | 9 + 625 files changed, 208886 insertions(+) create mode 100644 types/gapi.client.acceleratedmobilepageurl/gapi.client.acceleratedmobilepageurl-tests.ts create mode 100644 types/gapi.client.acceleratedmobilepageurl/index.d.ts create mode 100644 types/gapi.client.acceleratedmobilepageurl/readme.md create mode 100644 types/gapi.client.acceleratedmobilepageurl/tsconfig.json create mode 100644 types/gapi.client.acceleratedmobilepageurl/tslint.json create mode 100644 types/gapi.client.adexchangebuyer/gapi.client.adexchangebuyer-tests.ts create mode 100644 types/gapi.client.adexchangebuyer/index.d.ts create mode 100644 types/gapi.client.adexchangebuyer/readme.md create mode 100644 types/gapi.client.adexchangebuyer/tsconfig.json create mode 100644 types/gapi.client.adexchangebuyer/tslint.json create mode 100644 types/gapi.client.adexchangebuyer2/gapi.client.adexchangebuyer2-tests.ts create mode 100644 types/gapi.client.adexchangebuyer2/index.d.ts create mode 100644 types/gapi.client.adexchangebuyer2/readme.md create mode 100644 types/gapi.client.adexchangebuyer2/tsconfig.json create mode 100644 types/gapi.client.adexchangebuyer2/tslint.json create mode 100644 types/gapi.client.adexchangeseller/gapi.client.adexchangeseller-tests.ts create mode 100644 types/gapi.client.adexchangeseller/index.d.ts create mode 100644 types/gapi.client.adexchangeseller/readme.md create mode 100644 types/gapi.client.adexchangeseller/tsconfig.json create mode 100644 types/gapi.client.adexchangeseller/tslint.json create mode 100644 types/gapi.client.adexperiencereport/gapi.client.adexperiencereport-tests.ts create mode 100644 types/gapi.client.adexperiencereport/index.d.ts create mode 100644 types/gapi.client.adexperiencereport/readme.md create mode 100644 types/gapi.client.adexperiencereport/tsconfig.json create mode 100644 types/gapi.client.adexperiencereport/tslint.json create mode 100644 types/gapi.client.admin/gapi.client.admin-tests.ts create mode 100644 types/gapi.client.admin/index.d.ts create mode 100644 types/gapi.client.admin/readme.md create mode 100644 types/gapi.client.admin/tsconfig.json create mode 100644 types/gapi.client.admin/tslint.json create mode 100644 types/gapi.client.adsense/gapi.client.adsense-tests.ts create mode 100644 types/gapi.client.adsense/index.d.ts create mode 100644 types/gapi.client.adsense/readme.md create mode 100644 types/gapi.client.adsense/tsconfig.json create mode 100644 types/gapi.client.adsense/tslint.json create mode 100644 types/gapi.client.adsensehost/gapi.client.adsensehost-tests.ts create mode 100644 types/gapi.client.adsensehost/index.d.ts create mode 100644 types/gapi.client.adsensehost/readme.md create mode 100644 types/gapi.client.adsensehost/tsconfig.json create mode 100644 types/gapi.client.adsensehost/tslint.json create mode 100644 types/gapi.client.analytics/gapi.client.analytics-tests.ts create mode 100644 types/gapi.client.analytics/index.d.ts create mode 100644 types/gapi.client.analytics/readme.md create mode 100644 types/gapi.client.analytics/tsconfig.json create mode 100644 types/gapi.client.analytics/tslint.json create mode 100644 types/gapi.client.analyticsreporting/gapi.client.analyticsreporting-tests.ts create mode 100644 types/gapi.client.analyticsreporting/index.d.ts create mode 100644 types/gapi.client.analyticsreporting/readme.md create mode 100644 types/gapi.client.analyticsreporting/tsconfig.json create mode 100644 types/gapi.client.analyticsreporting/tslint.json create mode 100644 types/gapi.client.androiddeviceprovisioning/gapi.client.androiddeviceprovisioning-tests.ts create mode 100644 types/gapi.client.androiddeviceprovisioning/index.d.ts create mode 100644 types/gapi.client.androiddeviceprovisioning/readme.md create mode 100644 types/gapi.client.androiddeviceprovisioning/tsconfig.json create mode 100644 types/gapi.client.androiddeviceprovisioning/tslint.json create mode 100644 types/gapi.client.androidenterprise/gapi.client.androidenterprise-tests.ts create mode 100644 types/gapi.client.androidenterprise/index.d.ts create mode 100644 types/gapi.client.androidenterprise/readme.md create mode 100644 types/gapi.client.androidenterprise/tsconfig.json create mode 100644 types/gapi.client.androidenterprise/tslint.json create mode 100644 types/gapi.client.androidmanagement/gapi.client.androidmanagement-tests.ts create mode 100644 types/gapi.client.androidmanagement/index.d.ts create mode 100644 types/gapi.client.androidmanagement/readme.md create mode 100644 types/gapi.client.androidmanagement/tsconfig.json create mode 100644 types/gapi.client.androidmanagement/tslint.json create mode 100644 types/gapi.client.androidpublisher/gapi.client.androidpublisher-tests.ts create mode 100644 types/gapi.client.androidpublisher/index.d.ts create mode 100644 types/gapi.client.androidpublisher/readme.md create mode 100644 types/gapi.client.androidpublisher/tsconfig.json create mode 100644 types/gapi.client.androidpublisher/tslint.json create mode 100644 types/gapi.client.appengine/gapi.client.appengine-tests.ts create mode 100644 types/gapi.client.appengine/index.d.ts create mode 100644 types/gapi.client.appengine/readme.md create mode 100644 types/gapi.client.appengine/tsconfig.json create mode 100644 types/gapi.client.appengine/tslint.json create mode 100644 types/gapi.client.appsactivity/gapi.client.appsactivity-tests.ts create mode 100644 types/gapi.client.appsactivity/index.d.ts create mode 100644 types/gapi.client.appsactivity/readme.md create mode 100644 types/gapi.client.appsactivity/tsconfig.json create mode 100644 types/gapi.client.appsactivity/tslint.json create mode 100644 types/gapi.client.appstate/gapi.client.appstate-tests.ts create mode 100644 types/gapi.client.appstate/index.d.ts create mode 100644 types/gapi.client.appstate/readme.md create mode 100644 types/gapi.client.appstate/tsconfig.json create mode 100644 types/gapi.client.appstate/tslint.json create mode 100644 types/gapi.client.bigquery/gapi.client.bigquery-tests.ts create mode 100644 types/gapi.client.bigquery/index.d.ts create mode 100644 types/gapi.client.bigquery/readme.md create mode 100644 types/gapi.client.bigquery/tsconfig.json create mode 100644 types/gapi.client.bigquery/tslint.json create mode 100644 types/gapi.client.bigquerydatatransfer/gapi.client.bigquerydatatransfer-tests.ts create mode 100644 types/gapi.client.bigquerydatatransfer/index.d.ts create mode 100644 types/gapi.client.bigquerydatatransfer/readme.md create mode 100644 types/gapi.client.bigquerydatatransfer/tsconfig.json create mode 100644 types/gapi.client.bigquerydatatransfer/tslint.json create mode 100644 types/gapi.client.blogger/gapi.client.blogger-tests.ts create mode 100644 types/gapi.client.blogger/index.d.ts create mode 100644 types/gapi.client.blogger/readme.md create mode 100644 types/gapi.client.blogger/tsconfig.json create mode 100644 types/gapi.client.blogger/tslint.json create mode 100644 types/gapi.client.books/gapi.client.books-tests.ts create mode 100644 types/gapi.client.books/index.d.ts create mode 100644 types/gapi.client.books/readme.md create mode 100644 types/gapi.client.books/tsconfig.json create mode 100644 types/gapi.client.books/tslint.json create mode 100644 types/gapi.client.calendar/gapi.client.calendar-tests.ts create mode 100644 types/gapi.client.calendar/index.d.ts create mode 100644 types/gapi.client.calendar/readme.md create mode 100644 types/gapi.client.calendar/tsconfig.json create mode 100644 types/gapi.client.calendar/tslint.json create mode 100644 types/gapi.client.civicinfo/gapi.client.civicinfo-tests.ts create mode 100644 types/gapi.client.civicinfo/index.d.ts create mode 100644 types/gapi.client.civicinfo/readme.md create mode 100644 types/gapi.client.civicinfo/tsconfig.json create mode 100644 types/gapi.client.civicinfo/tslint.json create mode 100644 types/gapi.client.classroom/gapi.client.classroom-tests.ts create mode 100644 types/gapi.client.classroom/index.d.ts create mode 100644 types/gapi.client.classroom/readme.md create mode 100644 types/gapi.client.classroom/tsconfig.json create mode 100644 types/gapi.client.classroom/tslint.json create mode 100644 types/gapi.client.cloudbilling/gapi.client.cloudbilling-tests.ts create mode 100644 types/gapi.client.cloudbilling/index.d.ts create mode 100644 types/gapi.client.cloudbilling/readme.md create mode 100644 types/gapi.client.cloudbilling/tsconfig.json create mode 100644 types/gapi.client.cloudbilling/tslint.json create mode 100644 types/gapi.client.cloudbuild/gapi.client.cloudbuild-tests.ts create mode 100644 types/gapi.client.cloudbuild/index.d.ts create mode 100644 types/gapi.client.cloudbuild/readme.md create mode 100644 types/gapi.client.cloudbuild/tsconfig.json create mode 100644 types/gapi.client.cloudbuild/tslint.json create mode 100644 types/gapi.client.clouddebugger/gapi.client.clouddebugger-tests.ts create mode 100644 types/gapi.client.clouddebugger/index.d.ts create mode 100644 types/gapi.client.clouddebugger/readme.md create mode 100644 types/gapi.client.clouddebugger/tsconfig.json create mode 100644 types/gapi.client.clouddebugger/tslint.json create mode 100644 types/gapi.client.clouderrorreporting/gapi.client.clouderrorreporting-tests.ts create mode 100644 types/gapi.client.clouderrorreporting/index.d.ts create mode 100644 types/gapi.client.clouderrorreporting/readme.md create mode 100644 types/gapi.client.clouderrorreporting/tsconfig.json create mode 100644 types/gapi.client.clouderrorreporting/tslint.json create mode 100644 types/gapi.client.cloudfunctions/gapi.client.cloudfunctions-tests.ts create mode 100644 types/gapi.client.cloudfunctions/index.d.ts create mode 100644 types/gapi.client.cloudfunctions/readme.md create mode 100644 types/gapi.client.cloudfunctions/tsconfig.json create mode 100644 types/gapi.client.cloudfunctions/tslint.json create mode 100644 types/gapi.client.cloudiot/gapi.client.cloudiot-tests.ts create mode 100644 types/gapi.client.cloudiot/index.d.ts create mode 100644 types/gapi.client.cloudiot/readme.md create mode 100644 types/gapi.client.cloudiot/tsconfig.json create mode 100644 types/gapi.client.cloudiot/tslint.json create mode 100644 types/gapi.client.cloudkms/gapi.client.cloudkms-tests.ts create mode 100644 types/gapi.client.cloudkms/index.d.ts create mode 100644 types/gapi.client.cloudkms/readme.md create mode 100644 types/gapi.client.cloudkms/tsconfig.json create mode 100644 types/gapi.client.cloudkms/tslint.json create mode 100644 types/gapi.client.cloudmonitoring/gapi.client.cloudmonitoring-tests.ts create mode 100644 types/gapi.client.cloudmonitoring/index.d.ts create mode 100644 types/gapi.client.cloudmonitoring/readme.md create mode 100644 types/gapi.client.cloudmonitoring/tsconfig.json create mode 100644 types/gapi.client.cloudmonitoring/tslint.json create mode 100644 types/gapi.client.cloudresourcemanager/gapi.client.cloudresourcemanager-tests.ts create mode 100644 types/gapi.client.cloudresourcemanager/index.d.ts create mode 100644 types/gapi.client.cloudresourcemanager/readme.md create mode 100644 types/gapi.client.cloudresourcemanager/tsconfig.json create mode 100644 types/gapi.client.cloudresourcemanager/tslint.json create mode 100644 types/gapi.client.cloudtasks/gapi.client.cloudtasks-tests.ts create mode 100644 types/gapi.client.cloudtasks/index.d.ts create mode 100644 types/gapi.client.cloudtasks/readme.md create mode 100644 types/gapi.client.cloudtasks/tsconfig.json create mode 100644 types/gapi.client.cloudtasks/tslint.json create mode 100644 types/gapi.client.cloudtrace/gapi.client.cloudtrace-tests.ts create mode 100644 types/gapi.client.cloudtrace/index.d.ts create mode 100644 types/gapi.client.cloudtrace/readme.md create mode 100644 types/gapi.client.cloudtrace/tsconfig.json create mode 100644 types/gapi.client.cloudtrace/tslint.json create mode 100644 types/gapi.client.clouduseraccounts/gapi.client.clouduseraccounts-tests.ts create mode 100644 types/gapi.client.clouduseraccounts/index.d.ts create mode 100644 types/gapi.client.clouduseraccounts/readme.md create mode 100644 types/gapi.client.clouduseraccounts/tsconfig.json create mode 100644 types/gapi.client.clouduseraccounts/tslint.json create mode 100644 types/gapi.client.compute/gapi.client.compute-tests.ts create mode 100644 types/gapi.client.compute/index.d.ts create mode 100644 types/gapi.client.compute/readme.md create mode 100644 types/gapi.client.compute/tsconfig.json create mode 100644 types/gapi.client.compute/tslint.json create mode 100644 types/gapi.client.consumersurveys/gapi.client.consumersurveys-tests.ts create mode 100644 types/gapi.client.consumersurveys/index.d.ts create mode 100644 types/gapi.client.consumersurveys/readme.md create mode 100644 types/gapi.client.consumersurveys/tsconfig.json create mode 100644 types/gapi.client.consumersurveys/tslint.json create mode 100644 types/gapi.client.container/gapi.client.container-tests.ts create mode 100644 types/gapi.client.container/index.d.ts create mode 100644 types/gapi.client.container/readme.md create mode 100644 types/gapi.client.container/tsconfig.json create mode 100644 types/gapi.client.container/tslint.json create mode 100644 types/gapi.client.content/gapi.client.content-tests.ts create mode 100644 types/gapi.client.content/index.d.ts create mode 100644 types/gapi.client.content/readme.md create mode 100644 types/gapi.client.content/tsconfig.json create mode 100644 types/gapi.client.content/tslint.json create mode 100644 types/gapi.client.customsearch/gapi.client.customsearch-tests.ts create mode 100644 types/gapi.client.customsearch/index.d.ts create mode 100644 types/gapi.client.customsearch/readme.md create mode 100644 types/gapi.client.customsearch/tsconfig.json create mode 100644 types/gapi.client.customsearch/tslint.json create mode 100644 types/gapi.client.dataflow/gapi.client.dataflow-tests.ts create mode 100644 types/gapi.client.dataflow/index.d.ts create mode 100644 types/gapi.client.dataflow/readme.md create mode 100644 types/gapi.client.dataflow/tsconfig.json create mode 100644 types/gapi.client.dataflow/tslint.json create mode 100644 types/gapi.client.dataproc/gapi.client.dataproc-tests.ts create mode 100644 types/gapi.client.dataproc/index.d.ts create mode 100644 types/gapi.client.dataproc/readme.md create mode 100644 types/gapi.client.dataproc/tsconfig.json create mode 100644 types/gapi.client.dataproc/tslint.json create mode 100644 types/gapi.client.datastore/gapi.client.datastore-tests.ts create mode 100644 types/gapi.client.datastore/index.d.ts create mode 100644 types/gapi.client.datastore/readme.md create mode 100644 types/gapi.client.datastore/tsconfig.json create mode 100644 types/gapi.client.datastore/tslint.json create mode 100644 types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts create mode 100644 types/gapi.client.deploymentmanager/index.d.ts create mode 100644 types/gapi.client.deploymentmanager/readme.md create mode 100644 types/gapi.client.deploymentmanager/tsconfig.json create mode 100644 types/gapi.client.deploymentmanager/tslint.json create mode 100644 types/gapi.client.dfareporting/gapi.client.dfareporting-tests.ts create mode 100644 types/gapi.client.dfareporting/index.d.ts create mode 100644 types/gapi.client.dfareporting/readme.md create mode 100644 types/gapi.client.dfareporting/tsconfig.json create mode 100644 types/gapi.client.dfareporting/tslint.json create mode 100644 types/gapi.client.discovery/gapi.client.discovery-tests.ts create mode 100644 types/gapi.client.discovery/index.d.ts create mode 100644 types/gapi.client.discovery/readme.md create mode 100644 types/gapi.client.discovery/tsconfig.json create mode 100644 types/gapi.client.discovery/tslint.json create mode 100644 types/gapi.client.dlp/gapi.client.dlp-tests.ts create mode 100644 types/gapi.client.dlp/index.d.ts create mode 100644 types/gapi.client.dlp/readme.md create mode 100644 types/gapi.client.dlp/tsconfig.json create mode 100644 types/gapi.client.dlp/tslint.json create mode 100644 types/gapi.client.dns/gapi.client.dns-tests.ts create mode 100644 types/gapi.client.dns/index.d.ts create mode 100644 types/gapi.client.dns/readme.md create mode 100644 types/gapi.client.dns/tsconfig.json create mode 100644 types/gapi.client.dns/tslint.json create mode 100644 types/gapi.client.doubleclickbidmanager/gapi.client.doubleclickbidmanager-tests.ts create mode 100644 types/gapi.client.doubleclickbidmanager/index.d.ts create mode 100644 types/gapi.client.doubleclickbidmanager/readme.md create mode 100644 types/gapi.client.doubleclickbidmanager/tsconfig.json create mode 100644 types/gapi.client.doubleclickbidmanager/tslint.json create mode 100644 types/gapi.client.doubleclicksearch/gapi.client.doubleclicksearch-tests.ts create mode 100644 types/gapi.client.doubleclicksearch/index.d.ts create mode 100644 types/gapi.client.doubleclicksearch/readme.md create mode 100644 types/gapi.client.doubleclicksearch/tsconfig.json create mode 100644 types/gapi.client.doubleclicksearch/tslint.json create mode 100644 types/gapi.client.drive/gapi.client.drive-tests.ts create mode 100644 types/gapi.client.drive/index.d.ts create mode 100644 types/gapi.client.drive/readme.md create mode 100644 types/gapi.client.drive/tsconfig.json create mode 100644 types/gapi.client.drive/tslint.json create mode 100644 types/gapi.client.firebasedynamiclinks/gapi.client.firebasedynamiclinks-tests.ts create mode 100644 types/gapi.client.firebasedynamiclinks/index.d.ts create mode 100644 types/gapi.client.firebasedynamiclinks/readme.md create mode 100644 types/gapi.client.firebasedynamiclinks/tsconfig.json create mode 100644 types/gapi.client.firebasedynamiclinks/tslint.json create mode 100644 types/gapi.client.firebaseremoteconfig/gapi.client.firebaseremoteconfig-tests.ts create mode 100644 types/gapi.client.firebaseremoteconfig/index.d.ts create mode 100644 types/gapi.client.firebaseremoteconfig/readme.md create mode 100644 types/gapi.client.firebaseremoteconfig/tsconfig.json create mode 100644 types/gapi.client.firebaseremoteconfig/tslint.json create mode 100644 types/gapi.client.firebaserules/gapi.client.firebaserules-tests.ts create mode 100644 types/gapi.client.firebaserules/index.d.ts create mode 100644 types/gapi.client.firebaserules/readme.md create mode 100644 types/gapi.client.firebaserules/tsconfig.json create mode 100644 types/gapi.client.firebaserules/tslint.json create mode 100644 types/gapi.client.firestore/gapi.client.firestore-tests.ts create mode 100644 types/gapi.client.firestore/index.d.ts create mode 100644 types/gapi.client.firestore/readme.md create mode 100644 types/gapi.client.firestore/tsconfig.json create mode 100644 types/gapi.client.firestore/tslint.json create mode 100644 types/gapi.client.fitness/gapi.client.fitness-tests.ts create mode 100644 types/gapi.client.fitness/index.d.ts create mode 100644 types/gapi.client.fitness/readme.md create mode 100644 types/gapi.client.fitness/tsconfig.json create mode 100644 types/gapi.client.fitness/tslint.json create mode 100644 types/gapi.client.fusiontables/gapi.client.fusiontables-tests.ts create mode 100644 types/gapi.client.fusiontables/index.d.ts create mode 100644 types/gapi.client.fusiontables/readme.md create mode 100644 types/gapi.client.fusiontables/tsconfig.json create mode 100644 types/gapi.client.fusiontables/tslint.json create mode 100644 types/gapi.client.games/gapi.client.games-tests.ts create mode 100644 types/gapi.client.games/index.d.ts create mode 100644 types/gapi.client.games/readme.md create mode 100644 types/gapi.client.games/tsconfig.json create mode 100644 types/gapi.client.games/tslint.json create mode 100644 types/gapi.client.gamesconfiguration/gapi.client.gamesconfiguration-tests.ts create mode 100644 types/gapi.client.gamesconfiguration/index.d.ts create mode 100644 types/gapi.client.gamesconfiguration/readme.md create mode 100644 types/gapi.client.gamesconfiguration/tsconfig.json create mode 100644 types/gapi.client.gamesconfiguration/tslint.json create mode 100644 types/gapi.client.gamesmanagement/gapi.client.gamesmanagement-tests.ts create mode 100644 types/gapi.client.gamesmanagement/index.d.ts create mode 100644 types/gapi.client.gamesmanagement/readme.md create mode 100644 types/gapi.client.gamesmanagement/tsconfig.json create mode 100644 types/gapi.client.gamesmanagement/tslint.json create mode 100644 types/gapi.client.genomics/gapi.client.genomics-tests.ts create mode 100644 types/gapi.client.genomics/index.d.ts create mode 100644 types/gapi.client.genomics/readme.md create mode 100644 types/gapi.client.genomics/tsconfig.json create mode 100644 types/gapi.client.genomics/tslint.json create mode 100644 types/gapi.client.gmail/gapi.client.gmail-tests.ts create mode 100644 types/gapi.client.gmail/index.d.ts create mode 100644 types/gapi.client.gmail/readme.md create mode 100644 types/gapi.client.gmail/tsconfig.json create mode 100644 types/gapi.client.gmail/tslint.json create mode 100644 types/gapi.client.groupsmigration/gapi.client.groupsmigration-tests.ts create mode 100644 types/gapi.client.groupsmigration/index.d.ts create mode 100644 types/gapi.client.groupsmigration/readme.md create mode 100644 types/gapi.client.groupsmigration/tsconfig.json create mode 100644 types/gapi.client.groupsmigration/tslint.json create mode 100644 types/gapi.client.groupssettings/gapi.client.groupssettings-tests.ts create mode 100644 types/gapi.client.groupssettings/index.d.ts create mode 100644 types/gapi.client.groupssettings/readme.md create mode 100644 types/gapi.client.groupssettings/tsconfig.json create mode 100644 types/gapi.client.groupssettings/tslint.json create mode 100644 types/gapi.client.iam/gapi.client.iam-tests.ts create mode 100644 types/gapi.client.iam/index.d.ts create mode 100644 types/gapi.client.iam/readme.md create mode 100644 types/gapi.client.iam/tsconfig.json create mode 100644 types/gapi.client.iam/tslint.json create mode 100644 types/gapi.client.identitytoolkit/gapi.client.identitytoolkit-tests.ts create mode 100644 types/gapi.client.identitytoolkit/index.d.ts create mode 100644 types/gapi.client.identitytoolkit/readme.md create mode 100644 types/gapi.client.identitytoolkit/tsconfig.json create mode 100644 types/gapi.client.identitytoolkit/tslint.json create mode 100644 types/gapi.client.kgsearch/gapi.client.kgsearch-tests.ts create mode 100644 types/gapi.client.kgsearch/index.d.ts create mode 100644 types/gapi.client.kgsearch/readme.md create mode 100644 types/gapi.client.kgsearch/tsconfig.json create mode 100644 types/gapi.client.kgsearch/tslint.json create mode 100644 types/gapi.client.language/gapi.client.language-tests.ts create mode 100644 types/gapi.client.language/index.d.ts create mode 100644 types/gapi.client.language/readme.md create mode 100644 types/gapi.client.language/tsconfig.json create mode 100644 types/gapi.client.language/tslint.json create mode 100644 types/gapi.client.licensing/gapi.client.licensing-tests.ts create mode 100644 types/gapi.client.licensing/index.d.ts create mode 100644 types/gapi.client.licensing/readme.md create mode 100644 types/gapi.client.licensing/tsconfig.json create mode 100644 types/gapi.client.licensing/tslint.json create mode 100644 types/gapi.client.logging/gapi.client.logging-tests.ts create mode 100644 types/gapi.client.logging/index.d.ts create mode 100644 types/gapi.client.logging/readme.md create mode 100644 types/gapi.client.logging/tsconfig.json create mode 100644 types/gapi.client.logging/tslint.json create mode 100644 types/gapi.client.manufacturers/gapi.client.manufacturers-tests.ts create mode 100644 types/gapi.client.manufacturers/index.d.ts create mode 100644 types/gapi.client.manufacturers/readme.md create mode 100644 types/gapi.client.manufacturers/tsconfig.json create mode 100644 types/gapi.client.manufacturers/tslint.json create mode 100644 types/gapi.client.mirror/gapi.client.mirror-tests.ts create mode 100644 types/gapi.client.mirror/index.d.ts create mode 100644 types/gapi.client.mirror/readme.md create mode 100644 types/gapi.client.mirror/tsconfig.json create mode 100644 types/gapi.client.mirror/tslint.json create mode 100644 types/gapi.client.ml/gapi.client.ml-tests.ts create mode 100644 types/gapi.client.ml/index.d.ts create mode 100644 types/gapi.client.ml/readme.md create mode 100644 types/gapi.client.ml/tsconfig.json create mode 100644 types/gapi.client.ml/tslint.json create mode 100644 types/gapi.client.monitoring/gapi.client.monitoring-tests.ts create mode 100644 types/gapi.client.monitoring/index.d.ts create mode 100644 types/gapi.client.monitoring/readme.md create mode 100644 types/gapi.client.monitoring/tsconfig.json create mode 100644 types/gapi.client.monitoring/tslint.json create mode 100644 types/gapi.client.oauth2/gapi.client.oauth2-tests.ts create mode 100644 types/gapi.client.oauth2/index.d.ts create mode 100644 types/gapi.client.oauth2/readme.md create mode 100644 types/gapi.client.oauth2/tsconfig.json create mode 100644 types/gapi.client.oauth2/tslint.json create mode 100644 types/gapi.client.oslogin/gapi.client.oslogin-tests.ts create mode 100644 types/gapi.client.oslogin/index.d.ts create mode 100644 types/gapi.client.oslogin/readme.md create mode 100644 types/gapi.client.oslogin/tsconfig.json create mode 100644 types/gapi.client.oslogin/tslint.json create mode 100644 types/gapi.client.pagespeedonline/gapi.client.pagespeedonline-tests.ts create mode 100644 types/gapi.client.pagespeedonline/index.d.ts create mode 100644 types/gapi.client.pagespeedonline/readme.md create mode 100644 types/gapi.client.pagespeedonline/tsconfig.json create mode 100644 types/gapi.client.pagespeedonline/tslint.json create mode 100644 types/gapi.client.partners/gapi.client.partners-tests.ts create mode 100644 types/gapi.client.partners/index.d.ts create mode 100644 types/gapi.client.partners/readme.md create mode 100644 types/gapi.client.partners/tsconfig.json create mode 100644 types/gapi.client.partners/tslint.json create mode 100644 types/gapi.client.people/gapi.client.people-tests.ts create mode 100644 types/gapi.client.people/index.d.ts create mode 100644 types/gapi.client.people/readme.md create mode 100644 types/gapi.client.people/tsconfig.json create mode 100644 types/gapi.client.people/tslint.json create mode 100644 types/gapi.client.playcustomapp/gapi.client.playcustomapp-tests.ts create mode 100644 types/gapi.client.playcustomapp/index.d.ts create mode 100644 types/gapi.client.playcustomapp/readme.md create mode 100644 types/gapi.client.playcustomapp/tsconfig.json create mode 100644 types/gapi.client.playcustomapp/tslint.json create mode 100644 types/gapi.client.playmoviespartner/gapi.client.playmoviespartner-tests.ts create mode 100644 types/gapi.client.playmoviespartner/index.d.ts create mode 100644 types/gapi.client.playmoviespartner/readme.md create mode 100644 types/gapi.client.playmoviespartner/tsconfig.json create mode 100644 types/gapi.client.playmoviespartner/tslint.json create mode 100644 types/gapi.client.plus/gapi.client.plus-tests.ts create mode 100644 types/gapi.client.plus/index.d.ts create mode 100644 types/gapi.client.plus/readme.md create mode 100644 types/gapi.client.plus/tsconfig.json create mode 100644 types/gapi.client.plus/tslint.json create mode 100644 types/gapi.client.plusdomains/gapi.client.plusdomains-tests.ts create mode 100644 types/gapi.client.plusdomains/index.d.ts create mode 100644 types/gapi.client.plusdomains/readme.md create mode 100644 types/gapi.client.plusdomains/tsconfig.json create mode 100644 types/gapi.client.plusdomains/tslint.json create mode 100644 types/gapi.client.prediction/gapi.client.prediction-tests.ts create mode 100644 types/gapi.client.prediction/index.d.ts create mode 100644 types/gapi.client.prediction/readme.md create mode 100644 types/gapi.client.prediction/tsconfig.json create mode 100644 types/gapi.client.prediction/tslint.json create mode 100644 types/gapi.client.proximitybeacon/gapi.client.proximitybeacon-tests.ts create mode 100644 types/gapi.client.proximitybeacon/index.d.ts create mode 100644 types/gapi.client.proximitybeacon/readme.md create mode 100644 types/gapi.client.proximitybeacon/tsconfig.json create mode 100644 types/gapi.client.proximitybeacon/tslint.json create mode 100644 types/gapi.client.pubsub/gapi.client.pubsub-tests.ts create mode 100644 types/gapi.client.pubsub/index.d.ts create mode 100644 types/gapi.client.pubsub/readme.md create mode 100644 types/gapi.client.pubsub/tsconfig.json create mode 100644 types/gapi.client.pubsub/tslint.json create mode 100644 types/gapi.client.qpxexpress/gapi.client.qpxexpress-tests.ts create mode 100644 types/gapi.client.qpxexpress/index.d.ts create mode 100644 types/gapi.client.qpxexpress/readme.md create mode 100644 types/gapi.client.qpxexpress/tsconfig.json create mode 100644 types/gapi.client.qpxexpress/tslint.json create mode 100644 types/gapi.client.reseller/gapi.client.reseller-tests.ts create mode 100644 types/gapi.client.reseller/index.d.ts create mode 100644 types/gapi.client.reseller/readme.md create mode 100644 types/gapi.client.reseller/tsconfig.json create mode 100644 types/gapi.client.reseller/tslint.json create mode 100644 types/gapi.client.resourceviews/gapi.client.resourceviews-tests.ts create mode 100644 types/gapi.client.resourceviews/index.d.ts create mode 100644 types/gapi.client.resourceviews/readme.md create mode 100644 types/gapi.client.resourceviews/tsconfig.json create mode 100644 types/gapi.client.resourceviews/tslint.json create mode 100644 types/gapi.client.runtimeconfig/gapi.client.runtimeconfig-tests.ts create mode 100644 types/gapi.client.runtimeconfig/index.d.ts create mode 100644 types/gapi.client.runtimeconfig/readme.md create mode 100644 types/gapi.client.runtimeconfig/tsconfig.json create mode 100644 types/gapi.client.runtimeconfig/tslint.json create mode 100644 types/gapi.client.safebrowsing/gapi.client.safebrowsing-tests.ts create mode 100644 types/gapi.client.safebrowsing/index.d.ts create mode 100644 types/gapi.client.safebrowsing/readme.md create mode 100644 types/gapi.client.safebrowsing/tsconfig.json create mode 100644 types/gapi.client.safebrowsing/tslint.json create mode 100644 types/gapi.client.script/gapi.client.script-tests.ts create mode 100644 types/gapi.client.script/index.d.ts create mode 100644 types/gapi.client.script/readme.md create mode 100644 types/gapi.client.script/tsconfig.json create mode 100644 types/gapi.client.script/tslint.json create mode 100644 types/gapi.client.searchconsole/gapi.client.searchconsole-tests.ts create mode 100644 types/gapi.client.searchconsole/index.d.ts create mode 100644 types/gapi.client.searchconsole/readme.md create mode 100644 types/gapi.client.searchconsole/tsconfig.json create mode 100644 types/gapi.client.searchconsole/tslint.json create mode 100644 types/gapi.client.servicecontrol/gapi.client.servicecontrol-tests.ts create mode 100644 types/gapi.client.servicecontrol/index.d.ts create mode 100644 types/gapi.client.servicecontrol/readme.md create mode 100644 types/gapi.client.servicecontrol/tsconfig.json create mode 100644 types/gapi.client.servicecontrol/tslint.json create mode 100644 types/gapi.client.servicemanagement/gapi.client.servicemanagement-tests.ts create mode 100644 types/gapi.client.servicemanagement/index.d.ts create mode 100644 types/gapi.client.servicemanagement/readme.md create mode 100644 types/gapi.client.servicemanagement/tsconfig.json create mode 100644 types/gapi.client.servicemanagement/tslint.json create mode 100644 types/gapi.client.serviceuser/gapi.client.serviceuser-tests.ts create mode 100644 types/gapi.client.serviceuser/index.d.ts create mode 100644 types/gapi.client.serviceuser/readme.md create mode 100644 types/gapi.client.serviceuser/tsconfig.json create mode 100644 types/gapi.client.serviceuser/tslint.json create mode 100644 types/gapi.client.sheets/gapi.client.sheets-tests.ts create mode 100644 types/gapi.client.sheets/index.d.ts create mode 100644 types/gapi.client.sheets/readme.md create mode 100644 types/gapi.client.sheets/tsconfig.json create mode 100644 types/gapi.client.sheets/tslint.json create mode 100644 types/gapi.client.siteverification/gapi.client.siteverification-tests.ts create mode 100644 types/gapi.client.siteverification/index.d.ts create mode 100644 types/gapi.client.siteverification/readme.md create mode 100644 types/gapi.client.siteverification/tsconfig.json create mode 100644 types/gapi.client.siteverification/tslint.json create mode 100644 types/gapi.client.slides/gapi.client.slides-tests.ts create mode 100644 types/gapi.client.slides/index.d.ts create mode 100644 types/gapi.client.slides/readme.md create mode 100644 types/gapi.client.slides/tsconfig.json create mode 100644 types/gapi.client.slides/tslint.json create mode 100644 types/gapi.client.sourcerepo/gapi.client.sourcerepo-tests.ts create mode 100644 types/gapi.client.sourcerepo/index.d.ts create mode 100644 types/gapi.client.sourcerepo/readme.md create mode 100644 types/gapi.client.sourcerepo/tsconfig.json create mode 100644 types/gapi.client.sourcerepo/tslint.json create mode 100644 types/gapi.client.spanner/gapi.client.spanner-tests.ts create mode 100644 types/gapi.client.spanner/index.d.ts create mode 100644 types/gapi.client.spanner/readme.md create mode 100644 types/gapi.client.spanner/tsconfig.json create mode 100644 types/gapi.client.spanner/tslint.json create mode 100644 types/gapi.client.spectrum/gapi.client.spectrum-tests.ts create mode 100644 types/gapi.client.spectrum/index.d.ts create mode 100644 types/gapi.client.spectrum/readme.md create mode 100644 types/gapi.client.spectrum/tsconfig.json create mode 100644 types/gapi.client.spectrum/tslint.json create mode 100644 types/gapi.client.speech/gapi.client.speech-tests.ts create mode 100644 types/gapi.client.speech/index.d.ts create mode 100644 types/gapi.client.speech/readme.md create mode 100644 types/gapi.client.speech/tsconfig.json create mode 100644 types/gapi.client.speech/tslint.json create mode 100644 types/gapi.client.sqladmin/gapi.client.sqladmin-tests.ts create mode 100644 types/gapi.client.sqladmin/index.d.ts create mode 100644 types/gapi.client.sqladmin/readme.md create mode 100644 types/gapi.client.sqladmin/tsconfig.json create mode 100644 types/gapi.client.sqladmin/tslint.json create mode 100644 types/gapi.client.storage/gapi.client.storage-tests.ts create mode 100644 types/gapi.client.storage/index.d.ts create mode 100644 types/gapi.client.storage/readme.md create mode 100644 types/gapi.client.storage/tsconfig.json create mode 100644 types/gapi.client.storage/tslint.json create mode 100644 types/gapi.client.storagetransfer/gapi.client.storagetransfer-tests.ts create mode 100644 types/gapi.client.storagetransfer/index.d.ts create mode 100644 types/gapi.client.storagetransfer/readme.md create mode 100644 types/gapi.client.storagetransfer/tsconfig.json create mode 100644 types/gapi.client.storagetransfer/tslint.json create mode 100644 types/gapi.client.streetviewpublish/gapi.client.streetviewpublish-tests.ts create mode 100644 types/gapi.client.streetviewpublish/index.d.ts create mode 100644 types/gapi.client.streetviewpublish/readme.md create mode 100644 types/gapi.client.streetviewpublish/tsconfig.json create mode 100644 types/gapi.client.streetviewpublish/tslint.json create mode 100644 types/gapi.client.surveys/gapi.client.surveys-tests.ts create mode 100644 types/gapi.client.surveys/index.d.ts create mode 100644 types/gapi.client.surveys/readme.md create mode 100644 types/gapi.client.surveys/tsconfig.json create mode 100644 types/gapi.client.surveys/tslint.json create mode 100644 types/gapi.client.tagmanager/gapi.client.tagmanager-tests.ts create mode 100644 types/gapi.client.tagmanager/index.d.ts create mode 100644 types/gapi.client.tagmanager/readme.md create mode 100644 types/gapi.client.tagmanager/tsconfig.json create mode 100644 types/gapi.client.tagmanager/tslint.json create mode 100644 types/gapi.client.taskqueue/gapi.client.taskqueue-tests.ts create mode 100644 types/gapi.client.taskqueue/index.d.ts create mode 100644 types/gapi.client.taskqueue/readme.md create mode 100644 types/gapi.client.taskqueue/tsconfig.json create mode 100644 types/gapi.client.taskqueue/tslint.json create mode 100644 types/gapi.client.tasks/gapi.client.tasks-tests.ts create mode 100644 types/gapi.client.tasks/index.d.ts create mode 100644 types/gapi.client.tasks/readme.md create mode 100644 types/gapi.client.tasks/tsconfig.json create mode 100644 types/gapi.client.tasks/tslint.json create mode 100644 types/gapi.client.testing/gapi.client.testing-tests.ts create mode 100644 types/gapi.client.testing/index.d.ts create mode 100644 types/gapi.client.testing/readme.md create mode 100644 types/gapi.client.testing/tsconfig.json create mode 100644 types/gapi.client.testing/tslint.json create mode 100644 types/gapi.client.toolresults/gapi.client.toolresults-tests.ts create mode 100644 types/gapi.client.toolresults/index.d.ts create mode 100644 types/gapi.client.toolresults/readme.md create mode 100644 types/gapi.client.toolresults/tsconfig.json create mode 100644 types/gapi.client.toolresults/tslint.json create mode 100644 types/gapi.client.translate/gapi.client.translate-tests.ts create mode 100644 types/gapi.client.translate/index.d.ts create mode 100644 types/gapi.client.translate/readme.md create mode 100644 types/gapi.client.translate/tsconfig.json create mode 100644 types/gapi.client.translate/tslint.json create mode 100644 types/gapi.client.urlshortener/gapi.client.urlshortener-tests.ts create mode 100644 types/gapi.client.urlshortener/index.d.ts create mode 100644 types/gapi.client.urlshortener/readme.md create mode 100644 types/gapi.client.urlshortener/tsconfig.json create mode 100644 types/gapi.client.urlshortener/tslint.json create mode 100644 types/gapi.client.vault/gapi.client.vault-tests.ts create mode 100644 types/gapi.client.vault/index.d.ts create mode 100644 types/gapi.client.vault/readme.md create mode 100644 types/gapi.client.vault/tsconfig.json create mode 100644 types/gapi.client.vault/tslint.json create mode 100644 types/gapi.client.videointelligence/gapi.client.videointelligence-tests.ts create mode 100644 types/gapi.client.videointelligence/index.d.ts create mode 100644 types/gapi.client.videointelligence/readme.md create mode 100644 types/gapi.client.videointelligence/tsconfig.json create mode 100644 types/gapi.client.videointelligence/tslint.json create mode 100644 types/gapi.client.vision/gapi.client.vision-tests.ts create mode 100644 types/gapi.client.vision/index.d.ts create mode 100644 types/gapi.client.vision/readme.md create mode 100644 types/gapi.client.vision/tsconfig.json create mode 100644 types/gapi.client.vision/tslint.json create mode 100644 types/gapi.client.webfonts/gapi.client.webfonts-tests.ts create mode 100644 types/gapi.client.webfonts/index.d.ts create mode 100644 types/gapi.client.webfonts/readme.md create mode 100644 types/gapi.client.webfonts/tsconfig.json create mode 100644 types/gapi.client.webfonts/tslint.json create mode 100644 types/gapi.client.webmasters/gapi.client.webmasters-tests.ts create mode 100644 types/gapi.client.webmasters/index.d.ts create mode 100644 types/gapi.client.webmasters/readme.md create mode 100644 types/gapi.client.webmasters/tsconfig.json create mode 100644 types/gapi.client.webmasters/tslint.json create mode 100644 types/gapi.client.youtube/gapi.client.youtube-tests.ts create mode 100644 types/gapi.client.youtube/index.d.ts create mode 100644 types/gapi.client.youtube/readme.md create mode 100644 types/gapi.client.youtube/tsconfig.json create mode 100644 types/gapi.client.youtube/tslint.json create mode 100644 types/gapi.client.youtubeanalytics/gapi.client.youtubeanalytics-tests.ts create mode 100644 types/gapi.client.youtubeanalytics/index.d.ts create mode 100644 types/gapi.client.youtubeanalytics/readme.md create mode 100644 types/gapi.client.youtubeanalytics/tsconfig.json create mode 100644 types/gapi.client.youtubeanalytics/tslint.json create mode 100644 types/gapi.client.youtubereporting/gapi.client.youtubereporting-tests.ts create mode 100644 types/gapi.client.youtubereporting/index.d.ts create mode 100644 types/gapi.client.youtubereporting/readme.md create mode 100644 types/gapi.client.youtubereporting/tsconfig.json create mode 100644 types/gapi.client.youtubereporting/tslint.json create mode 100644 types/gapi.client/gapi.client-tests.ts create mode 100644 types/gapi.client/index.d.ts create mode 100644 types/gapi.client/readme.md create mode 100644 types/gapi.client/tsconfig.json create mode 100644 types/gapi.client/tslint.json diff --git a/types/gapi.client.acceleratedmobilepageurl/gapi.client.acceleratedmobilepageurl-tests.ts b/types/gapi.client.acceleratedmobilepageurl/gapi.client.acceleratedmobilepageurl-tests.ts new file mode 100644 index 0000000000..f5bce33566 --- /dev/null +++ b/types/gapi.client.acceleratedmobilepageurl/gapi.client.acceleratedmobilepageurl-tests.ts @@ -0,0 +1,22 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('acceleratedmobilepageurl', 'v1', () => { + /** now we can use gapi.client.acceleratedmobilepageurl */ + + run(); + }); + + async function run() { + /** + * Returns AMP URL(s) and equivalent + * [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format). + */ + await gapi.client.ampUrls.batchGet({ + }); + } +}); diff --git a/types/gapi.client.acceleratedmobilepageurl/index.d.ts b/types/gapi.client.acceleratedmobilepageurl/index.d.ts new file mode 100644 index 0000000000..1c2c968f53 --- /dev/null +++ b/types/gapi.client.acceleratedmobilepageurl/index.d.ts @@ -0,0 +1,97 @@ +// Type definitions for Google Accelerated Mobile Pages (AMP) URL API v1 1.0 +// Project: https://developers.google.com/amp/cache/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://acceleratedmobilepageurl.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Accelerated Mobile Pages (AMP) URL API v1 */ + function load(name: "acceleratedmobilepageurl", version: "v1"): PromiseLike; + function load(name: "acceleratedmobilepageurl", version: "v1", callback: () => any): void; + + const ampUrls: acceleratedmobilepageurl.AmpUrlsResource; + + namespace acceleratedmobilepageurl { + interface AmpUrl { + /** The AMP URL pointing to the publisher's web server. */ + ampUrl?: string; + /** + * The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to + * the cached document in the Google AMP Cache. + */ + cdnAmpUrl?: string; + /** The original non-AMP URL. */ + originalUrl?: string; + } + interface AmpUrlError { + /** The error code of an API call. */ + errorCode?: string; + /** An optional descriptive error message. */ + errorMessage?: string; + /** The original non-AMP URL. */ + originalUrl?: string; + } + interface BatchGetAmpUrlsRequest { + /** The lookup_strategy being requested. */ + lookupStrategy?: string; + /** + * List of URLs to look up for the paired AMP URLs. + * The URLs are case-sensitive. Up to 50 URLs per lookup + * (see [Usage Limits](/amp/cache/reference/limits)). + */ + urls?: string[]; + } + interface BatchGetAmpUrlsResponse { + /** + * For each URL in BatchAmpUrlsRequest, the URL response. The response might + * not be in the same order as URLs in the batch request. + * If BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated + * only once. + */ + ampUrls?: AmpUrl[]; + /** The errors for requested URLs that have no AMP URL. */ + urlErrors?: AmpUrlError[]; + } + interface AmpUrlsResource { + /** + * Returns AMP URL(s) and equivalent + * [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format). + */ + batchGet(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.acceleratedmobilepageurl/readme.md b/types/gapi.client.acceleratedmobilepageurl/readme.md new file mode 100644 index 0000000000..788f3882c0 --- /dev/null +++ b/types/gapi.client.acceleratedmobilepageurl/readme.md @@ -0,0 +1,42 @@ +# TypeScript typings for Accelerated Mobile Pages (AMP) URL API v1 +Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given list of public URL(s). + +For detailed description please check [documentation](https://developers.google.com/amp/cache/). + +## Installing + +Install typings for Accelerated Mobile Pages (AMP) URL API: +``` +npm install @types/gapi.client.acceleratedmobilepageurl@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('acceleratedmobilepageurl', 'v1', () => { + // now we can use gapi.client.acceleratedmobilepageurl + // ... +}); +``` + + + +After that you can use Accelerated Mobile Pages (AMP) URL API resources: + +```typescript + +/* +Returns AMP URL(s) and equivalent +[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format). +*/ +await gapi.client.ampUrls.batchGet({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.acceleratedmobilepageurl/tsconfig.json b/types/gapi.client.acceleratedmobilepageurl/tsconfig.json new file mode 100644 index 0000000000..60d81925fe --- /dev/null +++ b/types/gapi.client.acceleratedmobilepageurl/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.acceleratedmobilepageurl-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.acceleratedmobilepageurl/tslint.json b/types/gapi.client.acceleratedmobilepageurl/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.acceleratedmobilepageurl/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.adexchangebuyer/gapi.client.adexchangebuyer-tests.ts b/types/gapi.client.adexchangebuyer/gapi.client.adexchangebuyer-tests.ts new file mode 100644 index 0000000000..b180610519 --- /dev/null +++ b/types/gapi.client.adexchangebuyer/gapi.client.adexchangebuyer-tests.ts @@ -0,0 +1,213 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('adexchangebuyer', 'v1.4', () => { + /** now we can use gapi.client.adexchangebuyer */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage your Ad Exchange buyer account configuration */ + 'https://www.googleapis.com/auth/adexchange.buyer', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Gets one account by ID. */ + await gapi.client.accounts.get({ + id: 1, + }); + /** Retrieves the authenticated user's list of accounts. */ + await gapi.client.accounts.list({ + }); + /** Updates an existing account. This method supports patch semantics. */ + await gapi.client.accounts.patch({ + confirmUnsafeAccountChange: true, + id: 2, + }); + /** Updates an existing account. */ + await gapi.client.accounts.update({ + confirmUnsafeAccountChange: true, + id: 2, + }); + /** Returns the billing information for one account specified by account ID. */ + await gapi.client.billingInfo.get({ + accountId: 1, + }); + /** Retrieves a list of billing information for all accounts of the authenticated user. */ + await gapi.client.billingInfo.list({ + }); + /** Returns the budget information for the adgroup specified by the accountId and billingId. */ + await gapi.client.budget.get({ + accountId: "accountId", + billingId: "billingId", + }); + /** + * Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method + * supports patch semantics. + */ + await gapi.client.budget.patch({ + accountId: "accountId", + billingId: "billingId", + }); + /** Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. */ + await gapi.client.budget.update({ + accountId: "accountId", + billingId: "billingId", + }); + /** Add a deal id association for the creative. */ + await gapi.client.creatives.addDeal({ + accountId: 1, + buyerCreativeId: "buyerCreativeId", + dealId: "dealId", + }); + /** Gets the status for a single creative. A creative will be available 30-40 minutes after submission. */ + await gapi.client.creatives.get({ + accountId: 1, + buyerCreativeId: "buyerCreativeId", + }); + /** Submit a new creative. */ + await gapi.client.creatives.insert({ + }); + /** Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. */ + await gapi.client.creatives.list({ + accountId: 1, + buyerCreativeId: "buyerCreativeId", + dealsStatusFilter: "dealsStatusFilter", + maxResults: 4, + openAuctionStatusFilter: "openAuctionStatusFilter", + pageToken: "pageToken", + }); + /** Lists the external deal ids associated with the creative. */ + await gapi.client.creatives.listDeals({ + accountId: 1, + buyerCreativeId: "buyerCreativeId", + }); + /** Remove a deal id associated with the creative. */ + await gapi.client.creatives.removeDeal({ + accountId: 1, + buyerCreativeId: "buyerCreativeId", + dealId: "dealId", + }); + /** Delete the specified deals from the proposal */ + await gapi.client.marketplacedeals.delete({ + proposalId: "proposalId", + }); + /** Add new deals for the specified proposal */ + await gapi.client.marketplacedeals.insert({ + proposalId: "proposalId", + }); + /** List all the deals for a given proposal */ + await gapi.client.marketplacedeals.list({ + pqlQuery: "pqlQuery", + proposalId: "proposalId", + }); + /** Replaces all the deals in the proposal with the passed in deals */ + await gapi.client.marketplacedeals.update({ + proposalId: "proposalId", + }); + /** Add notes to the proposal */ + await gapi.client.marketplacenotes.insert({ + proposalId: "proposalId", + }); + /** Get all the notes associated with a proposal */ + await gapi.client.marketplacenotes.list({ + pqlQuery: "pqlQuery", + proposalId: "proposalId", + }); + /** Update a given private auction proposal */ + await gapi.client.marketplaceprivateauction.updateproposal({ + privateAuctionId: "privateAuctionId", + }); + /** Retrieves the authenticated user's list of performance metrics. */ + await gapi.client.performanceReport.list({ + accountId: "accountId", + endDateTime: "endDateTime", + maxResults: 3, + pageToken: "pageToken", + startDateTime: "startDateTime", + }); + /** Deletes an existing pretargeting config. */ + await gapi.client.pretargetingConfig.delete({ + accountId: "accountId", + configId: "configId", + }); + /** Gets a specific pretargeting configuration */ + await gapi.client.pretargetingConfig.get({ + accountId: "accountId", + configId: "configId", + }); + /** Inserts a new pretargeting configuration. */ + await gapi.client.pretargetingConfig.insert({ + accountId: "accountId", + }); + /** Retrieves a list of the authenticated user's pretargeting configurations. */ + await gapi.client.pretargetingConfig.list({ + accountId: "accountId", + }); + /** Updates an existing pretargeting config. This method supports patch semantics. */ + await gapi.client.pretargetingConfig.patch({ + accountId: "accountId", + configId: "configId", + }); + /** Updates an existing pretargeting config. */ + await gapi.client.pretargetingConfig.update({ + accountId: "accountId", + configId: "configId", + }); + /** Gets the requested product by id. */ + await gapi.client.products.get({ + productId: "productId", + }); + /** Gets the requested product. */ + await gapi.client.products.search({ + pqlQuery: "pqlQuery", + }); + /** Get a proposal given its id */ + await gapi.client.proposals.get({ + proposalId: "proposalId", + }); + /** Create the given list of proposals */ + await gapi.client.proposals.insert({ + }); + /** Update the given proposal. This method supports patch semantics. */ + await gapi.client.proposals.patch({ + proposalId: "proposalId", + revisionNumber: "revisionNumber", + updateAction: "updateAction", + }); + /** Search for proposals using pql query */ + await gapi.client.proposals.search({ + pqlQuery: "pqlQuery", + }); + /** Update the given proposal to indicate that setup has been completed. */ + await gapi.client.proposals.setupcomplete({ + proposalId: "proposalId", + }); + /** Update the given proposal */ + await gapi.client.proposals.update({ + proposalId: "proposalId", + revisionNumber: "revisionNumber", + updateAction: "updateAction", + }); + /** Gets the requested publisher profile(s) by publisher accountId. */ + await gapi.client.pubprofiles.list({ + accountId: 1, + }); + } +}); diff --git a/types/gapi.client.adexchangebuyer/index.d.ts b/types/gapi.client.adexchangebuyer/index.d.ts new file mode 100644 index 0000000000..b6ee95d192 --- /dev/null +++ b/types/gapi.client.adexchangebuyer/index.d.ts @@ -0,0 +1,1989 @@ +// Type definitions for Google Ad Exchange Buyer API v1.4 1.4 +// Project: https://developers.google.com/ad-exchange/buyer-rest +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/adexchangebuyer/v1.4/rest + +/// + +declare namespace gapi.client { + /** Load Ad Exchange Buyer API v1.4 */ + function load(name: "adexchangebuyer", version: "v1.4"): PromiseLike; + function load(name: "adexchangebuyer", version: "v1.4", callback: () => any): void; + + const accounts: adexchangebuyer.AccountsResource; + + const billingInfo: adexchangebuyer.BillingInfoResource; + + const budget: adexchangebuyer.BudgetResource; + + const creatives: adexchangebuyer.CreativesResource; + + const marketplacedeals: adexchangebuyer.MarketplacedealsResource; + + const marketplacenotes: adexchangebuyer.MarketplacenotesResource; + + const marketplaceprivateauction: adexchangebuyer.MarketplaceprivateauctionResource; + + const performanceReport: adexchangebuyer.PerformanceReportResource; + + const pretargetingConfig: adexchangebuyer.PretargetingConfigResource; + + const products: adexchangebuyer.ProductsResource; + + const proposals: adexchangebuyer.ProposalsResource; + + const pubprofiles: adexchangebuyer.PubprofilesResource; + + namespace adexchangebuyer { + interface Account { + /** Your bidder locations that have distinct URLs. */ + bidderLocation?: Array<{ + /** + * The protocol that the bidder endpoint is using. OpenRTB protocols with prefix PROTOCOL_OPENRTB_PROTOBUF use proto buffer, otherwise use JSON. Allowed + * values: + * - PROTOCOL_ADX + * - PROTOCOL_OPENRTB_2_2 + * - PROTOCOL_OPENRTB_2_3 + * - PROTOCOL_OPENRTB_2_4 + * - PROTOCOL_OPENRTB_2_5 + * - PROTOCOL_OPENRTB_PROTOBUF_2_3 + * - PROTOCOL_OPENRTB_PROTOBUF_2_4 + * - PROTOCOL_OPENRTB_PROTOBUF_2_5 + */ + bidProtocol?: string; + /** The maximum queries per second the Ad Exchange will send. */ + maximumQps?: number; + /** + * The geographical region the Ad Exchange should send requests from. Only used by some quota systems, but always setting the value is recommended. + * Allowed values: + * - ASIA + * - EUROPE + * - US_EAST + * - US_WEST + */ + region?: string; + /** The URL to which the Ad Exchange will send bid requests. */ + url?: string; + }>; + /** The nid parameter value used in cookie match requests. Please contact your technical account manager if you need to change this. */ + cookieMatchingNid?: string; + /** The base URL used in cookie match requests. */ + cookieMatchingUrl?: string; + /** Account id. */ + id?: number; + /** Resource type. */ + kind?: string; + /** + * The maximum number of active creatives that an account can have, where a creative is active if it was inserted or bid with in the last 30 days. Please + * contact your technical account manager if you need to change this. + */ + maximumActiveCreatives?: number; + /** The sum of all bidderLocation.maximumQps values cannot exceed this. Please contact your technical account manager if you need to change this. */ + maximumTotalQps?: number; + /** The number of creatives that this account inserted or bid with in the last 30 days. */ + numberActiveCreatives?: number; + } + interface AccountsList { + /** A list of accounts. */ + items?: Account[]; + /** Resource type. */ + kind?: string; + } + interface AddOrderDealsRequest { + /** The list of deals to add */ + deals?: MarketplaceDeal[]; + /** The last known proposal revision number. */ + proposalRevisionNumber?: string; + /** Indicates an optional action to take on the proposal */ + updateAction?: string; + } + interface AddOrderDealsResponse { + /** List of deals added (in the same proposal as passed in the request) */ + deals?: MarketplaceDeal[]; + /** The updated revision number for the proposal. */ + proposalRevisionNumber?: string; + } + interface AddOrderNotesRequest { + /** The list of notes to add. */ + notes?: MarketplaceNote[]; + } + interface AddOrderNotesResponse { + notes?: MarketplaceNote[]; + } + interface BillingInfo { + /** Account id. */ + accountId?: number; + /** Account name. */ + accountName?: string; + /** + * A list of adgroup IDs associated with this particular account. These IDs may show up as part of a realtime bidding BidRequest, which indicates a bid + * request for this account. + */ + billingId?: string[]; + /** Resource type. */ + kind?: string; + } + interface BillingInfoList { + /** A list of billing info relevant for your account. */ + items?: BillingInfo[]; + /** Resource type. */ + kind?: string; + } + interface Budget { + /** The id of the account. This is required for get and update requests. */ + accountId?: string; + /** The billing id to determine which adgroup to provide budget information for. This is required for get and update requests. */ + billingId?: string; + /** The daily budget amount in unit amount of the account currency to apply for the billingId provided. This is required for update requests. */ + budgetAmount?: string; + /** The currency code for the buyer. This cannot be altered here. */ + currencyCode?: string; + /** The unique id that describes this item. */ + id?: string; + /** The kind of the resource, i.e. "adexchangebuyer#budget". */ + kind?: string; + } + interface Buyer { + /** Adx account id of the buyer. */ + accountId?: string; + } + interface ContactInformation { + /** Email address of the contact. */ + email?: string; + /** The name of the contact. */ + name?: string; + } + interface CreateOrdersRequest { + /** The list of proposals to create. */ + proposals?: Proposal[]; + /** Web property id of the seller creating these orders */ + webPropertyCode?: string; + } + interface CreateOrdersResponse { + /** The list of proposals successfully created. */ + proposals?: Proposal[]; + } + interface Creative { + /** The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set. */ + HTMLSnippet?: string; + /** Account id. */ + accountId?: number; + /** The link to the Ad Preferences page. This is only supported for native ads. */ + adChoicesDestinationUrl?: string; + /** Detected advertiser id, if any. Read-only. This field should not be set in requests. */ + advertiserId?: string[]; + /** The name of the company being advertised in the creative. The value provided must exist in the advertisers.txt file. */ + advertiserName?: string; + /** The agency id for this creative. */ + agencyId?: string; + /** + * The last upload timestamp of this creative if it was uploaded via API. Read-only. The value of this field is generated, and will be ignored for + * uploads. (formatted RFC 3339 timestamp). + */ + apiUploadTimestamp?: string; + /** + * List of buyer selectable attributes for the ads that may be shown from this snippet. Each attribute is represented by an integer as defined in + * buyer-declarable-creative-attributes.txt. + */ + attribute?: number[]; + /** A buyer-specific id identifying the creative in this ad. */ + buyerCreativeId?: string; + /** The set of destination urls for the snippet. */ + clickThroughUrl?: string[]; + /** Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. */ + corrections?: Array<{ + /** All known serving contexts containing serving status information. */ + contexts?: Array<{ + /** Only set when contextType=AUCTION_TYPE. Represents the auction types this correction applies to. */ + auctionType?: string[]; + /** The type of context (e.g., location, platform, auction type, SSL-ness). */ + contextType?: string; + /** Only set when contextType=LOCATION. Represents the geo criterias this correction applies to. */ + geoCriteriaId?: number[]; + /** Only set when contextType=PLATFORM. Represents the platforms this correction applies to. */ + platform?: string[]; + }>; + /** Additional details about the correction. */ + details?: string[]; + /** The type of correction that was applied to the creative. */ + reason?: string; + }>; + /** + * Top-level deals status. Read-only. This field should not be set in requests. If disapproved, an entry for auctionType=DIRECT_DEALS (or ALL) in + * servingRestrictions will also exist. Note that this may be nuanced with other contextual restrictions, in which case it may be preferable to read from + * servingRestrictions directly. + */ + dealsStatus?: string; + /** Detected domains for this creative. Read-only. This field should not be set in requests. */ + detectedDomains?: string[]; + /** The filtering reasons for the creative. Read-only. This field should not be set in requests. */ + filteringReasons?: { + /** The date in ISO 8601 format for the data. The data is collected from 00:00:00 to 23:59:59 in PST. */ + date?: string; + /** The filtering reasons. */ + reasons?: Array<{ + /** The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. */ + filteringCount?: string; + /** The filtering status code as defined in creative-status-codes.txt. */ + filteringStatus?: number; + }>; + }; + /** Ad height. */ + height?: number; + /** The set of urls to be called to record an impression. */ + impressionTrackingUrl?: string[]; + /** Resource type. */ + kind?: string; + /** Detected languages for this creative. Read-only. This field should not be set in requests. */ + languages?: string[]; + /** If nativeAd is set, HTMLSnippet and the videoURL outside of nativeAd should not be set. (The videoURL inside nativeAd can be set.) */ + nativeAd?: { + advertiser?: string; + /** The app icon, for app download ads. */ + appIcon?: { + height?: number; + url?: string; + width?: number; + }; + /** A long description of the ad. */ + body?: string; + /** A label for the button that the user is supposed to click. */ + callToAction?: string; + /** The URL that the browser/SDK will load when the user clicks the ad. */ + clickLinkUrl?: string; + /** The URL to use for click tracking. */ + clickTrackingUrl?: string; + /** A short title for the ad. */ + headline?: string; + /** A large image. */ + image?: { + height?: number; + url?: string; + width?: number; + }; + /** The URLs are called when the impression is rendered. */ + impressionTrackingUrl?: string[]; + /** A smaller image, for the advertiser logo. */ + logo?: { + height?: number; + url?: string; + width?: number; + }; + /** The price of the promoted app including the currency info. */ + price?: string; + /** The app rating in the app store. Must be in the range [0-5]. */ + starRating?: number; + /** The URL to the app store to purchase/download the promoted app. */ + store?: string; + /** The URL of the XML VAST for a native ad. Note this is a separate field from resource.video_url. */ + videoURL?: string; + }; + /** + * Top-level open auction status. Read-only. This field should not be set in requests. If disapproved, an entry for auctionType=OPEN_AUCTION (or ALL) in + * servingRestrictions will also exist. Note that this may be nuanced with other contextual restrictions, in which case it may be preferable to read from + * ServingRestrictions directly. + */ + openAuctionStatus?: string; + /** + * Detected product categories, if any. Each category is represented by an integer as defined in ad-product-categories.txt. Read-only. This field should + * not be set in requests. + */ + productCategories?: number[]; + /** + * All restricted categories for the ads that may be shown from this snippet. Each category is represented by an integer as defined in the + * ad-restricted-categories.txt. + */ + restrictedCategories?: number[]; + /** + * Detected sensitive categories, if any. Each category is represented by an integer as defined in ad-sensitive-categories.txt. Read-only. This field + * should not be set in requests. + */ + sensitiveCategories?: number[]; + /** + * The granular status of this ad in specific contexts. A context here relates to where something ultimately serves (for example, a physical location, a + * platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This field should not be set in requests. See the examples in the Creatives + * guide for more details. + */ + servingRestrictions?: Array<{ + /** All known contexts/restrictions. */ + contexts?: Array<{ + /** Only set when contextType=AUCTION_TYPE. Represents the auction types this restriction applies to. */ + auctionType?: string[]; + /** The type of context (e.g., location, platform, auction type, SSL-ness). */ + contextType?: string; + /** + * Only set when contextType=LOCATION. Represents the geo criterias this restriction applies to. Impressions are considered to match a context if either + * the user location or publisher location matches a given geoCriteriaId. + */ + geoCriteriaId?: number[]; + /** Only set when contextType=PLATFORM. Represents the platforms this restriction applies to. */ + platform?: string[]; + }>; + /** + * The reasons for disapproval within this restriction, if any. Note that not all disapproval reasons may be categorized, so it is possible for the + * creative to have a status of DISAPPROVED or CONDITIONALLY_APPROVED with an empty list for disapproval_reasons. In this case, please reach out to your + * TAM to help debug the issue. + */ + disapprovalReasons?: Array<{ + /** Additional details about the reason for disapproval. */ + details?: string[]; + /** The categorized reason for disapproval. */ + reason?: string; + }>; + /** Why the creative is ineligible to serve in this context (e.g., it has been explicitly disapproved or is pending review). */ + reason?: string; + }>; + /** List of vendor types for the ads that may be shown from this snippet. Each vendor type is represented by an integer as defined in vendors.txt. */ + vendorType?: number[]; + /** The version for this creative. Read-only. This field should not be set in requests. */ + version?: number; + /** The URL to fetch a video ad. If set, HTMLSnippet and the nativeAd should not be set. Note, this is different from resource.native_ad.video_url above. */ + videoURL?: string; + /** Ad width. */ + width?: number; + } + interface CreativeDealIds { + /** A list of external deal ids and ARC approval status. */ + dealStatuses?: Array<{ + /** ARC approval status. */ + arcStatus?: string; + /** External deal ID. */ + dealId?: string; + /** Publisher ID. */ + webPropertyId?: number; + }>; + /** Resource type. */ + kind?: string; + } + interface CreativesList { + /** A list of creatives. */ + items?: Creative[]; + /** Resource type. */ + kind?: string; + /** Continuation token used to page through creatives. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface DealServingMetadata { + /** + * True if alcohol ads are allowed for this deal (read-only). This field is only populated when querying for finalized orders using the method + * GetFinalizedOrderDeals + */ + alcoholAdsAllowed?: boolean; + /** Tracks which parties (if any) have paused a deal. (readonly, except via PauseResumeOrderDeals action) */ + dealPauseStatus?: DealServingMetadataDealPauseStatus; + } + interface DealServingMetadataDealPauseStatus { + buyerPauseReason?: string; + /** If the deal is paused, records which party paused the deal first. */ + firstPausedBy?: string; + hasBuyerPaused?: boolean; + hasSellerPaused?: boolean; + sellerPauseReason?: string; + } + interface DealTerms { + /** Visibilty of the URL in bid requests. */ + brandingType?: string; + /** + * Indicates that this ExternalDealId exists under at least two different AdxInventoryDeals. Currently, the only case that the same ExternalDealId will + * exist is programmatic cross sell case. + */ + crossListedExternalDealIdType?: string; + /** Description for the proposed terms of the deal. */ + description?: string; + /** Non-binding estimate of the estimated gross spend for this deal Can be set by buyer or seller. */ + estimatedGrossSpend?: Price; + /** Non-binding estimate of the impressions served per day Can be set by buyer or seller. */ + estimatedImpressionsPerDay?: string; + /** The terms for guaranteed fixed price deals. */ + guaranteedFixedPriceTerms?: DealTermsGuaranteedFixedPriceTerms; + /** The terms for non-guaranteed auction deals. */ + nonGuaranteedAuctionTerms?: DealTermsNonGuaranteedAuctionTerms; + /** The terms for non-guaranteed fixed price deals. */ + nonGuaranteedFixedPriceTerms?: DealTermsNonGuaranteedFixedPriceTerms; + /** The terms for rubicon non-guaranteed deals. */ + rubiconNonGuaranteedTerms?: DealTermsRubiconNonGuaranteedTerms; + /** For deals with Cost Per Day billing, defines the timezone used to mark the boundaries of a day (buyer-readonly) */ + sellerTimeZone?: string; + } + interface DealTermsGuaranteedFixedPriceTerms { + /** External billing info for this Deal. This field is relevant when external billing info such as price has a different currency code than DFP/AdX. */ + billingInfo?: DealTermsGuaranteedFixedPriceTermsBillingInfo; + /** Fixed price for the specified buyer. */ + fixedPrices?: PricePerBuyer[]; + /** Guaranteed impressions as a percentage. This is the percentage of guaranteed looks that the buyer is guaranteeing to buy. */ + guaranteedImpressions?: string; + /** Count of guaranteed looks. Required for deal, optional for product. For CPD deals, buyer changes to guaranteed_looks will be ignored. */ + guaranteedLooks?: string; + /** Count of minimum daily looks for a CPD deal. For CPD deals, buyer should negotiate on this field instead of guaranteed_looks. */ + minimumDailyLooks?: string; + } + interface DealTermsGuaranteedFixedPriceTermsBillingInfo { + /** + * The timestamp (in ms since epoch) when the original reservation price for the deal was first converted to DFP currency. This is used to convert the + * contracted price into buyer's currency without discrepancy. + */ + currencyConversionTimeMs?: string; + /** The DFP line item id associated with this deal. For features like CPD, buyers can retrieve the DFP line item for billing reconciliation. */ + dfpLineItemId?: string; + /** + * The original contracted quantity (# impressions) for this deal. To ensure delivery, sometimes the publisher will book the deal with a impression + * buffer, such that guaranteed_looks is greater than the contracted quantity. However clients are billed using the original contracted quantity. + */ + originalContractedQuantity?: string; + /** The original reservation price for the deal, if the currency code is different from the one used in negotiation. */ + price?: Price; + } + interface DealTermsNonGuaranteedAuctionTerms { + /** True if open auction buyers are allowed to compete with invited buyers in this private auction (buyer-readonly). */ + autoOptimizePrivateAuction?: boolean; + /** Reserve price for the specified buyer. */ + reservePricePerBuyers?: PricePerBuyer[]; + } + interface DealTermsNonGuaranteedFixedPriceTerms { + /** Fixed price for the specified buyer. */ + fixedPrices?: PricePerBuyer[]; + } + interface DealTermsRubiconNonGuaranteedTerms { + /** Optional price for Rubicon priority access in the auction. */ + priorityPrice?: Price; + /** Optional price for Rubicon standard access in the auction. */ + standardPrice?: Price; + } + interface DeleteOrderDealsRequest { + /** List of deals to delete for a given proposal */ + dealIds?: string[]; + /** The last known proposal revision number. */ + proposalRevisionNumber?: string; + /** Indicates an optional action to take on the proposal */ + updateAction?: string; + } + interface DeleteOrderDealsResponse { + /** List of deals deleted (in the same proposal as passed in the request) */ + deals?: MarketplaceDeal[]; + /** The updated revision number for the proposal. */ + proposalRevisionNumber?: string; + } + interface DeliveryControl { + creativeBlockingLevel?: string; + deliveryRateType?: string; + frequencyCaps?: DeliveryControlFrequencyCap[]; + } + interface DeliveryControlFrequencyCap { + maxImpressions?: number; + numTimeUnits?: number; + timeUnitType?: string; + } + interface Dimension { + dimensionType?: string; + dimensionValues?: DimensionDimensionValue[]; + } + interface DimensionDimensionValue { + /** Id of the dimension. */ + id?: number; + /** Name of the dimension mainly for debugging purposes, except for the case of CREATIVE_SIZE. For CREATIVE_SIZE, strings are used instead of ids. */ + name?: string; + /** + * Percent of total impressions for a dimension type. e.g. {dimension_type: 'GENDER', [{dimension_value: {id: 1, name: 'MALE', percentage: 60}}]} Gender + * MALE is 60% of all impressions which have gender. + */ + percentage?: number; + } + interface EditAllOrderDealsRequest { + /** + * List of deals to edit. Service may perform 3 different operations based on comparison of deals in this list vs deals already persisted in database: 1. + * Add new deal to proposal If a deal in this list does not exist in the proposal, the service will create a new deal and add it to the proposal. + * Validation will follow AddOrderDealsRequest. 2. Update existing deal in the proposal If a deal in this list already exist in the proposal, the service + * will update that existing deal to this new deal in the request. Validation will follow UpdateOrderDealsRequest. 3. Delete deals from the proposal (just + * need the id) If a existing deal in the proposal is not present in this list, the service will delete that deal from the proposal. Validation will + * follow DeleteOrderDealsRequest. + */ + deals?: MarketplaceDeal[]; + /** If specified, also updates the proposal in the batch transaction. This is useful when the proposal and the deals need to be updated in one transaction. */ + proposal?: Proposal; + /** The last known revision number for the proposal. */ + proposalRevisionNumber?: string; + /** Indicates an optional action to take on the proposal */ + updateAction?: string; + } + interface EditAllOrderDealsResponse { + /** List of all deals in the proposal after edit. */ + deals?: MarketplaceDeal[]; + /** The latest revision number after the update has been applied. */ + orderRevisionNumber?: string; + } + interface GetOffersResponse { + /** The returned list of products. */ + products?: Product[]; + } + interface GetOrderDealsResponse { + /** List of deals for the proposal */ + deals?: MarketplaceDeal[]; + } + interface GetOrderNotesResponse { + /** + * The list of matching notes. The notes for a proposal are ordered from oldest to newest. If the notes span multiple proposals, they will be grouped by + * proposal, with the notes for the most recently modified proposal appearing first. + */ + notes?: MarketplaceNote[]; + } + interface GetOrdersResponse { + /** The list of matching proposals. */ + proposals?: Proposal[]; + } + interface GetPublisherProfilesByAccountIdResponse { + /** Profiles for the requested publisher */ + profiles?: PublisherProfileApiProto[]; + } + interface MarketplaceDeal { + /** Buyer private data (hidden from seller). */ + buyerPrivateData?: PrivateData; + /** The time (ms since epoch) of the deal creation. (readonly) */ + creationTimeMs?: string; + /** Specifies the creative pre-approval policy (buyer-readonly) */ + creativePreApprovalPolicy?: string; + /** Specifies whether the creative is safeFrame compatible (buyer-readonly) */ + creativeSafeFrameCompatibility?: string; + /** A unique deal-id for the deal (readonly). */ + dealId?: string; + /** Metadata about the serving status of this deal (readonly, writes via custom actions) */ + dealServingMetadata?: DealServingMetadata; + /** + * The set of fields around delivery control that are interesting for a buyer to see but are non-negotiable. These are set by the publisher. This message + * is assigned an id of 100 since some day we would want to model this as a protobuf extension. + */ + deliveryControl?: DeliveryControl; + /** The external deal id assigned to this deal once the deal is finalized. This is the deal-id that shows up in serving/reporting etc. (readonly) */ + externalDealId?: string; + /** Proposed flight end time of the deal (ms since epoch) This will generally be stored in a granularity of a second. (updatable) */ + flightEndTimeMs?: string; + /** Proposed flight start time of the deal (ms since epoch) This will generally be stored in a granularity of a second. (updatable) */ + flightStartTimeMs?: string; + /** Description for the deal terms. (buyer-readonly) */ + inventoryDescription?: string; + /** Indicates whether the current deal is a RFP template. RFP template is created by buyer and not based on seller created products. */ + isRfpTemplate?: boolean; + /** True, if the buyside inventory setup is complete for this deal. (readonly, except via OrderSetupCompleted action) */ + isSetupComplete?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceDeal". */ + kind?: string; + /** The time (ms since epoch) when the deal was last updated. (readonly) */ + lastUpdateTimeMs?: string; + /** The name of the deal. (updatable) */ + name?: string; + /** The product-id from which this deal was created. (readonly, except on create) */ + productId?: string; + /** The revision number of the product that the deal was created from (readonly, except on create) */ + productRevisionNumber?: string; + /** + * Specifies the creative source for programmatic deals, PUBLISHER means creative is provided by seller and ADVERTISR means creative is provided by buyer. + * (buyer-readonly) + */ + programmaticCreativeSource?: string; + proposalId?: string; + /** Optional Seller contact information for the deal (buyer-readonly) */ + sellerContacts?: ContactInformation[]; + /** The shared targeting visible to buyers and sellers. Each shared targeting entity is AND'd together. (updatable) */ + sharedTargetings?: SharedTargeting[]; + /** The syndication product associated with the deal. (readonly, except on create) */ + syndicationProduct?: string; + /** The negotiable terms of the deal. (updatable) */ + terms?: DealTerms; + webPropertyCode?: string; + } + interface MarketplaceDealParty { + /** The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party. */ + buyer?: Buyer; + /** The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party. */ + seller?: Seller; + } + interface MarketplaceLabel { + /** The accountId of the party that created the label. */ + accountId?: string; + /** The creation time (in ms since epoch) for the label. */ + createTimeMs?: string; + /** Information about the party that created the label. */ + deprecatedMarketplaceDealParty?: MarketplaceDealParty; + /** The label to use. */ + label?: string; + } + interface MarketplaceNote { + /** The role of the person (buyer/seller) creating the note. (readonly) */ + creatorRole?: string; + /** Notes can optionally be associated with a deal. (readonly, except on create) */ + dealId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#marketplaceNote". */ + kind?: string; + /** The actual note to attach. (readonly, except on create) */ + note?: string; + /** The unique id for the note. (readonly) */ + noteId?: string; + /** The proposalId that a note is attached to. (readonly) */ + proposalId?: string; + /** If the note is associated with a proposal revision number, then store that here. (readonly, except on create) */ + proposalRevisionNumber?: string; + /** The timestamp (ms since epoch) that this note was created. (readonly) */ + timestampMs?: string; + } + interface PerformanceReport { + /** The number of bid responses with an ad. */ + bidRate?: number; + /** The number of bid requests sent to your bidder. */ + bidRequestRate?: number; + /** Rate of various prefiltering statuses per match. Please refer to the callout-status-codes.txt file for different statuses. */ + calloutStatusRate?: any[]; + /** Average QPS for cookie matcher operations. */ + cookieMatcherStatusRate?: any[]; + /** Rate of ads with a given status. Please refer to the creative-status-codes.txt file for different statuses. */ + creativeStatusRate?: any[]; + /** The number of bid responses that were filtered due to a policy violation or other errors. */ + filteredBidRate?: number; + /** Average QPS for hosted match operations. */ + hostedMatchStatusRate?: any[]; + /** The number of potential queries based on your pretargeting settings. */ + inventoryMatchRate?: number; + /** Resource type. */ + kind?: string; + /** The 50th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. */ + latency50thPercentile?: number; + /** The 85th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. */ + latency85thPercentile?: number; + /** The 95th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. */ + latency95thPercentile?: number; + /** Rate of various quota account statuses per quota check. */ + noQuotaInRegion?: number; + /** Rate of various quota account statuses per quota check. */ + outOfQuota?: number; + /** Average QPS for pixel match requests from clients. */ + pixelMatchRequests?: number; + /** Average QPS for pixel match responses from clients. */ + pixelMatchResponses?: number; + /** The configured quota limits for this account. */ + quotaConfiguredLimit?: number; + /** The throttled quota limits for this account. */ + quotaThrottledLimit?: number; + /** The trading location of this data. */ + region?: string; + /** The number of properly formed bid responses received by our servers within the deadline. */ + successfulRequestRate?: number; + /** The unix timestamp of the starting time of this performance data. */ + timestamp?: string; + /** The number of bid responses that were unsuccessful due to timeouts, incorrect formatting, etc. */ + unsuccessfulRequestRate?: number; + } + interface PerformanceReportList { + /** Resource type. */ + kind?: string; + /** A list of performance reports relevant for the account. */ + performanceReport?: PerformanceReport[]; + } + interface PretargetingConfig { + /** The id for billing purposes, provided for reference. Leave this field blank for insert requests; the id will be generated automatically. */ + billingId?: string; + /** The config id; generated automatically. Leave this field blank for insert requests. */ + configId?: string; + /** The name of the config. Must be unique. Required for all requests. */ + configName?: string; + /** List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or PRETARGETING_CREATIVE_TYPE_VIDEO. */ + creativeType?: string[]; + /** Requests which allow one of these (width, height) pairs will match. All pairs must be supported ad dimensions. */ + dimensions?: Array<{ + /** Height in pixels. */ + height?: string; + /** Width in pixels. */ + width?: string; + }>; + /** Requests with any of these content labels will not match. Values are from content-labels.txt in the downloadable files section. */ + excludedContentLabels?: string[]; + /** Requests containing any of these geo criteria ids will not match. */ + excludedGeoCriteriaIds?: string[]; + /** Requests containing any of these placements will not match. */ + excludedPlacements?: Array<{ + /** + * The value of the placement. Interpretation depends on the placement type, e.g. URL for a site placement, channel name for a channel placement, app id + * for a mobile app placement. + */ + token?: string; + /** The type of the placement. */ + type?: string; + }>; + /** Requests containing any of these users list ids will not match. */ + excludedUserLists?: string[]; + /** Requests containing any of these vertical ids will not match. Values are from the publisher-verticals.txt file in the downloadable files section. */ + excludedVerticals?: string[]; + /** Requests containing any of these geo criteria ids will match. */ + geoCriteriaIds?: string[]; + /** Whether this config is active. Required for all requests. */ + isActive?: boolean; + /** The kind of the resource, i.e. "adexchangebuyer#pretargetingConfig". */ + kind?: string; + /** Request containing any of these language codes will match. */ + languages?: string[]; + /** + * Requests where the predicted viewability is below the specified decile will not match. E.g. if the buyer sets this value to 5, requests from slots + * where the predicted viewability is below 50% will not match. If the predicted viewability is unknown this field will be ignored. + */ + minimumViewabilityDecile?: number; + /** Requests containing any of these mobile carrier ids will match. Values are from mobile-carriers.csv in the downloadable files section. */ + mobileCarriers?: string[]; + /** Requests containing any of these mobile device ids will match. Values are from mobile-devices.csv in the downloadable files section. */ + mobileDevices?: string[]; + /** Requests containing any of these mobile operating system version ids will match. Values are from mobile-os.csv in the downloadable files section. */ + mobileOperatingSystemVersions?: string[]; + /** Requests containing any of these placements will match. */ + placements?: Array<{ + /** + * The value of the placement. Interpretation depends on the placement type, e.g. URL for a site placement, channel name for a channel placement, app id + * for a mobile app placement. + */ + token?: string; + /** The type of the placement. */ + type?: string; + }>; + /** + * Requests matching any of these platforms will match. Possible values are PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and + * PRETARGETING_PLATFORM_TABLET. + */ + platforms?: string[]; + /** + * Creative attributes should be declared here if all creatives corresponding to this pretargeting configuration have that creative attribute. Values are + * from pretargetable-creative-attributes.txt in the downloadable files section. + */ + supportedCreativeAttributes?: string[]; + /** + * Requests containing the specified type of user data will match. Possible values are HOSTED_MATCH_DATA, which means the request is cookie-targetable and + * has a match in the buyer's hosted match table, and COOKIE_OR_IDFA, which means the request has either a targetable cookie or an iOS IDFA. + */ + userIdentifierDataRequired?: string[]; + /** Requests containing any of these user list ids will match. */ + userLists?: string[]; + /** Requests that allow any of these vendor ids will match. Values are from vendors.txt in the downloadable files section. */ + vendorTypes?: string[]; + /** Requests containing any of these vertical ids will match. */ + verticals?: string[]; + /** Video requests satisfying any of these player size constraints will match. */ + videoPlayerSizes?: Array<{ + /** The type of aspect ratio. Leave this field blank to match all aspect ratios. */ + aspectRatio?: string; + /** The minimum player height in pixels. Leave this field blank to match any player height. */ + minHeight?: string; + /** The minimum player width in pixels. Leave this field blank to match any player width. */ + minWidth?: string; + }>; + } + interface PretargetingConfigList { + /** A list of pretargeting configs */ + items?: PretargetingConfig[]; + /** Resource type. */ + kind?: string; + } + interface Price { + /** The price value in micros. */ + amountMicros?: number; + /** The currency code for the price. */ + currencyCode?: string; + /** In case of CPD deals, the expected CPM in micros. */ + expectedCpmMicros?: number; + /** The pricing type for the deal/product. */ + pricingType?: string; + } + interface PricePerBuyer { + /** Optional access type for this buyer. */ + auctionTier?: string; + /** Reference to the buyer that will get billed. */ + billedBuyer?: Buyer; + /** + * The buyer who will pay this price. If unset, all buyers can pay this price (if the advertisers match, and there's no more specific rule matching the + * buyer). + */ + buyer?: Buyer; + /** The specified price */ + price?: Price; + } + interface PrivateData { + referenceId?: string; + referencePayload?: string; + } + interface Product { + /** The billed buyer corresponding to the buyer that created the offer. (readonly, except on create) */ + billedBuyer?: Buyer; + /** The buyer that created the offer if this is a buyer initiated offer (readonly, except on create) */ + buyer?: Buyer; + /** Creation time in ms. since epoch (readonly) */ + creationTimeMs?: string; + /** Optional contact information for the creator of this product. (buyer-readonly) */ + creatorContacts?: ContactInformation[]; + /** The role that created the offer. Set to BUYER for buyer initiated offers. */ + creatorRole?: string; + /** + * The set of fields around delivery control that are interesting for a buyer to see but are non-negotiable. These are set by the publisher. This message + * is assigned an id of 100 since some day we would want to model this as a protobuf extension. + */ + deliveryControl?: DeliveryControl; + /** The proposed end time for the deal (ms since epoch) (buyer-readonly) */ + flightEndTimeMs?: string; + /** Inventory availability dates. (times are in ms since epoch) The granularity is generally in the order of seconds. (buyer-readonly) */ + flightStartTimeMs?: string; + /** + * If the creator has already signed off on the product, then the buyer can finalize the deal by accepting the product as is. When copying to a proposal, + * if any of the terms are changed, then auto_finalize is automatically set to false. + */ + hasCreatorSignedOff?: boolean; + /** What exchange will provide this inventory (readonly, except on create). */ + inventorySource?: string; + /** Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#product". */ + kind?: string; + /** Optional List of labels for the product (optional, buyer-readonly). */ + labels?: MarketplaceLabel[]; + /** Time of last update in ms. since epoch (readonly) */ + lastUpdateTimeMs?: string; + /** Optional legacy offer id if this offer is a preferred deal offer. */ + legacyOfferId?: string; + /** + * Marketplace publisher profile Id. This Id differs from the regular publisher_profile_id in that 1. This is a new id, the old Id will be deprecated in + * 2017. 2. This id uniquely identifies a publisher profile by itself. + */ + marketplacePublisherProfileId?: string; + /** The name for this product as set by the seller. (buyer-readonly) */ + name?: string; + /** Optional private auction id if this offer is a private auction offer. */ + privateAuctionId?: string; + /** The unique id for the product (readonly) */ + productId?: string; + /** + * Id of the publisher profile for a given seller. A (seller.account_id, publisher_profile_id) pair uniquely identifies a publisher profile. Buyers can + * call the PublisherProfiles::List endpoint to get a list of publisher profiles for a given seller. + */ + publisherProfileId?: string; + /** Publisher self-provided forecast information. */ + publisherProvidedForecast?: PublisherProvidedForecast; + /** The revision number of the product. (readonly) */ + revisionNumber?: string; + /** Information about the seller that created this product (readonly, except on create) */ + seller?: Seller; + /** + * Targeting that is shared between the buyer and the seller. Each targeting criteria has a specified key and for each key there is a list of inclusion + * value or exclusion values. (buyer-readonly) + */ + sharedTargetings?: SharedTargeting[]; + /** The state of the product. (buyer-readonly) */ + state?: string; + /** The syndication product associated with the deal. (readonly, except on create) */ + syndicationProduct?: string; + /** The negotiable terms of the deal (buyer-readonly) */ + terms?: DealTerms; + /** The web property code for the seller. This field is meant to be copied over as is when creating deals. */ + webPropertyCode?: string; + } + interface Proposal { + /** Reference to the buyer that will get billed for this proposal. (readonly) */ + billedBuyer?: Buyer; + /** Reference to the buyer on the proposal. (readonly, except on create) */ + buyer?: Buyer; + /** Optional contact information of the buyer. (seller-readonly) */ + buyerContacts?: ContactInformation[]; + /** Private data for buyer. (hidden from seller). */ + buyerPrivateData?: PrivateData; + /** IDs of DBM advertisers permission to this proposal. */ + dbmAdvertiserIds?: string[]; + /** + * When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be + * finalized by the seller. (seller-readonly) + */ + hasBuyerSignedOff?: boolean; + /** + * When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be + * finalized by the seller. (buyer-readonly) + */ + hasSellerSignedOff?: boolean; + /** What exchange will provide this inventory (readonly, except on create). */ + inventorySource?: string; + /** True if the proposal is being renegotiated (readonly). */ + isRenegotiating?: boolean; + /** + * True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level + * setup complete flag. + */ + isSetupComplete?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal". */ + kind?: string; + /** List of labels associated with the proposal. (readonly) */ + labels?: MarketplaceLabel[]; + /** The role of the last user that either updated the proposal or left a comment. (readonly) */ + lastUpdaterOrCommentorRole?: string; + /** The name for the proposal (updatable) */ + name?: string; + /** Optional negotiation id if this proposal is a preferred deal proposal. */ + negotiationId?: string; + /** Indicates whether the buyer/seller created the proposal.(readonly) */ + originatorRole?: string; + /** Optional private auction id if this proposal is a private auction proposal. */ + privateAuctionId?: string; + /** The unique id of the proposal. (readonly). */ + proposalId?: string; + /** The current state of the proposal. (readonly) */ + proposalState?: string; + /** The revision number for the proposal (readonly). */ + revisionNumber?: string; + /** The time (ms since epoch) when the proposal was last revised (readonly). */ + revisionTimeMs?: string; + /** Reference to the seller on the proposal. (readonly, except on create) */ + seller?: Seller; + /** Optional contact information of the seller (buyer-readonly). */ + sellerContacts?: ContactInformation[]; + } + interface PublisherProfileApiProto { + /** Deprecated: use the seller.account_id. The account id of the seller. */ + accountId?: string; + /** Publisher provided info on its audience. */ + audience?: string; + /** A pitch statement for the buyer */ + buyerPitchStatement?: string; + /** Direct contact for the publisher profile. */ + directContact?: string; + /** Exchange where this publisher profile is from. E.g. AdX, Rubicon etc... */ + exchange?: string; + /** Link to publisher's Google+ page. */ + googlePlusLink?: string; + /** True, if this is the parent profile, which represents all domains owned by the publisher. */ + isParent?: boolean; + /** True, if this profile is published. Deprecated for state. */ + isPublished?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#publisherProfileApiProto". */ + kind?: string; + /** The url to the logo for the publisher. */ + logoUrl?: string; + /** The url for additional marketing and sales materials. */ + mediaKitLink?: string; + name?: string; + /** Publisher provided overview. */ + overview?: string; + /** The pair of (seller.account_id, profile_id) uniquely identifies a publisher profile for a given publisher. */ + profileId?: number; + /** Programmatic contact for the publisher profile. */ + programmaticContact?: string; + /** The list of domains represented in this publisher profile. Empty if this is a parent profile. */ + publisherDomains?: string[]; + /** Unique Id for publisher profile. */ + publisherProfileId?: string; + /** Publisher provided forecasting information. */ + publisherProvidedForecast?: PublisherProvidedForecast; + /** Link to publisher rate card */ + rateCardInfoLink?: string; + /** Link for a sample content page. */ + samplePageLink?: string; + /** Seller of the publisher profile. */ + seller?: Seller; + /** State of the publisher profile. */ + state?: string; + /** Publisher provided key metrics and rankings. */ + topHeadlines?: string[]; + } + interface PublisherProvidedForecast { + /** Publisher provided dimensions. E.g. geo, sizes etc... */ + dimensions?: Dimension[]; + /** Publisher provided weekly impressions. */ + weeklyImpressions?: string; + /** Publisher provided weekly uniques. */ + weeklyUniques?: string; + } + interface Seller { + /** The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product. */ + accountId?: string; + /** Optional sub-account id for the seller. */ + subAccountId?: string; + } + interface SharedTargeting { + /** The list of values to exclude from targeting. Each value is AND'd together. */ + exclusions?: TargetingValue[]; + /** The list of value to include as part of the targeting. Each value is OR'd together. */ + inclusions?: TargetingValue[]; + /** The key representing the shared targeting criterion. */ + key?: string; + } + interface TargetingValue { + /** The creative size value to exclude/include. */ + creativeSizeValue?: TargetingValueCreativeSize; + /** The daypart targeting to include / exclude. Filled in when the key is GOOG_DAYPART_TARGETING. */ + dayPartTargetingValue?: TargetingValueDayPartTargeting; + /** The long value to exclude/include. */ + longValue?: string; + /** The string value to exclude/include. */ + stringValue?: string; + } + interface TargetingValueCreativeSize { + /** For video size type, the list of companion sizes. */ + companionSizes?: TargetingValueSize[]; + /** The Creative size type. */ + creativeSizeType?: string; + /** The native template for native ad. */ + nativeTemplate?: string; + /** For regular or video creative size type, specifies the size of the creative. */ + size?: TargetingValueSize; + /** The skippable ad type for video size. */ + skippableAdType?: string; + } + interface TargetingValueDayPartTargeting { + dayParts?: TargetingValueDayPartTargetingDayPart[]; + timeZoneType?: string; + } + interface TargetingValueDayPartTargetingDayPart { + dayOfWeek?: string; + endHour?: number; + endMinute?: number; + startHour?: number; + startMinute?: number; + } + interface TargetingValueSize { + /** The height of the creative. */ + height?: number; + /** The width of the creative. */ + width?: number; + } + interface UpdatePrivateAuctionProposalRequest { + /** The externalDealId of the deal to be updated. */ + externalDealId?: string; + /** Optional note to be added. */ + note?: MarketplaceNote; + /** The current revision number of the proposal to be updated. */ + proposalRevisionNumber?: string; + /** The proposed action on the private auction proposal. */ + updateAction?: string; + } + interface AccountsResource { + /** Gets one account by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The account id */ + id: number; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the authenticated user's list of accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing account. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Confirmation for erasing bidder and cookie matching urls. */ + confirmUnsafeAccountChange?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The account id */ + id: number; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing account. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Confirmation for erasing bidder and cookie matching urls. */ + confirmUnsafeAccountChange?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The account id */ + id: number; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface BillingInfoResource { + /** Returns the billing information for one account specified by account ID. */ + get(request: { + /** The account id. */ + accountId: number; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of billing information for all accounts of the authenticated user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface BudgetResource { + /** Returns the budget information for the adgroup specified by the accountId and billingId. */ + get(request: { + /** The account id to get the budget information for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The billing id to get the budget information for. */ + billingId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method + * supports patch semantics. + */ + patch(request: { + /** The account id associated with the budget being updated. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The billing id associated with the budget being updated. */ + billingId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. */ + update(request: { + /** The account id associated with the budget being updated. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The billing id associated with the budget being updated. */ + billingId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CreativesResource { + /** Add a deal id association for the creative. */ + addDeal(request: { + /** The id for the account that will serve this creative. */ + accountId: number; + /** Data format for the response. */ + alt?: string; + /** The buyer-specific id for this creative. */ + buyerCreativeId: string; + /** The id of the deal id to associate with this creative. */ + dealId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the status for a single creative. A creative will be available 30-40 minutes after submission. */ + get(request: { + /** The id for the account that will serve this creative. */ + accountId: number; + /** Data format for the response. */ + alt?: string; + /** The buyer-specific id for this creative. */ + buyerCreativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Submit a new creative. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. */ + list(request: { + /** When specified, only creatives for the given account ids are returned. */ + accountId?: number; + /** Data format for the response. */ + alt?: string; + /** When specified, only creatives for the given buyer creative ids are returned. */ + buyerCreativeId?: string; + /** When specified, only creatives having the given deals status are returned. */ + dealsStatusFilter?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of entries returned on one result page. If not set, the default is 100. Optional. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** When specified, only creatives having the given open auction status are returned. */ + openAuctionStatusFilter?: string; + /** + * A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. Optional. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the external deal ids associated with the creative. */ + listDeals(request: { + /** The id for the account that will serve this creative. */ + accountId: number; + /** Data format for the response. */ + alt?: string; + /** The buyer-specific id for this creative. */ + buyerCreativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Remove a deal id associated with the creative. */ + removeDeal(request: { + /** The id for the account that will serve this creative. */ + accountId: number; + /** Data format for the response. */ + alt?: string; + /** The buyer-specific id for this creative. */ + buyerCreativeId: string; + /** The id of the deal id to disassociate with this creative. */ + dealId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MarketplacedealsResource { + /** Delete the specified deals from the proposal */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposalId to delete deals from. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Add new deals for the specified proposal */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** proposalId for which deals need to be added. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all the deals for a given proposal */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Query string to retrieve specific deals. */ + pqlQuery?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposalId to get deals for. To search across all proposals specify order_id = '-' as part of the URL. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Replaces all the deals in the proposal with the passed in deals */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposalId to edit deals on. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MarketplacenotesResource { + /** Add notes to the proposal */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposalId to add notes for. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get all the notes associated with a proposal */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Query string to retrieve specific notes. To search the text contents of notes, please use syntax like "WHERE note.note = "foo" or "WHERE note.note LIKE + * "%bar%" + */ + pqlQuery?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposalId to get notes for. To search across all proposals specify order_id = '-' as part of the URL. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MarketplaceprivateauctionResource { + /** Update a given private auction proposal */ + updateproposal(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The private auction id to be updated. */ + privateAuctionId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PerformanceReportResource { + /** Retrieves the authenticated user's list of performance metrics. */ + list(request: { + /** The account id to get the reports. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The end time of the report in ISO 8601 timestamp format using UTC. */ + endDateTime: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of entries returned on one result page. If not set, the default is 100. Optional. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through performance reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. Optional. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The start time of the report in ISO 8601 timestamp format using UTC. */ + startDateTime: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PretargetingConfigResource { + /** Deletes an existing pretargeting config. */ + delete(request: { + /** The account id to delete the pretargeting config for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The specific id of the configuration to delete. */ + configId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a specific pretargeting configuration */ + get(request: { + /** The account id to get the pretargeting config for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The specific id of the configuration to retrieve. */ + configId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new pretargeting configuration. */ + insert(request: { + /** The account id to insert the pretargeting config for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of the authenticated user's pretargeting configurations. */ + list(request: { + /** The account id to get the pretargeting configs for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing pretargeting config. This method supports patch semantics. */ + patch(request: { + /** The account id to update the pretargeting config for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The specific id of the configuration to update. */ + configId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing pretargeting config. */ + update(request: { + /** The account id to update the pretargeting config for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The specific id of the configuration to update. */ + configId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProductsResource { + /** Gets the requested product by id. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The id for the product to get the head revision for. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the requested product. */ + search(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The pql query used to query for products. */ + pqlQuery?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProposalsResource { + /** Get a proposal given its id */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Id of the proposal to retrieve. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Create the given list of proposals */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update the given proposal. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposal id to update. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller + * should then fetch the latest proposal at head revision and retry the update at that revision. + */ + revisionNumber: string; + /** The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. */ + updateAction: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Search for proposals using pql query */ + search(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Query string to retrieve specific proposals. */ + pqlQuery?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update the given proposal to indicate that setup has been completed. */ + setupcomplete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposal id for which the setup is complete */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update the given proposal */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The proposal id to update. */ + proposalId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller + * should then fetch the latest proposal at head revision and retry the update at that revision. + */ + revisionNumber: string; + /** The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. */ + updateAction: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PubprofilesResource { + /** Gets the requested publisher profile(s) by publisher accountId. */ + list(request: { + /** The accountId of the publisher to get profiles for. */ + accountId: number; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.adexchangebuyer/readme.md b/types/gapi.client.adexchangebuyer/readme.md new file mode 100644 index 0000000000..ab46fb564c --- /dev/null +++ b/types/gapi.client.adexchangebuyer/readme.md @@ -0,0 +1,244 @@ +# TypeScript typings for Ad Exchange Buyer API v1.4 +Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports. +For detailed description please check [documentation](https://developers.google.com/ad-exchange/buyer-rest). + +## Installing + +Install typings for Ad Exchange Buyer API: +``` +npm install @types/gapi.client.adexchangebuyer@v1.4 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('adexchangebuyer', 'v1.4', () => { + // now we can use gapi.client.adexchangebuyer + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage your Ad Exchange buyer account configuration + 'https://www.googleapis.com/auth/adexchange.buyer', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Ad Exchange Buyer API resources: + +```typescript + +/* +Gets one account by ID. +*/ +await gapi.client.accounts.get({ id: 1, }); + +/* +Retrieves the authenticated user's list of accounts. +*/ +await gapi.client.accounts.list({ }); + +/* +Updates an existing account. This method supports patch semantics. +*/ +await gapi.client.accounts.patch({ id: 1, }); + +/* +Updates an existing account. +*/ +await gapi.client.accounts.update({ id: 1, }); + +/* +Returns the billing information for one account specified by account ID. +*/ +await gapi.client.billingInfo.get({ accountId: 1, }); + +/* +Retrieves a list of billing information for all accounts of the authenticated user. +*/ +await gapi.client.billingInfo.list({ }); + +/* +Returns the budget information for the adgroup specified by the accountId and billingId. +*/ +await gapi.client.budget.get({ accountId: "accountId", billingId: "billingId", }); + +/* +Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method supports patch semantics. +*/ +await gapi.client.budget.patch({ accountId: "accountId", billingId: "billingId", }); + +/* +Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. +*/ +await gapi.client.budget.update({ accountId: "accountId", billingId: "billingId", }); + +/* +Add a deal id association for the creative. +*/ +await gapi.client.creatives.addDeal({ accountId: 1, buyerCreativeId: "buyerCreativeId", dealId: "dealId", }); + +/* +Gets the status for a single creative. A creative will be available 30-40 minutes after submission. +*/ +await gapi.client.creatives.get({ accountId: 1, buyerCreativeId: "buyerCreativeId", }); + +/* +Submit a new creative. +*/ +await gapi.client.creatives.insert({ }); + +/* +Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. +*/ +await gapi.client.creatives.list({ }); + +/* +Lists the external deal ids associated with the creative. +*/ +await gapi.client.creatives.listDeals({ accountId: 1, buyerCreativeId: "buyerCreativeId", }); + +/* +Remove a deal id associated with the creative. +*/ +await gapi.client.creatives.removeDeal({ accountId: 1, buyerCreativeId: "buyerCreativeId", dealId: "dealId", }); + +/* +Delete the specified deals from the proposal +*/ +await gapi.client.marketplacedeals.delete({ proposalId: "proposalId", }); + +/* +Add new deals for the specified proposal +*/ +await gapi.client.marketplacedeals.insert({ proposalId: "proposalId", }); + +/* +List all the deals for a given proposal +*/ +await gapi.client.marketplacedeals.list({ proposalId: "proposalId", }); + +/* +Replaces all the deals in the proposal with the passed in deals +*/ +await gapi.client.marketplacedeals.update({ proposalId: "proposalId", }); + +/* +Add notes to the proposal +*/ +await gapi.client.marketplacenotes.insert({ proposalId: "proposalId", }); + +/* +Get all the notes associated with a proposal +*/ +await gapi.client.marketplacenotes.list({ proposalId: "proposalId", }); + +/* +Update a given private auction proposal +*/ +await gapi.client.marketplaceprivateauction.updateproposal({ privateAuctionId: "privateAuctionId", }); + +/* +Retrieves the authenticated user's list of performance metrics. +*/ +await gapi.client.performanceReport.list({ accountId: "accountId", endDateTime: "endDateTime", startDateTime: "startDateTime", }); + +/* +Deletes an existing pretargeting config. +*/ +await gapi.client.pretargetingConfig.delete({ accountId: "accountId", configId: "configId", }); + +/* +Gets a specific pretargeting configuration +*/ +await gapi.client.pretargetingConfig.get({ accountId: "accountId", configId: "configId", }); + +/* +Inserts a new pretargeting configuration. +*/ +await gapi.client.pretargetingConfig.insert({ accountId: "accountId", }); + +/* +Retrieves a list of the authenticated user's pretargeting configurations. +*/ +await gapi.client.pretargetingConfig.list({ accountId: "accountId", }); + +/* +Updates an existing pretargeting config. This method supports patch semantics. +*/ +await gapi.client.pretargetingConfig.patch({ accountId: "accountId", configId: "configId", }); + +/* +Updates an existing pretargeting config. +*/ +await gapi.client.pretargetingConfig.update({ accountId: "accountId", configId: "configId", }); + +/* +Gets the requested product by id. +*/ +await gapi.client.products.get({ productId: "productId", }); + +/* +Gets the requested product. +*/ +await gapi.client.products.search({ }); + +/* +Get a proposal given its id +*/ +await gapi.client.proposals.get({ proposalId: "proposalId", }); + +/* +Create the given list of proposals +*/ +await gapi.client.proposals.insert({ }); + +/* +Update the given proposal. This method supports patch semantics. +*/ +await gapi.client.proposals.patch({ proposalId: "proposalId", revisionNumber: "revisionNumber", updateAction: "updateAction", }); + +/* +Search for proposals using pql query +*/ +await gapi.client.proposals.search({ }); + +/* +Update the given proposal to indicate that setup has been completed. +*/ +await gapi.client.proposals.setupcomplete({ proposalId: "proposalId", }); + +/* +Update the given proposal +*/ +await gapi.client.proposals.update({ proposalId: "proposalId", revisionNumber: "revisionNumber", updateAction: "updateAction", }); + +/* +Gets the requested publisher profile(s) by publisher accountId. +*/ +await gapi.client.pubprofiles.list({ accountId: 1, }); +``` \ No newline at end of file diff --git a/types/gapi.client.adexchangebuyer/tsconfig.json b/types/gapi.client.adexchangebuyer/tsconfig.json new file mode 100644 index 0000000000..a6ddc40ec7 --- /dev/null +++ b/types/gapi.client.adexchangebuyer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.adexchangebuyer-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.adexchangebuyer/tslint.json b/types/gapi.client.adexchangebuyer/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.adexchangebuyer/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.adexchangebuyer2/gapi.client.adexchangebuyer2-tests.ts b/types/gapi.client.adexchangebuyer2/gapi.client.adexchangebuyer2-tests.ts new file mode 100644 index 0000000000..0e6ee50fe5 --- /dev/null +++ b/types/gapi.client.adexchangebuyer2/gapi.client.adexchangebuyer2-tests.ts @@ -0,0 +1,32 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('adexchangebuyer2', 'v2beta1', () => { + /** now we can use gapi.client.adexchangebuyer2 */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage your Ad Exchange buyer account configuration */ + 'https://www.googleapis.com/auth/adexchange.buyer', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.adexchangebuyer2/index.d.ts b/types/gapi.client.adexchangebuyer2/index.d.ts new file mode 100644 index 0000000000..40ab26679b --- /dev/null +++ b/types/gapi.client.adexchangebuyer2/index.d.ts @@ -0,0 +1,2400 @@ +// Type definitions for Google Ad Exchange Buyer API II v2beta1 2.0 +// Project: https://developers.google.com/ad-exchange/buyer-rest/reference/rest/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://adexchangebuyer.googleapis.com/$discovery/rest?version=v2beta1 + +/// + +declare namespace gapi.client { + /** Load Ad Exchange Buyer API II v2beta1 */ + function load(name: "adexchangebuyer2", version: "v2beta1"): PromiseLike; + function load(name: "adexchangebuyer2", version: "v2beta1", callback: () => any): void; + + const accounts: adexchangebuyer2.AccountsResource; + + namespace adexchangebuyer2 { + interface AbsoluteDateRange { + /** + * The end date of the range (inclusive). + * Must be within the 30 days leading up to current date, and must be equal to + * or after start_date. + */ + endDate?: Date; + /** + * The start date of the range (inclusive). + * Must be within the 30 days leading up to current date, and must be equal to + * or before end_date. + */ + startDate?: Date; + } + interface AddDealAssociationRequest { + /** The association between a creative and a deal that should be added. */ + association?: CreativeDealAssociation; + } + interface AppContext { + /** The app types this restriction applies to. */ + appTypes?: string[]; + } + interface AuctionContext { + /** The auction types this restriction applies to. */ + auctionTypes?: string[]; + } + interface BidMetricsRow { + /** The number of bids that Ad Exchange received from the buyer. */ + bids?: MetricValue; + /** The number of bids that were permitted to compete in the auction. */ + bidsInAuction?: MetricValue; + /** The number of bids for which the buyer was billed. */ + billedImpressions?: MetricValue; + /** The number of bids that won an impression. */ + impressionsWon?: MetricValue; + /** + * The number of bids for which the corresponding impression was measurable + * for viewability (as defined by Active View). + */ + measurableImpressions?: MetricValue; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + /** + * The number of bids for which the corresponding impression was viewable (as + * defined by Active View). + */ + viewableImpressions?: MetricValue; + } + interface BidResponseWithoutBidsStatusRow { + /** + * The number of impressions for which there was a bid response with the + * specified status. + */ + impressionCount?: MetricValue; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + /** + * The status specifying why the bid responses were considered to have no + * applicable bids. + */ + status?: string; + } + interface CalloutStatusRow { + /** + * The ID of the callout status. + * See [callout-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/callout-status-codes). + */ + calloutStatusId?: number; + /** + * The number of impressions for which there was a bid request or bid response + * with the specified callout status. + */ + impressionCount?: MetricValue; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + } + interface Client { + /** + * The globally-unique numerical ID of the client. + * The value of this field is ignored in create and update operations. + */ + clientAccountId?: string; + /** + * Name used to represent this client to publishers. + * You may have multiple clients that map to the same entity, + * but for each client the combination of `clientName` and entity + * must be unique. + * You can specify this field as empty. + */ + clientName?: string; + /** + * Numerical identifier of the client entity. + * The entity can be an advertiser, a brand, or an agency. + * This identifier is unique among all the entities with the same type. + * + * A list of all known advertisers with their identifiers is available in the + * [advertisers.txt](https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt) + * file. + * + * A list of all known brands with their identifiers is available in the + * [brands.txt](https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt) + * file. + * + * A list of all known agencies with their identifiers is available in the + * [agencies.txt](https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt) + * file. + */ + entityId?: string; + /** + * The name of the entity. This field is automatically fetched based on + * the type and ID. + * The value of this field is ignored in create and update operations. + */ + entityName?: string; + /** The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`. */ + entityType?: string; + /** + * The role which is assigned to the client buyer. Each role implies a set of + * permissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`, + * `CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`. + */ + role?: string; + /** The status of the client buyer. */ + status?: string; + /** Whether the client buyer will be visible to sellers. */ + visibleToSeller?: boolean; + } + interface ClientUser { + /** + * Numerical account ID of the client buyer + * with which the user is associated; the + * buyer must be a client of the current sponsor buyer. + * The value of this field is ignored in an update operation. + */ + clientAccountId?: string; + /** + * User's email address. The value of this field + * is ignored in an update operation. + */ + email?: string; + /** The status of the client user. */ + status?: string; + /** + * The unique numerical ID of the client user + * that has accepted an invitation. + * The value of this field is ignored in an update operation. + */ + userId?: string; + } + interface ClientUserInvitation { + /** + * Numerical account ID of the client buyer + * that the invited user is associated with. + * The value of this field is ignored in create operations. + */ + clientAccountId?: string; + /** + * The email address to which the invitation is sent. Email + * addresses should be unique among all client users under each sponsor + * buyer. + */ + email?: string; + /** + * The unique numerical ID of the invitation that is sent to the user. + * The value of this field is ignored in create operations. + */ + invitationId?: string; + } + interface Correction { + /** The contexts for the correction. */ + contexts?: ServingContext[]; + /** Additional details about what was corrected. */ + details?: string[]; + /** The type of correction that was applied to the creative. */ + type?: string; + } + interface Creative { + /** + * The account that this creative belongs to. + * Can be used to filter the response of the + * creatives.list + * method. + */ + accountId?: string; + /** The link to AdChoices destination page. */ + adChoicesDestinationUrl?: string; + /** The name of the company being advertised in the creative. */ + advertiserName?: string; + /** The agency ID for this creative. */ + agencyId?: string; + /** @OutputOnly The last update timestamp of the creative via API. */ + apiUpdateTime?: string; + /** + * All attributes for the ads that may be shown from this creative. + * Can be used to filter the response of the + * creatives.list + * method. + */ + attributes?: string[]; + /** The set of destination URLs for the creative. */ + clickThroughUrls?: string[]; + /** @OutputOnly Shows any corrections that were applied to this creative. */ + corrections?: Correction[]; + /** + * The buyer-defined creative ID of this creative. + * Can be used to filter the response of the + * creatives.list + * method. + */ + creativeId?: string; + /** + * @OutputOnly The top-level deals status of this creative. + * If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in + * serving_restrictions will also exist. Note + * that this may be nuanced with other contextual restrictions, in which case, + * it may be preferable to read from serving_restrictions directly. + * Can be used to filter the response of the + * creatives.list + * method. + */ + dealsStatus?: string; + /** @OutputOnly Detected advertiser IDs, if any. */ + detectedAdvertiserIds?: string[]; + /** + * @OutputOnly + * The detected domains for this creative. + */ + detectedDomains?: string[]; + /** + * @OutputOnly + * The detected languages for this creative. The order is arbitrary. The codes + * are 2 or 5 characters and are documented at + * https://developers.google.com/adwords/api/docs/appendix/languagecodes. + */ + detectedLanguages?: string[]; + /** + * @OutputOnly Detected product categories, if any. + * See the ad-product-categories.txt file in the technical documentation + * for a list of IDs. + */ + detectedProductCategories?: number[]; + /** + * @OutputOnly Detected sensitive categories, if any. + * See the ad-sensitive-categories.txt file in the technical documentation for + * a list of IDs. You should use these IDs along with the + * excluded-sensitive-category field in the bid request to filter your bids. + */ + detectedSensitiveCategories?: number[]; + /** @OutputOnly The filtering stats for this creative. */ + filteringStats?: FilteringStats; + /** An HTML creative. */ + html?: HtmlContent; + /** The set of URLs to be called to record an impression. */ + impressionTrackingUrls?: string[]; + /** A native creative. */ + native?: NativeContent; + /** + * @OutputOnly The top-level open auction status of this creative. + * If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in + * serving_restrictions will also exist. Note + * that this may be nuanced with other contextual restrictions, in which case, + * it may be preferable to read from serving_restrictions directly. + * Can be used to filter the response of the + * creatives.list + * method. + */ + openAuctionStatus?: string; + /** All restricted categories for the ads that may be shown from this creative. */ + restrictedCategories?: string[]; + /** + * @OutputOnly The granular status of this ad in specific contexts. + * A context here relates to where something ultimately serves (for example, + * a physical location, a platform, an HTTPS vs HTTP request, or the type + * of auction). + */ + servingRestrictions?: ServingRestriction[]; + /** + * All vendor IDs for the ads that may be shown from this creative. + * See https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt + * for possible values. + */ + vendorIds?: number[]; + /** @OutputOnly The version of this creative. */ + version?: number; + /** A video creative. */ + video?: VideoContent; + } + interface CreativeDealAssociation { + /** The account the creative belongs to. */ + accountId?: string; + /** The ID of the creative associated with the deal. */ + creativeId?: string; + /** The externalDealId for the deal associated with the creative. */ + dealsId?: string; + } + interface CreativeStatusRow { + /** The number of bids with the specified status. */ + bidCount?: MetricValue; + /** + * The ID of the creative status. + * See [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + */ + creativeStatusId?: number; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + } + interface 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. */ + month?: number; + /** + * Year of date. Must be from 1 to 9999, or 0 if specifying a date without + * a year. + */ + year?: number; + } + interface Disapproval { + /** Additional details about the reason for disapproval. */ + details?: string[]; + /** The categorized reason for disapproval. */ + reason?: string; + } + interface FilterSet { + /** + * An absolute date range, defined by a start date and an end date. + * Interpreted relative to Pacific time zone. + */ + absoluteDateRange?: AbsoluteDateRange; + /** The ID of the buyer account on which to filter; optional. */ + buyerAccountId?: string; + /** The ID of the creative on which to filter; optional. */ + creativeId?: string; + /** The ID of the deal on which to filter; optional. */ + dealId?: string; + /** The environment on which to filter; optional. */ + environment?: string; + /** + * The ID of the filter set; unique within the account of the filter set + * owner. + * The value of this field is ignored in create operations. + */ + filterSetId?: string; + /** The format on which to filter; optional. */ + format?: string; + /** + * The account ID of the buyer who owns this filter set. + * The value of this field is ignored in create operations. + */ + ownerAccountId?: string; + /** + * The list of platforms on which to filter; may be empty. The filters + * represented by multiple platforms are ORed together (i.e. if non-empty, + * results must match any one of the platforms). + */ + platforms?: string[]; + /** + * An open-ended realtime time range, defined by the aggregation start + * timestamp. + */ + realtimeTimeRange?: RealtimeTimeRange; + /** + * A relative date range, defined by an offset from today and a duration. + * Interpreted relative to Pacific time zone. + */ + relativeDateRange?: RelativeDateRange; + /** + * The list of IDs of the seller (publisher) networks on which to filter; + * may be empty. The filters represented by multiple seller network IDs are + * ORed together (i.e. if non-empty, results must match any one of the + * publisher networks). + * See [seller-network-ids](https://developers.google.com/ad-exchange/rtb/downloads/seller-network-ids) + * file for the set of existing seller network IDs. + */ + sellerNetworkIds?: number[]; + /** + * The granularity of time intervals if a time series breakdown is desired; + * optional. + */ + timeSeriesGranularity?: string; + } + interface FilteredBidCreativeRow { + /** The number of bids with the specified creative. */ + bidCount?: MetricValue; + /** The ID of the creative. */ + creativeId?: string; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + } + interface FilteredBidDetailRow { + /** The number of bids with the specified detail. */ + bidCount?: MetricValue; + /** + * The ID of the detail. The associated value can be looked up in the + * dictionary file corresponding to the DetailType in the response message. + */ + detailId?: number; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + } + interface FilteringStats { + /** + * The day during which the data was collected. + * The data is collected from 00:00:00 to 23:59:59 PT. + * During switches from PST to PDT and back, the day may + * contain 23 or 25 hours of data instead of the usual 24. + */ + date?: Date; + /** The set of filtering reasons for this date. */ + reasons?: Reason[]; + } + interface HtmlContent { + /** The height of the HTML snippet in pixels. */ + height?: number; + /** The HTML snippet that displays the ad when inserted in the web page. */ + snippet?: string; + /** The width of the HTML snippet in pixels. */ + width?: number; + } + interface Image { + /** Image height in pixels. */ + height?: number; + /** The URL of the image. */ + url?: string; + /** Image width in pixels. */ + width?: number; + } + interface ImpressionMetricsRow { + /** + * The number of impressions available to the buyer on Ad Exchange. + * In some cases this value may be unavailable. + */ + availableImpressions?: MetricValue; + /** + * The number of impressions for which Ad Exchange sent the buyer a bid + * request. + */ + bidRequests?: MetricValue; + /** The number of impressions that match the buyer's inventory pretargeting. */ + inventoryMatches?: MetricValue; + /** + * The number of impressions for which Ad Exchange received a response from + * the buyer that contained at least one applicable bid. + */ + responsesWithBids?: MetricValue; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + /** + * The number of impressions for which the buyer successfully sent a response + * to Ad Exchange. + */ + successfulResponses?: MetricValue; + } + interface ListBidMetricsResponse { + /** List of rows, each containing a set of bid metrics. */ + bidMetricsRows?: BidMetricsRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListBidMetricsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.bidMetrics.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListBidResponseErrorsResponse { + /** List of rows, with counts of bid responses aggregated by callout status. */ + calloutStatusRows?: CalloutStatusRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListBidResponseErrorsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.bidResponseErrors.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListBidResponsesWithoutBidsResponse { + /** + * List of rows, with counts of bid responses without bids aggregated by + * status. + */ + bidResponseWithoutBidsStatusRows?: BidResponseWithoutBidsStatusRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListBidResponsesWithoutBidsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.bidResponsesWithoutBids.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListClientUserInvitationsResponse { + /** The returned list of client users. */ + invitations?: ClientUserInvitation[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListClientUserInvitationsRequest.pageToken + * field in the subsequent call to the + * clients.invitations.list + * method to retrieve the next + * page of results. + */ + nextPageToken?: string; + } + interface ListClientUsersResponse { + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListClientUsersRequest.pageToken + * field in the subsequent call to the + * clients.invitations.list + * method to retrieve the next + * page of results. + */ + nextPageToken?: string; + /** The returned list of client users. */ + users?: ClientUser[]; + } + interface ListClientsResponse { + /** The returned list of clients. */ + clients?: Client[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListClientsRequest.pageToken + * field in the subsequent call to the + * accounts.clients.list method + * to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListCreativeStatusBreakdownByCreativeResponse { + /** + * List of rows, with counts of bids with a given creative status aggregated + * by creative. + */ + filteredBidCreativeRows?: FilteredBidCreativeRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListCreativeStatusBreakdownByCreativeRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.filteredBids.creatives.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListCreativeStatusBreakdownByDetailResponse { + /** The type of detail that the detail IDs represent. */ + detailType?: string; + /** + * List of rows, with counts of bids with a given creative status aggregated + * by detail. + */ + filteredBidDetailRows?: FilteredBidDetailRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListCreativeStatusBreakdownByDetailRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.filteredBids.details.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListCreativesResponse { + /** The list of creatives. */ + creatives?: Creative[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListCreativesRequest.page_token + * field in the subsequent call to `ListCreatives` method to retrieve the next + * page of results. + */ + nextPageToken?: string; + } + interface ListDealAssociationsResponse { + /** The list of associations. */ + associations?: CreativeDealAssociation[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListDealAssociationsRequest.page_token + * field in the subsequent call to 'ListDealAssociation' method to retrieve + * the next page of results. + */ + nextPageToken?: string; + } + interface ListFilterSetsResponse { + /** The filter sets belonging to the buyer. */ + filterSets?: FilterSet[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListFilterSetsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListFilteredBidRequestsResponse { + /** + * List of rows, with counts of filtered bid requests aggregated by callout + * status. + */ + calloutStatusRows?: CalloutStatusRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListFilteredBidRequestsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.filteredBidRequests.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListFilteredBidsResponse { + /** + * List of rows, with counts of filtered bids aggregated by filtering reason + * (i.e. creative status). + */ + creativeStatusRows?: CreativeStatusRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListFilteredBidsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.filteredBids.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListImpressionMetricsResponse { + /** List of rows, each containing a set of impression metrics. */ + impressionMetricsRows?: ImpressionMetricsRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListImpressionMetricsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.impressionMetrics.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListLosingBidsResponse { + /** + * List of rows, with counts of losing bids aggregated by loss reason (i.e. + * creative status). + */ + creativeStatusRows?: CreativeStatusRow[]; + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListLosingBidsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.losingBids.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + } + interface ListNonBillableWinningBidsResponse { + /** + * A token to retrieve the next page of results. + * Pass this value in the + * ListNonBillableWinningBidsRequest.pageToken + * field in the subsequent call to the + * accounts.filterSets.nonBillableWinningBids.list + * method to retrieve the next page of results. + */ + nextPageToken?: string; + /** List of rows, with counts of bids not billed aggregated by reason. */ + nonBillableWinningBidStatusRows?: NonBillableWinningBidStatusRow[]; + } + interface LocationContext { + /** + * IDs representing the geo location for this context. + * Please refer to the + * [geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv) + * file for different geo criteria IDs. + */ + geoCriteriaIds?: number[]; + } + interface MetricValue { + /** The expected value of the metric. */ + value?: string; + /** + * The variance (i.e. square of the standard deviation) of the metric value. + * If value is exact, variance is 0. + * Can be used to calculate margin of error as a percentage of value, using + * the following formula, where Z is the standard constant that depends on the + * desired size of the confidence interval (e.g. for 90% confidence interval, + * use Z = 1.645): + * + * marginOfError = 100 * Z * sqrt(variance) / value + */ + variance?: string; + } + interface NativeContent { + /** The name of the advertiser or sponsor, to be displayed in the ad creative. */ + advertiserName?: string; + /** The app icon, for app download ads. */ + appIcon?: Image; + /** A long description of the ad. */ + body?: string; + /** A label for the button that the user is supposed to click. */ + callToAction?: string; + /** The URL that the browser/SDK will load when the user clicks the ad. */ + clickLinkUrl?: string; + /** The URL to use for click tracking. */ + clickTrackingUrl?: string; + /** A short title for the ad. */ + headline?: string; + /** A large image. */ + image?: Image; + /** A smaller image, for the advertiser's logo. */ + logo?: Image; + /** The price of the promoted app including currency info. */ + priceDisplayText?: string; + /** The app rating in the app store. Must be in the range [0-5]. */ + starRating?: number; + /** The URL to the app store to purchase/download the promoted app. */ + storeUrl?: string; + /** The URL to fetch a native video ad. */ + videoUrl?: string; + } + interface NonBillableWinningBidStatusRow { + /** The number of bids with the specified status. */ + bidCount?: MetricValue; + /** The values of all dimensions associated with metric values in this row. */ + rowDimensions?: RowDimensions; + /** The status specifying why the winning bids were not billed. */ + status?: string; + } + interface PlatformContext { + /** The platforms this restriction applies to. */ + platforms?: string[]; + } + interface RealtimeTimeRange { + /** The start timestamp of the real-time RTB metrics aggregation. */ + startTimestamp?: string; + } + interface Reason { + /** + * The number of times the creative was filtered for the status. The + * count is aggregated across all publishers on the exchange. + */ + count?: string; + /** + * The filtering status code. Please refer to the + * [creative-status-codes.txt](https://storage.googleapis.com/adx-rtb-dictionaries/creative-status-codes.txt) + * file for different statuses. + */ + status?: number; + } + interface RelativeDateRange { + /** + * The number of days in the requested date range. E.g. for a range spanning + * today, 1. For a range spanning the last 7 days, 7. + */ + durationDays?: number; + /** + * The end date of the filter set, specified as the number of days before + * today. E.g. for a range where the last date is today, 0. + */ + offsetDays?: number; + } + interface RemoveDealAssociationRequest { + /** The association between a creative and a deal that should be removed. */ + association?: CreativeDealAssociation; + } + interface RowDimensions { + /** The time interval that this row represents. */ + timeInterval?: TimeInterval; + } + interface SecurityContext { + /** The security types in this context. */ + securities?: string[]; + } + interface ServingContext { + /** Matches all contexts. */ + all?: string; + /** Matches impressions for a particular app type. */ + appType?: AppContext; + /** Matches impressions for a particular auction type. */ + auctionType?: AuctionContext; + /** + * Matches impressions coming from users *or* publishers in a specific + * location. + */ + location?: LocationContext; + /** Matches impressions coming from a particular platform. */ + platform?: PlatformContext; + /** Matches impressions for a particular security type. */ + securityType?: SecurityContext; + } + interface ServingRestriction { + /** The contexts for the restriction. */ + contexts?: ServingContext[]; + /** + * Any disapprovals bound to this restriction. + * Only present if status=DISAPPROVED. + * Can be used to filter the response of the + * creatives.list + * method. + */ + disapprovalReasons?: Disapproval[]; + /** + * The status of the creative in this context (for example, it has been + * explicitly disapproved or is pending review). + */ + status?: string; + } + interface TimeInterval { + /** + * The timestamp marking the end of the range (exclusive) for which data is + * included. + */ + endTime?: string; + /** + * The timestamp marking the start of the range (inclusive) for which data is + * included. + */ + startTime?: string; + } + interface VideoContent { + /** The URL to fetch a video ad. */ + videoUrl?: string; + } + interface WatchCreativeRequest { + /** + * The Pub/Sub topic to publish notifications to. + * This topic must already exist and must give permission to + * ad-exchange-buyside-reports@google.com to write to the topic. + * This should be the full resource name in + * "projects/{project_id}/topics/{topic_id}" format. + */ + topic?: string; + } + interface InvitationsResource { + /** + * Creates and sends out an email invitation to access + * an Ad Exchange client buyer account. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Numerical account ID of the client's sponsor buyer. (required) */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Numerical account ID of the client buyer that the user + * should be associated with. (required) + */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Retrieves an existing client user invitation. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Numerical account ID of the client's sponsor buyer. (required) */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Numerical account ID of the client buyer that the user invitation + * to be retrieved is associated with. (required) + */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Numerical identifier of the user invitation to retrieve. (required) */ + invitationId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists all the client users invitations for a client + * with a given account ID. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Numerical account ID of the client's sponsor buyer. (required) */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Numerical account ID of the client buyer to list invitations for. + * (required) + * You must either specify a string representation of a + * numerical account identifier or the `-` character + * to list all the invitations for all the clients + * of a given sponsor buyer. + */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. Server may return fewer clients than requested. + * If unspecified, server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListClientUserInvitationsResponse.nextPageToken + * returned from the previous call to the + * clients.invitations.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface UsersResource { + /** Retrieves an existing client user. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Numerical account ID of the client's sponsor buyer. (required) */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Numerical account ID of the client buyer + * that the user to be retrieved is associated with. (required) + */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Numerical identifier of the user to retrieve. (required) */ + userId: string; + }): Request; + /** + * Lists all the known client users for a specified + * sponsor buyer account ID. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * Numerical account ID of the sponsor buyer of the client to list users for. + * (required) + */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The account ID of the client buyer to list users for. (required) + * You must specify either a string representation of a + * numerical account identifier or the `-` character + * to list all the client users for all the clients + * of a given sponsor buyer. + */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer clients than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListClientUsersResponse.nextPageToken + * returned from the previous call to the + * accounts.clients.users.list method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates an existing client user. + * Only the user status can be changed on update. + */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Numerical account ID of the client's sponsor buyer. (required) */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Numerical account ID of the client buyer that the user to be retrieved + * is associated with. (required) + */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Numerical identifier of the user to retrieve. (required) */ + userId: string; + }): Request; + } + interface ClientsResource { + /** Creates a new client buyer. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * Unique numerical account ID for the buyer of which the client buyer + * is a customer; the sponsor buyer to create a client for. (required) + */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets a client buyer with a given client account ID. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Numerical account ID of the client's sponsor buyer. (required) */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Numerical account ID of the client buyer to retrieve. (required) */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all the clients for the current sponsor buyer. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Unique numerical account ID of the sponsor buyer to list the clients for. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer clients than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListClientsResponse.nextPageToken + * returned from the previous call to the + * accounts.clients.list method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates an existing client buyer. */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * Unique numerical account ID for the buyer of which the client buyer + * is a customer; the sponsor buyer to update a client for. (required) + */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Unique numerical account ID of the client to update. (required) */ + clientAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + invitations: InvitationsResource; + users: UsersResource; + } + interface DealAssociationsResource { + /** Associate an existing deal with a creative. */ + add(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** The account the creative belongs to. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The ID of the creative associated with the deal. */ + creativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** List all creative-deal associations. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * The account to list the associations from. + * Specify "-" to list all creatives the current user has access to. + */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The creative ID to list the associations from. + * Specify "-" to list all creatives under the above account. + */ + creativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. Server may return fewer associations than requested. + * If unspecified, server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListDealAssociationsResponse.next_page_token + * returned from the previous call to 'ListDealAssociations' method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * An optional query string to filter deal associations. If no filter is + * specified, all associations will be returned. + * Supported queries are: + *
    + *
  • accountId=account_id_string + *
  • creativeId=creative_id_string + *
  • dealsId=deals_id_string + *
  • dealsStatus:{approved, conditionally_approved, disapproved, + * not_checked} + *
  • openAuctionStatus:{approved, conditionally_approved, disapproved, + * not_checked} + *
+ * Example: 'dealsId=12345 AND dealsStatus:disapproved' + */ + query?: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Remove the association between a deal and a creative. */ + remove(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** The account the creative belongs to. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The ID of the creative associated with the deal. */ + creativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface CreativesResource { + /** Creates a creative. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * The account that this creative belongs to. + * Can be used to filter the response of the + * creatives.list + * method. + */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Indicates if multiple creatives can share an ID or not. Default is + * NO_DUPLICATES (one ID per creative). + */ + duplicateIdMode?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets a creative. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** The account the creative belongs to. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The ID of the creative to retrieve. */ + creativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists creatives. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * The account to list the creatives from. + * Specify "-" to list all creatives the current user has access to. + */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer creatives than requested + * (due to timeout constraint) even if more are available via another call. + * If unspecified, server will pick an appropriate default. + * Acceptable values are 1 to 1000, inclusive. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListCreativesResponse.next_page_token + * returned from the previous call to 'ListCreatives' method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * An optional query string to filter creatives. If no filter is specified, + * all active creatives will be returned. + * Supported queries are: + *
    + *
  • accountId=account_id_string + *
  • creativeId=creative_id_string + *
  • dealsStatus: {approved, conditionally_approved, disapproved, + * not_checked} + *
  • openAuctionStatus: {approved, conditionally_approved, disapproved, + * not_checked} + *
  • attribute: {a numeric attribute from the list of attributes} + *
  • disapprovalReason: {a reason from + * DisapprovalReason + *
+ * Example: 'accountId=12345 AND (dealsStatus:disapproved AND + * disapprovalReason:unacceptable_content) OR attribute:47' + */ + query?: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Stops watching a creative. Will stop push notifications being sent to the + * topics when the creative changes status. + */ + stopWatching(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** The account of the creative to stop notifications for. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The creative ID of the creative to stop notifications for. + * Specify "-" to specify stopping account level notifications. + */ + creativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Updates a creative. */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * The account that this creative belongs to. + * Can be used to filter the response of the + * creatives.list + * method. + */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The buyer-defined creative ID of this creative. + * Can be used to filter the response of the + * creatives.list + * method. + */ + creativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Watches a creative. Will result in push notifications being sent to the + * topic when the creative changes status. + */ + watch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** The account of the creative to watch. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The creative ID to watch for status changes. + * Specify "-" to watch all creatives under the above account. + * If both creative-level and account-level notifications are + * sent, only a single notification will be sent to the + * creative-level notification topic. + */ + creativeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + dealAssociations: DealAssociationsResource; + } + interface BidMetricsResource { + /** Lists all metrics that are measured in terms of number of bids. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListBidMetricsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.bidMetrics.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface BidResponseErrorsResource { + /** + * List all errors that occurred in bid responses, with the number of bid + * responses affected for each reason. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListBidResponseErrorsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.bidResponseErrors.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface BidResponsesWithoutBidsResource { + /** + * List all reasons for which bid responses were considered to have no + * applicable bids, with the number of bid responses affected for each reason. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListBidResponsesWithoutBidsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.bidResponsesWithoutBids.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface FilteredBidRequestsResource { + /** + * List all reasons that caused a bid request not to be sent for an + * impression, with the number of bid requests not sent for each reason. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListFilteredBidRequestsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.filteredBidRequests.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface CreativesResource { + /** + * List all creatives associated with a specific reason for which bids were + * filtered, with the number of bids filtered for each creative. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The ID of the creative status for which to retrieve a breakdown by + * creative. + * See + * [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + */ + creativeStatusId: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListCreativeStatusBreakdownByCreativeResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.filteredBids.creatives.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DetailsResource { + /** + * List all details associated with a specific reason for which bids were + * filtered, with the number of bids filtered for each detail. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The ID of the creative status for which to retrieve a breakdown by detail. + * See + * [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87. + */ + creativeStatusId: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListCreativeStatusBreakdownByDetailResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.filteredBids.details.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface FilteredBidsResource { + /** + * List all reasons for which bids were filtered, with the number of bids + * filtered for each reason. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListFilteredBidsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.filteredBids.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + creatives: CreativesResource; + details: DetailsResource; + } + interface ImpressionMetricsResource { + /** Lists all metrics that are measured in terms of number of impressions. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListImpressionMetricsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.impressionMetrics.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface LosingBidsResource { + /** + * List all reasons for which bids lost in the auction, with the number of + * bids that lost for each reason. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListLosingBidsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.losingBids.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface NonBillableWinningBidsResource { + /** + * List all reasons for which winning bids were not billable, with the number + * of bids not billed for each reason. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to apply. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListNonBillableWinningBidsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.nonBillableWinningBids.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface FilterSetsResource { + /** Creates the specified filter set for the account with the given account ID. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Whether the filter set is transient, or should be persisted indefinitely. + * By default, filter sets are not transient. + * If transient, it will be available for at least 1 hour after creation. + */ + isTransient?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes the requested filter set from the account with the given account + * ID. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to delete. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Retrieves the requested filter set for the account with the given account + * ID. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the filter set to get. */ + filterSetId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all filter sets for the account with the given account ID. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Account ID of the buyer. */ + accountId: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListFilterSetsResponse.nextPageToken + * returned from the previous call to the + * accounts.filterSets.list + * method. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + bidMetrics: BidMetricsResource; + bidResponseErrors: BidResponseErrorsResource; + bidResponsesWithoutBids: BidResponsesWithoutBidsResource; + filteredBidRequests: FilteredBidRequestsResource; + filteredBids: FilteredBidsResource; + impressionMetrics: ImpressionMetricsResource; + losingBids: LosingBidsResource; + nonBillableWinningBids: NonBillableWinningBidsResource; + } + interface AccountsResource { + clients: ClientsResource; + creatives: CreativesResource; + filterSets: FilterSetsResource; + } + } +} diff --git a/types/gapi.client.adexchangebuyer2/readme.md b/types/gapi.client.adexchangebuyer2/readme.md new file mode 100644 index 0000000000..92b3f3fb30 --- /dev/null +++ b/types/gapi.client.adexchangebuyer2/readme.md @@ -0,0 +1,54 @@ +# TypeScript typings for Ad Exchange Buyer API II v2beta1 +Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals. +For detailed description please check [documentation](https://developers.google.com/ad-exchange/buyer-rest/reference/rest/). + +## Installing + +Install typings for Ad Exchange Buyer API II: +``` +npm install @types/gapi.client.adexchangebuyer2@v2beta1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('adexchangebuyer2', 'v2beta1', () => { + // now we can use gapi.client.adexchangebuyer2 + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage your Ad Exchange buyer account configuration + 'https://www.googleapis.com/auth/adexchange.buyer', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Ad Exchange Buyer API II resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.adexchangebuyer2/tsconfig.json b/types/gapi.client.adexchangebuyer2/tsconfig.json new file mode 100644 index 0000000000..453ca167ee --- /dev/null +++ b/types/gapi.client.adexchangebuyer2/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.adexchangebuyer2-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.adexchangebuyer2/tslint.json b/types/gapi.client.adexchangebuyer2/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.adexchangebuyer2/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.adexchangeseller/gapi.client.adexchangeseller-tests.ts b/types/gapi.client.adexchangeseller/gapi.client.adexchangeseller-tests.ts new file mode 100644 index 0000000000..69d7e2feec --- /dev/null +++ b/types/gapi.client.adexchangeseller/gapi.client.adexchangeseller-tests.ts @@ -0,0 +1,43 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('adexchangeseller', 'v2.0', () => { + /** now we can use gapi.client.adexchangeseller */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your Ad Exchange data */ + 'https://www.googleapis.com/auth/adexchange.seller', + /** View your Ad Exchange data */ + 'https://www.googleapis.com/auth/adexchange.seller.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Get information about the selected Ad Exchange account. */ + await gapi.client.accounts.get({ + accountId: "accountId", + }); + /** List all accounts available to this Ad Exchange account. */ + await gapi.client.accounts.list({ + maxResults: 1, + pageToken: "pageToken", + }); + } +}); diff --git a/types/gapi.client.adexchangeseller/index.d.ts b/types/gapi.client.adexchangeseller/index.d.ts new file mode 100644 index 0000000000..dd327ed5ae --- /dev/null +++ b/types/gapi.client.adexchangeseller/index.d.ts @@ -0,0 +1,664 @@ +// Type definitions for Google Ad Exchange Seller API v2.0 2.0 +// Project: https://developers.google.com/ad-exchange/seller-rest/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/adexchangeseller/v2.0/rest + +/// + +declare namespace gapi.client { + /** Load Ad Exchange Seller API v2.0 */ + function load(name: "adexchangeseller", version: "v2.0"): PromiseLike; + function load(name: "adexchangeseller", version: "v2.0", callback: () => any): void; + + const accounts: adexchangeseller.AccountsResource; + + namespace adexchangeseller { + interface Account { + /** Unique identifier of this account. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#account. */ + kind?: string; + /** Name of this account. */ + name?: string; + } + interface Accounts { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The accounts returned in this list response. */ + items?: Account[]; + /** Kind of list this is, in this case adexchangeseller#accounts. */ + kind?: string; + /** Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdClient { + /** Whether this ad client is opted in to ARC. */ + arcOptIn?: boolean; + /** Unique identifier of this ad client. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#adClient. */ + kind?: string; + /** This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. */ + productCode?: string; + /** Whether this ad client supports being reported on. */ + supportsReporting?: boolean; + } + interface AdClients { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The ad clients returned in this list response. */ + items?: AdClient[]; + /** Kind of list this is, in this case adexchangeseller#adClients. */ + kind?: string; + /** Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface Alert { + /** Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#alert. */ + kind?: string; + /** The localized alert message. */ + message?: string; + /** Severity of this alert. Possible values: INFO, WARNING, SEVERE. */ + severity?: string; + /** + * Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, + * GRAYLISTED_PUBLISHER, API_HOLD. + */ + type?: string; + } + interface Alerts { + /** The alerts returned in this list response. */ + items?: Alert[]; + /** Kind of list this is, in this case adexchangeseller#alerts. */ + kind?: string; + } + interface CustomChannel { + /** Code of this custom channel, not necessarily unique across ad clients. */ + code?: string; + /** Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#customChannel. */ + kind?: string; + /** Name of this custom channel. */ + name?: string; + /** The targeting information of this custom channel, if activated. */ + targetingInfo?: { + /** The name used to describe this channel externally. */ + adsAppearOn?: string; + /** The external description of the channel. */ + description?: string; + /** + * The locations in which ads appear. (Only valid for content and mobile content ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, + * TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content + * ads are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. + */ + location?: string; + /** The language of the sites ads will be displayed on. */ + siteLanguage?: string; + }; + } + interface CustomChannels { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The custom channels returned in this list response. */ + items?: CustomChannel[]; + /** Kind of list this is, in this case adexchangeseller#customChannels. */ + kind?: string; + /** Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface Metadata { + items?: ReportingMetadataEntry[]; + /** Kind of list this is, in this case adexchangeseller#metadata. */ + kind?: string; + } + interface PreferredDeal { + /** The name of the advertiser this deal is for. */ + advertiserName?: string; + /** The name of the buyer network this deal is for. */ + buyerNetworkName?: string; + /** The currency code that applies to the fixed_cpm value. If not set then assumed to be USD. */ + currencyCode?: string; + /** Time when this deal stops being active in seconds since the epoch (GMT). If not set then this deal is valid until manually disabled by the publisher. */ + endTime?: string; + /** + * The fixed price for this preferred deal. In cpm micros of currency according to currencyCode. If set, then this preferred deal is eligible for the + * fixed price tier of buying (highest priority, pay exactly the configured fixed price). + */ + fixedCpm?: string; + /** Unique identifier of this preferred deal. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#preferredDeal. */ + kind?: string; + /** Time when this deal becomes active in seconds since the epoch (GMT). If not set then this deal is active immediately upon creation. */ + startTime?: string; + } + interface PreferredDeals { + /** The preferred deals returned in this list response. */ + items?: PreferredDeal[]; + /** Kind of list this is, in this case adexchangeseller#preferredDeals. */ + kind?: string; + } + interface Report { + /** The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. */ + averages?: string[]; + /** + * The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for + * each metric in the request. + */ + headers?: Array<{ + /** The currency of this column. Only present if the header type is METRIC_CURRENCY. */ + currency?: string; + /** The name of the header. */ + name?: string; + /** The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. */ + type?: string; + }>; + /** Kind this is, in this case adexchangeseller#report. */ + kind?: string; + /** + * The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The + * dimension cells contain strings, and the metric cells contain numbers. + */ + rows?: string[][]; + /** + * The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or + * the report row limit. + */ + totalMatchedRows?: string; + /** The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. */ + totals?: string[]; + /** Any warnings associated with generation of the report. */ + warnings?: string[]; + } + interface ReportingMetadataEntry { + /** + * For metrics this is a list of dimension IDs which the metric is compatible with, for dimensions it is a list of compatibility groups the dimension + * belongs to. + */ + compatibleDimensions?: string[]; + /** The names of the metrics the dimension or metric this reporting metadata entry describes is compatible with. */ + compatibleMetrics?: string[]; + /** Unique identifier of this reporting metadata entry, corresponding to the name of the appropriate dimension or metric. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#reportingMetadataEntry. */ + kind?: string; + /** + * The names of the dimensions which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report + * to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + */ + requiredDimensions?: string[]; + /** + * The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to + * be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + */ + requiredMetrics?: string[]; + /** The codes of the projects supported by the dimension or metric this reporting metadata entry describes. */ + supportedProducts?: string[]; + } + interface SavedReport { + /** Unique identifier of this saved report. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#savedReport. */ + kind?: string; + /** This saved report's name. */ + name?: string; + } + interface SavedReports { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The saved reports returned in this list response. */ + items?: SavedReport[]; + /** Kind of list this is, in this case adexchangeseller#savedReports. */ + kind?: string; + /** Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface UrlChannel { + /** Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adexchangeseller#urlChannel. */ + kind?: string; + /** URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home */ + urlPattern?: string; + } + interface UrlChannels { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The URL channels returned in this list response. */ + items?: UrlChannel[]; + /** Kind of list this is, in this case adexchangeseller#urlChannels. */ + kind?: string; + /** Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdclientsResource { + /** List all ad clients in this Ad Exchange account. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad clients to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AlertsResource { + /** List the alerts for this Ad Exchange account. */ + list(request: { + /** Account owning the alerts. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used + * if the supplied locale is invalid or unsupported. + */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomchannelsResource { + /** Get the specified custom channel from the specified ad client. */ + get(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client which contains the custom channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel to retrieve. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all custom channels in the specified ad client for this Ad Exchange account. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client for which to list custom channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DimensionsResource { + /** List the metadata for the dimensions available to this AdExchange account. */ + list(request: { + /** Account with visibility to the dimensions. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MetricsResource { + /** List the metadata for the metrics available to this AdExchange account. */ + list(request: { + /** Account with visibility to the metrics. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MetadataResource { + dimensions: DimensionsResource; + metrics: MetricsResource; + } + interface PreferreddealsResource { + /** Get information about the selected Ad Exchange Preferred Deal. */ + get(request: { + /** Account owning the deal. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Preferred deal to get information about. */ + dealId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List the preferred deals for this Ad Exchange account. */ + list(request: { + /** Account owning the deals. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SavedResource { + /** Generate an Ad Exchange report based on the saved report ID sent in the query parameters. */ + generate(request: { + /** Account owning the saved report. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The saved report to retrieve. */ + savedReportId: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all saved reports in this Ad Exchange account. */ + list(request: { + /** Account owning the saved reports. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of saved reports to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** + * Generate an Ad Exchange report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format + * specify "alt=csv" as a query parameter. + */ + generate(request: { + /** Account which owns the generated report. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Dimensions to base the report on. */ + dimension?: string; + /** End of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + endDate: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filters to be run on the report. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** Numeric columns to include in the report. */ + metric?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no + * prefix is specified, the column is sorted ascending. + */ + sort?: string; + /** Start of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + startDate: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + saved: SavedResource; + } + interface UrlchannelsResource { + /** List all URL channels in the specified ad client for this Ad Exchange account. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client for which to list URL channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of URL channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountsResource { + /** Get information about the selected Ad Exchange account. */ + get(request: { + /** Account to get information about. Tip: 'myaccount' is a valid ID. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all accounts available to this Ad Exchange account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of accounts to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + adclients: AdclientsResource; + alerts: AlertsResource; + customchannels: CustomchannelsResource; + metadata: MetadataResource; + preferreddeals: PreferreddealsResource; + reports: ReportsResource; + urlchannels: UrlchannelsResource; + } + } +} diff --git a/types/gapi.client.adexchangeseller/readme.md b/types/gapi.client.adexchangeseller/readme.md new file mode 100644 index 0000000000..5519aa798f --- /dev/null +++ b/types/gapi.client.adexchangeseller/readme.md @@ -0,0 +1,67 @@ +# TypeScript typings for Ad Exchange Seller API v2.0 +Accesses the inventory of Ad Exchange seller users and generates reports. +For detailed description please check [documentation](https://developers.google.com/ad-exchange/seller-rest/). + +## Installing + +Install typings for Ad Exchange Seller API: +``` +npm install @types/gapi.client.adexchangeseller@v2.0 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('adexchangeseller', 'v2.0', () => { + // now we can use gapi.client.adexchangeseller + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your Ad Exchange data + 'https://www.googleapis.com/auth/adexchange.seller', + + // View your Ad Exchange data + 'https://www.googleapis.com/auth/adexchange.seller.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Ad Exchange Seller API resources: + +```typescript + +/* +Get information about the selected Ad Exchange account. +*/ +await gapi.client.accounts.get({ accountId: "accountId", }); + +/* +List all accounts available to this Ad Exchange account. +*/ +await gapi.client.accounts.list({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.adexchangeseller/tsconfig.json b/types/gapi.client.adexchangeseller/tsconfig.json new file mode 100644 index 0000000000..a38d57f5b8 --- /dev/null +++ b/types/gapi.client.adexchangeseller/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.adexchangeseller-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.adexchangeseller/tslint.json b/types/gapi.client.adexchangeseller/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.adexchangeseller/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.adexperiencereport/gapi.client.adexperiencereport-tests.ts b/types/gapi.client.adexperiencereport/gapi.client.adexperiencereport-tests.ts new file mode 100644 index 0000000000..f621a79da0 --- /dev/null +++ b/types/gapi.client.adexperiencereport/gapi.client.adexperiencereport-tests.ts @@ -0,0 +1,39 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('adexperiencereport', 'v1', () => { + /** now we can use gapi.client.adexperiencereport */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Test scope for access to the Zoo service */ + 'https://www.googleapis.com/auth/xapi.zoo', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Gets a summary of the ad experience rating of a site. */ + await gapi.client.sites.get({ + name: "name", + }); + /** Lists sites with Ad Experience Report statuses of "Failing" or "Warning". */ + await gapi.client.violatingSites.list({ + }); + } +}); diff --git a/types/gapi.client.adexperiencereport/index.d.ts b/types/gapi.client.adexperiencereport/index.d.ts new file mode 100644 index 0000000000..8258568b1d --- /dev/null +++ b/types/gapi.client.adexperiencereport/index.d.ts @@ -0,0 +1,125 @@ +// Type definitions for Google Google Ad Experience Report API v1 1.0 +// Project: https://developers.google.com/ad-experience-report/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://adexperiencereport.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Ad Experience Report API v1 */ + function load(name: "adexperiencereport", version: "v1"): PromiseLike; + function load(name: "adexperiencereport", version: "v1", callback: () => any): void; + + const sites: adexperiencereport.SitesResource; + + const violatingSites: adexperiencereport.ViolatingSitesResource; + + namespace adexperiencereport { + interface PlatformSummary { + /** The status of the site reviewed for the Better Ads Standards. */ + betterAdsStatus?: string; + /** The date on which ad filtering begins. */ + enforcementTime?: string; + /** The ad filtering status of the site. */ + filterStatus?: string; + /** The last time that the site changed status. */ + lastChangeTime?: string; + /** The assigned regions for the site and platform. */ + region?: string[]; + /** A link that leads to a full ad experience report. */ + reportUrl?: string; + /** Whether the site is currently under review. */ + underReview?: boolean; + } + interface SiteSummaryResponse { + /** Summary for the desktop review of the site. */ + desktopSummary?: PlatformSummary; + /** Summary for the mobile review of the site. */ + mobileSummary?: PlatformSummary; + /** The name of the site reviewed. */ + reviewedSite?: string; + } + interface ViolatingSitesResponse { + /** A list of summaries of violating sites. */ + violatingSites?: SiteSummaryResponse[]; + } + interface SitesResource { + /** Gets a summary of the ad experience rating of a site. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The required site name. It should be the site property whose ad experiences + * may have been reviewed, and it should be URL-encoded. For example, + * sites/https%3A%2F%2Fwww.google.com. The server will return an error of + * BAD_REQUEST if this field is not filled in. Note that if the site property + * is not yet verified in Search Console, the reportUrl field returned by the + * API will lead to the verification page, prompting the user to go through + * that process before they can gain access to the Ad Experience Report. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ViolatingSitesResource { + /** Lists sites with Ad Experience Report statuses of "Failing" or "Warning". */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.adexperiencereport/readme.md b/types/gapi.client.adexperiencereport/readme.md new file mode 100644 index 0000000000..fff8e09ccf --- /dev/null +++ b/types/gapi.client.adexperiencereport/readme.md @@ -0,0 +1,64 @@ +# TypeScript typings for Google Ad Experience Report API v1 +View Ad Experience Report data, and get a list of sites that have a significant number of annoying ads. +For detailed description please check [documentation](https://developers.google.com/ad-experience-report/). + +## Installing + +Install typings for Google Ad Experience Report API: +``` +npm install @types/gapi.client.adexperiencereport@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('adexperiencereport', 'v1', () => { + // now we can use gapi.client.adexperiencereport + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Test scope for access to the Zoo service + 'https://www.googleapis.com/auth/xapi.zoo', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Ad Experience Report API resources: + +```typescript + +/* +Gets a summary of the ad experience rating of a site. +*/ +await gapi.client.sites.get({ name: "name", }); + +/* +Lists sites with Ad Experience Report statuses of "Failing" or "Warning". +*/ +await gapi.client.violatingSites.list({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.adexperiencereport/tsconfig.json b/types/gapi.client.adexperiencereport/tsconfig.json new file mode 100644 index 0000000000..968c080cf9 --- /dev/null +++ b/types/gapi.client.adexperiencereport/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.adexperiencereport-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.adexperiencereport/tslint.json b/types/gapi.client.adexperiencereport/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.adexperiencereport/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.admin/gapi.client.admin-tests.ts b/types/gapi.client.admin/gapi.client.admin-tests.ts new file mode 100644 index 0000000000..698cf0d218 --- /dev/null +++ b/types/gapi.client.admin/gapi.client.admin-tests.ts @@ -0,0 +1,80 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('admin', 'reports_v1', () => { + /** now we can use gapi.client.admin */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View audit reports for your G Suite domain */ + 'https://www.googleapis.com/auth/admin.reports.audit.readonly', + /** View usage reports for your G Suite domain */ + 'https://www.googleapis.com/auth/admin.reports.usage.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Retrieves a list of activities for a specific customer and application. */ + await gapi.client.activities.list({ + actorIpAddress: "actorIpAddress", + applicationName: "applicationName", + customerId: "customerId", + endTime: "endTime", + eventName: "eventName", + filters: "filters", + maxResults: 7, + pageToken: "pageToken", + startTime: "startTime", + userKey: "userKey", + }); + /** Push changes to activities */ + await gapi.client.activities.watch({ + actorIpAddress: "actorIpAddress", + applicationName: "applicationName", + customerId: "customerId", + endTime: "endTime", + eventName: "eventName", + filters: "filters", + maxResults: 7, + pageToken: "pageToken", + startTime: "startTime", + userKey: "userKey", + }); + /** Stop watching resources through this channel */ + await gapi.client.channels.stop({ + }); + /** Retrieves a report which is a collection of properties / statistics for a specific customer. */ + await gapi.client.customerUsageReports.get({ + customerId: "customerId", + date: "date", + pageToken: "pageToken", + parameters: "parameters", + }); + /** Retrieves a report which is a collection of properties / statistics for a set of users. */ + await gapi.client.userUsageReport.get({ + customerId: "customerId", + date: "date", + filters: "filters", + maxResults: 4, + pageToken: "pageToken", + parameters: "parameters", + userKey: "userKey", + }); + } +}); diff --git a/types/gapi.client.admin/index.d.ts b/types/gapi.client.admin/index.d.ts new file mode 100644 index 0000000000..9e82b6a06c --- /dev/null +++ b/types/gapi.client.admin/index.d.ts @@ -0,0 +1,349 @@ +// Type definitions for Google Admin Reports API reports_v1 1.0 +// Project: https://developers.google.com/admin-sdk/reports/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/admin/reports_v1/rest + +/// + +declare namespace gapi.client { + /** Load Admin Reports API reports_v1 */ + function load(name: "admin", version: "reports_v1"): PromiseLike; + function load(name: "admin", version: "reports_v1", callback: () => any): void; + + const activities: admin.ActivitiesResource; + + const channels: admin.ChannelsResource; + + const customerUsageReports: admin.CustomerUsageReportsResource; + + const userUsageReport: admin.UserUsageReportResource; + + namespace admin { + interface Activities { + /** ETag of the resource. */ + etag?: string; + /** Each record in read response. */ + items?: Activity[]; + /** Kind of list response this is. */ + kind?: string; + /** Token for retrieving the next page */ + nextPageToken?: string; + } + interface Activity { + /** User doing the action. */ + actor?: { + /** User or OAuth 2LO request. */ + callerType?: string; + /** Email address of the user. */ + email?: string; + /** For OAuth 2LO API requests, consumer_key of the requestor. */ + key?: string; + /** Obfuscated user id of the user. */ + profileId?: string; + }; + /** ETag of the entry. */ + etag?: string; + /** Activity events. */ + events?: Array<{ + /** Name of event. */ + name?: string; + /** Parameter value pairs for various applications. */ + parameters?: Array<{ + /** Boolean value of the parameter. */ + boolValue?: boolean; + /** Integral value of the parameter. */ + intValue?: string; + /** Multi-int value of the parameter. */ + multiIntValue?: string[]; + /** Multi-string value of the parameter. */ + multiValue?: string[]; + /** The name of the parameter. */ + name?: string; + /** String value of the parameter. */ + value?: string; + }>; + /** Type of event. */ + type?: string; + }>; + /** Unique identifier for each activity record. */ + id?: { + /** Application name to which the event belongs. */ + applicationName?: string; + /** Obfuscated customer ID of the source customer. */ + customerId?: string; + /** Time of occurrence of the activity. */ + time?: string; + /** Unique qualifier if multiple events have the same time. */ + uniqueQualifier?: string; + }; + /** IP Address of the user doing the action. */ + ipAddress?: string; + /** Kind of resource this is. */ + kind?: string; + /** Domain of source customer. */ + ownerDomain?: string; + } + interface Channel { + /** The address where notifications are delivered for this channel. */ + address?: string; + /** Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. */ + expiration?: string; + /** A UUID or similar unique string that identifies this channel. */ + id?: string; + /** Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". */ + kind?: string; + /** Additional parameters controlling delivery channel behavior. Optional. */ + params?: Record; + /** A Boolean value to indicate whether payload is wanted. Optional. */ + payload?: boolean; + /** An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. */ + resourceId?: string; + /** A version-specific identifier for the watched resource. */ + resourceUri?: string; + /** An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. */ + token?: string; + /** The type of delivery mechanism used for this channel. */ + type?: string; + } + interface UsageReport { + /** The date to which the record belongs. */ + date?: string; + /** Information about the type of the item. */ + entity?: { + /** Obfuscated customer id for the record. */ + customerId?: string; + /** Obfuscated user id for the record. */ + profileId?: string; + /** The type of item, can be a customer or user. */ + type?: string; + /** user's email. */ + userEmail?: string; + }; + /** ETag of the resource. */ + etag?: string; + /** The kind of object. */ + kind?: string; + /** Parameter value pairs for various applications. */ + parameters?: Array<{ + /** Boolean value of the parameter. */ + boolValue?: boolean; + /** RFC 3339 formatted value of the parameter. */ + datetimeValue?: string; + /** Integral value of the parameter. */ + intValue?: string; + /** Nested message value of the parameter. */ + msgValue?: Array>; + /** The name of the parameter. */ + name?: string; + /** String value of the parameter. */ + stringValue?: string; + }>; + } + interface UsageReports { + /** ETag of the resource. */ + etag?: string; + /** The kind of object. */ + kind?: string; + /** Token for retrieving the next page */ + nextPageToken?: string; + /** Various application parameter records. */ + usageReports?: UsageReport[]; + /** Warnings if any. */ + warnings?: Array<{ + /** Machine readable code / warning type. */ + code?: string; + /** Key-Value pairs to give detailed information on the warning. */ + data?: Array<{ + /** Key associated with a key-value pair to give detailed information on the warning. */ + key?: string; + /** Value associated with a key-value pair to give detailed information on the warning. */ + value?: string; + }>; + /** Human readable message for the warning. */ + message?: string; + }>; + } + interface ActivitiesResource { + /** Retrieves a list of activities for a specific customer and application. */ + list(request: { + /** IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. */ + actorIpAddress?: string; + /** Data format for the response. */ + alt?: string; + /** Application name for which the events are to be retrieved. */ + applicationName: string; + /** Represents the customer for which the data is to be fetched. */ + customerId?: string; + /** Return events which occurred at or before this time. */ + endTime?: string; + /** Name of the event being queried. */ + eventName?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... */ + filters?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Number of activity records to be shown in each page. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token to specify next page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Return events which occurred at or after this time. */ + startTime?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for + * all users. + */ + userKey: string; + }): Request; + /** Push changes to activities */ + watch(request: { + /** IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. */ + actorIpAddress?: string; + /** Data format for the response. */ + alt?: string; + /** Application name for which the events are to be retrieved. */ + applicationName: string; + /** Represents the customer for which the data is to be fetched. */ + customerId?: string; + /** Return events which occurred at or before this time. */ + endTime?: string; + /** Name of the event being queried. */ + eventName?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... */ + filters?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Number of activity records to be shown in each page. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token to specify next page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Return events which occurred at or after this time. */ + startTime?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for + * all users. + */ + userKey: string; + }): Request; + } + interface ChannelsResource { + /** Stop watching resources through this channel */ + stop(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomerUsageReportsResource { + /** Retrieves a report which is a collection of properties / statistics for a specific customer. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Represents the customer for which the data is to be fetched. */ + customerId?: string; + /** Represents the date in yyyy-mm-dd format for which the data is to be fetched. */ + date: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token to specify next page. */ + pageToken?: string; + /** Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. */ + parameters?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UserUsageReportResource { + /** Retrieves a report which is a collection of properties / statistics for a set of users. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Represents the customer for which the data is to be fetched. */ + customerId?: string; + /** Represents the date in yyyy-mm-dd format for which the data is to be fetched. */ + date: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Represents the set of filters including parameter operator value. */ + filters?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. Maximum allowed is 1000 */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token to specify next page. */ + pageToken?: string; + /** Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. */ + parameters?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Represents the profile id or the user email for which the data should be filtered. */ + userKey: string; + }): Request; + } + } +} diff --git a/types/gapi.client.admin/readme.md b/types/gapi.client.admin/readme.md new file mode 100644 index 0000000000..680dfa99f9 --- /dev/null +++ b/types/gapi.client.admin/readme.md @@ -0,0 +1,82 @@ +# TypeScript typings for Admin Reports API reports_v1 +Fetches reports for the administrators of G Suite customers about the usage, collaboration, security, and risk for their users. +For detailed description please check [documentation](https://developers.google.com/admin-sdk/reports/). + +## Installing + +Install typings for Admin Reports API: +``` +npm install @types/gapi.client.admin@reports_v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('admin', 'reports_v1', () => { + // now we can use gapi.client.admin + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View audit reports for your G Suite domain + 'https://www.googleapis.com/auth/admin.reports.audit.readonly', + + // View usage reports for your G Suite domain + 'https://www.googleapis.com/auth/admin.reports.usage.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Admin Reports API resources: + +```typescript + +/* +Retrieves a list of activities for a specific customer and application. +*/ +await gapi.client.activities.list({ applicationName: "applicationName", userKey: "userKey", }); + +/* +Push changes to activities +*/ +await gapi.client.activities.watch({ applicationName: "applicationName", userKey: "userKey", }); + +/* +Stop watching resources through this channel +*/ +await gapi.client.channels.stop({ }); + +/* +Retrieves a report which is a collection of properties / statistics for a specific customer. +*/ +await gapi.client.customerUsageReports.get({ date: "date", }); + +/* +Retrieves a report which is a collection of properties / statistics for a set of users. +*/ +await gapi.client.userUsageReport.get({ date: "date", userKey: "userKey", }); +``` \ No newline at end of file diff --git a/types/gapi.client.admin/tsconfig.json b/types/gapi.client.admin/tsconfig.json new file mode 100644 index 0000000000..840f1feb2d --- /dev/null +++ b/types/gapi.client.admin/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.admin-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.admin/tslint.json b/types/gapi.client.admin/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.admin/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.adsense/gapi.client.adsense-tests.ts b/types/gapi.client.adsense/gapi.client.adsense-tests.ts new file mode 100644 index 0000000000..92e9643ad3 --- /dev/null +++ b/types/gapi.client.adsense/gapi.client.adsense-tests.ts @@ -0,0 +1,121 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('adsense', 'v1.4', () => { + /** now we can use gapi.client.adsense */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your AdSense data */ + 'https://www.googleapis.com/auth/adsense', + /** View your AdSense data */ + 'https://www.googleapis.com/auth/adsense.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Get information about the selected AdSense account. */ + await gapi.client.accounts.get({ + accountId: "accountId", + tree: true, + }); + /** List all accounts available to this AdSense account. */ + await gapi.client.accounts.list({ + maxResults: 1, + pageToken: "pageToken", + }); + /** List all ad clients in this AdSense account. */ + await gapi.client.adclients.list({ + maxResults: 1, + pageToken: "pageToken", + }); + /** Gets the specified ad unit in the specified ad client. */ + await gapi.client.adunits.get({ + adClientId: "adClientId", + adUnitId: "adUnitId", + }); + /** Get ad code for the specified ad unit. */ + await gapi.client.adunits.getAdCode({ + adClientId: "adClientId", + adUnitId: "adUnitId", + }); + /** List all ad units in the specified ad client for this AdSense account. */ + await gapi.client.adunits.list({ + adClientId: "adClientId", + includeInactive: true, + maxResults: 3, + pageToken: "pageToken", + }); + /** Dismiss (delete) the specified alert from the publisher's AdSense account. */ + await gapi.client.alerts.delete({ + alertId: "alertId", + }); + /** List the alerts for this AdSense account. */ + await gapi.client.alerts.list({ + locale: "locale", + }); + /** Get the specified custom channel from the specified ad client. */ + await gapi.client.customchannels.get({ + adClientId: "adClientId", + customChannelId: "customChannelId", + }); + /** List all custom channels in the specified ad client for this AdSense account. */ + await gapi.client.customchannels.list({ + adClientId: "adClientId", + maxResults: 2, + pageToken: "pageToken", + }); + /** List the payments for this AdSense account. */ + await gapi.client.payments.list({ + }); + /** + * Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format + * specify "alt=csv" as a query parameter. + */ + await gapi.client.reports.generate({ + accountId: "accountId", + currency: "currency", + dimension: "dimension", + endDate: "endDate", + filter: "filter", + locale: "locale", + maxResults: 7, + metric: "metric", + sort: "sort", + startDate: "startDate", + startIndex: 11, + useTimezoneReporting: true, + }); + /** Get a specific saved ad style from the user's account. */ + await gapi.client.savedadstyles.get({ + savedAdStyleId: "savedAdStyleId", + }); + /** List all saved ad styles in the user's account. */ + await gapi.client.savedadstyles.list({ + maxResults: 1, + pageToken: "pageToken", + }); + /** List all URL channels in the specified ad client for this AdSense account. */ + await gapi.client.urlchannels.list({ + adClientId: "adClientId", + maxResults: 2, + pageToken: "pageToken", + }); + } +}); diff --git a/types/gapi.client.adsense/index.d.ts b/types/gapi.client.adsense/index.d.ts new file mode 100644 index 0000000000..ea9e5fa057 --- /dev/null +++ b/types/gapi.client.adsense/index.d.ts @@ -0,0 +1,1529 @@ +// Type definitions for Google AdSense Management API v1.4 1.4 +// Project: https://developers.google.com/adsense/management/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/adsense/v1.4/rest + +/// + +declare namespace gapi.client { + /** Load AdSense Management API v1.4 */ + function load(name: "adsense", version: "v1.4"): PromiseLike; + function load(name: "adsense", version: "v1.4", callback: () => any): void; + + const accounts: adsense.AccountsResource; + + const adclients: adsense.AdclientsResource; + + const adunits: adsense.AdunitsResource; + + const alerts: adsense.AlertsResource; + + const customchannels: adsense.CustomchannelsResource; + + const metadata: adsense.MetadataResource; + + const payments: adsense.PaymentsResource; + + const reports: adsense.ReportsResource; + + const savedadstyles: adsense.SavedadstylesResource; + + const urlchannels: adsense.UrlchannelsResource; + + namespace adsense { + interface Account { + creation_time?: string; + /** Unique identifier of this account. */ + id?: string; + /** Kind of resource this is, in this case adsense#account. */ + kind?: string; + /** Name of this account. */ + name?: string; + /** Whether this account is premium. */ + premium?: boolean; + /** Sub accounts of the this account. */ + subAccounts?: Account[]; + /** AdSense timezone of this account. */ + timezone?: string; + } + interface Accounts { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The accounts returned in this list response. */ + items?: Account[]; + /** Kind of list this is, in this case adsense#accounts. */ + kind?: string; + /** Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdClient { + /** Whether this ad client is opted in to ARC. */ + arcOptIn?: boolean; + /** Unique identifier of this ad client. */ + id?: string; + /** Kind of resource this is, in this case adsense#adClient. */ + kind?: string; + /** This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. */ + productCode?: string; + /** Whether this ad client supports being reported on. */ + supportsReporting?: boolean; + } + interface AdClients { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The ad clients returned in this list response. */ + items?: AdClient[]; + /** Kind of list this is, in this case adsense#adClients. */ + kind?: string; + /** Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdCode { + /** The ad code snippet. */ + adCode?: string; + /** Kind this is, in this case adsense#adCode. */ + kind?: string; + } + interface AdStyle { + /** + * The colors which are included in the style. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading + * hash. + */ + colors?: { + /** The color of the ad background. */ + background?: string; + /** The color of the ad border. */ + border?: string; + /** The color of the ad text. */ + text?: string; + /** The color of the ad title. */ + title?: string; + /** The color of the ad url. */ + url?: string; + }; + /** The style of the corners in the ad (deprecated: never populated, ignored). */ + corners?: string; + /** The font which is included in the style. */ + font?: { + /** The family of the font. */ + family?: string; + /** The size of the font. */ + size?: string; + }; + /** Kind this is, in this case adsense#adStyle. */ + kind?: string; + } + interface AdUnit { + /** Identity code of this ad unit, not necessarily unique across ad clients. */ + code?: string; + /** Settings specific to content ads (AFC) and highend mobile content ads (AFMC - deprecated). */ + contentAdsSettings?: { + /** The backup option to be used in instances where no ad is available. */ + backupOption?: { + /** Color to use when type is set to COLOR. */ + color?: string; + /** Type of the backup option. Possible values are BLANK, COLOR and URL. */ + type?: string; + /** URL to use when type is set to URL. */ + url?: string; + }; + /** Size of this ad unit. */ + size?: string; + /** Type of this ad unit. */ + type?: string; + }; + /** Custom style information specific to this ad unit. */ + customStyle?: AdStyle; + /** Settings specific to feed ads (AFF) - deprecated. */ + feedAdsSettings?: { + /** The position of the ads relative to the feed entries. */ + adPosition?: string; + /** The frequency at which ads should appear in the feed (i.e. every N entries). */ + frequency?: number; + /** The minimum length an entry should be in order to have attached ads. */ + minimumWordCount?: number; + /** The type of ads which should appear. */ + type?: string; + }; + /** Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adsense#adUnit. */ + kind?: string; + /** Settings specific to WAP mobile content ads (AFMC) - deprecated. */ + mobileContentAdsSettings?: { + /** The markup language to use for this ad unit. */ + markupLanguage?: string; + /** The scripting language to use for this ad unit. */ + scriptingLanguage?: string; + /** Size of this ad unit. */ + size?: string; + /** Type of this ad unit. */ + type?: string; + }; + /** Name of this ad unit. */ + name?: string; + /** ID of the saved ad style which holds this ad unit's style information. */ + savedStyleId?: string; + /** + * Status of this ad unit. Possible values are: + * NEW: Indicates that the ad unit was created within the last seven days and does not yet have any activity associated with it. + * + * ACTIVE: Indicates that there has been activity on this ad unit in the last seven days. + * + * INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days. + */ + status?: string; + } + interface AdUnits { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The ad units returned in this list response. */ + items?: AdUnit[]; + /** Kind of list this is, in this case adsense#adUnits. */ + kind?: string; + /** Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdsenseReportsGenerateResponse { + /** The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. */ + averages?: string[]; + /** The requested end date in yyyy-mm-dd format. */ + endDate?: string; + /** + * The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for + * each metric in the request. + */ + headers?: Array<{ + /** The currency of this column. Only present if the header type is METRIC_CURRENCY. */ + currency?: string; + /** The name of the header. */ + name?: string; + /** The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. */ + type?: string; + }>; + /** Kind this is, in this case adsense#report. */ + kind?: string; + /** + * The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The + * dimension cells contain strings, and the metric cells contain numbers. + */ + rows?: string[][]; + /** The requested start date in yyyy-mm-dd format. */ + startDate?: string; + /** + * The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or + * the report row limit. + */ + totalMatchedRows?: string; + /** The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. */ + totals?: string[]; + /** Any warnings associated with generation of the report. */ + warnings?: string[]; + } + interface Alert { + /** Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Whether this alert can be dismissed. */ + isDismissible?: boolean; + /** Kind of resource this is, in this case adsense#alert. */ + kind?: string; + /** The localized alert message. */ + message?: string; + /** Severity of this alert. Possible values: INFO, WARNING, SEVERE. */ + severity?: string; + /** + * Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, + * GRAYLISTED_PUBLISHER, API_HOLD. + */ + type?: string; + } + interface Alerts { + /** The alerts returned in this list response. */ + items?: Alert[]; + /** Kind of list this is, in this case adsense#alerts. */ + kind?: string; + } + interface CustomChannel { + /** Code of this custom channel, not necessarily unique across ad clients. */ + code?: string; + /** Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adsense#customChannel. */ + kind?: string; + /** Name of this custom channel. */ + name?: string; + /** The targeting information of this custom channel, if activated. */ + targetingInfo?: { + /** The name used to describe this channel externally. */ + adsAppearOn?: string; + /** The external description of the channel. */ + description?: string; + /** + * The locations in which ads appear. (Only valid for content and mobile content ads (deprecated)). Acceptable values for content ads are: TOP_LEFT, + * TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for + * mobile content ads (deprecated) are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. + */ + location?: string; + /** The language of the sites ads will be displayed on. */ + siteLanguage?: string; + }; + } + interface CustomChannels { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The custom channels returned in this list response. */ + items?: CustomChannel[]; + /** Kind of list this is, in this case adsense#customChannels. */ + kind?: string; + /** Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface Metadata { + items?: ReportingMetadataEntry[]; + /** Kind of list this is, in this case adsense#metadata. */ + kind?: string; + } + interface Payment { + /** Unique identifier of this Payment. */ + id?: string; + /** Kind of resource this is, in this case adsense#payment. */ + kind?: string; + /** The amount to be paid. */ + paymentAmount?: string; + /** The currency code for the amount to be paid. */ + paymentAmountCurrencyCode?: string; + /** The date this payment was/will be credited to the user, or none if the payment threshold has not been met. */ + paymentDate?: string; + } + interface Payments { + /** The list of Payments for the account. One or both of a) the account's most recent payment; and b) the account's upcoming payment. */ + items?: Payment[]; + /** Kind of list this is, in this case adsense#payments. */ + kind?: string; + } + interface ReportingMetadataEntry { + /** + * For metrics this is a list of dimension IDs which the metric is compatible with, for dimensions it is a list of compatibility groups the dimension + * belongs to. + */ + compatibleDimensions?: string[]; + /** The names of the metrics the dimension or metric this reporting metadata entry describes is compatible with. */ + compatibleMetrics?: string[]; + /** Unique identifier of this reporting metadata entry, corresponding to the name of the appropriate dimension or metric. */ + id?: string; + /** Kind of resource this is, in this case adsense#reportingMetadataEntry. */ + kind?: string; + /** + * The names of the dimensions which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report + * to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + */ + requiredDimensions?: string[]; + /** + * The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to + * be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + */ + requiredMetrics?: string[]; + /** The codes of the projects supported by the dimension or metric this reporting metadata entry describes. */ + supportedProducts?: string[]; + } + interface SavedAdStyle { + /** The AdStyle itself. */ + adStyle?: AdStyle; + /** Unique identifier of this saved ad style. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adsense#savedAdStyle. */ + kind?: string; + /** The user selected name of this SavedAdStyle. */ + name?: string; + } + interface SavedAdStyles { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The saved ad styles returned in this list response. */ + items?: SavedAdStyle[]; + /** Kind of list this is, in this case adsense#savedAdStyles. */ + kind?: string; + /** Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface SavedReport { + /** Unique identifier of this saved report. */ + id?: string; + /** Kind of resource this is, in this case adsense#savedReport. */ + kind?: string; + /** This saved report's name. */ + name?: string; + } + interface SavedReports { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The saved reports returned in this list response. */ + items?: SavedReport[]; + /** Kind of list this is, in this case adsense#savedReports. */ + kind?: string; + /** Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface UrlChannel { + /** Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adsense#urlChannel. */ + kind?: string; + /** URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home */ + urlPattern?: string; + } + interface UrlChannels { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The URL channels returned in this list response. */ + items?: UrlChannel[]; + /** Kind of list this is, in this case adsense#urlChannels. */ + kind?: string; + /** Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdclientsResource { + /** List all ad clients in the specified account. */ + list(request: { + /** Account for which to list ad clients. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad clients to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomchannelsResource { + /** List all custom channels which the specified ad unit belongs to. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client which contains the ad unit. */ + adClientId: string; + /** Ad unit for which to list custom channels. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdunitsResource { + /** Gets the specified ad unit in the specified ad client for the specified account. */ + get(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client for which to get the ad unit. */ + adClientId: string; + /** Ad unit to retrieve. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get ad code for the specified ad unit. */ + getAdCode(request: { + /** Account which contains the ad client. */ + accountId: string; + /** Ad client with contains the ad unit. */ + adClientId: string; + /** Ad unit to get the code for. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all ad units in the specified ad client for the specified account. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client for which to list ad units. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to include inactive ad units. Default: true. */ + includeInactive?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad units to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + customchannels: CustomchannelsResource; + } + interface AlertsResource { + /** Dismiss (delete) the specified alert from the specified publisher AdSense account. */ + delete(request: { + /** Account which contains the ad unit. */ + accountId: string; + /** Alert to delete. */ + alertId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List the alerts for the specified AdSense account. */ + list(request: { + /** Account for which to retrieve the alerts. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used + * if the supplied locale is invalid or unsupported. + */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdunitsResource { + /** List all ad units in the specified custom channel. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client which contains the custom channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel for which to list ad units. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to include inactive ad units. Default: true. */ + includeInactive?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad units to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomchannelsResource { + /** Get the specified custom channel from the specified ad client for the specified account. */ + get(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client which contains the custom channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel to retrieve. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all custom channels in the specified ad client for the specified account. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client for which to list custom channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + adunits: AdunitsResource; + } + interface PaymentsResource { + /** List the payments for the specified AdSense account. */ + list(request: { + /** Account for which to retrieve the payments. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SavedResource { + /** Generate an AdSense report based on the saved report ID sent in the query parameters. */ + generate(request: { + /** Account to which the saved reports belong. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The saved report to retrieve. */ + savedReportId: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all saved reports in the specified AdSense account. */ + list(request: { + /** Account to which the saved reports belong. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of saved reports to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** + * Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format + * specify "alt=csv" as a query parameter. + */ + generate(request: { + /** Account upon which to report. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. */ + currency?: string; + /** Dimensions to base the report on. */ + dimension?: string; + /** End of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + endDate: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filters to be run on the report. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** Numeric columns to include in the report. */ + metric?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no + * prefix is specified, the column is sorted ascending. + */ + sort?: string; + /** Start of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + startDate: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. */ + useTimezoneReporting?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + saved: SavedResource; + } + interface SavedadstylesResource { + /** List a specific saved ad style for the specified account. */ + get(request: { + /** Account for which to get the saved ad style. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Saved ad style to retrieve. */ + savedAdStyleId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all saved ad styles in the specified account. */ + list(request: { + /** Account for which to list saved ad styles. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of saved ad styles to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UrlchannelsResource { + /** List all URL channels in the specified ad client for the specified account. */ + list(request: { + /** Account to which the ad client belongs. */ + accountId: string; + /** Ad client for which to list URL channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of URL channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountsResource { + /** Get information about the selected AdSense account. */ + get(request: { + /** Account to get information about. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the tree of sub accounts should be returned. */ + tree?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all accounts available to this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of accounts to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + adclients: AdclientsResource; + adunits: AdunitsResource; + alerts: AlertsResource; + customchannels: CustomchannelsResource; + payments: PaymentsResource; + reports: ReportsResource; + savedadstyles: SavedadstylesResource; + urlchannels: UrlchannelsResource; + } + interface AdclientsResource { + /** List all ad clients in this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad clients to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomchannelsResource { + /** List all custom channels which the specified ad unit belongs to. */ + list(request: { + /** Ad client which contains the ad unit. */ + adClientId: string; + /** Ad unit for which to list custom channels. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdunitsResource { + /** Gets the specified ad unit in the specified ad client. */ + get(request: { + /** Ad client for which to get the ad unit. */ + adClientId: string; + /** Ad unit to retrieve. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get ad code for the specified ad unit. */ + getAdCode(request: { + /** Ad client with contains the ad unit. */ + adClientId: string; + /** Ad unit to get the code for. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all ad units in the specified ad client for this AdSense account. */ + list(request: { + /** Ad client for which to list ad units. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to include inactive ad units. Default: true. */ + includeInactive?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad units to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + customchannels: CustomchannelsResource; + } + interface AlertsResource { + /** Dismiss (delete) the specified alert from the publisher's AdSense account. */ + delete(request: { + /** Alert to delete. */ + alertId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List the alerts for this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used + * if the supplied locale is invalid or unsupported. + */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdunitsResource { + /** List all ad units in the specified custom channel. */ + list(request: { + /** Ad client which contains the custom channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel for which to list ad units. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to include inactive ad units. Default: true. */ + includeInactive?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad units to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomchannelsResource { + /** Get the specified custom channel from the specified ad client. */ + get(request: { + /** Ad client which contains the custom channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel to retrieve. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all custom channels in the specified ad client for this AdSense account. */ + list(request: { + /** Ad client for which to list custom channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + adunits: AdunitsResource; + } + interface DimensionsResource { + /** List the metadata for the dimensions available to this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MetricsResource { + /** List the metadata for the metrics available to this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MetadataResource { + dimensions: DimensionsResource; + metrics: MetricsResource; + } + interface PaymentsResource { + /** List the payments for this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SavedResource { + /** Generate an AdSense report based on the saved report ID sent in the query parameters. */ + generate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The saved report to retrieve. */ + savedReportId: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all saved reports in this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of saved reports to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** + * Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format + * specify "alt=csv" as a query parameter. + */ + generate(request: { + /** Accounts upon which to report. */ + accountId?: string; + /** Data format for the response. */ + alt?: string; + /** Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. */ + currency?: string; + /** Dimensions to base the report on. */ + dimension?: string; + /** End of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + endDate: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filters to be run on the report. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** Numeric columns to include in the report. */ + metric?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no + * prefix is specified, the column is sorted ascending. + */ + sort?: string; + /** Start of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + startDate: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. */ + useTimezoneReporting?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + saved: SavedResource; + } + interface SavedadstylesResource { + /** Get a specific saved ad style from the user's account. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Saved ad style to retrieve. */ + savedAdStyleId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all saved ad styles in the user's account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of saved ad styles to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UrlchannelsResource { + /** List all URL channels in the specified ad client for this AdSense account. */ + list(request: { + /** Ad client for which to list URL channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of URL channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.adsense/readme.md b/types/gapi.client.adsense/readme.md new file mode 100644 index 0000000000..49de12e874 --- /dev/null +++ b/types/gapi.client.adsense/readme.md @@ -0,0 +1,132 @@ +# TypeScript typings for AdSense Management API v1.4 +Accesses AdSense publishers' inventory and generates performance reports. +For detailed description please check [documentation](https://developers.google.com/adsense/management/). + +## Installing + +Install typings for AdSense Management API: +``` +npm install @types/gapi.client.adsense@v1.4 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('adsense', 'v1.4', () => { + // now we can use gapi.client.adsense + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your AdSense data + 'https://www.googleapis.com/auth/adsense', + + // View your AdSense data + 'https://www.googleapis.com/auth/adsense.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use AdSense Management API resources: + +```typescript + +/* +Get information about the selected AdSense account. +*/ +await gapi.client.accounts.get({ accountId: "accountId", }); + +/* +List all accounts available to this AdSense account. +*/ +await gapi.client.accounts.list({ }); + +/* +List all ad clients in this AdSense account. +*/ +await gapi.client.adclients.list({ }); + +/* +Gets the specified ad unit in the specified ad client. +*/ +await gapi.client.adunits.get({ adClientId: "adClientId", adUnitId: "adUnitId", }); + +/* +Get ad code for the specified ad unit. +*/ +await gapi.client.adunits.getAdCode({ adClientId: "adClientId", adUnitId: "adUnitId", }); + +/* +List all ad units in the specified ad client for this AdSense account. +*/ +await gapi.client.adunits.list({ adClientId: "adClientId", }); + +/* +Dismiss (delete) the specified alert from the publisher's AdSense account. +*/ +await gapi.client.alerts.delete({ alertId: "alertId", }); + +/* +List the alerts for this AdSense account. +*/ +await gapi.client.alerts.list({ }); + +/* +Get the specified custom channel from the specified ad client. +*/ +await gapi.client.customchannels.get({ adClientId: "adClientId", customChannelId: "customChannelId", }); + +/* +List all custom channels in the specified ad client for this AdSense account. +*/ +await gapi.client.customchannels.list({ adClientId: "adClientId", }); + +/* +List the payments for this AdSense account. +*/ +await gapi.client.payments.list({ }); + +/* +Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. +*/ +await gapi.client.reports.generate({ endDate: "endDate", startDate: "startDate", }); + +/* +Get a specific saved ad style from the user's account. +*/ +await gapi.client.savedadstyles.get({ savedAdStyleId: "savedAdStyleId", }); + +/* +List all saved ad styles in the user's account. +*/ +await gapi.client.savedadstyles.list({ }); + +/* +List all URL channels in the specified ad client for this AdSense account. +*/ +await gapi.client.urlchannels.list({ adClientId: "adClientId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.adsense/tsconfig.json b/types/gapi.client.adsense/tsconfig.json new file mode 100644 index 0000000000..49b1e08a5a --- /dev/null +++ b/types/gapi.client.adsense/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.adsense-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.adsense/tslint.json b/types/gapi.client.adsense/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.adsense/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.adsensehost/gapi.client.adsensehost-tests.ts b/types/gapi.client.adsensehost/gapi.client.adsensehost-tests.ts new file mode 100644 index 0000000000..12c14af6da --- /dev/null +++ b/types/gapi.client.adsensehost/gapi.client.adsensehost-tests.ts @@ -0,0 +1,119 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('adsensehost', 'v4.1', () => { + /** now we can use gapi.client.adsensehost */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your AdSense host data and associated accounts */ + 'https://www.googleapis.com/auth/adsensehost', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Get information about the selected associated AdSense account. */ + await gapi.client.accounts.get({ + accountId: "accountId", + }); + /** List hosted accounts associated with this AdSense account by ad client id. */ + await gapi.client.accounts.list({ + filterAdClientId: "filterAdClientId", + }); + /** Get information about one of the ad clients in the Host AdSense account. */ + await gapi.client.adclients.get({ + adClientId: "adClientId", + }); + /** List all host ad clients in this AdSense account. */ + await gapi.client.adclients.list({ + maxResults: 1, + pageToken: "pageToken", + }); + /** Create an association session for initiating an association with an AdSense user. */ + await gapi.client.associationsessions.start({ + productCode: "productCode", + userLocale: "userLocale", + websiteLocale: "websiteLocale", + websiteUrl: "websiteUrl", + }); + /** Verify an association session after the association callback returns from AdSense signup. */ + await gapi.client.associationsessions.verify({ + token: "token", + }); + /** Delete a specific custom channel from the host AdSense account. */ + await gapi.client.customchannels.delete({ + adClientId: "adClientId", + customChannelId: "customChannelId", + }); + /** Get a specific custom channel from the host AdSense account. */ + await gapi.client.customchannels.get({ + adClientId: "adClientId", + customChannelId: "customChannelId", + }); + /** Add a new custom channel to the host AdSense account. */ + await gapi.client.customchannels.insert({ + adClientId: "adClientId", + }); + /** List all host custom channels in this AdSense account. */ + await gapi.client.customchannels.list({ + adClientId: "adClientId", + maxResults: 2, + pageToken: "pageToken", + }); + /** Update a custom channel in the host AdSense account. This method supports patch semantics. */ + await gapi.client.customchannels.patch({ + adClientId: "adClientId", + customChannelId: "customChannelId", + }); + /** Update a custom channel in the host AdSense account. */ + await gapi.client.customchannels.update({ + adClientId: "adClientId", + }); + /** + * Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format + * specify "alt=csv" as a query parameter. + */ + await gapi.client.reports.generate({ + dimension: "dimension", + endDate: "endDate", + filter: "filter", + locale: "locale", + maxResults: 5, + metric: "metric", + sort: "sort", + startDate: "startDate", + startIndex: 9, + }); + /** Delete a URL channel from the host AdSense account. */ + await gapi.client.urlchannels.delete({ + adClientId: "adClientId", + urlChannelId: "urlChannelId", + }); + /** Add a new URL channel to the host AdSense account. */ + await gapi.client.urlchannels.insert({ + adClientId: "adClientId", + }); + /** List all host URL channels in the host AdSense account. */ + await gapi.client.urlchannels.list({ + adClientId: "adClientId", + maxResults: 2, + pageToken: "pageToken", + }); + } +}); diff --git a/types/gapi.client.adsensehost/index.d.ts b/types/gapi.client.adsensehost/index.d.ts new file mode 100644 index 0000000000..1595d36c6c --- /dev/null +++ b/types/gapi.client.adsensehost/index.d.ts @@ -0,0 +1,967 @@ +// Type definitions for Google AdSense Host API v4.1 4.1 +// Project: https://developers.google.com/adsense/host/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/adsensehost/v4.1/rest + +/// + +declare namespace gapi.client { + /** Load AdSense Host API v4.1 */ + function load(name: "adsensehost", version: "v4.1"): PromiseLike; + function load(name: "adsensehost", version: "v4.1", callback: () => any): void; + + const accounts: adsensehost.AccountsResource; + + const adclients: adsensehost.AdclientsResource; + + const associationsessions: adsensehost.AssociationsessionsResource; + + const customchannels: adsensehost.CustomchannelsResource; + + const reports: adsensehost.ReportsResource; + + const urlchannels: adsensehost.UrlchannelsResource; + + namespace adsensehost { + interface Account { + /** Unique identifier of this account. */ + id?: string; + /** Kind of resource this is, in this case adsensehost#account. */ + kind?: string; + /** Name of this account. */ + name?: string; + /** Approval status of this account. One of: PENDING, APPROVED, DISABLED. */ + status?: string; + } + interface Accounts { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The accounts returned in this list response. */ + items?: Account[]; + /** Kind of list this is, in this case adsensehost#accounts. */ + kind?: string; + } + interface AdClient { + /** Whether this ad client is opted in to ARC. */ + arcOptIn?: boolean; + /** Unique identifier of this ad client. */ + id?: string; + /** Kind of resource this is, in this case adsensehost#adClient. */ + kind?: string; + /** This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. */ + productCode?: string; + /** Whether this ad client supports being reported on. */ + supportsReporting?: boolean; + } + interface AdClients { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The ad clients returned in this list response. */ + items?: AdClient[]; + /** Kind of list this is, in this case adsensehost#adClients. */ + kind?: string; + /** Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdCode { + /** The ad code snippet. */ + adCode?: string; + /** Kind this is, in this case adsensehost#adCode. */ + kind?: string; + } + interface AdStyle { + /** The colors included in the style. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. */ + colors?: { + /** The color of the ad background. */ + background?: string; + /** The color of the ad border. */ + border?: string; + /** The color of the ad text. */ + text?: string; + /** The color of the ad title. */ + title?: string; + /** The color of the ad url. */ + url?: string; + }; + /** The style of the corners in the ad (deprecated: never populated, ignored). */ + corners?: string; + /** The font which is included in the style. */ + font?: { + /** The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY, ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA. */ + family?: string; + /** The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE, ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE. */ + size?: string; + }; + /** Kind this is, in this case adsensehost#adStyle. */ + kind?: string; + } + interface AdUnit { + /** Identity code of this ad unit, not necessarily unique across ad clients. */ + code?: string; + /** Settings specific to content ads (AFC) and highend mobile content ads (AFMC - deprecated). */ + contentAdsSettings?: { + /** The backup option to be used in instances where no ad is available. */ + backupOption?: { + /** Color to use when type is set to COLOR. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. */ + color?: string; + /** Type of the backup option. Possible values are BLANK, COLOR and URL. */ + type?: string; + /** URL to use when type is set to URL. */ + url?: string; + }; + /** Size of this ad unit. Size values are in the form SIZE_{width}_{height}. */ + size?: string; + /** Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK. */ + type?: string; + }; + /** Custom style information specific to this ad unit. */ + customStyle?: AdStyle; + /** Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adsensehost#adUnit. */ + kind?: string; + /** Settings specific to WAP mobile content ads (AFMC - deprecated). */ + mobileContentAdsSettings?: { + /** The markup language to use for this ad unit. */ + markupLanguage?: string; + /** The scripting language to use for this ad unit. */ + scriptingLanguage?: string; + /** Size of this ad unit. */ + size?: string; + /** Type of this ad unit. */ + type?: string; + }; + /** Name of this ad unit. */ + name?: string; + /** + * Status of this ad unit. Possible values are: + * NEW: Indicates that the ad unit was created within the last seven days and does not yet have any activity associated with it. + * + * ACTIVE: Indicates that there has been activity on this ad unit in the last seven days. + * + * INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days. + */ + status?: string; + } + interface AdUnits { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The ad units returned in this list response. */ + items?: AdUnit[]; + /** Kind of list this is, in this case adsensehost#adUnits. */ + kind?: string; + /** Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AssociationSession { + /** Hosted account id of the associated publisher after association. Present if status is ACCEPTED. */ + accountId?: string; + /** Unique identifier of this association session. */ + id?: string; + /** Kind of resource this is, in this case adsensehost#associationSession. */ + kind?: string; + /** The products to associate with the user. Options: AFC, AFG, AFV, AFS (deprecated), AFMC (deprecated) */ + productCodes?: string[]; + /** Redirect URL of this association session. Used to redirect users into the AdSense association flow. */ + redirectUrl?: string; + /** Status of the completed association, available once the association callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. */ + status?: string; + /** The preferred locale of the user themselves when going through the AdSense association flow. */ + userLocale?: string; + /** The locale of the user's hosted website. */ + websiteLocale?: string; + /** The URL of the user's hosted website. */ + websiteUrl?: string; + } + interface CustomChannel { + /** Code of this custom channel, not necessarily unique across ad clients. */ + code?: string; + /** Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adsensehost#customChannel. */ + kind?: string; + /** Name of this custom channel. */ + name?: string; + } + interface CustomChannels { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The custom channels returned in this list response. */ + items?: CustomChannel[]; + /** Kind of list this is, in this case adsensehost#customChannels. */ + kind?: string; + /** Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface Report { + /** The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. */ + averages?: string[]; + /** + * The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for + * each metric in the request. + */ + headers?: Array<{ + /** The currency of this column. Only present if the header type is METRIC_CURRENCY. */ + currency?: string; + /** The name of the header. */ + name?: string; + /** The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. */ + type?: string; + }>; + /** Kind this is, in this case adsensehost#report. */ + kind?: string; + /** + * The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The + * dimension cells contain strings, and the metric cells contain numbers. + */ + rows?: string[][]; + /** + * The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or + * the report row limit. + */ + totalMatchedRows?: string; + /** The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. */ + totals?: string[]; + /** Any warnings associated with generation of the report. */ + warnings?: string[]; + } + interface UrlChannel { + /** Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. */ + id?: string; + /** Kind of resource this is, in this case adsensehost#urlChannel. */ + kind?: string; + /** URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home */ + urlPattern?: string; + } + interface UrlChannels { + /** ETag of this response for caching purposes. */ + etag?: string; + /** The URL channels returned in this list response. */ + items?: UrlChannel[]; + /** Kind of list this is, in this case adsensehost#urlChannels. */ + kind?: string; + /** Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. */ + nextPageToken?: string; + } + interface AdclientsResource { + /** Get information about one of the ad clients in the specified publisher's AdSense account. */ + get(request: { + /** Account which contains the ad client. */ + accountId: string; + /** Ad client to get. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all hosted ad clients in the specified hosted account. */ + list(request: { + /** Account for which to list ad clients. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad clients to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdunitsResource { + /** Delete the specified ad unit from the specified publisher AdSense account. */ + delete(request: { + /** Account which contains the ad unit. */ + accountId: string; + /** Ad client for which to get ad unit. */ + adClientId: string; + /** Ad unit to delete. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get the specified host ad unit in this AdSense account. */ + get(request: { + /** Account which contains the ad unit. */ + accountId: string; + /** Ad client for which to get ad unit. */ + adClientId: string; + /** Ad unit to get. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get ad code for the specified ad unit, attaching the specified host custom channels. */ + getAdCode(request: { + /** Account which contains the ad client. */ + accountId: string; + /** Ad client with contains the ad unit. */ + adClientId: string; + /** Ad unit to get the code for. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Host custom channel to attach to the ad code. */ + hostCustomChannelId?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Insert the supplied ad unit into the specified publisher AdSense account. */ + insert(request: { + /** Account which will contain the ad unit. */ + accountId: string; + /** Ad client into which to insert the ad unit. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all ad units in the specified publisher's AdSense account. */ + list(request: { + /** Account which contains the ad client. */ + accountId: string; + /** Ad client for which to list ad units. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to include inactive ad units. Default: true. */ + includeInactive?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad units to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics. */ + patch(request: { + /** Account which contains the ad client. */ + accountId: string; + /** Ad client which contains the ad unit. */ + adClientId: string; + /** Ad unit to get. */ + adUnitId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update the supplied ad unit in the specified publisher AdSense account. */ + update(request: { + /** Account which contains the ad client. */ + accountId: string; + /** Ad client which contains the ad unit. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** + * Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format + * specify "alt=csv" as a query parameter. + */ + generate(request: { + /** Hosted account upon which to report. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Dimensions to base the report on. */ + dimension?: string; + /** End of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + endDate: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filters to be run on the report. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** Numeric columns to include in the report. */ + metric?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no + * prefix is specified, the column is sorted ascending. + */ + sort?: string; + /** Start of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + startDate: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountsResource { + /** Get information about the selected associated AdSense account. */ + get(request: { + /** Account to get information about. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List hosted accounts associated with this AdSense account by ad client id. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Ad clients to list accounts for. */ + filterAdClientId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + adclients: AdclientsResource; + adunits: AdunitsResource; + reports: ReportsResource; + } + interface AdclientsResource { + /** Get information about one of the ad clients in the Host AdSense account. */ + get(request: { + /** Ad client to get. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all host ad clients in this AdSense account. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of ad clients to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous + * response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AssociationsessionsResource { + /** Create an association session for initiating an association with an AdSense user. */ + start(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Products to associate with the user. */ + productCode: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The preferred locale of the user. */ + userLocale?: string; + /** The locale of the user's hosted website. */ + websiteLocale?: string; + /** The URL of the user's hosted website. */ + websiteUrl: string; + }): Request; + /** Verify an association session after the association callback returns from AdSense signup. */ + verify(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The token returned to the association callback URL. */ + token: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomchannelsResource { + /** Delete a specific custom channel from the host AdSense account. */ + delete(request: { + /** Ad client from which to delete the custom channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel to delete. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get a specific custom channel from the host AdSense account. */ + get(request: { + /** Ad client from which to get the custom channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel to get. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Add a new custom channel to the host AdSense account. */ + insert(request: { + /** Ad client to which the new custom channel will be added. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all host custom channels in this AdSense account. */ + list(request: { + /** Ad client for which to list custom channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update a custom channel in the host AdSense account. This method supports patch semantics. */ + patch(request: { + /** Ad client in which the custom channel will be updated. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Custom channel to get. */ + customChannelId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update a custom channel in the host AdSense account. */ + update(request: { + /** Ad client in which the custom channel will be updated. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** + * Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format + * specify "alt=csv" as a query parameter. + */ + generate(request: { + /** Data format for the response. */ + alt?: string; + /** Dimensions to base the report on. */ + dimension?: string; + /** End of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + endDate: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filters to be run on the report. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. */ + locale?: string; + /** The maximum number of rows of report data to return. */ + maxResults?: number; + /** Numeric columns to include in the report. */ + metric?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no + * prefix is specified, the column is sorted ascending. + */ + sort?: string; + /** Start of the date range to report on in "YYYY-MM-DD" format, inclusive. */ + startDate: string; + /** Index of the first row of report data to return. */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UrlchannelsResource { + /** Delete a URL channel from the host AdSense account. */ + delete(request: { + /** Ad client from which to delete the URL channel. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** URL channel to delete. */ + urlChannelId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Add a new URL channel to the host AdSense account. */ + insert(request: { + /** Ad client to which the new URL channel will be added. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all host URL channels in the host AdSense account. */ + list(request: { + /** Ad client for which to list URL channels. */ + adClientId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of URL channels to include in the response, used for paging. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the + * previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.adsensehost/readme.md b/types/gapi.client.adsensehost/readme.md new file mode 100644 index 0000000000..2418d40442 --- /dev/null +++ b/types/gapi.client.adsensehost/readme.md @@ -0,0 +1,134 @@ +# TypeScript typings for AdSense Host API v4.1 +Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts. +For detailed description please check [documentation](https://developers.google.com/adsense/host/). + +## Installing + +Install typings for AdSense Host API: +``` +npm install @types/gapi.client.adsensehost@v4.1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('adsensehost', 'v4.1', () => { + // now we can use gapi.client.adsensehost + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your AdSense host data and associated accounts + 'https://www.googleapis.com/auth/adsensehost', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use AdSense Host API resources: + +```typescript + +/* +Get information about the selected associated AdSense account. +*/ +await gapi.client.accounts.get({ accountId: "accountId", }); + +/* +List hosted accounts associated with this AdSense account by ad client id. +*/ +await gapi.client.accounts.list({ filterAdClientId: "filterAdClientId", }); + +/* +Get information about one of the ad clients in the Host AdSense account. +*/ +await gapi.client.adclients.get({ adClientId: "adClientId", }); + +/* +List all host ad clients in this AdSense account. +*/ +await gapi.client.adclients.list({ }); + +/* +Create an association session for initiating an association with an AdSense user. +*/ +await gapi.client.associationsessions.start({ productCode: "productCode", websiteUrl: "websiteUrl", }); + +/* +Verify an association session after the association callback returns from AdSense signup. +*/ +await gapi.client.associationsessions.verify({ token: "token", }); + +/* +Delete a specific custom channel from the host AdSense account. +*/ +await gapi.client.customchannels.delete({ adClientId: "adClientId", customChannelId: "customChannelId", }); + +/* +Get a specific custom channel from the host AdSense account. +*/ +await gapi.client.customchannels.get({ adClientId: "adClientId", customChannelId: "customChannelId", }); + +/* +Add a new custom channel to the host AdSense account. +*/ +await gapi.client.customchannels.insert({ adClientId: "adClientId", }); + +/* +List all host custom channels in this AdSense account. +*/ +await gapi.client.customchannels.list({ adClientId: "adClientId", }); + +/* +Update a custom channel in the host AdSense account. This method supports patch semantics. +*/ +await gapi.client.customchannels.patch({ adClientId: "adClientId", customChannelId: "customChannelId", }); + +/* +Update a custom channel in the host AdSense account. +*/ +await gapi.client.customchannels.update({ adClientId: "adClientId", }); + +/* +Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. +*/ +await gapi.client.reports.generate({ endDate: "endDate", startDate: "startDate", }); + +/* +Delete a URL channel from the host AdSense account. +*/ +await gapi.client.urlchannels.delete({ adClientId: "adClientId", urlChannelId: "urlChannelId", }); + +/* +Add a new URL channel to the host AdSense account. +*/ +await gapi.client.urlchannels.insert({ adClientId: "adClientId", }); + +/* +List all host URL channels in the host AdSense account. +*/ +await gapi.client.urlchannels.list({ adClientId: "adClientId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.adsensehost/tsconfig.json b/types/gapi.client.adsensehost/tsconfig.json new file mode 100644 index 0000000000..5cee9dc200 --- /dev/null +++ b/types/gapi.client.adsensehost/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.adsensehost-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.adsensehost/tslint.json b/types/gapi.client.adsensehost/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.adsensehost/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.analytics/gapi.client.analytics-tests.ts b/types/gapi.client.analytics/gapi.client.analytics-tests.ts new file mode 100644 index 0000000000..4a8be2094e --- /dev/null +++ b/types/gapi.client.analytics/gapi.client.analytics-tests.ts @@ -0,0 +1,45 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('analytics', 'v3', () => { + /** now we can use gapi.client.analytics */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your Google Analytics data */ + 'https://www.googleapis.com/auth/analytics', + /** Edit Google Analytics management entities */ + 'https://www.googleapis.com/auth/analytics.edit', + /** Manage Google Analytics Account users by email address */ + 'https://www.googleapis.com/auth/analytics.manage.users', + /** View Google Analytics user permissions */ + 'https://www.googleapis.com/auth/analytics.manage.users.readonly', + /** Create a new Google Analytics account along with its default property and view */ + 'https://www.googleapis.com/auth/analytics.provision', + /** View your Google Analytics data */ + 'https://www.googleapis.com/auth/analytics.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Creates an account ticket. */ + await gapi.client.provisioning.createAccountTicket({ + }); + } +}); diff --git a/types/gapi.client.analytics/index.d.ts b/types/gapi.client.analytics/index.d.ts new file mode 100644 index 0000000000..eeddb3f81f --- /dev/null +++ b/types/gapi.client.analytics/index.d.ts @@ -0,0 +1,4071 @@ +// Type definitions for Google Google Analytics API v3 3.0 +// Project: https://developers.google.com/analytics/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/analytics/v3/rest + +/// + +declare namespace gapi.client { + /** Load Google Analytics API v3 */ + function load(name: "analytics", version: "v3"): PromiseLike; + function load(name: "analytics", version: "v3", callback: () => any): void; + + const data: analytics.DataResource; + + const management: analytics.ManagementResource; + + const metadata: analytics.MetadataResource; + + const provisioning: analytics.ProvisioningResource; + + namespace analytics { + interface Account { + /** Child link for an account entry. Points to the list of web properties for this account. */ + childLink?: { + /** Link to the list of web properties for this account. */ + href?: string; + /** Type of the child link. Its value is "analytics#webproperties". */ + type?: string; + }; + /** Time the account was created. */ + created?: string; + /** Account ID. */ + id?: string; + /** Resource type for Analytics account. */ + kind?: string; + /** Account name. */ + name?: string; + /** Permissions the user has for this account. */ + permissions?: { + /** All the permissions that the user has for this account. These include any implied permissions (e.g., EDIT implies VIEW). */ + effective?: string[]; + }; + /** Link for this account. */ + selfLink?: string; + /** Indicates whether this account is starred or not. */ + starred?: boolean; + /** Time the account was last modified. */ + updated?: string; + } + interface AccountRef { + /** Link for this account. */ + href?: string; + /** Account ID. */ + id?: string; + /** Analytics account reference. */ + kind?: string; + /** Account name. */ + name?: string; + } + interface AccountSummaries { + /** A list of AccountSummaries. */ + items?: AccountSummary[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this AccountSummary collection. */ + nextLink?: string; + /** Link to previous page for this AccountSummary collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface AccountSummary { + /** Account ID. */ + id?: string; + /** Resource type for Analytics AccountSummary. */ + kind?: string; + /** Account name. */ + name?: string; + /** Indicates whether this account is starred or not. */ + starred?: boolean; + /** List of web properties under this account. */ + webProperties?: WebPropertySummary[]; + } + interface AccountTicket { + /** Account for this ticket. */ + account?: Account; + /** Account ticket ID used to access the account ticket. */ + id?: string; + /** Resource type for account ticket. */ + kind?: string; + /** View (Profile) for the account. */ + profile?: Profile; + /** Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in APIs console as a callback URL. */ + redirectUri?: string; + /** Web property for the account. */ + webproperty?: Webproperty; + } + interface Accounts { + /** A list of accounts. */ + items?: Account[]; + /** + * The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Next link for this account collection. */ + nextLink?: string; + /** Previous link for this account collection. */ + previousLink?: string; + /** The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface AdWordsAccount { + /** True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation. */ + autoTaggingEnabled?: boolean; + /** Customer ID. This field is required when creating an AdWords link. */ + customerId?: string; + /** Resource type for AdWords account. */ + kind?: string; + } + interface AnalyticsDataimportDeleteUploadDataRequest { + /** A list of upload UIDs. */ + customDataImportUids?: string[]; + } + interface Column { + /** Map of attribute name and value for this column. */ + attributes?: Record; + /** Column id. */ + id?: string; + /** Resource type for Analytics column. */ + kind?: string; + } + interface Columns { + /** List of attributes names returned by columns. */ + attributeNames?: string[]; + /** Etag of collection. This etag can be compared with the last response etag to check if response has changed. */ + etag?: string; + /** List of columns for a report type. */ + items?: Column[]; + /** Collection type. */ + kind?: string; + /** Total number of columns returned in the response. */ + totalResults?: number; + } + interface CustomDataSource { + /** Account ID to which this custom data source belongs. */ + accountId?: string; + childLink?: { + /** Link to the list of daily uploads for this custom data source. Link to the list of uploads for this custom data source. */ + href?: string; + /** Value is "analytics#dailyUploads". Value is "analytics#uploads". */ + type?: string; + }; + /** Time this custom data source was created. */ + created?: string; + /** Description of custom data source. */ + description?: string; + /** Custom data source ID. */ + id?: string; + importBehavior?: string; + /** Resource type for Analytics custom data source. */ + kind?: string; + /** Name of this custom data source. */ + name?: string; + /** Parent link for this custom data source. Points to the web property to which this custom data source belongs. */ + parentLink?: { + /** Link to the web property to which this custom data source belongs. */ + href?: string; + /** Value is "analytics#webproperty". */ + type?: string; + }; + /** IDs of views (profiles) linked to the custom data source. */ + profilesLinked?: string[]; + /** Collection of schema headers of the custom data source. */ + schema?: string[]; + /** Link for this Analytics custom data source. */ + selfLink?: string; + /** Type of the custom data source. */ + type?: string; + /** Time this custom data source was last modified. */ + updated?: string; + /** Upload type of the custom data source. */ + uploadType?: string; + /** Web property ID of the form UA-XXXXX-YY to which this custom data source belongs. */ + webPropertyId?: string; + } + interface CustomDataSources { + /** Collection of custom data sources. */ + items?: CustomDataSource[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this custom data source collection. */ + nextLink?: string; + /** Link to previous page for this custom data source collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface CustomDimension { + /** Account ID. */ + accountId?: string; + /** Boolean indicating whether the custom dimension is active. */ + active?: boolean; + /** Time the custom dimension was created. */ + created?: string; + /** Custom dimension ID. */ + id?: string; + /** Index of the custom dimension. */ + index?: number; + /** Kind value for a custom dimension. Set to "analytics#customDimension". It is a read-only field. */ + kind?: string; + /** Name of the custom dimension. */ + name?: string; + /** Parent link for the custom dimension. Points to the property to which the custom dimension belongs. */ + parentLink?: { + /** Link to the property to which the custom dimension belongs. */ + href?: string; + /** Type of the parent link. Set to "analytics#webproperty". */ + type?: string; + }; + /** Scope of the custom dimension: HIT, SESSION, USER or PRODUCT. */ + scope?: string; + /** Link for the custom dimension */ + selfLink?: string; + /** Time the custom dimension was last modified. */ + updated?: string; + /** Property ID. */ + webPropertyId?: string; + } + interface CustomDimensions { + /** Collection of custom dimensions. */ + items?: CustomDimension[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this custom dimension collection. */ + nextLink?: string; + /** Link to previous page for this custom dimension collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface CustomMetric { + /** Account ID. */ + accountId?: string; + /** Boolean indicating whether the custom metric is active. */ + active?: boolean; + /** Time the custom metric was created. */ + created?: string; + /** Custom metric ID. */ + id?: string; + /** Index of the custom metric. */ + index?: number; + /** Kind value for a custom metric. Set to "analytics#customMetric". It is a read-only field. */ + kind?: string; + /** Max value of custom metric. */ + max_value?: string; + /** Min value of custom metric. */ + min_value?: string; + /** Name of the custom metric. */ + name?: string; + /** Parent link for the custom metric. Points to the property to which the custom metric belongs. */ + parentLink?: { + /** Link to the property to which the custom metric belongs. */ + href?: string; + /** Type of the parent link. Set to "analytics#webproperty". */ + type?: string; + }; + /** Scope of the custom metric: HIT or PRODUCT. */ + scope?: string; + /** Link for the custom metric */ + selfLink?: string; + /** Data type of custom metric. */ + type?: string; + /** Time the custom metric was last modified. */ + updated?: string; + /** Property ID. */ + webPropertyId?: string; + } + interface CustomMetrics { + /** Collection of custom metrics. */ + items?: CustomMetric[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this custom metric collection. */ + nextLink?: string; + /** Link to previous page for this custom metric collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface EntityAdWordsLink { + /** A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty. */ + adWordsAccounts?: AdWordsAccount[]; + /** Web property being linked. */ + entity?: { + webPropertyRef?: WebPropertyRef; + }; + /** Entity AdWords link ID */ + id?: string; + /** Resource type for entity AdWords link. */ + kind?: string; + /** Name of the link. This field is required when creating an AdWords link. */ + name?: string; + /** IDs of linked Views (Profiles) represented as strings. */ + profileIds?: string[]; + /** URL link for this Google Analytics - Google AdWords link. */ + selfLink?: string; + } + interface EntityAdWordsLinks { + /** A list of entity AdWords links. */ + items?: EntityAdWordsLink[]; + /** + * The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Next link for this AdWords link collection. */ + nextLink?: string; + /** Previous link for this AdWords link collection. */ + previousLink?: string; + /** The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + } + interface EntityUserLink { + /** Entity for this link. It can be an account, a web property, or a view (profile). */ + entity?: { + /** Account for this link. */ + accountRef?: AccountRef; + /** View (Profile) for this link. */ + profileRef?: ProfileRef; + /** Web property for this link. */ + webPropertyRef?: WebPropertyRef; + }; + /** Entity user link ID */ + id?: string; + /** Resource type for entity user link. */ + kind?: string; + /** Permissions the user has for this entity. */ + permissions?: { + /** + * Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or + * inherited permissions from the parent entity. Effective permissions are read-only. + */ + effective?: string[]; + /** Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. */ + local?: string[]; + }; + /** Self link for this resource. */ + selfLink?: string; + /** User reference. */ + userRef?: UserRef; + } + interface EntityUserLinks { + /** A list of entity user links. */ + items?: EntityUserLink[]; + /** + * The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Next link for this account collection. */ + nextLink?: string; + /** Previous link for this account collection. */ + previousLink?: string; + /** The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + } + interface Experiment { + /** Account ID to which this experiment belongs. This field is read-only. */ + accountId?: string; + /** Time the experiment was created. This field is read-only. */ + created?: string; + /** Notes about this experiment. */ + description?: string; + /** If true, the end user will be able to edit the experiment via the Google Analytics user interface. */ + editableInGaUi?: boolean; + /** + * The ending time of the experiment (the time the status changed from RUNNING to ENDED). This field is present only if the experiment has ended. This + * field is read-only. + */ + endTime?: string; + /** + * Boolean specifying whether to distribute traffic evenly across all variations. If the value is False, content experiments follows the default behavior + * of adjusting traffic dynamically based on variation performance. Optional -- defaults to False. This field may not be changed for an experiment whose + * status is ENDED. + */ + equalWeighting?: boolean; + /** Experiment ID. Required for patch and update. Disallowed for create. */ + id?: string; + /** Internal ID for the web property to which this experiment belongs. This field is read-only. */ + internalWebPropertyId?: string; + /** Resource type for an Analytics experiment. This field is read-only. */ + kind?: string; + /** + * An integer number in [3, 90]. Specifies the minimum length of the experiment. Can be changed for a running experiment. This field may not be changed + * for an experiments whose status is ENDED. + */ + minimumExperimentLengthInDays?: number; + /** Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment. */ + name?: string; + /** + * The metric that the experiment is optimizing. Valid values: "ga:goal(n)Completions", "ga:adsenseAdsClicks", "ga:adsenseAdsViewed", "ga:adsenseRevenue", + * "ga:bounces", "ga:pageviews", "ga:sessionDuration", "ga:transactions", "ga:transactionRevenue". This field is required if status is "RUNNING" and + * servingFramework is one of "REDIRECT" or "API". + */ + objectiveMetric?: string; + /** + * Whether the objectiveMetric should be minimized or maximized. Possible values: "MAXIMUM", "MINIMUM". Optional--defaults to "MAXIMUM". Cannot be + * specified without objectiveMetric. Cannot be modified when status is "RUNNING" or "ENDED". + */ + optimizationType?: string; + /** Parent link for an experiment. Points to the view (profile) to which this experiment belongs. */ + parentLink?: { + /** Link to the view (profile) to which this experiment belongs. This field is read-only. */ + href?: string; + /** Value is "analytics#profile". This field is read-only. */ + type?: string; + }; + /** View (Profile) ID to which this experiment belongs. This field is read-only. */ + profileId?: string; + /** + * Why the experiment ended. Possible values: "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED", "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". + * "ENDED_WITH_NO_WINNER" means that the experiment didn't expire but no winner was projected to be found. If the experiment status is changed via the API + * to ENDED this field is set to STOPPED_BY_USER. This field is read-only. + */ + reasonExperimentEnded?: string; + /** + * Boolean specifying whether variations URLS are rewritten to match those of the original. This field may not be changed for an experiments whose status + * is ENDED. + */ + rewriteVariationUrlsAsOriginal?: boolean; + /** Link for this experiment. This field is read-only. */ + selfLink?: string; + /** + * The framework used to serve the experiment variations and evaluate the results. One of: + * - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results. + * - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected + * variation. + * - EXTERNAL: The variations will be served externally and the chosen variation reported to Google Analytics. The caller is responsible for serving the + * selected variation and evaluating the results. + */ + servingFramework?: string; + /** The snippet of code to include on the control page(s). This field is read-only. */ + snippet?: string; + /** + * The starting time of the experiment (the time the status changed from READY_TO_RUN to RUNNING). This field is present only if the experiment has + * started. This field is read-only. + */ + startTime?: string; + /** + * Experiment status. Possible values: "DRAFT", "READY_TO_RUN", "RUNNING", "ENDED". Experiments can be created in the "DRAFT", "READY_TO_RUN" or "RUNNING" + * state. This field is required when creating an experiment. + */ + status?: string; + /** + * A floating-point number in (0, 1]. Specifies the fraction of the traffic that participates in the experiment. Can be changed for a running experiment. + * This field may not be changed for an experiments whose status is ENDED. + */ + trafficCoverage?: number; + /** Time the experiment was last modified. This field is read-only. */ + updated?: string; + /** + * Array of variations. The first variation in the array is the original. The number of variations may not change once an experiment is in the RUNNING + * state. At least two variations are required before status can be set to RUNNING. + */ + variations?: Array<{ + /** The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED. */ + name?: string; + /** + * Status of the variation. Possible values: "ACTIVE", "INACTIVE". INACTIVE variations are not served. This field may not be changed for an experiment + * whose status is ENDED. + */ + status?: string; + /** The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED. */ + url?: string; + /** Weight that this variation should receive. Only present if the experiment is running. This field is read-only. */ + weight?: number; + /** True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only. */ + won?: boolean; + }>; + /** Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only. */ + webPropertyId?: string; + /** + * A floating-point number in (0, 1). Specifies the necessary confidence level to choose a winner. This field may not be changed for an experiments whose + * status is ENDED. + */ + winnerConfidenceLevel?: number; + /** Boolean specifying whether a winner has been found for this experiment. This field is read-only. */ + winnerFound?: boolean; + } + interface Experiments { + /** A list of experiments. */ + items?: Experiment[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this experiment collection. */ + nextLink?: string; + /** Link to previous page for this experiment collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of resources in the result. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface Filter { + /** Account ID to which this filter belongs. */ + accountId?: string; + /** Details for the filter of the type ADVANCED. */ + advancedDetails?: { + /** Indicates if the filter expressions are case sensitive. */ + caseSensitive?: boolean; + /** Expression to extract from field A. */ + extractA?: string; + /** Expression to extract from field B. */ + extractB?: string; + /** Field A. */ + fieldA?: string; + /** The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. */ + fieldAIndex?: number; + /** Indicates if field A is required to match. */ + fieldARequired?: boolean; + /** Field B. */ + fieldB?: string; + /** The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. */ + fieldBIndex?: number; + /** Indicates if field B is required to match. */ + fieldBRequired?: boolean; + /** Expression used to construct the output value. */ + outputConstructor?: string; + /** Output field. */ + outputToField?: string; + /** The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. */ + outputToFieldIndex?: number; + /** Indicates if the existing value of the output field, if any, should be overridden by the output expression. */ + overrideOutputField?: boolean; + }; + /** Time this filter was created. */ + created?: string; + /** Details for the filter of the type EXCLUDE. */ + excludeDetails?: FilterExpression; + /** Filter ID. */ + id?: string; + /** Details for the filter of the type INCLUDE. */ + includeDetails?: FilterExpression; + /** Resource type for Analytics filter. */ + kind?: string; + /** Details for the filter of the type LOWER. */ + lowercaseDetails?: { + /** Field to use in the filter. */ + field?: string; + /** The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. */ + fieldIndex?: number; + }; + /** Name of this filter. */ + name?: string; + /** Parent link for this filter. Points to the account to which this filter belongs. */ + parentLink?: { + /** Link to the account to which this filter belongs. */ + href?: string; + /** Value is "analytics#account". */ + type?: string; + }; + /** Details for the filter of the type SEARCH_AND_REPLACE. */ + searchAndReplaceDetails?: { + /** Determines if the filter is case sensitive. */ + caseSensitive?: boolean; + /** Field to use in the filter. */ + field?: string; + /** The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. */ + fieldIndex?: number; + /** Term to replace the search term with. */ + replaceString?: string; + /** Term to search. */ + searchString?: string; + }; + /** Link for this filter. */ + selfLink?: string; + /** Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE, UPPERCASE, SEARCH_AND_REPLACE and ADVANCED. */ + type?: string; + /** Time this filter was last modified. */ + updated?: string; + /** Details for the filter of the type UPPER. */ + uppercaseDetails?: { + /** Field to use in the filter. */ + field?: string; + /** The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. */ + fieldIndex?: number; + }; + } + interface FilterExpression { + /** Determines if the filter is case sensitive. */ + caseSensitive?: boolean; + /** Filter expression value */ + expressionValue?: string; + /** + * Field to filter. Possible values: + * - Content and Traffic + * - PAGE_REQUEST_URI, + * - PAGE_HOSTNAME, + * - PAGE_TITLE, + * - REFERRAL, + * - COST_DATA_URI (Campaign target URL), + * - HIT_TYPE, + * - INTERNAL_SEARCH_TERM, + * - INTERNAL_SEARCH_TYPE, + * - SOURCE_PROPERTY_TRACKING_ID, + * - Campaign or AdGroup + * - CAMPAIGN_SOURCE, + * - CAMPAIGN_MEDIUM, + * - CAMPAIGN_NAME, + * - CAMPAIGN_AD_GROUP, + * - CAMPAIGN_TERM, + * - CAMPAIGN_CONTENT, + * - CAMPAIGN_CODE, + * - CAMPAIGN_REFERRAL_PATH, + * - E-Commerce + * - TRANSACTION_COUNTRY, + * - TRANSACTION_REGION, + * - TRANSACTION_CITY, + * - TRANSACTION_AFFILIATION (Store or order location), + * - ITEM_NAME, + * - ITEM_CODE, + * - ITEM_VARIATION, + * - TRANSACTION_ID, + * - TRANSACTION_CURRENCY_CODE, + * - PRODUCT_ACTION_TYPE, + * - Audience/Users + * - BROWSER, + * - BROWSER_VERSION, + * - BROWSER_SIZE, + * - PLATFORM, + * - PLATFORM_VERSION, + * - LANGUAGE, + * - SCREEN_RESOLUTION, + * - SCREEN_COLORS, + * - JAVA_ENABLED (Boolean Field), + * - FLASH_VERSION, + * - GEO_SPEED (Connection speed), + * - VISITOR_TYPE, + * - GEO_ORGANIZATION (ISP organization), + * - GEO_DOMAIN, + * - GEO_IP_ADDRESS, + * - GEO_IP_VERSION, + * - Location + * - GEO_COUNTRY, + * - GEO_REGION, + * - GEO_CITY, + * - Event + * - EVENT_CATEGORY, + * - EVENT_ACTION, + * - EVENT_LABEL, + * - Other + * - CUSTOM_FIELD_1, + * - CUSTOM_FIELD_2, + * - USER_DEFINED_VALUE, + * - Application + * - APP_ID, + * - APP_INSTALLER_ID, + * - APP_NAME, + * - APP_VERSION, + * - SCREEN, + * - IS_APP (Boolean Field), + * - IS_FATAL_EXCEPTION (Boolean Field), + * - EXCEPTION_DESCRIPTION, + * - Mobile device + * - IS_MOBILE (Boolean Field, Deprecated. Use DEVICE_CATEGORY=mobile), + * - IS_TABLET (Boolean Field, Deprecated. Use DEVICE_CATEGORY=tablet), + * - DEVICE_CATEGORY, + * - MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field), + * - MOBILE_HAS_NFC_SUPPORT (Boolean Field), + * - MOBILE_HAS_CELLULAR_RADIO (Boolean Field), + * - MOBILE_HAS_WIFI_SUPPORT (Boolean Field), + * - MOBILE_BRAND_NAME, + * - MOBILE_MODEL_NAME, + * - MOBILE_MARKETING_NAME, + * - MOBILE_POINTING_METHOD, + * - Social + * - SOCIAL_NETWORK, + * - SOCIAL_ACTION, + * - SOCIAL_ACTION_TARGET, + * - Custom dimension + * - CUSTOM_DIMENSION (See accompanying field index), + */ + field?: string; + /** The Index of the custom dimension. Set only if the field is a is CUSTOM_DIMENSION. */ + fieldIndex?: number; + /** Kind value for filter expression */ + kind?: string; + /** + * Match type for this filter. Possible values are BEGINS_WITH, EQUAL, ENDS_WITH, CONTAINS, or MATCHES. GEO_DOMAIN, GEO_IP_ADDRESS, PAGE_REQUEST_URI, or + * PAGE_HOSTNAME filters can use any match type; all other filters must use MATCHES. + */ + matchType?: string; + } + interface FilterRef { + /** Account ID to which this filter belongs. */ + accountId?: string; + /** Link for this filter. */ + href?: string; + /** Filter ID. */ + id?: string; + /** Kind value for filter reference. */ + kind?: string; + /** Name of this filter. */ + name?: string; + } + interface Filters { + /** A list of filters. */ + items?: Filter[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1,000 with + * a value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this filter collection. */ + nextLink?: string; + /** Link to previous page for this filter collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface GaData { + /** Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. */ + columnHeaders?: Array<{ + /** Column Type. Either DIMENSION or METRIC. */ + columnType?: string; + /** + * Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, + * CURRENCY etc. + */ + dataType?: string; + /** Column name. */ + name?: string; + }>; + /** Determines if Analytics data contains samples. */ + containsSampledData?: boolean; + /** The last refreshed time in seconds for Analytics data. */ + dataLastRefreshed?: string; + dataTable?: { + cols?: Array<{ + id?: string; + label?: string; + type?: string; + }>; + rows?: Array<{ + c?: Array<{ + v?: string; + }>; + }>; + }; + /** Unique ID for this data response. */ + id?: string; + /** + * The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value + * of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Resource type. */ + kind?: string; + /** Link to next page for this Analytics data query. */ + nextLink?: string; + /** Link to previous page for this Analytics data query. */ + previousLink?: string; + /** Information for the view (profile), for which the Analytics data was requested. */ + profileInfo?: { + /** Account ID to which this view (profile) belongs. */ + accountId?: string; + /** Internal ID for the web property to which this view (profile) belongs. */ + internalWebPropertyId?: string; + /** View (Profile) ID. */ + profileId?: string; + /** View (Profile) name. */ + profileName?: string; + /** Table ID for view (profile). */ + tableId?: string; + /** Web Property ID to which this view (profile) belongs. */ + webPropertyId?: string; + }; + /** Analytics data request query parameters. */ + query?: { + /** List of analytics dimensions. */ + dimensions?: string; + /** End date. */ + "end-date"?: string; + /** Comma-separated list of dimension or metric filters. */ + filters?: string; + /** Unique table ID. */ + ids?: string; + /** Maximum results per page. */ + "max-results"?: number; + /** List of analytics metrics. */ + metrics?: string[]; + /** Desired sampling level */ + samplingLevel?: string; + /** Analytics advanced segment. */ + segment?: string; + /** List of dimensions or metrics based on which Analytics data is sorted. */ + sort?: string[]; + /** Start date. */ + "start-date"?: string; + /** Start index. */ + "start-index"?: number; + }; + /** + * Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as + * specified in the request. + */ + rows?: string[][]; + /** The number of samples used to calculate the result. */ + sampleSize?: string; + /** Total size of the sample space from which the samples were selected. */ + sampleSpace?: string; + /** Link to this page. */ + selfLink?: string; + /** The total number of rows for the query, regardless of the number of rows in the response. */ + totalResults?: number; + /** + * Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as + * the metric order specified in the request. + */ + totalsForAllResults?: Record; + } + interface Goal { + /** Account ID to which this goal belongs. */ + accountId?: string; + /** Determines whether this goal is active. */ + active?: boolean; + /** Time this goal was created. */ + created?: string; + /** Details for the goal of the type EVENT. */ + eventDetails?: { + /** List of event conditions. */ + eventConditions?: Array<{ + /** Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL. */ + comparisonType?: string; + /** Value used for this comparison. */ + comparisonValue?: string; + /** Expression used for this match. */ + expression?: string; + /** Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT. */ + matchType?: string; + /** Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE. */ + type?: string; + }>; + /** Determines if the event value should be used as the value for this goal. */ + useEventValue?: boolean; + }; + /** Goal ID. */ + id?: string; + /** Internal ID for the web property to which this goal belongs. */ + internalWebPropertyId?: string; + /** Resource type for an Analytics goal. */ + kind?: string; + /** Goal name. */ + name?: string; + /** Parent link for a goal. Points to the view (profile) to which this goal belongs. */ + parentLink?: { + /** Link to the view (profile) to which this goal belongs. */ + href?: string; + /** Value is "analytics#profile". */ + type?: string; + }; + /** View (Profile) ID to which this goal belongs. */ + profileId?: string; + /** Link for this goal. */ + selfLink?: string; + /** Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT. */ + type?: string; + /** Time this goal was last modified. */ + updated?: string; + /** Details for the goal of the type URL_DESTINATION. */ + urlDestinationDetails?: { + /** Determines if the goal URL must exactly match the capitalization of visited URLs. */ + caseSensitive?: boolean; + /** Determines if the first step in this goal is required. */ + firstStepRequired?: boolean; + /** Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX. */ + matchType?: string; + /** List of steps configured for this goal funnel. */ + steps?: Array<{ + /** Step name. */ + name?: string; + /** Step number. */ + number?: number; + /** URL for this step. */ + url?: string; + }>; + /** URL for this goal. */ + url?: string; + }; + /** Goal value. */ + value?: number; + /** Details for the goal of the type VISIT_NUM_PAGES. */ + visitNumPagesDetails?: { + /** Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL. */ + comparisonType?: string; + /** Value used for this comparison. */ + comparisonValue?: string; + }; + /** Details for the goal of the type VISIT_TIME_ON_SITE. */ + visitTimeOnSiteDetails?: { + /** Type of comparison. Possible values are LESS_THAN or GREATER_THAN. */ + comparisonType?: string; + /** Value used for this comparison. */ + comparisonValue?: string; + }; + /** Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY. */ + webPropertyId?: string; + } + interface Goals { + /** A list of goals. */ + items?: Goal[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this goal collection. */ + nextLink?: string; + /** Link to previous page for this goal collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of resources in the result. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface IncludeConditions { + /** + * The look-back window lets you specify a time frame for evaluating the behavior that qualifies users for your audience. For example, if your filters + * include users from Central Asia, and Transactions Greater than 2, and you set the look-back window to 14 days, then any user from Central Asia whose + * cumulative transactions exceed 2 during the last 14 days is added to the audience. + */ + daysToLookBack?: number; + /** Boolean indicating whether this segment is a smart list. https://support.google.com/analytics/answer/4628577 */ + isSmartList?: boolean; + /** Resource type for include conditions. */ + kind?: string; + /** Number of days (in the range 1 to 540) a user remains in the audience. */ + membershipDurationDays?: number; + /** The segment condition that will cause a user to be added to an audience. */ + segment?: string; + } + interface LinkedForeignAccount { + /** Account ID to which this linked foreign account belongs. */ + accountId?: string; + /** Boolean indicating whether this is eligible for search. */ + eligibleForSearch?: boolean; + /** Entity ad account link ID. */ + id?: string; + /** Internal ID for the web property to which this linked foreign account belongs. */ + internalWebPropertyId?: string; + /** Resource type for linked foreign account. */ + kind?: string; + /** The foreign account ID. For example the an AdWords `linkedAccountId` has the following format XXX-XXX-XXXX. */ + linkedAccountId?: string; + /** Remarketing audience ID to which this linked foreign account belongs. */ + remarketingAudienceId?: string; + /** The status of this foreign account link. */ + status?: string; + /** The type of the foreign account. For example, `ADWORDS_LINKS`, `DBM_LINKS`, `MCC_LINKS` or `OPTIMIZE`. */ + type?: string; + /** Web property ID of the form UA-XXXXX-YY to which this linked foreign account belongs. */ + webPropertyId?: string; + } + interface McfData { + /** Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. */ + columnHeaders?: Array<{ + /** Column Type. Either DIMENSION or METRIC. */ + columnType?: string; + /** Data type. Dimension and metric values data types such as INTEGER, DOUBLE, CURRENCY, MCF_SEQUENCE etc. */ + dataType?: string; + /** Column name. */ + name?: string; + }>; + /** Determines if the Analytics data contains sampled data. */ + containsSampledData?: boolean; + /** Unique ID for this data response. */ + id?: string; + /** + * The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value + * of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Resource type. */ + kind?: string; + /** Link to next page for this Analytics data query. */ + nextLink?: string; + /** Link to previous page for this Analytics data query. */ + previousLink?: string; + /** Information for the view (profile), for which the Analytics data was requested. */ + profileInfo?: { + /** Account ID to which this view (profile) belongs. */ + accountId?: string; + /** Internal ID for the web property to which this view (profile) belongs. */ + internalWebPropertyId?: string; + /** View (Profile) ID. */ + profileId?: string; + /** View (Profile) name. */ + profileName?: string; + /** Table ID for view (profile). */ + tableId?: string; + /** Web Property ID to which this view (profile) belongs. */ + webPropertyId?: string; + }; + /** Analytics data request query parameters. */ + query?: { + /** List of analytics dimensions. */ + dimensions?: string; + /** End date. */ + "end-date"?: string; + /** Comma-separated list of dimension or metric filters. */ + filters?: string; + /** Unique table ID. */ + ids?: string; + /** Maximum results per page. */ + "max-results"?: number; + /** List of analytics metrics. */ + metrics?: string[]; + /** Desired sampling level */ + samplingLevel?: string; + /** Analytics advanced segment. */ + segment?: string; + /** List of dimensions or metrics based on which Analytics data is sorted. */ + sort?: string[]; + /** Start date. */ + "start-date"?: string; + /** Start index. */ + "start-index"?: number; + }; + /** + * Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as + * specified in the request. + */ + rows?: Array; + /** A primitive dimension value. A primitive metric value. */ + primitiveValue?: string; + }>>; + /** The number of samples used to calculate the result. */ + sampleSize?: string; + /** Total size of the sample space from which the samples were selected. */ + sampleSpace?: string; + /** Link to this page. */ + selfLink?: string; + /** The total number of rows for the query, regardless of the number of rows in the response. */ + totalResults?: number; + /** + * Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as + * the metric order specified in the request. + */ + totalsForAllResults?: Record; + } + interface Profile { + /** Account ID to which this view (profile) belongs. */ + accountId?: string; + /** Indicates whether bot filtering is enabled for this view (profile). */ + botFilteringEnabled?: boolean; + /** Child link for this view (profile). Points to the list of goals for this view (profile). */ + childLink?: { + /** Link to the list of goals for this view (profile). */ + href?: string; + /** Value is "analytics#goals". */ + type?: string; + }; + /** Time this view (profile) was created. */ + created?: string; + /** + * The currency type associated with this view (profile), defaults to USD. The supported values are: + * USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY, TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF, BGN, LTL, + * ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL + */ + currency?: string; + /** Default page for this view (profile). */ + defaultPage?: string; + /** Indicates whether ecommerce tracking is enabled for this view (profile). */ + eCommerceTracking?: boolean; + /** Indicates whether enhanced ecommerce tracking is enabled for this view (profile). This property can only be enabled if ecommerce tracking is enabled. */ + enhancedECommerceTracking?: boolean; + /** The query parameters that are excluded from this view (profile). */ + excludeQueryParameters?: string; + /** View (Profile) ID. */ + id?: string; + /** Internal ID for the web property to which this view (profile) belongs. */ + internalWebPropertyId?: string; + /** Resource type for Analytics view (profile). */ + kind?: string; + /** Name of this view (profile). */ + name?: string; + /** Parent link for this view (profile). Points to the web property to which this view (profile) belongs. */ + parentLink?: { + /** Link to the web property to which this view (profile) belongs. */ + href?: string; + /** Value is "analytics#webproperty". */ + type?: string; + }; + /** Permissions the user has for this view (profile). */ + permissions?: { + /** + * All the permissions that the user has for this view (profile). These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions + * from the parent web property. + */ + effective?: string[]; + }; + /** Link for this view (profile). */ + selfLink?: string; + /** Site search category parameters for this view (profile). */ + siteSearchCategoryParameters?: string; + /** The site search query parameters for this view (profile). */ + siteSearchQueryParameters?: string; + /** Indicates whether this view (profile) is starred or not. */ + starred?: boolean; + /** Whether or not Analytics will strip search category parameters from the URLs in your reports. */ + stripSiteSearchCategoryParameters?: boolean; + /** Whether or not Analytics will strip search query parameters from the URLs in your reports. */ + stripSiteSearchQueryParameters?: boolean; + /** Time zone for which this view (profile) has been configured. Time zones are identified by strings from the TZ database. */ + timezone?: string; + /** View (Profile) type. Supported types: WEB or APP. */ + type?: string; + /** Time this view (profile) was last modified. */ + updated?: string; + /** Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. */ + webPropertyId?: string; + /** Website URL for this view (profile). */ + websiteUrl?: string; + } + interface ProfileFilterLink { + /** Filter for this link. */ + filterRef?: FilterRef; + /** Profile filter link ID. */ + id?: string; + /** Resource type for Analytics filter. */ + kind?: string; + /** View (Profile) for this link. */ + profileRef?: ProfileRef; + /** + * The rank of this profile filter link relative to the other filters linked to the same profile. + * For readonly (i.e., list and get) operations, the rank always starts at 1. + * For write (i.e., create, update, or delete) operations, you may specify a value between 0 and 255 inclusively, [0, 255]. In order to insert a link at + * the end of the list, either don't specify a rank or set a rank to a number greater than the largest rank in the list. In order to insert a link to the + * beginning of the list specify a rank that is less than or equal to 1. The new link will move all existing filters with the same or lower rank down the + * list. After the link is inserted/updated/deleted all profile filter links will be renumbered starting at 1. + */ + rank?: number; + /** Link for this profile filter link. */ + selfLink?: string; + } + interface ProfileFilterLinks { + /** A list of profile filter links. */ + items?: ProfileFilterLink[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1,000 with + * a value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this profile filter link collection. */ + nextLink?: string; + /** Link to previous page for this profile filter link collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface ProfileRef { + /** Account ID to which this view (profile) belongs. */ + accountId?: string; + /** Link for this view (profile). */ + href?: string; + /** View (Profile) ID. */ + id?: string; + /** Internal ID for the web property to which this view (profile) belongs. */ + internalWebPropertyId?: string; + /** Analytics view (profile) reference. */ + kind?: string; + /** Name of this view (profile). */ + name?: string; + /** Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. */ + webPropertyId?: string; + } + interface ProfileSummary { + /** View (profile) ID. */ + id?: string; + /** Resource type for Analytics ProfileSummary. */ + kind?: string; + /** View (profile) name. */ + name?: string; + /** Indicates whether this view (profile) is starred or not. */ + starred?: boolean; + /** View (Profile) type. Supported types: WEB or APP. */ + type?: string; + } + interface Profiles { + /** A list of views (profiles). */ + items?: Profile[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this view (profile) collection. */ + nextLink?: string; + /** Link to previous page for this view (profile) collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface RealtimeData { + /** Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. */ + columnHeaders?: Array<{ + /** Column Type. Either DIMENSION or METRIC. */ + columnType?: string; + /** + * Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, + * CURRENCY etc. + */ + dataType?: string; + /** Column name. */ + name?: string; + }>; + /** Unique ID for this data response. */ + id?: string; + /** Resource type. */ + kind?: string; + /** Information for the view (profile), for which the real time data was requested. */ + profileInfo?: { + /** Account ID to which this view (profile) belongs. */ + accountId?: string; + /** Internal ID for the web property to which this view (profile) belongs. */ + internalWebPropertyId?: string; + /** View (Profile) ID. */ + profileId?: string; + /** View (Profile) name. */ + profileName?: string; + /** Table ID for view (profile). */ + tableId?: string; + /** Web Property ID to which this view (profile) belongs. */ + webPropertyId?: string; + }; + /** Real time data request query parameters. */ + query?: { + /** List of real time dimensions. */ + dimensions?: string; + /** Comma-separated list of dimension or metric filters. */ + filters?: string; + /** Unique table ID. */ + ids?: string; + /** Maximum results per page. */ + "max-results"?: number; + /** List of real time metrics. */ + metrics?: string[]; + /** List of dimensions or metrics based on which real time data is sorted. */ + sort?: string[]; + }; + /** + * Real time data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as + * specified in the request. + */ + rows?: string[][]; + /** Link to this page. */ + selfLink?: string; + /** The total number of rows for the query, regardless of the number of rows in the response. */ + totalResults?: number; + /** + * Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as + * the metric order specified in the request. + */ + totalsForAllResults?: Record; + } + interface RemarketingAudience { + /** Account ID to which this remarketing audience belongs. */ + accountId?: string; + /** The simple audience definition that will cause a user to be added to an audience. */ + audienceDefinition?: { + /** Defines the conditions to include users to the audience. */ + includeConditions?: IncludeConditions; + }; + /** The type of audience, either SIMPLE or STATE_BASED. */ + audienceType?: string; + /** Time this remarketing audience was created. */ + created?: string; + /** The description of this remarketing audience. */ + description?: string; + /** Remarketing Audience ID. */ + id?: string; + /** Internal ID for the web property to which this remarketing audience belongs. */ + internalWebPropertyId?: string; + /** Collection type. */ + kind?: string; + /** The linked ad accounts associated with this remarketing audience. A remarketing audience can have only one linkedAdAccount currently. */ + linkedAdAccounts?: LinkedForeignAccount[]; + /** The views (profiles) that this remarketing audience is linked to. */ + linkedViews?: string[]; + /** The name of this remarketing audience. */ + name?: string; + /** A state based audience definition that will cause a user to be added or removed from an audience. */ + stateBasedAudienceDefinition?: { + /** Defines the conditions to exclude users from the audience. */ + excludeConditions?: { + /** Whether to make the exclusion TEMPORARY or PERMANENT. */ + exclusionDuration?: string; + /** The segment condition that will cause a user to be removed from an audience. */ + segment?: string; + }; + /** Defines the conditions to include users to the audience. */ + includeConditions?: IncludeConditions; + }; + /** Time this remarketing audience was last modified. */ + updated?: string; + /** Web property ID of the form UA-XXXXX-YY to which this remarketing audience belongs. */ + webPropertyId?: string; + } + interface RemarketingAudiences { + /** A list of remarketing audiences. */ + items?: RemarketingAudience[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this remarketing audience collection. */ + nextLink?: string; + /** Link to previous page for this view (profile) collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface Segment { + /** Time the segment was created. */ + created?: string; + /** Segment definition. */ + definition?: string; + /** Segment ID. */ + id?: string; + /** Resource type for Analytics segment. */ + kind?: string; + /** Segment name. */ + name?: string; + /** Segment ID. Can be used with the 'segment' parameter in Core Reporting API. */ + segmentId?: string; + /** Link for this segment. */ + selfLink?: string; + /** Type for a segment. Possible values are "BUILT_IN" or "CUSTOM". */ + type?: string; + /** Time the segment was last modified. */ + updated?: string; + } + interface Segments { + /** A list of segments. */ + items?: Segment[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type for segments. */ + kind?: string; + /** Link to next page for this segment collection. */ + nextLink?: string; + /** Link to previous page for this segment collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface UnsampledReport { + /** Account ID to which this unsampled report belongs. */ + accountId?: string; + /** Download details for a file stored in Google Cloud Storage. */ + cloudStorageDownloadDetails?: { + /** Id of the bucket the file object is stored in. */ + bucketId?: string; + /** Id of the file object containing the report data. */ + objectId?: string; + }; + /** Time this unsampled report was created. */ + created?: string; + /** The dimensions for the unsampled report. */ + dimensions?: string; + /** + * The type of download you need to use for the report data file. Possible values include `GOOGLE_DRIVE` and `GOOGLE_CLOUD_STORAGE`. If the value is + * `GOOGLE_DRIVE`, see the `driveDownloadDetails` field. If the value is `GOOGLE_CLOUD_STORAGE`, see the `cloudStorageDownloadDetails` field. + */ + downloadType?: string; + /** Download details for a file stored in Google Drive. */ + driveDownloadDetails?: { + /** Id of the document/file containing the report data. */ + documentId?: string; + }; + /** The end date for the unsampled report. */ + "end-date"?: string; + /** The filters for the unsampled report. */ + filters?: string; + /** Unsampled report ID. */ + id?: string; + /** Resource type for an Analytics unsampled report. */ + kind?: string; + /** The metrics for the unsampled report. */ + metrics?: string; + /** View (Profile) ID to which this unsampled report belongs. */ + profileId?: string; + /** The segment for the unsampled report. */ + segment?: string; + /** Link for this unsampled report. */ + selfLink?: string; + /** The start date for the unsampled report. */ + "start-date"?: string; + /** Status of this unsampled report. Possible values are PENDING, COMPLETED, or FAILED. */ + status?: string; + /** Title of the unsampled report. */ + title?: string; + /** Time this unsampled report was last modified. */ + updated?: string; + /** Web property ID to which this unsampled report belongs. The web property ID is of the form UA-XXXXX-YY. */ + webPropertyId?: string; + } + interface UnsampledReports { + /** A list of unsampled reports. */ + items?: UnsampledReport[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this unsampled report collection. */ + nextLink?: string; + /** Link to previous page for this unsampled report collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of resources in the result. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface Upload { + /** Account Id to which this upload belongs. */ + accountId?: string; + /** Custom data source Id to which this data import belongs. */ + customDataSourceId?: string; + /** Data import errors collection. */ + errors?: string[]; + /** A unique ID for this upload. */ + id?: string; + /** Resource type for Analytics upload. */ + kind?: string; + /** Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, DELETED. */ + status?: string; + /** Time this file is uploaded. */ + uploadTime?: string; + } + interface Uploads { + /** A list of uploads. */ + items?: Upload[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this upload collection. */ + nextLink?: string; + /** Link to previous page for this upload collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of resources in the result. */ + totalResults?: number; + } + interface UserRef { + /** Email ID of this user. */ + email?: string; + /** User ID. */ + id?: string; + kind?: string; + } + interface WebPropertyRef { + /** Account ID to which this web property belongs. */ + accountId?: string; + /** Link for this web property. */ + href?: string; + /** Web property ID of the form UA-XXXXX-YY. */ + id?: string; + /** Internal ID for this web property. */ + internalWebPropertyId?: string; + /** Analytics web property reference. */ + kind?: string; + /** Name of this web property. */ + name?: string; + } + interface WebPropertySummary { + /** Web property ID of the form UA-XXXXX-YY. */ + id?: string; + /** Internal ID for this web property. */ + internalWebPropertyId?: string; + /** Resource type for Analytics WebPropertySummary. */ + kind?: string; + /** Level for this web property. Possible values are STANDARD or PREMIUM. */ + level?: string; + /** Web property name. */ + name?: string; + /** List of profiles under this web property. */ + profiles?: ProfileSummary[]; + /** Indicates whether this web property is starred or not. */ + starred?: boolean; + /** Website url for this web property. */ + websiteUrl?: string; + } + interface Webproperties { + /** A list of web properties. */ + items?: Webproperty[]; + /** + * The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a + * value of 1000 by default, or otherwise specified by the max-results query parameter. + */ + itemsPerPage?: number; + /** Collection type. */ + kind?: string; + /** Link to next page for this web property collection. */ + nextLink?: string; + /** Link to previous page for this web property collection. */ + previousLink?: string; + /** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. */ + startIndex?: number; + /** The total number of results for the query, regardless of the number of results in the response. */ + totalResults?: number; + /** Email ID of the authenticated user */ + username?: string; + } + interface Webproperty { + /** Account ID to which this web property belongs. */ + accountId?: string; + /** Child link for this web property. Points to the list of views (profiles) for this web property. */ + childLink?: { + /** Link to the list of views (profiles) for this web property. */ + href?: string; + /** Type of the parent link. Its value is "analytics#profiles". */ + type?: string; + }; + /** Time this web property was created. */ + created?: string; + /** Default view (profile) ID. */ + defaultProfileId?: string; + /** Web property ID of the form UA-XXXXX-YY. */ + id?: string; + /** The industry vertical/category selected for this web property. */ + industryVertical?: string; + /** Internal ID for this web property. */ + internalWebPropertyId?: string; + /** Resource type for Analytics WebProperty. */ + kind?: string; + /** Level for this web property. Possible values are STANDARD or PREMIUM. */ + level?: string; + /** Name of this web property. */ + name?: string; + /** Parent link for this web property. Points to the account to which this web property belongs. */ + parentLink?: { + /** Link to the account for this web property. */ + href?: string; + /** Type of the parent link. Its value is "analytics#account". */ + type?: string; + }; + /** Permissions the user has for this web property. */ + permissions?: { + /** + * All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions + * from the parent account. + */ + effective?: string[]; + }; + /** View (Profile) count for this web property. */ + profileCount?: number; + /** Link for this web property. */ + selfLink?: string; + /** Indicates whether this web property is starred or not. */ + starred?: boolean; + /** Time this web property was last modified. */ + updated?: string; + /** Website url for this web property. */ + websiteUrl?: string; + } + interface GaResource { + /** Returns Analytics data for a view (profile). */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'. */ + dimensions?: string; + /** + * End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or + * 7daysAgo). The default value is yesterday. + */ + "end-date": string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** A comma-separated list of dimension or metric filters to be applied to Analytics data. */ + filters?: string; + /** Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. */ + ids: string; + /** The response will include empty rows if this parameter is set to true, the default is true */ + "include-empty-rows"?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of entries to include in this feed. */ + "max-results"?: number; + /** A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified. */ + metrics: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The selected format for the response. Default format is JSON. */ + output?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The desired sampling level. */ + samplingLevel?: string; + /** An Analytics segment to be applied to data. */ + segment?: string; + /** A comma-separated list of dimensions or metrics that determine the sort order for Analytics data. */ + sort?: string; + /** + * Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or + * 7daysAgo). The default value is 7daysAgo. + */ + "start-date": string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface McfResource { + /** Returns Analytics Multi-Channel Funnels data for a view (profile). */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'. */ + dimensions?: string; + /** + * End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or + * 7daysAgo). The default value is 7daysAgo. + */ + "end-date": string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** A comma-separated list of dimension or metric filters to be applied to the Analytics data. */ + filters?: string; + /** Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. */ + ids: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of entries to include in this feed. */ + "max-results"?: number; + /** A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified. */ + metrics: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The desired sampling level. */ + samplingLevel?: string; + /** A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data. */ + sort?: string; + /** + * Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or + * 7daysAgo). The default value is 7daysAgo. + */ + "start-date": string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RealtimeResource { + /** Returns real time data for a view (profile). */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'. */ + dimensions?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** A comma-separated list of dimension or metric filters to be applied to real time data. */ + filters?: string; + /** Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. */ + ids: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of entries to include in this feed. */ + "max-results"?: number; + /** A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. */ + metrics: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** A comma-separated list of dimensions or metrics that determine the sort order for real time data. */ + sort?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DataResource { + ga: GaResource; + mcf: McfResource; + realtime: RealtimeResource; + } + interface AccountSummariesResource { + /** Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of account summaries to include in this response, where the largest acceptable value is 1000. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountUserLinksResource { + /** Removes a user from the given account. */ + delete(request: { + /** Account ID to delete the user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Link ID to delete the user link for. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds a new user to the given account. */ + insert(request: { + /** Account ID to create the user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists account-user links for a given account. */ + list(request: { + /** Account ID to retrieve the user links for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of account-user links to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates permissions for an existing user on the given account. */ + update(request: { + /** Account ID to update the account-user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Link ID to update the account-user link for. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountsResource { + /** Lists all accounts to which the user has access. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of accounts to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CustomDataSourcesResource { + /** List custom data sources to which the user has access. */ + list(request: { + /** Account Id for the custom data sources to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom data sources to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id for the custom data sources to retrieve. */ + webPropertyId: string; + }): Request; + } + interface CustomDimensionsResource { + /** Get a custom dimension to which the user has access. */ + get(request: { + /** Account ID for the custom dimension to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The ID of the custom dimension to retrieve. */ + customDimensionId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom dimension to retrieve. */ + webPropertyId: string; + }): Request; + /** Create a new custom dimension. */ + insert(request: { + /** Account ID for the custom dimension to create. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom dimension to create. */ + webPropertyId: string; + }): Request; + /** Lists custom dimensions to which the user has access. */ + list(request: { + /** Account ID for the custom dimensions to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom dimensions to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom dimensions to retrieve. */ + webPropertyId: string; + }): Request; + /** Updates an existing custom dimension. This method supports patch semantics. */ + patch(request: { + /** Account ID for the custom dimension to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom dimension ID for the custom dimension to update. */ + customDimensionId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. */ + ignoreCustomDataSourceLinks?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom dimension to update. */ + webPropertyId: string; + }): Request; + /** Updates an existing custom dimension. */ + update(request: { + /** Account ID for the custom dimension to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom dimension ID for the custom dimension to update. */ + customDimensionId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. */ + ignoreCustomDataSourceLinks?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom dimension to update. */ + webPropertyId: string; + }): Request; + } + interface CustomMetricsResource { + /** Get a custom metric to which the user has access. */ + get(request: { + /** Account ID for the custom metric to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** The ID of the custom metric to retrieve. */ + customMetricId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom metric to retrieve. */ + webPropertyId: string; + }): Request; + /** Create a new custom metric. */ + insert(request: { + /** Account ID for the custom metric to create. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom dimension to create. */ + webPropertyId: string; + }): Request; + /** Lists custom metrics to which the user has access. */ + list(request: { + /** Account ID for the custom metrics to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of custom metrics to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom metrics to retrieve. */ + webPropertyId: string; + }): Request; + /** Updates an existing custom metric. This method supports patch semantics. */ + patch(request: { + /** Account ID for the custom metric to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom metric ID for the custom metric to update. */ + customMetricId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. */ + ignoreCustomDataSourceLinks?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom metric to update. */ + webPropertyId: string; + }): Request; + /** Updates an existing custom metric. */ + update(request: { + /** Account ID for the custom metric to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom metric ID for the custom metric to update. */ + customMetricId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. */ + ignoreCustomDataSourceLinks?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for the custom metric to update. */ + webPropertyId: string; + }): Request; + } + interface ExperimentsResource { + /** Delete an experiment. */ + delete(request: { + /** Account ID to which the experiment belongs */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** ID of the experiment to delete */ + experimentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to which the experiment belongs */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to which the experiment belongs */ + webPropertyId: string; + }): Request; + /** Returns an experiment to which the user has access. */ + get(request: { + /** Account ID to retrieve the experiment for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Experiment ID to retrieve the experiment for. */ + experimentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to retrieve the experiment for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to retrieve the experiment for. */ + webPropertyId: string; + }): Request; + /** Create a new experiment. */ + insert(request: { + /** Account ID to create the experiment for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to create the experiment for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to create the experiment for. */ + webPropertyId: string; + }): Request; + /** Lists experiments to which the user has access. */ + list(request: { + /** Account ID to retrieve experiments for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of experiments to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to retrieve experiments for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to retrieve experiments for. */ + webPropertyId: string; + }): Request; + /** Update an existing experiment. This method supports patch semantics. */ + patch(request: { + /** Account ID of the experiment to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Experiment ID of the experiment to update. */ + experimentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID of the experiment to update. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID of the experiment to update. */ + webPropertyId: string; + }): Request; + /** Update an existing experiment. */ + update(request: { + /** Account ID of the experiment to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Experiment ID of the experiment to update. */ + experimentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID of the experiment to update. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID of the experiment to update. */ + webPropertyId: string; + }): Request; + } + interface FiltersResource { + /** Delete a filter. */ + delete(request: { + /** Account ID to delete the filter for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** ID of the filter to be deleted. */ + filterId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns a filters to which the user has access. */ + get(request: { + /** Account ID to retrieve filters for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filter ID to retrieve filters for. */ + filterId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Create a new filter. */ + insert(request: { + /** Account ID to create filter for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all filters for an account */ + list(request: { + /** Account ID to retrieve filters for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of filters to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing filter. This method supports patch semantics. */ + patch(request: { + /** Account ID to which the filter belongs. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** ID of the filter to be updated. */ + filterId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing filter. */ + update(request: { + /** Account ID to which the filter belongs. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** ID of the filter to be updated. */ + filterId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface GoalsResource { + /** Gets a goal to which the user has access. */ + get(request: { + /** Account ID to retrieve the goal for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Goal ID to retrieve the goal for. */ + goalId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to retrieve the goal for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to retrieve the goal for. */ + webPropertyId: string; + }): Request; + /** Create a new goal. */ + insert(request: { + /** Account ID to create the goal for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to create the goal for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to create the goal for. */ + webPropertyId: string; + }): Request; + /** Lists goals to which the user has access. */ + list(request: { + /** Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of goals to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has + * access to. + */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access + * to. + */ + webPropertyId: string; + }): Request; + /** Updates an existing goal. This method supports patch semantics. */ + patch(request: { + /** Account ID to update the goal. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Index of the goal to be updated. */ + goalId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to update the goal. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to update the goal. */ + webPropertyId: string; + }): Request; + /** Updates an existing goal. */ + update(request: { + /** Account ID to update the goal. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Index of the goal to be updated. */ + goalId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to update the goal. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to update the goal. */ + webPropertyId: string; + }): Request; + } + interface ProfileFilterLinksResource { + /** Delete a profile filter link. */ + delete(request: { + /** Account ID to which the profile filter link belongs. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ID of the profile filter link to delete. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Profile ID to which the filter link belongs. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id to which the profile filter link belongs. */ + webPropertyId: string; + }): Request; + /** Returns a single profile filter link. */ + get(request: { + /** Account ID to retrieve profile filter link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ID of the profile filter link. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Profile ID to retrieve filter link for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id to retrieve profile filter link for. */ + webPropertyId: string; + }): Request; + /** Create a new profile filter link. */ + insert(request: { + /** Account ID to create profile filter link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Profile ID to create filter link for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id to create profile filter link for. */ + webPropertyId: string; + }): Request; + /** Lists all profile filter links for a profile. */ + list(request: { + /** Account ID to retrieve profile filter links for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of profile filter links to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has + * access to. + */ + webPropertyId: string; + }): Request; + /** Update an existing profile filter link. This method supports patch semantics. */ + patch(request: { + /** Account ID to which profile filter link belongs. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ID of the profile filter link to be updated. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Profile ID to which filter link belongs */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id to which profile filter link belongs */ + webPropertyId: string; + }): Request; + /** Update an existing profile filter link. */ + update(request: { + /** Account ID to which profile filter link belongs. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ID of the profile filter link to be updated. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Profile ID to which filter link belongs */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id to which profile filter link belongs */ + webPropertyId: string; + }): Request; + } + interface ProfileUserLinksResource { + /** Removes a user from the given view (profile). */ + delete(request: { + /** Account ID to delete the user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Link ID to delete the user link for. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to delete the user link for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web Property ID to delete the user link for. */ + webPropertyId: string; + }): Request; + /** Adds a new user to the given view (profile). */ + insert(request: { + /** Account ID to create the user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to create the user link for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web Property ID to create the user link for. */ + webPropertyId: string; + }): Request; + /** Lists profile-user links for a given view (profile). */ + list(request: { + /** Account ID which the given view (profile) belongs to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of profile-user links to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has + * access to. + */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties + * that user has access to. + */ + webPropertyId: string; + }): Request; + /** Updates permissions for an existing user on the given view (profile). */ + update(request: { + /** Account ID to update the user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Link ID to update the user link for. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile ID) to update the user link for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web Property ID to update the user link for. */ + webPropertyId: string; + }): Request; + } + interface ProfilesResource { + /** Deletes a view (profile). */ + delete(request: { + /** Account ID to delete the view (profile) for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the view (profile) to be deleted. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to delete the view (profile) for. */ + webPropertyId: string; + }): Request; + /** Gets a view (profile) to which the user has access. */ + get(request: { + /** Account ID to retrieve the view (profile) for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to retrieve the view (profile) for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to retrieve the view (profile) for. */ + webPropertyId: string; + }): Request; + /** Create a new view (profile). */ + insert(request: { + /** Account ID to create the view (profile) for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to create the view (profile) for. */ + webPropertyId: string; + }): Request; + /** Lists views (profiles) to which the user has access. */ + list(request: { + /** + * Account ID for the view (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has + * access. + */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of views (profiles) to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to + * which the user has access. + */ + webPropertyId: string; + }): Request; + /** Updates an existing view (profile). This method supports patch semantics. */ + patch(request: { + /** Account ID to which the view (profile) belongs */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the view (profile) to be updated. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to which the view (profile) belongs */ + webPropertyId: string; + }): Request; + /** Updates an existing view (profile). */ + update(request: { + /** Account ID to which the view (profile) belongs */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the view (profile) to be updated. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to which the view (profile) belongs */ + webPropertyId: string; + }): Request; + } + interface RemarketingAudienceResource { + /** Delete a remarketing audience. */ + delete(request: { + /** Account ID to which the remarketing audience belongs. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the remarketing audience to delete. */ + remarketingAudienceId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to which the remarketing audience belongs. */ + webPropertyId: string; + }): Request; + /** Gets a remarketing audience to which the user has access. */ + get(request: { + /** The account ID of the remarketing audience to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the remarketing audience to retrieve. */ + remarketingAudienceId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The web property ID of the remarketing audience to retrieve. */ + webPropertyId: string; + }): Request; + /** Creates a new remarketing audience. */ + insert(request: { + /** The account ID for which to create the remarketing audience. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID for which to create the remarketing audience. */ + webPropertyId: string; + }): Request; + /** Lists remarketing audiences to which the user has access. */ + list(request: { + /** The account ID of the remarketing audiences to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of remarketing audiences to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + type?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The web property ID of the remarketing audiences to retrieve. */ + webPropertyId: string; + }): Request; + /** Updates an existing remarketing audience. This method supports patch semantics. */ + patch(request: { + /** The account ID of the remarketing audience to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the remarketing audience to update. */ + remarketingAudienceId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The web property ID of the remarketing audience to update. */ + webPropertyId: string; + }): Request; + /** Updates an existing remarketing audience. */ + update(request: { + /** The account ID of the remarketing audience to update. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the remarketing audience to update. */ + remarketingAudienceId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The web property ID of the remarketing audience to update. */ + webPropertyId: string; + }): Request; + } + interface SegmentsResource { + /** Lists segments to which the user has access. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of segments to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UnsampledReportsResource { + /** Deletes an unsampled report. */ + delete(request: { + /** Account ID to delete the unsampled report for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to delete the unsampled report for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of the unsampled report to be deleted. */ + unsampledReportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to delete the unsampled reports for. */ + webPropertyId: string; + }): Request; + /** Returns a single unsampled report. */ + get(request: { + /** Account ID to retrieve unsampled report for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to retrieve unsampled report for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of the unsampled report to retrieve. */ + unsampledReportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to retrieve unsampled reports for. */ + webPropertyId: string; + }): Request; + /** Create a new unsampled report. */ + insert(request: { + /** Account ID to create the unsampled report for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to create the unsampled report for. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to create the unsampled report for. */ + webPropertyId: string; + }): Request; + /** Lists unsampled reports to which the user has access. */ + list(request: { + /** Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of unsampled reports to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported. */ + webPropertyId: string; + }): Request; + } + interface UploadsResource { + /** Delete data associated with a previous upload. */ + deleteUploadData(request: { + /** Account Id for the uploads to be deleted. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom data source Id for the uploads to be deleted. */ + customDataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id for the uploads to be deleted. */ + webPropertyId: string; + }): Request; + /** List uploads to which the user has access. */ + get(request: { + /** Account Id for the upload to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom data source Id for upload to retrieve. */ + customDataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Upload Id to retrieve. */ + uploadId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id for the upload to retrieve. */ + webPropertyId: string; + }): Request; + /** List uploads to which the user has access. */ + list(request: { + /** Account Id for the uploads to retrieve. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom data source Id for uploads to retrieve. */ + customDataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of uploads to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property Id for the uploads to retrieve. */ + webPropertyId: string; + }): Request; + /** Upload data for a custom data source. */ + uploadData(request: { + /** Account Id associated with the upload. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Custom data source Id to which the data being uploaded belongs. */ + customDataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property UA-string associated with the upload. */ + webPropertyId: string; + }): Request; + } + interface WebPropertyAdWordsLinksResource { + /** Deletes a web property-AdWords link. */ + delete(request: { + /** ID of the account which the given web property belongs to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property AdWords link ID. */ + webPropertyAdWordsLinkId: string; + /** Web property ID to delete the AdWords link for. */ + webPropertyId: string; + }): Request; + /** Returns a web property-AdWords link to which the user has access. */ + get(request: { + /** ID of the account which the given web property belongs to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property-AdWords link ID. */ + webPropertyAdWordsLinkId: string; + /** Web property ID to retrieve the AdWords link for. */ + webPropertyId: string; + }): Request; + /** Creates a webProperty-AdWords link. */ + insert(request: { + /** ID of the Google Analytics account to create the link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to create the link for. */ + webPropertyId: string; + }): Request; + /** Lists webProperty-AdWords links for a given web property. */ + list(request: { + /** ID of the account which the given web property belongs to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of webProperty-AdWords links to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first webProperty-AdWords link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to retrieve the AdWords links for. */ + webPropertyId: string; + }): Request; + /** Updates an existing webProperty-AdWords link. This method supports patch semantics. */ + patch(request: { + /** ID of the account which the given web property belongs to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property-AdWords link ID. */ + webPropertyAdWordsLinkId: string; + /** Web property ID to retrieve the AdWords link for. */ + webPropertyId: string; + }): Request; + /** Updates an existing webProperty-AdWords link. */ + update(request: { + /** ID of the account which the given web property belongs to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property-AdWords link ID. */ + webPropertyAdWordsLinkId: string; + /** Web property ID to retrieve the AdWords link for. */ + webPropertyId: string; + }): Request; + } + interface WebpropertiesResource { + /** Gets a web property to which the user has access. */ + get(request: { + /** Account ID to retrieve the web property for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID to retrieve the web property for. */ + webPropertyId: string; + }): Request; + /** + * Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at + * least one profile. + */ + insert(request: { + /** Account ID to create the web property for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists web properties to which the user has access. */ + list(request: { + /** Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of web properties to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing web property. This method supports patch semantics. */ + patch(request: { + /** Account ID to which the web property belongs */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID */ + webPropertyId: string; + }): Request; + /** Updates an existing web property. */ + update(request: { + /** Account ID to which the web property belongs */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID */ + webPropertyId: string; + }): Request; + } + interface WebpropertyUserLinksResource { + /** Removes a user from the given web property. */ + delete(request: { + /** Account ID to delete the user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Link ID to delete the user link for. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web Property ID to delete the user link for. */ + webPropertyId: string; + }): Request; + /** Adds a new user to the given web property. */ + insert(request: { + /** Account ID to create the user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web Property ID to create the user link for. */ + webPropertyId: string; + }): Request; + /** Lists webProperty-user links for a given web property. */ + list(request: { + /** Account ID which the given web property belongs to. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of webProperty-user Links to include in this response. */ + "max-results"?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. */ + "start-index"?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties + * that user has access to. + */ + webPropertyId: string; + }): Request; + /** Updates permissions for an existing user on the given web property. */ + update(request: { + /** Account ID to update the account-user link for. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Link ID to update the account-user link for. */ + linkId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Web property ID to update the account-user link for. */ + webPropertyId: string; + }): Request; + } + interface ManagementResource { + accountSummaries: AccountSummariesResource; + accountUserLinks: AccountUserLinksResource; + accounts: AccountsResource; + customDataSources: CustomDataSourcesResource; + customDimensions: CustomDimensionsResource; + customMetrics: CustomMetricsResource; + experiments: ExperimentsResource; + filters: FiltersResource; + goals: GoalsResource; + profileFilterLinks: ProfileFilterLinksResource; + profileUserLinks: ProfileUserLinksResource; + profiles: ProfilesResource; + remarketingAudience: RemarketingAudienceResource; + segments: SegmentsResource; + unsampledReports: UnsampledReportsResource; + uploads: UploadsResource; + webPropertyAdWordsLinks: WebPropertyAdWordsLinksResource; + webproperties: WebpropertiesResource; + webpropertyUserLinks: WebpropertyUserLinksResource; + } + interface ColumnsResource { + /** Lists all columns for a report type */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API */ + reportType: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MetadataResource { + columns: ColumnsResource; + } + interface ProvisioningResource { + /** Creates an account ticket. */ + createAccountTicket(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.analytics/readme.md b/types/gapi.client.analytics/readme.md new file mode 100644 index 0000000000..a5d16c9613 --- /dev/null +++ b/types/gapi.client.analytics/readme.md @@ -0,0 +1,74 @@ +# TypeScript typings for Google Analytics API v3 +Views and manages your Google Analytics data. +For detailed description please check [documentation](https://developers.google.com/analytics/). + +## Installing + +Install typings for Google Analytics API: +``` +npm install @types/gapi.client.analytics@v3 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('analytics', 'v3', () => { + // now we can use gapi.client.analytics + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your Google Analytics data + 'https://www.googleapis.com/auth/analytics', + + // Edit Google Analytics management entities + 'https://www.googleapis.com/auth/analytics.edit', + + // Manage Google Analytics Account users by email address + 'https://www.googleapis.com/auth/analytics.manage.users', + + // View Google Analytics user permissions + 'https://www.googleapis.com/auth/analytics.manage.users.readonly', + + // Create a new Google Analytics account along with its default property and view + 'https://www.googleapis.com/auth/analytics.provision', + + // View your Google Analytics data + 'https://www.googleapis.com/auth/analytics.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Analytics API resources: + +```typescript + +/* +Creates an account ticket. +*/ +await gapi.client.provisioning.createAccountTicket({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.analytics/tsconfig.json b/types/gapi.client.analytics/tsconfig.json new file mode 100644 index 0000000000..24b9a3e308 --- /dev/null +++ b/types/gapi.client.analytics/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.analytics-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.analytics/tslint.json b/types/gapi.client.analytics/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.analytics/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.analyticsreporting/gapi.client.analyticsreporting-tests.ts b/types/gapi.client.analyticsreporting/gapi.client.analyticsreporting-tests.ts new file mode 100644 index 0000000000..bacc354694 --- /dev/null +++ b/types/gapi.client.analyticsreporting/gapi.client.analyticsreporting-tests.ts @@ -0,0 +1,37 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('analyticsreporting', 'v4', () => { + /** now we can use gapi.client.analyticsreporting */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your Google Analytics data */ + 'https://www.googleapis.com/auth/analytics', + /** View your Google Analytics data */ + 'https://www.googleapis.com/auth/analytics.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Returns the Analytics data. */ + await gapi.client.reports.batchGet({ + }); + } +}); diff --git a/types/gapi.client.analyticsreporting/index.d.ts b/types/gapi.client.analyticsreporting/index.d.ts new file mode 100644 index 0000000000..e5e1b7aabe --- /dev/null +++ b/types/gapi.client.analyticsreporting/index.d.ts @@ -0,0 +1,698 @@ +// Type definitions for Google Google Analytics Reporting API v4 4.0 +// Project: https://developers.google.com/analytics/devguides/reporting/core/v4/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://analyticsreporting.googleapis.com/$discovery/rest?version=v4 + +/// + +declare namespace gapi.client { + /** Load Google Analytics Reporting API v4 */ + function load(name: "analyticsreporting", version: "v4"): PromiseLike; + function load(name: "analyticsreporting", version: "v4", callback: () => any): void; + + const reports: analyticsreporting.ReportsResource; + + namespace analyticsreporting { + interface Cohort { + /** + * This is used for `FIRST_VISIT_DATE` cohort, the cohort selects users + * whose first visit date is between start date and end date defined in the + * DateRange. The date ranges should be aligned for cohort requests. If the + * request contains `ga:cohortNthDay` it should be exactly one day long, + * if `ga:cohortNthWeek` it should be aligned to the week boundary (starting + * at Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range + * should be aligned to the month (starting at the first and ending on the + * last day of the month). + * For LTV requests there are no such restrictions. + * You do not need to supply a date range for the + * `reportsRequest.dateRanges` field. + */ + dateRange?: DateRange; + /** + * A unique name for the cohort. If not defined name will be auto-generated + * with values cohort_[1234...]. + */ + name?: string; + /** + * Type of the cohort. The only supported type as of now is + * `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated + * as `FIRST_VISIT_DATE` type cohort. + */ + type?: string; + } + interface CohortGroup { + /** The definition for the cohort. */ + cohorts?: Cohort[]; + /** + * Enable Life Time Value (LTV). LTV measures lifetime value for users + * acquired through different channels. + * Please see: + * [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and + * [Lifetime Value](https://support.google.com/analytics/answer/6182550) + * If the value of lifetimeValue is false: + * + * - The metric values are similar to the values in the web interface cohort + * report. + * - The cohort definition date ranges must be aligned to the calendar week + * and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in + * the cohort definition should be a Sunday and the `endDate` should be the + * following Saturday, and for `ga:cohortNthMonth`, the `startDate` + * should be the 1st of the month and `endDate` should be the last day + * of the month. + * + * When the lifetimeValue is true: + * + * - The metric values will correspond to the values in the web interface + * LifeTime value report. + * - The Lifetime Value report shows you how user value (Revenue) and + * engagement (Appviews, Goal Completions, Sessions, and Session Duration) + * grow during the 90 days after a user is acquired. + * - The metrics are calculated as a cumulative average per user per the time + * increment. + * - The cohort definition date ranges need not be aligned to the calendar + * week and month boundaries. + * - The `viewId` must be an + * [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews) + */ + lifetimeValue?: boolean; + } + interface ColumnHeader { + /** The dimension names in the response. */ + dimensions?: string[]; + /** Metric headers for the metrics in the response. */ + metricHeader?: MetricHeader; + } + interface DateRange { + /** The end date for the query in the format `YYYY-MM-DD`. */ + endDate?: string; + /** The start date for the query in the format `YYYY-MM-DD`. */ + startDate?: string; + } + interface DateRangeValues { + /** The values of each pivot region. */ + pivotValueRegions?: PivotValueRegion[]; + /** Each value corresponds to each Metric in the request. */ + values?: string[]; + } + interface Dimension { + /** + * If non-empty, we place dimension values into buckets after string to + * int64. Dimension values that are not the string representation of an + * integral value will be converted to zero. The bucket values have to be in + * increasing order. Each bucket is closed on the lower end, and open on the + * upper end. The "first" bucket includes all values less than the first + * boundary, the "last" bucket includes all values up to infinity. Dimension + * values that fall in a bucket get transformed to a new dimension value. For + * example, if one gives a list of "0, 1, 3, 4, 7", then we return the + * following buckets: + * + * - bucket #1: values < 0, dimension value "<0" + * - bucket #2: values in [0,1), dimension value "0" + * - bucket #3: values in [1,3), dimension value "1-2" + * - bucket #4: values in [3,4), dimension value "3" + * - bucket #5: values in [4,7), dimension value "4-6" + * - bucket #6: values >= 7, dimension value "7+" + * + * NOTE: If you are applying histogram mutation on any dimension, and using + * that dimension in sort, you will want to use the sort type + * `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values + * will be sorted according to dictionary + * (lexicographic) order. For example the ascending dictionary order is: + * + * "<50", "1001+", "121-1000", "50-120" + * + * And the ascending `HISTOGRAM_BUCKET` order is: + * + * "<50", "50-120", "121-1000", "1001+" + * + * The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"` + * for a histogram-mutated dimension. + */ + histogramBuckets?: string[]; + /** Name of the dimension to fetch, for example `ga:browser`. */ + name?: string; + } + interface DimensionFilter { + /** Should the match be case sensitive? Default is false. */ + caseSensitive?: boolean; + /** The dimension to filter on. A DimensionFilter must contain a dimension. */ + dimensionName?: string; + /** + * Strings or regular expression to match against. Only the first value of + * the list is used for comparison unless the operator is `IN_LIST`. + * If `IN_LIST` operator, then the entire list is used to filter the + * dimensions as explained in the description of the `IN_LIST` operator. + */ + expressions?: string[]; + /** + * Logical `NOT` operator. If this boolean is set to true, then the matching + * dimension values will be excluded in the report. The default is false. + */ + not?: boolean; + /** How to match the dimension to the expression. The default is REGEXP. */ + operator?: string; + } + interface DimensionFilterClause { + /** + * The repeated set of filters. They are logically combined based on the + * operator specified. + */ + filters?: DimensionFilter[]; + /** + * The operator for combining multiple dimension filters. If unspecified, it + * is treated as an `OR`. + */ + operator?: string; + } + interface DynamicSegment { + /** The name of the dynamic segment. */ + name?: string; + /** Session Segment to select sessions to include in the segment. */ + sessionSegment?: SegmentDefinition; + /** User Segment to select users to include in the segment. */ + userSegment?: SegmentDefinition; + } + interface GetReportsRequest { + /** + * Requests, each request will have a separate response. + * There can be a maximum of 5 requests. All requests should have the same + * `dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`. + */ + reportRequests?: ReportRequest[]; + } + interface GetReportsResponse { + /** Responses corresponding to each of the request. */ + reports?: Report[]; + } + interface Metric { + /** + * An alias for the metric expression is an alternate name for the + * expression. The alias can be used for filtering and sorting. This field + * is optional and is useful if the expression is not a single metric but + * a complex expression which cannot be used in filtering and sorting. + * The alias is also used in the response column header. + */ + alias?: string; + /** + * A metric expression in the request. An expression is constructed from one + * or more metrics and numbers. Accepted operators include: Plus (+), Minus + * (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, + * Positive cardinal numbers (0-9), can include decimals and is limited to + * 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the + * metric expression is just a single metric name like `ga:users`. + * Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics + * will result in unexpected results. + */ + expression?: string; + /** + * Specifies how the metric expression should be formatted, for example + * `INTEGER`. + */ + formattingType?: string; + } + interface MetricFilter { + /** The value to compare against. */ + comparisonValue?: string; + /** + * The metric that will be filtered on. A metricFilter must contain a metric + * name. A metric name can be an alias earlier defined as a metric or it can + * also be a metric expression. + */ + metricName?: string; + /** + * Logical `NOT` operator. If this boolean is set to true, then the matching + * metric values will be excluded in the report. The default is false. + */ + not?: boolean; + /** + * Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the + * comparisonValue, the default is `EQUAL`. If the operator is + * `IS_MISSING`, checks if the metric is missing and would ignore the + * comparisonValue. + */ + operator?: string; + } + interface MetricFilterClause { + /** + * The repeated set of filters. They are logically combined based on the + * operator specified. + */ + filters?: MetricFilter[]; + /** + * The operator for combining multiple metric filters. If unspecified, it is + * treated as an `OR`. + */ + operator?: string; + } + interface MetricHeader { + /** Headers for the metrics in the response. */ + metricHeaderEntries?: MetricHeaderEntry[]; + /** Headers for the pivots in the response. */ + pivotHeaders?: PivotHeader[]; + } + interface MetricHeaderEntry { + /** The name of the header. */ + name?: string; + /** The type of the metric, for example `INTEGER`. */ + type?: string; + } + interface OrFiltersForSegment { + /** List of segment filters to be combined with a `OR` operator. */ + segmentFilterClauses?: SegmentFilterClause[]; + } + interface OrderBy { + /** + * The field which to sort by. The default sort order is ascending. Example: + * `ga:browser`. + * Note, that you can only specify one field for sort here. For example, + * `ga:browser, ga:city` is not valid. + */ + fieldName?: string; + /** The order type. The default orderType is `VALUE`. */ + orderType?: string; + /** The sorting order for the field. */ + sortOrder?: string; + } + interface Pivot { + /** + * DimensionFilterClauses are logically combined with an `AND` operator: only + * data that is included by all these DimensionFilterClauses contributes to + * the values in this pivot region. Dimension filters can be used to restrict + * the columns shown in the pivot region. For example if you have + * `ga:browser` as the requested dimension in the pivot region, and you + * specify key filters to restrict `ga:browser` to only "IE" or "Firefox", + * then only those two browsers would show up as columns. + */ + dimensionFilterClauses?: DimensionFilterClause[]; + /** + * A list of dimensions to show as pivot columns. A Pivot can have a maximum + * of 4 dimensions. Pivot dimensions are part of the restriction on the + * total number of dimensions allowed in the request. + */ + dimensions?: Dimension[]; + /** + * Specifies the maximum number of groups to return. + * The default value is 10, also the maximum value is 1,000. + */ + maxGroupCount?: number; + /** + * The pivot metrics. Pivot metrics are part of the + * restriction on total number of metrics allowed in the request. + */ + metrics?: Metric[]; + /** + * If k metrics were requested, then the response will contain some + * data-dependent multiple of k columns in the report. E.g., if you pivoted + * on the dimension `ga:browser` then you'd get k columns for "Firefox", k + * columns for "IE", k columns for "Chrome", etc. The ordering of the groups + * of columns is determined by descending order of "total" for the first of + * the k values. Ties are broken by lexicographic ordering of the first + * pivot dimension, then lexicographic ordering of the second pivot + * dimension, and so on. E.g., if the totals for the first value for + * Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns + * would be Chrome, Firefox, IE. + * + * The following let you choose which of the groups of k columns are + * included in the response. + */ + startGroup?: number; + } + interface PivotHeader { + /** A single pivot section header. */ + pivotHeaderEntries?: PivotHeaderEntry[]; + /** The total number of groups for this pivot. */ + totalPivotGroupsCount?: number; + } + interface PivotHeaderEntry { + /** The name of the dimensions in the pivot response. */ + dimensionNames?: string[]; + /** The values for the dimensions in the pivot. */ + dimensionValues?: string[]; + /** The metric header for the metric in the pivot. */ + metric?: MetricHeaderEntry; + } + interface PivotValueRegion { + /** The values of the metrics in each of the pivot regions. */ + values?: string[]; + } + interface Report { + /** The column headers. */ + columnHeader?: ColumnHeader; + /** Response data. */ + data?: ReportData; + /** Page token to retrieve the next page of results in the list. */ + nextPageToken?: string; + } + interface ReportData { + /** + * The last time the data in the report was refreshed. All the hits received + * before this timestamp are included in the calculation of the report. + */ + dataLastRefreshed?: string; + /** + * Indicates if response to this request is golden or not. Data is + * golden when the exact same request will not produce any new results if + * asked at a later point in time. + */ + isDataGolden?: boolean; + /** + * Minimum and maximum values seen over all matching rows. These are both + * empty when `hideValueRanges` in the request is false, or when + * rowCount is zero. + */ + maximums?: DateRangeValues[]; + /** + * Minimum and maximum values seen over all matching rows. These are both + * empty when `hideValueRanges` in the request is false, or when + * rowCount is zero. + */ + minimums?: DateRangeValues[]; + /** Total number of matching rows for this query. */ + rowCount?: number; + /** There's one ReportRow for every unique combination of dimensions. */ + rows?: ReportRow[]; + /** + * If the results are + * [sampled](https://support.google.com/analytics/answer/2637192), + * this returns the total number of samples read, one entry per date range. + * If the results are not sampled this field will not be defined. See + * [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + * for details. + */ + samplesReadCounts?: string[]; + /** + * If the results are + * [sampled](https://support.google.com/analytics/answer/2637192), + * this returns the total number of + * samples present, one entry per date range. If the results are not sampled + * this field will not be defined. See + * [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + * for details. + */ + samplingSpaceSizes?: string[]; + /** + * For each requested date range, for the set of all rows that match + * the query, every requested value format gets a total. The total + * for a value format is computed by first totaling the metrics + * mentioned in the value format and then evaluating the value + * format as a scalar expression. E.g., The "totals" for + * `3 / (ga:sessions + 2)` we compute + * `3 / ((sum of all relevant ga:sessions) + 2)`. + * Totals are computed before pagination. + */ + totals?: DateRangeValues[]; + } + interface ReportRequest { + /** + * Cohort group associated with this request. If there is a cohort group + * in the request the `ga:cohort` dimension must be present. + * Every [ReportRequest](#ReportRequest) within a `batchGet` method must + * contain the same `cohortGroup` definition. + */ + cohortGroup?: CohortGroup; + /** + * Date ranges in the request. The request can have a maximum of 2 date + * ranges. The response will contain a set of metric values for each + * combination of the dimensions for each date range in the request. So, if + * there are two date ranges, there will be two set of metric values, one for + * the original date range and one for the second date range. + * The `reportRequest.dateRanges` field should not be specified for cohorts + * or Lifetime value requests. + * If a date range is not provided, the default date range is (startDate: + * current date - 7 days, endDate: current date - 1 day). Every + * [ReportRequest](#ReportRequest) within a `batchGet` method must + * contain the same `dateRanges` definition. + */ + dateRanges?: DateRange[]; + /** + * The dimension filter clauses for filtering Dimension Values. They are + * logically combined with the `AND` operator. Note that filtering occurs + * before any dimensions are aggregated, so that the returned metrics + * represent the total for only the relevant dimensions. + */ + dimensionFilterClauses?: DimensionFilterClause[]; + /** + * The dimensions requested. + * Requests can have a total of 7 dimensions. + */ + dimensions?: Dimension[]; + /** + * Dimension or metric filters that restrict the data returned for your + * request. To use the `filtersExpression`, supply a dimension or metric on + * which to filter, followed by the filter expression. For example, the + * following expression selects `ga:browser` dimension which starts with + * Firefox; `ga:browser=~^Firefox`. For more information on dimensions + * and metric filters, see + * [Filters reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters). + */ + filtersExpression?: string; + /** + * If set to true, hides the total of all metrics for all the matching rows, + * for every date range. The default false and will return the totals. + */ + hideTotals?: boolean; + /** + * If set to true, hides the minimum and maximum across all matching rows. + * The default is false and the value ranges are returned. + */ + hideValueRanges?: boolean; + /** + * If set to false, the response does not include rows if all the retrieved + * metrics are equal to zero. The default is false which will exclude these + * rows. + */ + includeEmptyRows?: boolean; + /** + * The metric filter clauses. They are logically combined with the `AND` + * operator. Metric filters look at only the first date range and not the + * comparing date range. Note that filtering on metrics occurs after the + * metrics are aggregated. + */ + metricFilterClauses?: MetricFilterClause[]; + /** + * The metrics requested. + * Requests must specify at least one metric. Requests can have a + * total of 10 metrics. + */ + metrics?: Metric[]; + /** + * Sort order on output rows. To compare two rows, the elements of the + * following are applied in order until a difference is found. All date + * ranges in the output get the same row order. + */ + orderBys?: OrderBy[]; + /** + * Page size is for paging and specifies the maximum number of returned rows. + * Page size should be >= 0. A query returns the default of 1,000 rows. + * The Analytics Core Reporting API returns a maximum of 10,000 rows per + * request, no matter how many you ask for. It can also return fewer rows + * than requested, if there aren't as many dimension segments as you expect. + * For instance, there are fewer than 300 possible values for `ga:country`, + * so when segmenting only by country, you can't get more than 300 rows, + * even if you set `pageSize` to a higher value. + */ + 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 GetReports request. + */ + pageToken?: string; + /** The pivot definitions. Requests can have a maximum of 2 pivots. */ + pivots?: Pivot[]; + /** + * The desired report + * [sample](https://support.google.com/analytics/answer/2637192) size. + * If the the `samplingLevel` field is unspecified the `DEFAULT` sampling + * level is used. Every [ReportRequest](#ReportRequest) within a + * `batchGet` method must contain the same `samplingLevel` definition. See + * [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + * for details. + */ + samplingLevel?: string; + /** + * Segment the data returned for the request. A segment definition helps look + * at a subset of the segment request. A request can contain up to four + * segments. Every [ReportRequest](#ReportRequest) within a + * `batchGet` method must contain the same `segments` definition. Requests + * with segments must have the `ga:segment` dimension. + */ + segments?: Segment[]; + /** + * The Analytics + * [view ID](https://support.google.com/analytics/answer/1009618) + * from which to retrieve data. Every [ReportRequest](#ReportRequest) + * within a `batchGet` method must contain the same `viewId`. + */ + viewId?: string; + } + interface ReportRow { + /** List of requested dimensions. */ + dimensions?: string[]; + /** List of metrics for each requested DateRange. */ + metrics?: DateRangeValues[]; + } + interface Segment { + /** A dynamic segment definition in the request. */ + dynamicSegment?: DynamicSegment; + /** The segment ID of a built-in or custom segment, for example `gaid::-3`. */ + segmentId?: string; + } + interface SegmentDefinition { + /** + * A segment is defined by a set of segment filters which are combined + * together with a logical `AND` operation. + */ + segmentFilters?: SegmentFilter[]; + } + interface SegmentDimensionFilter { + /** Should the match be case sensitive, ignored for `IN_LIST` operator. */ + caseSensitive?: boolean; + /** Name of the dimension for which the filter is being applied. */ + dimensionName?: string; + /** The list of expressions, only the first element is used for all operators */ + expressions?: string[]; + /** Maximum comparison values for `BETWEEN` match type. */ + maxComparisonValue?: string; + /** Minimum comparison values for `BETWEEN` match type. */ + minComparisonValue?: string; + /** The operator to use to match the dimension with the expressions. */ + operator?: string; + } + interface SegmentFilter { + /** + * If true, match the complement of simple or sequence segment. + * For example, to match all visits not from "New York", we can define the + * segment as follows: + * + * "sessionSegment": { + * "segmentFilters": [{ + * "simpleSegment" :{ + * "orFiltersForSegment": [{ + * "segmentFilterClauses":[{ + * "dimensionFilter": { + * "dimensionName": "ga:city", + * "expressions": ["New York"] + * } + * }] + * }] + * }, + * "not": "True" + * }] + * }, + */ + not?: boolean; + /** + * Sequence conditions consist of one or more steps, where each step is + * defined by one or more dimension/metric conditions. Multiple steps can + * be combined with special sequence operators. + */ + sequenceSegment?: SequenceSegment; + /** + * A Simple segment conditions consist of one or more dimension/metric + * conditions that can be combined + */ + simpleSegment?: SimpleSegment; + } + interface SegmentFilterClause { + /** Dimension Filter for the segment definition. */ + dimensionFilter?: SegmentDimensionFilter; + /** Metric Filter for the segment definition. */ + metricFilter?: SegmentMetricFilter; + /** Matches the complement (`!`) of the filter. */ + not?: boolean; + } + interface SegmentMetricFilter { + /** + * The value to compare against. If the operator is `BETWEEN`, this value is + * treated as minimum comparison value. + */ + comparisonValue?: string; + /** Max comparison value is only used for `BETWEEN` operator. */ + maxComparisonValue?: string; + /** + * The metric that will be filtered on. A `metricFilter` must contain a + * metric name. + */ + metricName?: string; + /** + * Specifies is the operation to perform to compare the metric. The default + * is `EQUAL`. + */ + operator?: string; + /** + * Scope for a metric defines the level at which that metric is defined. The + * specified metric scope must be equal to or greater than its primary scope + * as defined in the data model. The primary scope is defined by if the + * segment is selecting users or sessions. + */ + scope?: string; + } + interface SegmentSequenceStep { + /** + * Specifies if the step immediately precedes or can be any time before the + * next step. + */ + matchType?: string; + /** + * A sequence is specified with a list of Or grouped filters which are + * combined with `AND` operator. + */ + orFiltersForSegment?: OrFiltersForSegment[]; + } + interface SequenceSegment { + /** + * If set, first step condition must match the first hit of the visitor (in + * the date range). + */ + firstStepShouldMatchFirstHit?: boolean; + /** The list of steps in the sequence. */ + segmentSequenceSteps?: SegmentSequenceStep[]; + } + interface SimpleSegment { + /** + * A list of segment filters groups which are combined with logical `AND` + * operator. + */ + orFiltersForSegment?: OrFiltersForSegment[]; + } + interface ReportsResource { + /** Returns the Analytics data. */ + batchGet(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.analyticsreporting/readme.md b/types/gapi.client.analyticsreporting/readme.md new file mode 100644 index 0000000000..96b09af1b4 --- /dev/null +++ b/types/gapi.client.analyticsreporting/readme.md @@ -0,0 +1,62 @@ +# TypeScript typings for Google Analytics Reporting API v4 +Accesses Analytics report data. +For detailed description please check [documentation](https://developers.google.com/analytics/devguides/reporting/core/v4/). + +## Installing + +Install typings for Google Analytics Reporting API: +``` +npm install @types/gapi.client.analyticsreporting@v4 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('analyticsreporting', 'v4', () => { + // now we can use gapi.client.analyticsreporting + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your Google Analytics data + 'https://www.googleapis.com/auth/analytics', + + // View your Google Analytics data + 'https://www.googleapis.com/auth/analytics.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Analytics Reporting API resources: + +```typescript + +/* +Returns the Analytics data. +*/ +await gapi.client.reports.batchGet({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.analyticsreporting/tsconfig.json b/types/gapi.client.analyticsreporting/tsconfig.json new file mode 100644 index 0000000000..2f65484898 --- /dev/null +++ b/types/gapi.client.analyticsreporting/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.analyticsreporting-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.analyticsreporting/tslint.json b/types/gapi.client.analyticsreporting/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.analyticsreporting/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.androiddeviceprovisioning/gapi.client.androiddeviceprovisioning-tests.ts b/types/gapi.client.androiddeviceprovisioning/gapi.client.androiddeviceprovisioning-tests.ts new file mode 100644 index 0000000000..b2c1cac362 --- /dev/null +++ b/types/gapi.client.androiddeviceprovisioning/gapi.client.androiddeviceprovisioning-tests.ts @@ -0,0 +1,24 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('androiddeviceprovisioning', 'v1', () => { + /** now we can use gapi.client.androiddeviceprovisioning */ + + run(); + }); + + async function run() { + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + await gapi.client.operations.get({ + name: "name", + }); + } +}); diff --git a/types/gapi.client.androiddeviceprovisioning/index.d.ts b/types/gapi.client.androiddeviceprovisioning/index.d.ts new file mode 100644 index 0000000000..0b896d6fbb --- /dev/null +++ b/types/gapi.client.androiddeviceprovisioning/index.d.ts @@ -0,0 +1,683 @@ +// Type definitions for Google Android Device Provisioning Partner API v1 1.0 +// Project: https://developers.google.com/zero-touch/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://androiddeviceprovisioning.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Android Device Provisioning Partner API v1 */ + function load(name: "androiddeviceprovisioning", version: "v1"): PromiseLike; + function load(name: "androiddeviceprovisioning", version: "v1", callback: () => any): void; + + const operations: androiddeviceprovisioning.OperationsResource; + + const partners: androiddeviceprovisioning.PartnersResource; + + namespace androiddeviceprovisioning { + interface ClaimDeviceRequest { + /** The customer to claim for. */ + customerId?: string; + /** The device identifier of the device to claim. */ + deviceIdentifier?: DeviceIdentifier; + /** The section to claim. */ + sectionType?: string; + } + interface ClaimDeviceResponse { + /** The device ID of the claimed device. */ + deviceId?: string; + /** + * The resource name of the device in the format + * `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. + */ + deviceName?: string; + } + interface ClaimDevicesRequest { + /** List of claims. */ + claims?: PartnerClaim[]; + } + interface Company { + /** + * Input only. Optional. Email address of customer's users in the admin role. + * Each email address must be associated with a Google Account. + */ + adminEmails?: string[]; + /** Output only. The ID of the company. Assigned by the server. */ + companyId?: string; + /** + * Required. The name of the company. For example _XYZ Corp_. Characters + * allowed are: Latin letters, numerals, hyphens, and spaces. Displayed to the + * customer's employees in the zero-touch enrollment portal. + */ + companyName?: string; + /** + * Output only. The API resource name of the company in the format + * `partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`. Assigned by the server. + */ + name?: string; + /** + * Input only. Email address of customer's users in the owner role. At least + * one `owner_email` is required. Each email address must be associated with a + * Google Account. Owners share the same access as admins but can also add, + * delete, and edit your organization's portal users. + */ + ownerEmails?: string[]; + } + interface CreateCustomerRequest { + /** + * Required. The company data to populate the new customer. Must contain a + * value for `companyName` and at least one `owner_email` that's associated + * with a Google Account. The values for `companyId` and `name` must be empty. + */ + customer?: Company; + } + interface Device { + /** Claims. */ + claims?: DeviceClaim[]; + /** + * The resource name of the configuration. + * Only set for customers. + */ + configuration?: string; + /** Device ID. */ + deviceId?: string; + /** Device identifier. */ + deviceIdentifier?: DeviceIdentifier; + /** Device metadata. */ + deviceMetadata?: DeviceMetadata; + /** Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. */ + name?: string; + } + interface DeviceClaim { + /** Owner ID. */ + ownerCompanyId?: string; + /** Section type of the device claim. */ + sectionType?: string; + } + interface DeviceIdentifier { + /** IMEI number. */ + imei?: string; + /** + * Manufacturer name to match `android.os.Build.MANUFACTURER` (required). + * Allowed values listed in + * [manufacturer names](/zero-touch/resources/manufacturer-names). + */ + manufacturer?: string; + /** MEID number. */ + meid?: string; + /** Serial number (optional). */ + serialNumber?: string; + } + interface DeviceMetadata { + /** Metadata entries */ + entries?: Record; + } + interface DevicesLongRunningOperationMetadata { + /** Number of devices parsed in your requests. */ + devicesCount?: number; + /** The overall processing status. */ + processingStatus?: string; + /** Processing progress from 0 to 100. */ + progress?: number; + } + interface DevicesLongRunningOperationResponse { + /** + * Processing status for each device. + * One `PerDeviceStatus` per device. The order is the same as in your requests. + */ + perDeviceStatus?: OperationPerDevice[]; + /** Number of succeesfully processed ones. */ + successCount?: number; + } + interface FindDevicesByDeviceIdentifierRequest { + /** The device identifier to search. */ + deviceIdentifier?: DeviceIdentifier; + /** Number of devices to show. */ + limit?: string; + /** Page token. */ + pageToken?: string; + } + interface FindDevicesByDeviceIdentifierResponse { + /** Found devices. */ + devices?: Device[]; + /** Page token of the next page. */ + nextPageToken?: string; + } + interface FindDevicesByOwnerRequest { + /** List of customer IDs to search for. */ + customerId?: string[]; + /** The number of devices to show in the result. */ + limit?: string; + /** Page token. */ + pageToken?: string; + /** The section type. */ + sectionType?: string; + } + interface FindDevicesByOwnerResponse { + /** Devices found. */ + devices?: Device[]; + /** Page token of the next page. */ + nextPageToken?: string; + } + interface ListCustomersResponse { + /** List of customers related to this partner. */ + customers?: Company[]; + } + interface Operation { + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * This field will always be not set if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, error + * information for each device is set in `response.perDeviceStatus.result.status`. + */ + error?: Status; + /** + * This field will contain a `DevicesLongRunningOperationMetadata` object if the operation is created by `claimAsync`, `unclaimAsync`, or + * `updateMetadataAsync`. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * This field will contain a `DevicesLongRunningOperationResponse` object if the operation is created by `claimAsync`, `unclaimAsync`, or + * `updateMetadataAsync`. + */ + response?: Record; + } + interface OperationPerDevice { + /** Request to claim a device. */ + claim?: PartnerClaim; + /** Processing result for every device. */ + result?: PerDeviceStatusInBatch; + /** Request to unclaim a device. */ + unclaim?: PartnerUnclaim; + /** Request to set metadata for a device. */ + updateMetadata?: UpdateMetadataArguments; + } + interface PartnerClaim { + /** Customer ID to claim for. */ + customerId?: string; + /** Device identifier of the device. */ + deviceIdentifier?: DeviceIdentifier; + /** Metadata to set at claim. */ + deviceMetadata?: DeviceMetadata; + /** Section type to claim. */ + sectionType?: string; + } + interface PartnerUnclaim { + /** Device ID of the device. */ + deviceId?: string; + /** Device identifier of the device. */ + deviceIdentifier?: DeviceIdentifier; + /** Section type to unclaim. */ + sectionType?: string; + } + interface PerDeviceStatusInBatch { + /** Device ID of the device if process succeeds. */ + deviceId?: string; + /** Error identifier. */ + errorIdentifier?: string; + /** Error message. */ + errorMessage?: string; + /** Process result. */ + status?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface UnclaimDeviceRequest { + /** The device ID returned by `ClaimDevice`. */ + deviceId?: string; + /** The device identifier you used when you claimed this device. */ + deviceIdentifier?: DeviceIdentifier; + /** The section type to unclaim for. */ + sectionType?: string; + } + interface UnclaimDevicesRequest { + /** List of devices to unclaim. */ + unclaims?: PartnerUnclaim[]; + } + interface UpdateDeviceMetadataInBatchRequest { + /** List of metadata updates. */ + updates?: UpdateMetadataArguments[]; + } + interface UpdateDeviceMetadataRequest { + /** The metdata to set. */ + deviceMetadata?: DeviceMetadata; + } + interface UpdateMetadataArguments { + /** Device ID of the device. */ + deviceId?: string; + /** Device identifier. */ + deviceIdentifier?: DeviceIdentifier; + /** The metadata to update. */ + deviceMetadata?: DeviceMetadata; + } + interface OperationsResource { + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface CustomersResource { + /** + * Creates a customer for zero-touch enrollment. After the method returns + * successfully, admin and owner roles can manage devices and EMM configs + * by calling API methods or using their zero-touch enrollment portal. The API + * doesn't notify the customer that they have access. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Required. The parent resource ID in format `partners/[PARTNER_ID]` that + * identifies the reseller. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists the customers that are enrolled to the reseller identified by the + * `partnerId` argument. This list includes customers that the reseller + * created and customers that enrolled themselves using the portal. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the partner. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DevicesResource { + /** Claim the device identified by device identifier. */ + claim(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** ID of the partner. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Claim devices asynchronously. */ + claimAsync(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Partner ID. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Find devices by device identifier. */ + findByIdentifier(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** ID of the partner. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Find devices by ownership. */ + findByOwner(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** ID of the partner. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Get a device. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Update the metadata. */ + metadata(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** ID of the partner. */ + deviceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The owner of the newly set metadata. Set this to the partner ID. */ + metadataOwnerId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Unclaim the device identified by the `device_id` or the `deviceIdentifier`. */ + unclaim(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** ID of the partner. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Unclaim devices asynchronously. */ + unclaimAsync(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Partner ID. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Set metadata in batch asynchronously. */ + updateMetadataAsync(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Partner ID. */ + partnerId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface PartnersResource { + customers: CustomersResource; + devices: DevicesResource; + } + } +} diff --git a/types/gapi.client.androiddeviceprovisioning/readme.md b/types/gapi.client.androiddeviceprovisioning/readme.md new file mode 100644 index 0000000000..bdeb55a582 --- /dev/null +++ b/types/gapi.client.androiddeviceprovisioning/readme.md @@ -0,0 +1,42 @@ +# TypeScript typings for Android Device Provisioning Partner API v1 +Automates reseller integration into zero-touch enrollment by assigning devices to customers and creating device reports. +For detailed description please check [documentation](https://developers.google.com/zero-touch/). + +## Installing + +Install typings for Android Device Provisioning Partner API: +``` +npm install @types/gapi.client.androiddeviceprovisioning@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('androiddeviceprovisioning', 'v1', () => { + // now we can use gapi.client.androiddeviceprovisioning + // ... +}); +``` + + + +After that you can use Android Device Provisioning Partner API resources: + +```typescript + +/* +Gets the latest state of a long-running operation. Clients can use this +method to poll the operation result at intervals as recommended by the API +service. +*/ +await gapi.client.operations.get({ name: "name", }); +``` \ No newline at end of file diff --git a/types/gapi.client.androiddeviceprovisioning/tsconfig.json b/types/gapi.client.androiddeviceprovisioning/tsconfig.json new file mode 100644 index 0000000000..953923be00 --- /dev/null +++ b/types/gapi.client.androiddeviceprovisioning/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.androiddeviceprovisioning-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.androiddeviceprovisioning/tslint.json b/types/gapi.client.androiddeviceprovisioning/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.androiddeviceprovisioning/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.androidenterprise/gapi.client.androidenterprise-tests.ts b/types/gapi.client.androidenterprise/gapi.client.androidenterprise-tests.ts new file mode 100644 index 0000000000..63c1f9101d --- /dev/null +++ b/types/gapi.client.androidenterprise/gapi.client.androidenterprise-tests.ts @@ -0,0 +1,559 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('androidenterprise', 'v1', () => { + /** now we can use gapi.client.androidenterprise */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage corporate Android devices */ + 'https://www.googleapis.com/auth/androidenterprise', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Retrieves the details of a device. */ + await gapi.client.devices.get({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android + * devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is + * only supported for Google-managed users. + */ + await gapi.client.devices.getState({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Retrieves the IDs of all of a user's devices. */ + await gapi.client.devices.list({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android + * devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is + * only supported for Google-managed users. + */ + await gapi.client.devices.setState({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications. */ + await gapi.client.enterprises.acknowledgeNotificationSet({ + notificationSetId: "notificationSetId", + }); + /** + * Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given + * Enterprise Token. + */ + await gapi.client.enterprises.completeSignup({ + completionToken: "completionToken", + enterpriseToken: "enterpriseToken", + }); + /** + * Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each + * token may only be used to start one UI session. See the javascript API documentation for further information. + */ + await gapi.client.enterprises.createWebToken({ + enterpriseId: "enterpriseId", + }); + /** + * Deletes the binding between the EMM and enterprise. This is now deprecated. Use this method only to unenroll customers that were previously enrolled + * with the insert call, then enroll them again with the enroll call. + */ + await gapi.client.enterprises.delete({ + enterpriseId: "enterpriseId", + }); + /** Enrolls an enterprise with the calling EMM. */ + await gapi.client.enterprises.enroll({ + token: "token", + }); + /** Generates a sign-up URL. */ + await gapi.client.enterprises.generateSignupUrl({ + callbackUrl: "callbackUrl", + }); + /** Retrieves the name and domain of an enterprise. */ + await gapi.client.enterprises.get({ + enterpriseId: "enterpriseId", + }); + /** Returns the Android Device Policy config resource. */ + await gapi.client.enterprises.getAndroidDevicePolicyConfig({ + enterpriseId: "enterpriseId", + }); + /** + * Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to + * this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side. + * + * This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it + * will return an error. + * + * Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials. + * + * Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource. + */ + await gapi.client.enterprises.getServiceAccount({ + enterpriseId: "enterpriseId", + keyType: "keyType", + }); + /** Returns the store layout for the enterprise. If the store layout has not been set, returns "basic" as the store layout type and no homepage. */ + await gapi.client.enterprises.getStoreLayout({ + enterpriseId: "enterpriseId", + }); + /** Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead. */ + await gapi.client.enterprises.insert({ + token: "token", + }); + /** + * Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not + * needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the + * Enterprises.generateSignupUrl call. + */ + await gapi.client.enterprises.list({ + domain: "domain", + }); + /** + * Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be + * empty if no notification are pending. + * A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set + * is empty. + * Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, + * and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy. + * Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each + * caller, if any are pending. + * If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available. + */ + await gapi.client.enterprises.pullNotificationSet({ + requestMode: "requestMode", + }); + /** Sends a test notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise. */ + await gapi.client.enterprises.sendTestPushNotification({ + enterpriseId: "enterpriseId", + }); + /** Sets the account that will be used to authenticate to the API as the enterprise. */ + await gapi.client.enterprises.setAccount({ + enterpriseId: "enterpriseId", + }); + /** + * Sets the Android Device Policy config resource. EMM may use this method to enable or disable Android Device Policy support for the specified + * enterprise. To learn more about managing devices and apps with Android Device Policy, see the Android Management API. + */ + await gapi.client.enterprises.setAndroidDevicePolicyConfig({ + enterpriseId: "enterpriseId", + }); + /** + * Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only + * contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on + * the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a + * homepage), the basic store layout is disabled. + */ + await gapi.client.enterprises.setStoreLayout({ + enterpriseId: "enterpriseId", + }); + /** Unenrolls an enterprise from the calling EMM. */ + await gapi.client.enterprises.unenroll({ + enterpriseId: "enterpriseId", + }); + /** Removes an entitlement to an app for a user. */ + await gapi.client.entitlements.delete({ + enterpriseId: "enterpriseId", + entitlementId: "entitlementId", + userId: "userId", + }); + /** Retrieves details of an entitlement. */ + await gapi.client.entitlements.get({ + enterpriseId: "enterpriseId", + entitlementId: "entitlementId", + userId: "userId", + }); + /** Lists all entitlements for the specified user. Only the ID is set. */ + await gapi.client.entitlements.list({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Adds or updates an entitlement to an app for a user. This method supports patch semantics. */ + await gapi.client.entitlements.patch({ + enterpriseId: "enterpriseId", + entitlementId: "entitlementId", + install: true, + userId: "userId", + }); + /** Adds or updates an entitlement to an app for a user. */ + await gapi.client.entitlements.update({ + enterpriseId: "enterpriseId", + entitlementId: "entitlementId", + install: true, + userId: "userId", + }); + /** Retrieves details of an enterprise's group license for a product. */ + await gapi.client.grouplicenses.get({ + enterpriseId: "enterpriseId", + groupLicenseId: "groupLicenseId", + }); + /** Retrieves IDs of all products for which the enterprise has a group license. */ + await gapi.client.grouplicenses.list({ + enterpriseId: "enterpriseId", + }); + /** Retrieves the IDs of the users who have been granted entitlements under the license. */ + await gapi.client.grouplicenseusers.list({ + enterpriseId: "enterpriseId", + groupLicenseId: "groupLicenseId", + }); + /** Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. */ + await gapi.client.installs.delete({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + installId: "installId", + userId: "userId", + }); + /** Retrieves details of an installation of an app on a device. */ + await gapi.client.installs.get({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + installId: "installId", + userId: "userId", + }); + /** Retrieves the details of all apps installed on the specified device. */ + await gapi.client.installs.list({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. + * This method supports patch semantics. + */ + await gapi.client.installs.patch({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + installId: "installId", + userId: "userId", + }); + /** Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. */ + await gapi.client.installs.update({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + installId: "installId", + userId: "userId", + }); + /** Removes a per-device managed configuration for an app for the specified device. */ + await gapi.client.managedconfigurationsfordevice.delete({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + managedConfigurationForDeviceId: "managedConfigurationForDeviceId", + userId: "userId", + }); + /** Retrieves details of a per-device managed configuration. */ + await gapi.client.managedconfigurationsfordevice.get({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + managedConfigurationForDeviceId: "managedConfigurationForDeviceId", + userId: "userId", + }); + /** Lists all the per-device managed configurations for the specified device. Only the ID is set. */ + await gapi.client.managedconfigurationsfordevice.list({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Adds or updates a per-device managed configuration for an app for the specified device. This method supports patch semantics. */ + await gapi.client.managedconfigurationsfordevice.patch({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + managedConfigurationForDeviceId: "managedConfigurationForDeviceId", + userId: "userId", + }); + /** Adds or updates a per-device managed configuration for an app for the specified device. */ + await gapi.client.managedconfigurationsfordevice.update({ + deviceId: "deviceId", + enterpriseId: "enterpriseId", + managedConfigurationForDeviceId: "managedConfigurationForDeviceId", + userId: "userId", + }); + /** Removes a per-user managed configuration for an app for the specified user. */ + await gapi.client.managedconfigurationsforuser.delete({ + enterpriseId: "enterpriseId", + managedConfigurationForUserId: "managedConfigurationForUserId", + userId: "userId", + }); + /** Retrieves details of a per-user managed configuration for an app for the specified user. */ + await gapi.client.managedconfigurationsforuser.get({ + enterpriseId: "enterpriseId", + managedConfigurationForUserId: "managedConfigurationForUserId", + userId: "userId", + }); + /** Lists all the per-user managed configurations for the specified user. Only the ID is set. */ + await gapi.client.managedconfigurationsforuser.list({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Adds or updates a per-user managed configuration for an app for the specified user. This method supports patch semantics. */ + await gapi.client.managedconfigurationsforuser.patch({ + enterpriseId: "enterpriseId", + managedConfigurationForUserId: "managedConfigurationForUserId", + userId: "userId", + }); + /** Adds or updates a per-user managed configuration for an app for the specified user. */ + await gapi.client.managedconfigurationsforuser.update({ + enterpriseId: "enterpriseId", + managedConfigurationForUserId: "managedConfigurationForUserId", + userId: "userId", + }); + /** Retrieves details of an Android app permission for display to an enterprise admin. */ + await gapi.client.permissions.get({ + language: "language", + permissionId: "permissionId", + }); + /** + * Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is + * 1,000. + * + * To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design. + */ + await gapi.client.products.approve({ + enterpriseId: "enterpriseId", + productId: "productId", + }); + /** + * Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and + * accept them on behalf of their organization in order to approve that product. + * + * Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of + * this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display + * permissions for up to 1 day. + */ + await gapi.client.products.generateApprovalUrl({ + enterpriseId: "enterpriseId", + languageCode: "languageCode", + productId: "productId", + }); + /** Retrieves details of a product for display to an enterprise admin. */ + await gapi.client.products.get({ + enterpriseId: "enterpriseId", + language: "language", + productId: "productId", + }); + /** + * Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed + * configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed + * configuration based on the schema obtained using this API, see Managed Configurations through Play. + */ + await gapi.client.products.getAppRestrictionsSchema({ + enterpriseId: "enterpriseId", + language: "language", + productId: "productId", + }); + /** Retrieves the Android app permissions required by this app. */ + await gapi.client.products.getPermissions({ + enterpriseId: "enterpriseId", + productId: "productId", + }); + /** Finds approved products that match a query, or all approved products if there is no query. */ + await gapi.client.products.list({ + approved: true, + enterpriseId: "enterpriseId", + language: "language", + maxResults: 4, + query: "query", + token: "token", + }); + /** Unapproves the specified product (and the relevant app permissions, if any) */ + await gapi.client.products.unapprove({ + enterpriseId: "enterpriseId", + productId: "productId", + }); + /** + * Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been + * retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. + */ + await gapi.client.serviceaccountkeys.delete({ + enterpriseId: "enterpriseId", + keyId: "keyId", + }); + /** + * Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling + * Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. + * + * Only the type of the key should be populated in the resource to be inserted. + */ + await gapi.client.serviceaccountkeys.insert({ + enterpriseId: "enterpriseId", + }); + /** + * Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service + * account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling + * Enterprises.SetAccount. + */ + await gapi.client.serviceaccountkeys.list({ + enterpriseId: "enterpriseId", + }); + /** Deletes a cluster. */ + await gapi.client.storelayoutclusters.delete({ + clusterId: "clusterId", + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Retrieves details of a cluster. */ + await gapi.client.storelayoutclusters.get({ + clusterId: "clusterId", + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Inserts a new cluster in a page. */ + await gapi.client.storelayoutclusters.insert({ + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Retrieves the details of all clusters on the specified page. */ + await gapi.client.storelayoutclusters.list({ + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Updates a cluster. This method supports patch semantics. */ + await gapi.client.storelayoutclusters.patch({ + clusterId: "clusterId", + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Updates a cluster. */ + await gapi.client.storelayoutclusters.update({ + clusterId: "clusterId", + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Deletes a store page. */ + await gapi.client.storelayoutpages.delete({ + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Retrieves details of a store page. */ + await gapi.client.storelayoutpages.get({ + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Inserts a new store page. */ + await gapi.client.storelayoutpages.insert({ + enterpriseId: "enterpriseId", + }); + /** Retrieves the details of all pages in the store. */ + await gapi.client.storelayoutpages.list({ + enterpriseId: "enterpriseId", + }); + /** Updates the content of a store page. This method supports patch semantics. */ + await gapi.client.storelayoutpages.patch({ + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Updates the content of a store page. */ + await gapi.client.storelayoutpages.update({ + enterpriseId: "enterpriseId", + pageId: "pageId", + }); + /** Deleted an EMM-managed user. */ + await gapi.client.users.delete({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated + * token is single-use and expires after a few minutes. + * + * This call only works with EMM-managed accounts. + */ + await gapi.client.users.generateAuthenticationToken({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated + * token. + * + * This call only works with Google managed accounts. + */ + await gapi.client.users.generateToken({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Retrieves a user's details. */ + await gapi.client.users.get({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Retrieves the set of products a user is entitled to access. */ + await gapi.client.users.getAvailableProductSet({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Creates a new EMM-managed user. + * + * The Users resource passed in the body of the request should include an accountIdentifier and an accountType. + * If a corresponding user already exists with the same account identifier, the user will be updated with the resource. In this case only the displayName + * field can be changed. + */ + await gapi.client.users.insert({ + enterpriseId: "enterpriseId", + }); + /** + * Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because + * the id is already returned in the result of the Users.insert call. + */ + await gapi.client.users.list({ + email: "email", + enterpriseId: "enterpriseId", + }); + /** + * Updates the details of an EMM-managed user. + * + * Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the + * displayName field can be changed. Other fields must either be unset or have the currently active value. This method supports patch semantics. + */ + await gapi.client.users.patch({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** Revokes a previously generated token (activation code) for the user. */ + await gapi.client.users.revokeToken({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that + * were previously approved (products with revoked approval) can be whitelisted. + */ + await gapi.client.users.setAvailableProductSet({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + /** + * Updates the details of an EMM-managed user. + * + * Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the + * displayName field can be changed. Other fields must either be unset or have the currently active value. + */ + await gapi.client.users.update({ + enterpriseId: "enterpriseId", + userId: "userId", + }); + } +}); diff --git a/types/gapi.client.androidenterprise/index.d.ts b/types/gapi.client.androidenterprise/index.d.ts new file mode 100644 index 0000000000..1e81143609 --- /dev/null +++ b/types/gapi.client.androidenterprise/index.d.ts @@ -0,0 +1,2830 @@ +// Type definitions for Google Google Play EMM API v1 1.0 +// Project: https://developers.google.com/android/work/play/emm-api +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/androidenterprise/v1/rest + +/// + +declare namespace gapi.client { + /** Load Google Play EMM API v1 */ + function load(name: "androidenterprise", version: "v1"): PromiseLike; + function load(name: "androidenterprise", version: "v1", callback: () => any): void; + + const devices: androidenterprise.DevicesResource; + + const enterprises: androidenterprise.EnterprisesResource; + + const entitlements: androidenterprise.EntitlementsResource; + + const grouplicenses: androidenterprise.GrouplicensesResource; + + const grouplicenseusers: androidenterprise.GrouplicenseusersResource; + + const installs: androidenterprise.InstallsResource; + + const managedconfigurationsfordevice: androidenterprise.ManagedconfigurationsfordeviceResource; + + const managedconfigurationsforuser: androidenterprise.ManagedconfigurationsforuserResource; + + const permissions: androidenterprise.PermissionsResource; + + const products: androidenterprise.ProductsResource; + + const serviceaccountkeys: androidenterprise.ServiceaccountkeysResource; + + const storelayoutclusters: androidenterprise.StorelayoutclustersResource; + + const storelayoutpages: androidenterprise.StorelayoutpagesResource; + + const users: androidenterprise.UsersResource; + + namespace androidenterprise { + interface Administrator { + /** The admin's email address. */ + email?: string; + } + interface AdministratorWebToken { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#administratorWebToken". */ + kind?: string; + /** An opaque token to be passed to the Play front-end to generate an iframe. */ + token?: string; + } + interface AdministratorWebTokenSpec { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#administratorWebTokenSpec". */ + kind?: string; + /** The URI of the parent frame hosting the iframe. To prevent XSS, the iframe may not be hosted at other URIs. This URI must be https. */ + parent?: string; + /** + * The list of permissions the admin is granted within the iframe. The admin will only be allowed to view an iframe if they have all of the permissions + * associated with it. The only valid value is "approveApps" that will allow the admin to access the iframe in "approve" mode. + */ + permission?: string[]; + } + interface AndroidDevicePolicyConfig { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#androidDevicePolicyConfig". */ + kind?: string; + /** + * The state of Android Device Policy. "enabled" indicates that Android Device Policy is enabled for the enterprise and the EMM is allowed to manage + * devices with Android Device Policy, while "disabled" means that it cannot. + */ + state?: string; + } + interface AppRestrictionsSchema { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#appRestrictionsSchema". */ + kind?: string; + /** The set of restrictions that make up this schema. */ + restrictions?: AppRestrictionsSchemaRestriction[]; + } + interface AppRestrictionsSchemaChangeEvent { + /** The id of the product (e.g. "app:com.google.android.gm") for which the app restriction schema changed. This field will always be present. */ + productId?: string; + } + interface AppRestrictionsSchemaRestriction { + /** The default value of the restriction. bundle and bundleArray restrictions never have a default value. */ + defaultValue?: AppRestrictionsSchemaRestrictionRestrictionValue; + /** A longer description of the restriction, giving more detail of what it affects. */ + description?: string; + /** For choice or multiselect restrictions, the list of possible entries' human-readable names. */ + entry?: string[]; + /** + * For choice or multiselect restrictions, the list of possible entries' machine-readable values. These values should be used in the configuration, either + * as a single string value for a choice restriction or in a stringArray for a multiselect restriction. + */ + entryValue?: string[]; + /** The unique key that the product uses to identify the restriction, e.g. "com.google.android.gm.fieldname". */ + key?: string; + /** + * For bundle or bundleArray restrictions, the list of nested restrictions. A bundle restriction is always nested within a bundleArray restriction, and a + * bundleArray restriction is at most two levels deep. + */ + nestedRestriction?: AppRestrictionsSchemaRestriction[]; + /** The type of the restriction. */ + restrictionType?: string; + /** The name of the restriction. */ + title?: string; + } + interface AppRestrictionsSchemaRestrictionRestrictionValue { + /** The type of the value being provided. */ + type?: string; + /** The boolean value - this will only be present if type is bool. */ + valueBool?: boolean; + /** The integer value - this will only be present if type is integer. */ + valueInteger?: number; + /** The list of string values - this will only be present if type is multiselect. */ + valueMultiselect?: string[]; + /** The string value - this will be present for types string, choice and hidden. */ + valueString?: string; + } + interface AppUpdateEvent { + /** The id of the product (e.g. "app:com.google.android.gm") that was updated. This field will always be present. */ + productId?: string; + } + interface AppVersion { + /** The track that this app was published in. For example if track is "alpha", this is an alpha version of the app. */ + track?: string; + /** Unique increasing identifier for the app version. */ + versionCode?: number; + /** + * The string used in the Play store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the + * string could be "1.4"). + */ + versionString?: string; + } + interface ApprovalUrlInfo { + /** A URL that displays a product's permissions and that can also be used to approve the product with the Products.approve call. */ + approvalUrl?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#approvalUrlInfo". */ + kind?: string; + } + interface AuthenticationToken { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#authenticationToken". */ + kind?: string; + /** + * The authentication token to be passed to the device policy client on the device where it can be used to provision the account for which this token was + * generated. + */ + token?: string; + } + interface Device { + /** The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0". */ + androidId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". */ + kind?: string; + /** + * Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations. + * + * Possible values include: + * - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner. + * - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is + * unavailable to the DPC. + * - "containerApp", no longer used (deprecated). + * - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google + * Play, but the profile is itself not owned by a DPC. + */ + managementType?: string; + } + interface DeviceState { + /** + * The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services + * (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state. + */ + accountState?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState". */ + kind?: string; + } + interface DevicesListResponse { + /** A managed device. */ + device?: Device[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#devicesListResponse". */ + kind?: string; + } + interface Enterprise { + /** Admins of the enterprise. This is only supported for enterprises created via the EMM-initiated flow. */ + administrator?: Administrator[]; + /** The unique ID for the enterprise. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise". */ + kind?: string; + /** The name of the enterprise, for example, "Example, Inc". */ + name?: string; + /** The enterprise's primary domain, such as "example.com". */ + primaryDomain?: string; + } + interface EnterpriseAccount { + /** The email address of the service account. */ + accountEmail?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterpriseAccount". */ + kind?: string; + } + interface EnterprisesListResponse { + /** An enterprise. */ + enterprise?: Enterprise[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprisesListResponse". */ + kind?: string; + } + interface EnterprisesSendTestPushNotificationResponse { + /** The message ID of the test push notification that was sent. */ + messageId?: string; + /** The name of the Cloud Pub/Sub topic to which notifications for this enterprise's enrolled account will be sent. */ + topicName?: string; + } + interface Entitlement { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement". */ + kind?: string; + /** The ID of the product that the entitlement is for. For example, "app:com.google.android.gm". */ + productId?: string; + /** + * The reason for the entitlement. For example, "free" for free apps. This property is temporary: it will be replaced by the acquisition kind field of + * group licenses. + */ + reason?: string; + } + interface EntitlementsListResponse { + /** + * An entitlement of a user to a product (e.g. an app). For example, a free app that they have installed, or a paid app that they have been allocated a + * license to. + */ + entitlement?: Entitlement[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlementsListResponse". */ + kind?: string; + } + interface GroupLicense { + /** + * How this group license was acquired. "bulkPurchase" means that this Grouplicenses resource was created because the enterprise purchased licenses for + * this product; otherwise, the value is "free" (for free products). + */ + acquisitionKind?: string; + /** + * Whether the product to which this group license relates is currently approved by the enterprise. Products are approved when a group license is first + * created, but this approval may be revoked by an enterprise admin via Google Play. Unapproved products will not be visible to end users in collections, + * and new entitlements to them should not normally be created. + */ + approval?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicense". */ + kind?: string; + /** The total number of provisioned licenses for this product. Returned by read operations, but ignored in write operations. */ + numProvisioned?: number; + /** + * The number of purchased licenses (possibly in multiple purchases). If this field is omitted, then there is no limit on the number of licenses that can + * be provisioned (for example, if the acquisition kind is "free"). + */ + numPurchased?: number; + /** + * The permission approval status of the product. This field is only set if the product is approved. Possible states are: + * - "currentApproved", the current set of permissions is approved, but additional permissions will require the administrator to reapprove the product (If + * the product was approved without specifying the approved permissions setting, then this is the default behavior.), + * - "needsReapproval", the product has unapproved permissions. No additional product licenses can be assigned until the product is reapproved, + * - "allCurrentAndFutureApproved", the current permissions are approved and any future permission updates will be automatically approved without + * administrator review. + */ + permissions?: string; + /** The ID of the product that the license is for. For example, "app:com.google.android.gm". */ + productId?: string; + } + interface GroupLicenseUsersListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicenseUsersListResponse". */ + kind?: string; + /** A user of an enterprise. */ + user?: User[]; + } + interface GroupLicensesListResponse { + /** A group license for a product approved for use in the enterprise. */ + groupLicense?: GroupLicense[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicensesListResponse". */ + kind?: string; + } + interface Install { + /** + * Install state. The state "installPending" means that an install request has recently been made and download to the device is in progress. The state + * "installed" means that the app has been installed. This field is read-only. + */ + installState?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#install". */ + kind?: string; + /** The ID of the product that the install is for. For example, "app:com.google.android.gm". */ + productId?: string; + /** The version of the installed product. Guaranteed to be set only if the install state is "installed". */ + versionCode?: number; + } + interface InstallFailureEvent { + /** The Android ID of the device. This field will always be present. */ + deviceId?: string; + /** Additional details on the failure if applicable. */ + failureDetails?: string; + /** The reason for the installation failure. This field will always be present. */ + failureReason?: string; + /** The id of the product (e.g. "app:com.google.android.gm") for which the install failure event occured. This field will always be present. */ + productId?: string; + /** The ID of the user. This field will always be present. */ + userId?: string; + } + interface InstallsListResponse { + /** An installation of an app for a user on a specific device. The existence of an install implies that the user must have an entitlement to the app. */ + install?: Install[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#installsListResponse". */ + kind?: string; + } + interface LocalizedText { + /** The BCP47 tag for a locale. (e.g. "en-US", "de"). */ + locale?: string; + /** The text localized in the associated locale. */ + text?: string; + } + interface ManagedConfiguration { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration". */ + kind?: string; + /** The set of managed properties for this configuration. */ + managedProperty?: ManagedProperty[]; + /** The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm". */ + productId?: string; + } + interface ManagedConfigurationsForDeviceListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfigurationsForDeviceListResponse". */ + kind?: string; + /** A managed configuration for an app on a specific device. */ + managedConfigurationForDevice?: ManagedConfiguration[]; + } + interface ManagedConfigurationsForUserListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfigurationsForUserListResponse". */ + kind?: string; + /** A managed configuration for an app for a specific user. */ + managedConfigurationForUser?: ManagedConfiguration[]; + } + interface ManagedProperty { + /** The unique key that identifies the property. */ + key?: string; + /** The boolean value - this will only be present if type of the property is bool. */ + valueBool?: boolean; + /** The bundle of managed properties - this will only be present if type of the property is bundle. */ + valueBundle?: ManagedPropertyBundle; + /** The list of bundles of properties - this will only be present if type of the property is bundle_array. */ + valueBundleArray?: ManagedPropertyBundle[]; + /** The integer value - this will only be present if type of the property is integer. */ + valueInteger?: number; + /** The string value - this will only be present if type of the property is string, choice or hidden. */ + valueString?: string; + /** The list of string values - this will only be present if type of the property is multiselect. */ + valueStringArray?: string[]; + } + interface ManagedPropertyBundle { + /** The list of managed properties. */ + managedProperty?: ManagedProperty[]; + } + interface NewDeviceEvent { + /** The Android ID of the device. This field will always be present. */ + deviceId?: string; + /** + * Identifies the extent to which the device is controlled by an Android EMM in various deployment configurations. + * + * Possible values include: + * - "managedDevice", a device where the DPC is set as device owner, + * - "managedProfile", a device where the DPC is set as profile owner. + */ + managementType?: string; + /** The ID of the user. This field will always be present. */ + userId?: string; + } + interface NewPermissionsEvent { + /** + * The set of permissions that the enterprise admin has already approved for this application. Use Permissions.Get on the EMM API to retrieve details + * about these permissions. + */ + approvedPermissions?: string[]; + /** The id of the product (e.g. "app:com.google.android.gm") for which new permissions were added. This field will always be present. */ + productId?: string; + /** The set of permissions that the app is currently requesting. Use Permissions.Get on the EMM API to retrieve details about these permissions. */ + requestedPermissions?: string[]; + } + interface Notification { + /** Notifications about new app restrictions schema changes. */ + appRestrictionsSchemaChangeEvent?: AppRestrictionsSchemaChangeEvent; + /** Notifications about app updates. */ + appUpdateEvent?: AppUpdateEvent; + /** The ID of the enterprise for which the notification is sent. This will always be present. */ + enterpriseId?: string; + /** Notifications about an app installation failure. */ + installFailureEvent?: InstallFailureEvent; + /** Notifications about new devices. */ + newDeviceEvent?: NewDeviceEvent; + /** Notifications about new app permissions. */ + newPermissionsEvent?: NewPermissionsEvent; + /** Type of the notification. */ + notificationType?: string; + /** Notifications about changes to a product's approval status. */ + productApprovalEvent?: ProductApprovalEvent; + /** Notifications about product availability changes. */ + productAvailabilityChangeEvent?: ProductAvailabilityChangeEvent; + /** The time when the notification was published in milliseconds since 1970-01-01T00:00:00Z. This will always be present. */ + timestampMillis?: string; + } + interface NotificationSet { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#notificationSet". */ + kind?: string; + /** The notifications received, or empty if no notifications are present. */ + notification?: Notification[]; + /** + * The notification set ID, required to mark the notification as received with the Enterprises.AcknowledgeNotification API. This will be omitted if no + * notifications are present. + */ + notificationSetId?: string; + } + interface PageInfo { + resultPerPage?: number; + startIndex?: number; + totalResults?: number; + } + interface Permission { + /** A longer description of the Permissions resource, giving more details of what it affects. */ + description?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#permission". */ + kind?: string; + /** The name of the permission. */ + name?: string; + /** An opaque string uniquely identifying the permission. */ + permissionId?: string; + } + interface Product { + /** App versions currently available for this product. */ + appVersion?: AppVersion[]; + /** The name of the author of the product (for example, the app developer). */ + authorName?: string; + /** The tracks that are visible to the enterprise. */ + availableTracks?: string[]; + /** A link to the (consumer) Google Play details page for the product. */ + detailsUrl?: string; + /** + * How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play store and not + * restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by + * Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted. + */ + distributionChannel?: string; + /** A link to an image that can be used as an icon for the product. This image is suitable for use at up to 512px x 512px. */ + iconUrl?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". */ + kind?: string; + /** A string of the form app:. For example, app:com.google.android.gm represents the Gmail app. */ + productId?: string; + /** + * Whether this product is free, free with in-app purchases, or paid. If the pricing is unknown, this means the product is not generally available anymore + * (even though it might still be available to people who own it). + */ + productPricing?: string; + /** Deprecated. */ + requiresContainerApp?: boolean; + /** The certificate used to sign this product. */ + signingCertificate?: ProductSigningCertificate; + /** A link to a smaller image that can be used as an icon for the product. This image is suitable for use at up to 128px x 128px. */ + smallIconUrl?: string; + /** The name of the product. */ + title?: string; + /** A link to the managed Google Play details page for the product, for use by an Enterprise admin. */ + workDetailsUrl?: string; + } + interface ProductApprovalEvent { + /** Whether the product was approved or unapproved. This field will always be present. */ + approved?: string; + /** The id of the product (e.g. "app:com.google.android.gm") for which the approval status has changed. This field will always be present. */ + productId?: string; + } + interface ProductAvailabilityChangeEvent { + /** The new state of the product. This field will always be present. */ + availabilityStatus?: string; + /** The id of the product (e.g. "app:com.google.android.gm") for which the product availability changed. This field will always be present. */ + productId?: string; + } + interface ProductPermission { + /** An opaque string uniquely identifying the permission. */ + permissionId?: string; + /** Whether the permission has been accepted or not. */ + state?: string; + } + interface ProductPermissions { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productPermissions". */ + kind?: string; + /** The permissions required by the app. */ + permission?: ProductPermission[]; + /** The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". */ + productId?: string; + } + interface ProductSet { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productSet". */ + kind?: string; + /** The list of product IDs making up the set of products. */ + productId?: string[]; + /** + * The interpretation of this product set. "unknown" should never be sent and is ignored if received. "whitelist" means that the user is entitled to + * access the product set. "includeAll" means that all products are accessible, including products that are approved, products with revoked approval, and + * products that have never been approved. "allApproved" means that the user is entitled to access all products that are approved for the enterprise. If + * the value is "allApproved" or "includeAll", the productId field is ignored. If no value is provided, it is interpreted as "whitelist" for backwards + * compatibility. Further "allApproved" or "includeAll" does not enable automatic visibility of "alpha" or "beta" tracks for Android app. Use + * ProductVisibility to enable "alpha" or "beta" tracks per user. + */ + productSetBehavior?: string; + /** + * Other products that are part of the set, in addition to those specified in the productId array. The only difference between this field and the + * productId array is that it's possible to specify additional information about this product visibility, see ProductVisibility and its fields for more + * information. Specifying the same product ID both here and in the productId array is not allowed and it will result in an error. + */ + productVisibility?: ProductVisibility[]; + } + interface ProductSigningCertificate { + /** + * The base64 urlsafe encoded SHA1 hash of the certificate. (This field is deprecated in favor of SHA2-256. It should not be used and may be removed at + * any time.) + */ + certificateHashSha1?: string; + /** The base64 urlsafe encoded SHA2-256 hash of the certificate. */ + certificateHashSha256?: string; + } + interface ProductVisibility { + /** The product ID that should be made visible to the user. This is required. */ + productId?: string; + /** + * This allows to only grant visibility to the specified tracks of the app. For example, if an app has a prod version, a beta version and an alpha version + * and the enterprise has been granted visibility to both the alpha and beta tracks, if tracks is {"beta", "production"} the user will be able to install + * the app and they will get the beta version of the app. If there are no app versions in the specified track or if the enterprise wasn't granted + * visibility for the track, adding the "alpha" and "beta" values to the list of tracks will have no effect for now; however they will take effect once + * both conditions are met. Note that the enterprise itself needs to be granted access to the alpha and/or beta tracks, regardless of whether individual + * users or admins have access to those tracks. + * + * The allowed sets are: {} (considered equivalent to {"production"}) {"production"} {"beta", "production"} {"alpha", "beta", "production"} The order of + * elements is not relevant. Any other set of tracks will be rejected with an error. + */ + tracks?: string[]; + } + interface ProductsApproveRequest { + /** + * The approval URL that was shown to the user. Only the permissions shown to the user with that URL will be accepted, which may not be the product's + * entire set of permissions. For example, the URL may only display new permissions from an update after the product was approved, or not include new + * permissions if the product was updated since the URL was generated. + */ + approvalUrlInfo?: ApprovalUrlInfo; + /** + * Sets how new permission requests for the product are handled. "allPermissions" automatically approves all current and future permissions for the + * product. "currentPermissionsOnly" approves the current set of permissions for the product, but any future permissions added through updates will + * require manual reapproval. If not specified, only the current set of permissions will be approved. + */ + approvedPermissions?: string; + } + interface ProductsGenerateApprovalUrlResponse { + /** + * A URL that can be rendered in an iframe to display the permissions (if any) of a product. This URL can be used to approve the product only once and + * only within 24 hours of being generated, using the Products.approve call. If the product is currently unapproved and has no permissions, this URL will + * point to an empty page. If the product is currently approved, a URL will only be generated if that product has added permissions since it was last + * approved, and the URL will only display those new permissions that have not yet been accepted. + */ + url?: string; + } + interface ProductsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productsListResponse". */ + kind?: string; + /** General pagination information. */ + pageInfo?: PageInfo; + /** Information about a product (e.g. an app) in the Google Play store, for display to an enterprise admin. */ + product?: Product[]; + /** Pagination information for token pagination. */ + tokenPagination?: TokenPagination; + } + interface ServiceAccount { + /** Credentials that can be used to authenticate as this ServiceAccount. */ + key?: ServiceAccountKey; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccount". */ + kind?: string; + /** The account name of the service account, in the form of an email address. Assigned by the server. */ + name?: string; + } + interface ServiceAccountKey { + /** + * The body of the private key credentials file, in string format. This is only populated when the ServiceAccountKey is created, and is not stored by + * Google. + */ + data?: string; + /** An opaque, unique identifier for this ServiceAccountKey. Assigned by the server. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccountKey". */ + kind?: string; + /** + * Public key data for the credentials file. This is an X.509 cert. If you are using the googleCredentials key type, this is identical to the cert that + * can be retrieved by using the X.509 cert url inside of the credentials file. + */ + publicData?: string; + /** The file format of the generated key data. */ + type?: string; + } + interface ServiceAccountKeysListResponse { + /** The service account credentials. */ + serviceAccountKey?: ServiceAccountKey[]; + } + interface SignupInfo { + /** An opaque token that will be required, along with the Enterprise Token, for obtaining the enterprise resource from CompleteSignup. */ + completionToken?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#signupInfo". */ + kind?: string; + /** A URL under which the Admin can sign up for an enterprise. The page pointed to cannot be rendered in an iframe. */ + url?: string; + } + interface StoreCluster { + /** Unique ID of this cluster. Assigned by the server. Immutable once assigned. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeCluster". */ + kind?: string; + /** + * Ordered list of localized strings giving the name of this page. The text displayed is the one that best matches the user locale, or the first entry if + * there is no good match. There needs to be at least one entry. + */ + name?: LocalizedText[]; + /** + * String (US-ASCII only) used to determine order of this cluster within the parent page's elements. Page elements are sorted in lexicographic order of + * this field. Duplicated values are allowed, but ordering between elements with duplicate order is undefined. + * + * The value of this field is never visible to a user, it is used solely for the purpose of defining an ordering. Maximum length is 256 characters. + */ + orderInPage?: string; + /** List of products in the order they are displayed in the cluster. There should not be duplicates within a cluster. */ + productId?: string[]; + } + interface StoreLayout { + /** + * The ID of the store page to be used as the homepage. The homepage is the first page shown in the managed Google Play Store. + * + * Not specifying a homepage is equivalent to setting the store layout type to "basic". + */ + homepageId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout". */ + kind?: string; + /** + * The store layout type. By default, this value is set to "basic" if the homepageId field is not set, and to "custom" otherwise. If set to "basic", the + * layout will consist of all approved apps that have been whitelisted for the user. + */ + storeLayoutType?: string; + } + interface StoreLayoutClustersListResponse { + /** A store cluster of an enterprise. */ + cluster?: StoreCluster[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayoutClustersListResponse". */ + kind?: string; + } + interface StoreLayoutPagesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayoutPagesListResponse". */ + kind?: string; + /** A store page of an enterprise. */ + page?: StorePage[]; + } + interface StorePage { + /** Unique ID of this page. Assigned by the server. Immutable once assigned. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storePage". */ + kind?: string; + /** + * Ordered list of pages a user should be able to reach from this page. The pages must exist, must not be this page, and once a link is created the page + * linked to cannot be deleted until all links to it are removed. It is recommended that the basic pages are created first, before adding the links + * between pages. + * + * No attempt is made to verify that all pages are reachable from the homepage. + */ + link?: string[]; + /** + * Ordered list of localized strings giving the name of this page. The text displayed is the one that best matches the user locale, or the first entry if + * there is no good match. There needs to be at least one entry. + */ + name?: LocalizedText[]; + } + interface TokenPagination { + nextPageToken?: string; + previousPageToken?: string; + } + interface User { + /** + * A unique identifier you create for this user, such as "user342" or "asset#44418". Do not use personally identifiable information (PII) for this + * property. Must always be set for EMM-managed users. Not set for Google-managed users. + */ + accountIdentifier?: string; + /** + * The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. + * An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount. + */ + accountType?: string; + /** + * The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use + * something generic about the organization (such as "Example, Inc.") or your name (as EMM). Not used for Google-managed user accounts. + */ + displayName?: string; + /** The unique ID for the user. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user". */ + kind?: string; + /** + * The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the + * user. With emmManaged users, the EMM is in charge. + */ + managementType?: string; + /** The user's primary email address, for example, "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users. */ + primaryEmail?: string; + } + interface UserToken { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#userToken". */ + kind?: string; + /** The token (activation code) to be entered by the user. This consists of a sequence of decimal digits. Note that the leading digit may be 0. */ + token?: string; + /** The unique ID for the user. */ + userId?: string; + } + interface UsersListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidenterprise#usersListResponse". */ + kind?: string; + /** A user of an enterprise. */ + user?: User[]; + } + interface DevicesResource { + /** Retrieves the details of a device. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android + * devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is + * only supported for Google-managed users. + */ + getState(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the IDs of all of a user's devices. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android + * devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is + * only supported for Google-managed users. + */ + setState(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface EnterprisesResource { + /** Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications. */ + acknowledgeNotificationSet(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The notification set ID as returned by Enterprises.PullNotificationSet. This must be provided. */ + notificationSetId?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given + * Enterprise Token. + */ + completeSignup(request: { + /** Data format for the response. */ + alt?: string; + /** The Completion token initially returned by GenerateSignupUrl. */ + completionToken?: string; + /** The Enterprise token appended to the Callback URL. */ + enterpriseToken?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each + * token may only be used to start one UI session. See the javascript API documentation for further information. + */ + createWebToken(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Deletes the binding between the EMM and enterprise. This is now deprecated. Use this method only to unenroll customers that were previously enrolled + * with the insert call, then enroll them again with the enroll call. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Enrolls an enterprise with the calling EMM. */ + enroll(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The token provided by the enterprise to register the EMM. */ + token: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Generates a sign-up URL. */ + generateSignupUrl(request: { + /** Data format for the response. */ + alt?: string; + /** + * The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single + * query parameter to this URL named "enterpriseToken" which will contain an opaque token to be used for the CompleteSignup request. + * Beware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes + * and, more importantly, the URL must be well-formed so that it can be parsed. + */ + callbackUrl?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the name and domain of an enterprise. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the Android Device Policy config resource. */ + getAndroidDevicePolicyConfig(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to + * this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side. + * + * This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it + * will return an error. + * + * Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials. + * + * Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource. + */ + getServiceAccount(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The type of credential to return with the service account. Required. */ + keyType?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the store layout for the enterprise. If the store layout has not been set, returns "basic" as the store layout type and no homepage. */ + getStoreLayout(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The token provided by the enterprise to register the EMM. */ + token: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not + * needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the + * Enterprises.generateSignupUrl call. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The exact primary domain name of the enterprise to look up. */ + domain: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be + * empty if no notification are pending. + * A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set + * is empty. + * Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, + * and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy. + * Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each + * caller, if any are pending. + * If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available. + */ + pullNotificationSet(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The request mode for pulling notifications. + * Specifying waitForNotifications will cause the request to block and wait until one or more notifications are present, or return an empty notification + * list if no notifications are present after some time. + * Speciying returnImmediately will cause the request to immediately return the pending notifications, or an empty list if no notifications are present. + * If omitted, defaults to waitForNotifications. + */ + requestMode?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sends a test notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise. */ + sendTestPushNotification(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the account that will be used to authenticate to the API as the enterprise. */ + setAccount(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Sets the Android Device Policy config resource. EMM may use this method to enable or disable Android Device Policy support for the specified + * enterprise. To learn more about managing devices and apps with Android Device Policy, see the Android Management API. + */ + setAndroidDevicePolicyConfig(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only + * contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on + * the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a + * homepage), the basic store layout is disabled. + */ + setStoreLayout(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Unenrolls an enterprise from the calling EMM. */ + unenroll(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface EntitlementsResource { + /** Removes an entitlement to an app for a user. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". */ + entitlementId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves details of an entitlement. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". */ + entitlementId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all entitlements for the specified user. Only the ID is set. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds or updates an entitlement to an app for a user. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". */ + entitlementId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this + * operation from returning successfully, as long as the entitlement was successfully assigned to the user. + */ + install?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds or updates an entitlement to an app for a user. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". */ + entitlementId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this + * operation from returning successfully, as long as the entitlement was successfully assigned to the user. + */ + install?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface GrouplicensesResource { + /** Retrieves details of an enterprise's group license for a product. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the product the group license is for, e.g. "app:com.google.android.gm". */ + groupLicenseId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves IDs of all products for which the enterprise has a group license. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface GrouplicenseusersResource { + /** Retrieves the IDs of the users who have been granted entitlements under the license. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the product the group license is for, e.g. "app:com.google.android.gm". */ + groupLicenseId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface InstallsResource { + /** Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the product represented by the install, e.g. "app:com.google.android.gm". */ + installId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves details of an installation of an app on a device. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the product represented by the install, e.g. "app:com.google.android.gm". */ + installId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the details of all apps installed on the specified device. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. + * This method supports patch semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the product represented by the install, e.g. "app:com.google.android.gm". */ + installId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the product represented by the install, e.g. "app:com.google.android.gm". */ + installId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ManagedconfigurationsfordeviceResource { + /** Removes a per-device managed configuration for an app for the specified device. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForDeviceId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves details of a per-device managed configuration. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForDeviceId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all the per-device managed configurations for the specified device. Only the ID is set. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds or updates a per-device managed configuration for an app for the specified device. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForDeviceId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds or updates a per-device managed configuration for an app for the specified device. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The Android ID of the device. */ + deviceId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForDeviceId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ManagedconfigurationsforuserResource { + /** Removes a per-user managed configuration for an app for the specified user. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForUserId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves details of a per-user managed configuration for an app for the specified user. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForUserId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all the per-user managed configurations for the specified user. Only the ID is set. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds or updates a per-user managed configuration for an app for the specified user. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForUserId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds or updates a per-user managed configuration for an app for the specified user. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". */ + managedConfigurationForUserId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PermissionsResource { + /** Retrieves details of an Android app permission for display to an enterprise admin. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The BCP47 tag for the user's preferred language (e.g. "en-US", "de") */ + language?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the permission. */ + permissionId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProductsResource { + /** + * Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is + * 1,000. + * + * To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design. + */ + approve(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and + * accept them on behalf of their organization in order to approve that product. + * + * Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of + * this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display + * permissions for up to 1 day. + */ + generateApprovalUrl(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The BCP 47 language code used for permission names and descriptions in the returned iframe, for instance "en-US". */ + languageCode?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves details of a product for display to an enterprise admin. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). */ + language?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product, e.g. "app:com.google.android.gm". */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed + * configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed + * configuration based on the schema obtained using this API, see Managed Configurations through Play. + */ + getAppRestrictionsSchema(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). */ + language?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the Android app permissions required by this app. */ + getPermissions(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Finds approved products that match a query, or all approved products if there is no query. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** + * Specifies whether to search among all products (false) or among only products that have been approved (true). Only "true" is supported, and should be + * specified. + */ + approved?: boolean; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). Results are returned in the language best matching the preferred language. */ + language?: string; + /** + * Specifies the maximum number of products that can be returned per request. If not specified, uses a default value of 100, which is also the maximum + * retrievable within a single response. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The search query as typed in the Google Play store search box. If omitted, all approved apps will be returned (using the pagination parameters), + * including apps that are not available in the store (e.g. unpublished apps). + */ + query?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * A pagination token is contained in a request''s response when there are more products. The token can be used in a subsequent request to obtain more + * products, and so forth. This parameter cannot be used in the initial request. + */ + token?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Unapproves the specified product (and the relevant app permissions, if any) */ + unapprove(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ServiceaccountkeysResource { + /** + * Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been + * retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the key. */ + keyId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling + * Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. + * + * Only the type of the key should be populated in the resource to be inserted. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service + * account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling + * Enterprises.SetAccount. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface StorelayoutclustersResource { + /** Deletes a cluster. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the cluster. */ + clusterId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves details of a cluster. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the cluster. */ + clusterId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new cluster in a page. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the details of all clusters on the specified page. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a cluster. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the cluster. */ + clusterId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a cluster. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the cluster. */ + clusterId: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface StorelayoutpagesResource { + /** Deletes a store page. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves details of a store page. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new store page. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the details of all pages in the store. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the content of a store page. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the content of a store page. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UsersResource { + /** Deleted an EMM-managed user. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated + * token is single-use and expires after a few minutes. + * + * This call only works with EMM-managed accounts. + */ + generateAuthenticationToken(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated + * token. + * + * This call only works with Google managed accounts. + */ + generateToken(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a user's details. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the set of products a user is entitled to access. */ + getAvailableProductSet(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Creates a new EMM-managed user. + * + * The Users resource passed in the body of the request should include an accountIdentifier and an accountType. + * If a corresponding user already exists with the same account identifier, the user will be updated with the resource. In this case only the displayName + * field can be changed. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because + * the id is already returned in the result of the Users.insert call. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The exact primary email address of the user to look up. */ + email: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the details of an EMM-managed user. + * + * Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the + * displayName field can be changed. Other fields must either be unset or have the currently active value. This method supports patch semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Revokes a previously generated token (activation code) for the user. */ + revokeToken(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that + * were previously approved (products with revoked approval) can be whitelisted. + */ + setAvailableProductSet(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the details of an EMM-managed user. + * + * Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the + * displayName field can be changed. Other fields must either be unset or have the currently active value. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the enterprise. */ + enterpriseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.androidenterprise/readme.md b/types/gapi.client.androidenterprise/readme.md new file mode 100644 index 0000000000..af095b5ae6 --- /dev/null +++ b/types/gapi.client.androidenterprise/readme.md @@ -0,0 +1,476 @@ +# TypeScript typings for Google Play EMM API v1 +Manages the deployment of apps to Android for Work users. +For detailed description please check [documentation](https://developers.google.com/android/work/play/emm-api). + +## Installing + +Install typings for Google Play EMM API: +``` +npm install @types/gapi.client.androidenterprise@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('androidenterprise', 'v1', () => { + // now we can use gapi.client.androidenterprise + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage corporate Android devices + 'https://www.googleapis.com/auth/androidenterprise', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Play EMM API resources: + +```typescript + +/* +Retrieves the details of a device. +*/ +await gapi.client.devices.get({ deviceId: "deviceId", enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users. +*/ +await gapi.client.devices.getState({ deviceId: "deviceId", enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Retrieves the IDs of all of a user's devices. +*/ +await gapi.client.devices.list({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users. +*/ +await gapi.client.devices.setState({ deviceId: "deviceId", enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications. +*/ +await gapi.client.enterprises.acknowledgeNotificationSet({ }); + +/* +Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token. +*/ +await gapi.client.enterprises.completeSignup({ }); + +/* +Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information. +*/ +await gapi.client.enterprises.createWebToken({ enterpriseId: "enterpriseId", }); + +/* +Deletes the binding between the EMM and enterprise. This is now deprecated. Use this method only to unenroll customers that were previously enrolled with the insert call, then enroll them again with the enroll call. +*/ +await gapi.client.enterprises.delete({ enterpriseId: "enterpriseId", }); + +/* +Enrolls an enterprise with the calling EMM. +*/ +await gapi.client.enterprises.enroll({ token: "token", }); + +/* +Generates a sign-up URL. +*/ +await gapi.client.enterprises.generateSignupUrl({ }); + +/* +Retrieves the name and domain of an enterprise. +*/ +await gapi.client.enterprises.get({ enterpriseId: "enterpriseId", }); + +/* +Returns the Android Device Policy config resource. +*/ +await gapi.client.enterprises.getAndroidDevicePolicyConfig({ enterpriseId: "enterpriseId", }); + +/* +Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side. + +This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it will return an error. + +Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials. + +Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource. +*/ +await gapi.client.enterprises.getServiceAccount({ enterpriseId: "enterpriseId", }); + +/* +Returns the store layout for the enterprise. If the store layout has not been set, returns "basic" as the store layout type and no homepage. +*/ +await gapi.client.enterprises.getStoreLayout({ enterpriseId: "enterpriseId", }); + +/* +Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead. +*/ +await gapi.client.enterprises.insert({ token: "token", }); + +/* +Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call. +*/ +await gapi.client.enterprises.list({ domain: "domain", }); + +/* +Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending. +A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty. +Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy. +Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending. +If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available. +*/ +await gapi.client.enterprises.pullNotificationSet({ }); + +/* +Sends a test notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise. +*/ +await gapi.client.enterprises.sendTestPushNotification({ enterpriseId: "enterpriseId", }); + +/* +Sets the account that will be used to authenticate to the API as the enterprise. +*/ +await gapi.client.enterprises.setAccount({ enterpriseId: "enterpriseId", }); + +/* +Sets the Android Device Policy config resource. EMM may use this method to enable or disable Android Device Policy support for the specified enterprise. To learn more about managing devices and apps with Android Device Policy, see the Android Management API. +*/ +await gapi.client.enterprises.setAndroidDevicePolicyConfig({ enterpriseId: "enterpriseId", }); + +/* +Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a homepage), the basic store layout is disabled. +*/ +await gapi.client.enterprises.setStoreLayout({ enterpriseId: "enterpriseId", }); + +/* +Unenrolls an enterprise from the calling EMM. +*/ +await gapi.client.enterprises.unenroll({ enterpriseId: "enterpriseId", }); + +/* +Removes an entitlement to an app for a user. +*/ +await gapi.client.entitlements.delete({ enterpriseId: "enterpriseId", entitlementId: "entitlementId", userId: "userId", }); + +/* +Retrieves details of an entitlement. +*/ +await gapi.client.entitlements.get({ enterpriseId: "enterpriseId", entitlementId: "entitlementId", userId: "userId", }); + +/* +Lists all entitlements for the specified user. Only the ID is set. +*/ +await gapi.client.entitlements.list({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Adds or updates an entitlement to an app for a user. This method supports patch semantics. +*/ +await gapi.client.entitlements.patch({ enterpriseId: "enterpriseId", entitlementId: "entitlementId", userId: "userId", }); + +/* +Adds or updates an entitlement to an app for a user. +*/ +await gapi.client.entitlements.update({ enterpriseId: "enterpriseId", entitlementId: "entitlementId", userId: "userId", }); + +/* +Retrieves details of an enterprise's group license for a product. +*/ +await gapi.client.grouplicenses.get({ enterpriseId: "enterpriseId", groupLicenseId: "groupLicenseId", }); + +/* +Retrieves IDs of all products for which the enterprise has a group license. +*/ +await gapi.client.grouplicenses.list({ enterpriseId: "enterpriseId", }); + +/* +Retrieves the IDs of the users who have been granted entitlements under the license. +*/ +await gapi.client.grouplicenseusers.list({ enterpriseId: "enterpriseId", groupLicenseId: "groupLicenseId", }); + +/* +Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. +*/ +await gapi.client.installs.delete({ deviceId: "deviceId", enterpriseId: "enterpriseId", installId: "installId", userId: "userId", }); + +/* +Retrieves details of an installation of an app on a device. +*/ +await gapi.client.installs.get({ deviceId: "deviceId", enterpriseId: "enterpriseId", installId: "installId", userId: "userId", }); + +/* +Retrieves the details of all apps installed on the specified device. +*/ +await gapi.client.installs.list({ deviceId: "deviceId", enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. This method supports patch semantics. +*/ +await gapi.client.installs.patch({ deviceId: "deviceId", enterpriseId: "enterpriseId", installId: "installId", userId: "userId", }); + +/* +Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. +*/ +await gapi.client.installs.update({ deviceId: "deviceId", enterpriseId: "enterpriseId", installId: "installId", userId: "userId", }); + +/* +Removes a per-device managed configuration for an app for the specified device. +*/ +await gapi.client.managedconfigurationsfordevice.delete({ deviceId: "deviceId", enterpriseId: "enterpriseId", managedConfigurationForDeviceId: "managedConfigurationForDeviceId", userId: "userId", }); + +/* +Retrieves details of a per-device managed configuration. +*/ +await gapi.client.managedconfigurationsfordevice.get({ deviceId: "deviceId", enterpriseId: "enterpriseId", managedConfigurationForDeviceId: "managedConfigurationForDeviceId", userId: "userId", }); + +/* +Lists all the per-device managed configurations for the specified device. Only the ID is set. +*/ +await gapi.client.managedconfigurationsfordevice.list({ deviceId: "deviceId", enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Adds or updates a per-device managed configuration for an app for the specified device. This method supports patch semantics. +*/ +await gapi.client.managedconfigurationsfordevice.patch({ deviceId: "deviceId", enterpriseId: "enterpriseId", managedConfigurationForDeviceId: "managedConfigurationForDeviceId", userId: "userId", }); + +/* +Adds or updates a per-device managed configuration for an app for the specified device. +*/ +await gapi.client.managedconfigurationsfordevice.update({ deviceId: "deviceId", enterpriseId: "enterpriseId", managedConfigurationForDeviceId: "managedConfigurationForDeviceId", userId: "userId", }); + +/* +Removes a per-user managed configuration for an app for the specified user. +*/ +await gapi.client.managedconfigurationsforuser.delete({ enterpriseId: "enterpriseId", managedConfigurationForUserId: "managedConfigurationForUserId", userId: "userId", }); + +/* +Retrieves details of a per-user managed configuration for an app for the specified user. +*/ +await gapi.client.managedconfigurationsforuser.get({ enterpriseId: "enterpriseId", managedConfigurationForUserId: "managedConfigurationForUserId", userId: "userId", }); + +/* +Lists all the per-user managed configurations for the specified user. Only the ID is set. +*/ +await gapi.client.managedconfigurationsforuser.list({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Adds or updates a per-user managed configuration for an app for the specified user. This method supports patch semantics. +*/ +await gapi.client.managedconfigurationsforuser.patch({ enterpriseId: "enterpriseId", managedConfigurationForUserId: "managedConfigurationForUserId", userId: "userId", }); + +/* +Adds or updates a per-user managed configuration for an app for the specified user. +*/ +await gapi.client.managedconfigurationsforuser.update({ enterpriseId: "enterpriseId", managedConfigurationForUserId: "managedConfigurationForUserId", userId: "userId", }); + +/* +Retrieves details of an Android app permission for display to an enterprise admin. +*/ +await gapi.client.permissions.get({ permissionId: "permissionId", }); + +/* +Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. + +To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design. +*/ +await gapi.client.products.approve({ enterpriseId: "enterpriseId", productId: "productId", }); + +/* +Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product. + +Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day. +*/ +await gapi.client.products.generateApprovalUrl({ enterpriseId: "enterpriseId", productId: "productId", }); + +/* +Retrieves details of a product for display to an enterprise admin. +*/ +await gapi.client.products.get({ enterpriseId: "enterpriseId", productId: "productId", }); + +/* +Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. +*/ +await gapi.client.products.getAppRestrictionsSchema({ enterpriseId: "enterpriseId", productId: "productId", }); + +/* +Retrieves the Android app permissions required by this app. +*/ +await gapi.client.products.getPermissions({ enterpriseId: "enterpriseId", productId: "productId", }); + +/* +Finds approved products that match a query, or all approved products if there is no query. +*/ +await gapi.client.products.list({ enterpriseId: "enterpriseId", }); + +/* +Unapproves the specified product (and the relevant app permissions, if any) +*/ +await gapi.client.products.unapprove({ enterpriseId: "enterpriseId", productId: "productId", }); + +/* +Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. +*/ +await gapi.client.serviceaccountkeys.delete({ enterpriseId: "enterpriseId", keyId: "keyId", }); + +/* +Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. + +Only the type of the key should be populated in the resource to be inserted. +*/ +await gapi.client.serviceaccountkeys.insert({ enterpriseId: "enterpriseId", }); + +/* +Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. +*/ +await gapi.client.serviceaccountkeys.list({ enterpriseId: "enterpriseId", }); + +/* +Deletes a cluster. +*/ +await gapi.client.storelayoutclusters.delete({ clusterId: "clusterId", enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Retrieves details of a cluster. +*/ +await gapi.client.storelayoutclusters.get({ clusterId: "clusterId", enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Inserts a new cluster in a page. +*/ +await gapi.client.storelayoutclusters.insert({ enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Retrieves the details of all clusters on the specified page. +*/ +await gapi.client.storelayoutclusters.list({ enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Updates a cluster. This method supports patch semantics. +*/ +await gapi.client.storelayoutclusters.patch({ clusterId: "clusterId", enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Updates a cluster. +*/ +await gapi.client.storelayoutclusters.update({ clusterId: "clusterId", enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Deletes a store page. +*/ +await gapi.client.storelayoutpages.delete({ enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Retrieves details of a store page. +*/ +await gapi.client.storelayoutpages.get({ enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Inserts a new store page. +*/ +await gapi.client.storelayoutpages.insert({ enterpriseId: "enterpriseId", }); + +/* +Retrieves the details of all pages in the store. +*/ +await gapi.client.storelayoutpages.list({ enterpriseId: "enterpriseId", }); + +/* +Updates the content of a store page. This method supports patch semantics. +*/ +await gapi.client.storelayoutpages.patch({ enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Updates the content of a store page. +*/ +await gapi.client.storelayoutpages.update({ enterpriseId: "enterpriseId", pageId: "pageId", }); + +/* +Deleted an EMM-managed user. +*/ +await gapi.client.users.delete({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated token is single-use and expires after a few minutes. + +This call only works with EMM-managed accounts. +*/ +await gapi.client.users.generateAuthenticationToken({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated token. + +This call only works with Google managed accounts. +*/ +await gapi.client.users.generateToken({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Retrieves a user's details. +*/ +await gapi.client.users.get({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Retrieves the set of products a user is entitled to access. +*/ +await gapi.client.users.getAvailableProductSet({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Creates a new EMM-managed user. + +The Users resource passed in the body of the request should include an accountIdentifier and an accountType. +If a corresponding user already exists with the same account identifier, the user will be updated with the resource. In this case only the displayName field can be changed. +*/ +await gapi.client.users.insert({ enterpriseId: "enterpriseId", }); + +/* +Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because the id is already returned in the result of the Users.insert call. +*/ +await gapi.client.users.list({ email: "email", enterpriseId: "enterpriseId", }); + +/* +Updates the details of an EMM-managed user. + +Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the displayName field can be changed. Other fields must either be unset or have the currently active value. This method supports patch semantics. +*/ +await gapi.client.users.patch({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Revokes a previously generated token (activation code) for the user. +*/ +await gapi.client.users.revokeToken({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that were previously approved (products with revoked approval) can be whitelisted. +*/ +await gapi.client.users.setAvailableProductSet({ enterpriseId: "enterpriseId", userId: "userId", }); + +/* +Updates the details of an EMM-managed user. + +Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the displayName field can be changed. Other fields must either be unset or have the currently active value. +*/ +await gapi.client.users.update({ enterpriseId: "enterpriseId", userId: "userId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.androidenterprise/tsconfig.json b/types/gapi.client.androidenterprise/tsconfig.json new file mode 100644 index 0000000000..d641db9824 --- /dev/null +++ b/types/gapi.client.androidenterprise/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.androidenterprise-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.androidenterprise/tslint.json b/types/gapi.client.androidenterprise/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.androidenterprise/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.androidmanagement/gapi.client.androidmanagement-tests.ts b/types/gapi.client.androidmanagement/gapi.client.androidmanagement-tests.ts new file mode 100644 index 0000000000..8710ad7485 --- /dev/null +++ b/types/gapi.client.androidmanagement/gapi.client.androidmanagement-tests.ts @@ -0,0 +1,52 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('androidmanagement', 'v1', () => { + /** now we can use gapi.client.androidmanagement */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage Android devices and apps for your customers */ + 'https://www.googleapis.com/auth/androidmanagement', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Creates an enterprise by completing the enterprise signup flow. */ + await gapi.client.enterprises.create({ + enterpriseToken: "enterpriseToken", + projectId: "projectId", + signupUrlName: "signupUrlName", + }); + /** Gets an enterprise. */ + await gapi.client.enterprises.get({ + name: "name", + }); + /** Updates an enterprise. */ + await gapi.client.enterprises.patch({ + name: "name", + updateMask: "updateMask", + }); + /** Creates an enterprise signup URL. */ + await gapi.client.signupUrls.create({ + callbackUrl: "callbackUrl", + projectId: "projectId", + }); + } +}); diff --git a/types/gapi.client.androidmanagement/index.d.ts b/types/gapi.client.androidmanagement/index.d.ts new file mode 100644 index 0000000000..b24ccab3e5 --- /dev/null +++ b/types/gapi.client.androidmanagement/index.d.ts @@ -0,0 +1,1385 @@ +// Type definitions for Google Android Management API v1 1.0 +// Project: https://developers.google.com/android/management +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://androidmanagement.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Android Management API v1 */ + function load(name: "androidmanagement", version: "v1"): PromiseLike; + function load(name: "androidmanagement", version: "v1", callback: () => any): void; + + const enterprises: androidmanagement.EnterprisesResource; + + const signupUrls: androidmanagement.SignupUrlsResource; + + namespace androidmanagement { + interface ApiLevelCondition { + /** + * The minimum desired Android Framework API level. If the device does not meet the minimum requirement, this condition is satisfied. Must be greater than + * zero. + */ + minApiLevel?: number; + } + interface Application { + /** The set of managed properties available to be pre-configured for the application. */ + managedProperties?: ManagedProperty[]; + /** The name of the application in the form enterprises/{enterpriseId}/applications/{package_name} */ + name?: string; + /** The permissions required by the app. */ + permissions?: ApplicationPermission[]; + /** The title of the application. Localized. */ + title?: string; + } + interface ApplicationPermission { + /** A longer description of the permission, giving more details of what it affects. Localized. */ + description?: string; + /** The name of the permission. Localized. */ + name?: string; + /** An opaque string uniquely identifying the permission. Not localized. */ + permissionId?: string; + } + interface ApplicationPolicy { + /** + * The default policy for all permissions requested by the app. If specified, this overrides the policy-level default_permission_policy which applies to + * all apps. + */ + defaultPermissionPolicy?: string; + /** The type of installation to perform. */ + installType?: string; + /** Whether the application is allowed to lock itself in full-screen mode. */ + lockTaskAllowed?: boolean; + /** + * Managed configuration applied to the app. The format for the configuration is dictated by the ManagedProperty values supported by the app. Each field + * name in the managed configuration must match the key field of the ManagedProperty. The field value must be compatible with the type of the + * ManagedProperty: + * + * + *
typeJSON value
BOOLtrue or false
STRINGstring
INTEGERnumber
CHOICEstring
MULTISELECTarray of strings
HIDDENstring
BUNDLE_ARRAYarray of objects
+ */ + managedConfiguration?: Record; + /** The package name of the app, e.g. com.google.android.youtube for the YouTube app. */ + packageName?: string; + /** Explicit permission grants or denials for the app. These values override the default_permission_policy. */ + permissionGrants?: PermissionGrant[]; + } + interface Command { + /** The timestamp at which the command was created. The timestamp is automatically generated by the server. */ + createTime?: string; + /** + * The duration for which the command is valid. The command will expire if not executed by the device during this time. The default duration if + * unspecified is ten minutes. There is no maximum duration. + */ + duration?: string; + /** For commands of type RESET_PASSWORD, optionally specifies the new password. */ + newPassword?: string; + /** For commands of type RESET_PASSWORD, optionally specifies flags. */ + resetPasswordFlags?: string[]; + /** The type of the command. */ + type?: string; + } + interface ComplianceRule { + /** A condition which is satisfied if the Android Framework API level on the device does not meet a minimum requirement. */ + apiLevelCondition?: ApiLevelCondition; + /** + * If set to true, the rule includes a mitigating action to disable applications so that the device is effectively disabled, but application data is + * preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be + * displayed. + */ + disableApps?: boolean; + /** A condition which is satisfied if there exists any matching NonComplianceDetail for the device. */ + nonComplianceDetailCondition?: NonComplianceDetailCondition; + } + interface Device { + /** The API level of the Android platform version running on the device. */ + apiLevel?: number; + /** The name of the policy that is currently applied by the device. */ + appliedPolicyName?: string; + /** The version of the policy that is currently applied by the device. */ + appliedPolicyVersion?: string; + /** The state that is currently applied by the device. */ + appliedState?: string; + /** + * If the device state is DISABLED, an optional message that is displayed on the device indicating the reason the device is disabled. This field may be + * modified by an update request. + */ + disabledReason?: UserFacingMessage; + /** Displays on the device. This information is only available when displayInfoEnabled is true in the device's policy. */ + displays?: Display[]; + /** The time of device enrollment. */ + enrollmentTime?: string; + /** If this device was enrolled with an enrollment token with additional data provided, this field contains that data. */ + enrollmentTokenData?: string; + /** If this device was enrolled with an enrollment token, this field contains the name of the token. */ + enrollmentTokenName?: string; + /** Detailed information about the device hardware. */ + hardwareInfo?: HardwareInfo; + /** Hardware status samples in chronological order. This information is only available when hardwareStatusEnabled is true in the device's policy. */ + hardwareStatusSamples?: HardwareStatus[]; + /** The last time the device sent a policy compliance report. */ + lastPolicyComplianceReportTime?: string; + /** The last time the device fetched its policy. */ + lastPolicySyncTime?: string; + /** The last time the device sent a status report. */ + lastStatusReportTime?: string; + /** + * Events related to memory and storage measurements in chronological order. This information is only available when memoryInfoEnabled is true in the + * device's policy. + */ + memoryEvents?: MemoryEvent[]; + /** Memory information. This information is only available when memoryInfoEnabled is true in the device's policy. */ + memoryInfo?: MemoryInfo; + /** The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId} */ + name?: string; + /** Device network information. This information is only available when networkInfoEnabled is true in the device's policy. */ + networkInfo?: NetworkInfo; + /** Details about policy settings for which the device is not in compliance. */ + nonComplianceDetails?: NonComplianceDetail[]; + /** Whether the device is compliant with its policy. */ + policyCompliant?: boolean; + /** + * The name of the policy that is intended to be applied to the device. If empty, the policy with id default is applied. This field may be modified by an + * update request. The name of the policy is in the form enterprises/{enterpriseId}/policies/{policyId}. It is also permissible to only specify the + * policyId when updating this field as long as the policyId contains no slashes since the rest of the policy name can be inferred from context. + */ + policyName?: string; + /** + * Power management events on the device in chronological order. This information is only available when powerManagementEventsEnabled is true in the + * device's policy. + */ + powerManagementEvents?: PowerManagementEvent[]; + /** + * The previous device names used for the same physical device when it has been enrolled multiple times. The serial number is used as the unique + * identifier to determine if the same physical device has enrolled previously. The names are in chronological order. + */ + previousDeviceNames?: string[]; + /** Detailed information about the device software. This information is only available when softwareInfoEnabled is true in the device's policy. */ + softwareInfo?: SoftwareInfo; + /** + * The state that is intended to be applied to the device. This field may be modified by an update request. Note that UpdateDevice only handles toggling + * between ACTIVE and DISABLED states. Use the delete device method to cause the device to enter the DELETED state. + */ + state?: string; + /** + * The resource name of the user of the device in the form enterprises/{enterpriseId}/users/{userId}. This is the name of the device account automatically + * created for this device. + */ + userName?: string; + } + interface Display { + /** Display density expressed as dots-per-inch. */ + density?: number; + /** Unique display id. */ + displayId?: number; + /** Display height in pixels. */ + height?: number; + /** Name of the display. */ + name?: string; + /** Refresh rate of the display in frames per second. */ + refreshRate?: number; + /** State of the display. */ + state?: string; + /** Display width in pixels. */ + width?: number; + } + interface EnrollmentToken { + /** + * Optional, arbitrary data associated with the enrollment token. This could contain, for example, the id of an org unit to which the device is assigned + * after enrollment. After a device enrolls with the token, this data will be exposed in the enrollment_token_data field of the Device resource. The data + * must be 1024 characters or less; otherwise, the creation request will fail. + */ + additionalData?: string; + /** The duration of the token. If not specified, the duration will be 1 hour. The allowed range is 1 minute to 30 days. */ + duration?: string; + /** The expiration time of the token. This is a read-only field generated by the server. */ + expirationTimestamp?: string; + /** + * The name of the enrollment token, which is generated by the server during creation, in the form + * enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} + */ + name?: string; + /** + * The name of the policy that will be initially applied to the enrolled device in the form enterprises/{enterpriseId}/policies/{policyId}. If not + * specified, the policy with id default is applied. It is permissible to only specify the policyId when updating this field as long as the policyId + * contains no slashes since the rest of the policy name can be inferred from context. + */ + policyName?: string; + /** + * A JSON string whose UTF-8 representation can be used to generate a QR code to enroll a device with this enrollment token. To enroll a device using NFC, + * the NFC record must contain a serialized java.util.Properties representation of the properties in the JSON. + */ + qrCode?: string; + /** The token value which is passed to the device and authorizes the device to enroll. This is a read-only field generated by the server. */ + value?: string; + } + interface Enterprise { + /** + * Whether app auto-approval is enabled. When enabled, apps installed via policy for this enterprise have all permissions automatically approved. When + * enabled, it is the caller's responsibility to display the permissions required by an app to the enterprise admin before setting the app to be installed + * in a policy. + */ + appAutoApprovalEnabled?: boolean; + /** The notification types to enable via Google Cloud Pub/Sub. */ + enabledNotificationTypes?: string[]; + /** The name of the enterprise as it will appear to users. */ + enterpriseDisplayName?: string; + /** + * An image displayed as a logo during device provisioning. Supported types are: image/bmp, image/gif, image/x-ico, image/jpeg, image/png, image/webp, + * image/vnd.wap.wbmp, image/x-adobe-dng. + */ + logo?: ExternalData; + /** The name of the enterprise which is generated by the server during creation, in the form enterprises/{enterpriseId} */ + name?: string; + /** + * A color in RGB format indicating the predominant color to display in the device management app UI. The color components are stored as follows: (red << + * 16) | (green << 8) | blue, where each component may take a value between 0 and 255 inclusive. + */ + primaryColor?: number; + /** + * When Cloud Pub/Sub notifications are enabled, this field is required to indicate the topic to which the notifications will be published. The format of + * this field is projects/{project}/topics/{topic}. You must have granted the publish permission on this topic to + * android-cloud-policy@system.gserviceaccount.com + */ + pubsubTopic?: string; + } + interface ExternalData { + /** The base-64 encoded SHA-256 hash of the content hosted at url. If the content does not match this hash, Android Device Policy will not use the data. */ + sha256Hash?: string; + /** + * The absolute URL to the data, which must use either the http or https scheme. Android Device Policy does not provide any credentials in the GET + * request, so the URL must be publicly accessible. Including a long, random component in the URL may be used to prevent attackers from discovering the + * URL. + */ + url?: string; + } + interface HardwareInfo { + /** Battery shutdown temperature thresholds in Celsius for each battery on the device. */ + batteryShutdownTemperatures?: number[]; + /** Battery throttling temperature thresholds in Celsius for each battery on the device. */ + batteryThrottlingTemperatures?: number[]; + /** Brand of the device, e.g. Google. */ + brand?: string; + /** CPU shutdown temperature thresholds in Celsius for each CPU on the device. */ + cpuShutdownTemperatures?: number[]; + /** CPU throttling temperature thresholds in Celsius for each CPU on the device. */ + cpuThrottlingTemperatures?: number[]; + /** Baseband version, e.g. MDM9625_104662.22.05.34p. */ + deviceBasebandVersion?: string; + /** GPU shutdown temperature thresholds in Celsius for each GPU on the device. */ + gpuShutdownTemperatures?: number[]; + /** GPU throttling temperature thresholds in Celsius for each GPU on the device. */ + gpuThrottlingTemperatures?: number[]; + /** Name of the hardware, e.g. Angler. */ + hardware?: string; + /** Manufacturer, e.g. Motorola. */ + manufacturer?: string; + /** The model of the device, e.g. Asus Nexus 7. */ + model?: string; + /** The device serial number. */ + serialNumber?: string; + /** Device skin shutdown temperature thresholds in Celsius. */ + skinShutdownTemperatures?: number[]; + /** Device skin throttling temperature thresholds in Celsius. */ + skinThrottlingTemperatures?: number[]; + } + interface HardwareStatus { + /** Current battery temperatures in Celsius for each battery on the device. */ + batteryTemperatures?: number[]; + /** Current CPU temperatures in Celsius for each CPU on the device. */ + cpuTemperatures?: number[]; + /** + * CPU usages in percentage for each core available on the device. Usage is 0 for each unplugged core. Empty array implies that CPU usage is not supported + * in the system. + */ + cpuUsages?: number[]; + /** The time the measurements were taken. */ + createTime?: string; + /** Fan speeds in RPM for each fan on the device. Empty array means that there are no fans or fan speed is not supported on the system. */ + fanSpeeds?: number[]; + /** Current GPU temperatures in Celsius for each GPU on the device. */ + gpuTemperatures?: number[]; + /** Current device skin temperatures in Celsius. */ + skinTemperatures?: number[]; + } + interface ListDevicesResponse { + /** The list of devices. */ + devices?: Device[]; + /** If there are more results, a token to retrieve next page of results. */ + nextPageToken?: string; + } + interface ListOperationsResponse { + /** The standard List next-page token. */ + nextPageToken?: string; + /** A list of operations that matches the specified filter in the request. */ + operations?: Operation[]; + } + interface ListPoliciesResponse { + /** If there are more results, a token to retrieve next page of results. */ + nextPageToken?: string; + /** The list of policies. */ + policies?: Policy[]; + } + interface ManagedProperty { + /** The default value of the properties. BUNDLE_ARRAY properties never have a default value. */ + defaultValue?: any; + /** A longer description of the property, giving more detail of what it affects. Localized. */ + description?: string; + /** For CHOICE or MULTISELECT properties, the list of possible entries. */ + entries?: ManagedPropertyEntry[]; + /** The unique key that the application uses to identify the property, e.g. "com.google.android.gm.fieldname". */ + key?: string; + /** For BUNDLE_ARRAY properties, the list of nested properties. A BUNDLE_ARRAY property is at most two levels deep. */ + nestedProperties?: ManagedProperty[]; + /** The name of the property. Localized. */ + title?: string; + /** The type of the property. */ + type?: string; + } + interface ManagedPropertyEntry { + /** The human-readable name of the value. Localized. */ + name?: string; + /** The machine-readable value of the entry, which should be used in the configuration. Not localized. */ + value?: string; + } + interface MemoryEvent { + /** The number of free bytes in the medium, or for EXTERNAL_STORAGE_DETECTED, the total capacity in bytes of the storage medium. */ + byteCount?: string; + /** The creation time of the event. */ + createTime?: string; + /** Event type. */ + eventType?: string; + } + interface MemoryInfo { + /** Total internal storage on device in bytes. */ + totalInternalStorage?: string; + /** Total RAM on device in bytes. */ + totalRam?: string; + } + interface NetworkInfo { + /** IMEI number of the GSM device, e.g. A1000031212. */ + imei?: string; + /** MEID number of the CDMA device, e.g. A00000292788E1. */ + meid?: string; + /** WiFi MAC address of the device, e.g. 7c:11:11:11:11:11. */ + wifiMacAddress?: string; + } + interface NonComplianceDetail { + /** If the policy setting could not be applied, the current value of the setting on the device. */ + currentValue?: any; + /** + * For settings with nested fields, if a particular nested field is out of compliance, this specifies the full path to the offending field. The path is + * formatted in the same way the policy JSON field would be referenced in JavaScript, that is: 1) For object-typed fields, the field name is followed by a + * dot then by a subfield name. 2) For array-typed fields, the field name is followed by the array index enclosed in brackets. For example, to indicate + * a problem with the url field in the externalData field in the 3rd application, the path would be applications[2].externalData.url + */ + fieldPath?: string; + /** + * If package_name is set and the non-compliance reason is APP_NOT_INSTALLED or APP_NOT_UPDATED, the detailed reason the app cannot be installed or + * updated. + */ + installationFailureReason?: string; + /** The reason the device is not in compliance with the setting. */ + nonComplianceReason?: string; + /** The package name indicating which application is out of compliance, if applicable. */ + packageName?: string; + /** The name of the policy setting. This is the JSON field name of a top-level Policy field. */ + settingName?: string; + } + interface NonComplianceDetailCondition { + /** The reason the device is not in compliance with the setting. If not set, then this condition matches any reason. */ + nonComplianceReason?: string; + /** The package name indicating which application is out of compliance. If not set, then this condition matches any package name. */ + packageName?: string; + /** The name of the policy setting. This is the JSON field name of a top-level Policy field. If not set, then this condition matches any setting name. */ + settingName?: string; + } + interface Operation { + /** If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some + * services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should + * have the format of operations/some/unique/name. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is + * google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response + * should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred + * response type is TakeSnapshotResponse. + */ + response?: Record; + } + interface PasswordRequirements { + /** A device will be wiped after too many incorrect device-unlock passwords have been entered. A value of 0 means there is no restriction. */ + maximumFailedPasswordsForWipe?: number; + /** Password expiration timeout. */ + passwordExpirationTimeout?: string; + /** + * The length of the password history. After setting this, the user will not be able to enter a new password that is the same as any password in the + * history. A value of 0 means there is no restriction. + */ + passwordHistoryLength?: number; + /** + * The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when password_quality is NUMERIC, NUMERIC_COMPLEX, + * ALPHABETIC, ALPHANUMERIC, or COMPLEX. + */ + passwordMinimumLength?: number; + /** Minimum number of letters required in the password. Only enforced when password_quality is COMPLEX. */ + passwordMinimumLetters?: number; + /** Minimum number of lower case letters required in the password. Only enforced when password_quality is COMPLEX. */ + passwordMinimumLowerCase?: number; + /** Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when password_quality is COMPLEX. */ + passwordMinimumNonLetter?: number; + /** Minimum number of numerical digits required in the password. Only enforced when password_quality is COMPLEX. */ + passwordMinimumNumeric?: number; + /** Minimum number of symbols required in the password. Only enforced when password_quality is COMPLEX. */ + passwordMinimumSymbols?: number; + /** Minimum number of upper case letters required in the password. Only enforced when password_quality is COMPLEX. */ + passwordMinimumUpperCase?: number; + /** The required password quality. */ + passwordQuality?: string; + } + interface PermissionGrant { + /** The android permission, e.g. android.permission.READ_CALENDAR. */ + permission?: string; + /** The policy for granting the permission. */ + policy?: string; + } + interface PersistentPreferredActivity { + /** + * The intent actions to match in the filter. If any actions are included in the filter, then an intent's action must be one of those values for it to + * match. If no actions are included, the intent action is ignored. + */ + actions?: string[]; + /** + * The intent categories to match in the filter. An intent includes the categories that it requires, all of which must be included in the filter in order + * to match. In other words, adding a category to the filter has no impact on matching unless that category is specified in the intent. + */ + categories?: string[]; + /** + * The activity that should be the default intent handler. This should be an Android component name, e.g. com.android.enterprise.app/.MainActivity. + * Alternatively, the value may be the package name of an app, which causes Android Device Policy to choose an appropriate activity from the app to handle + * the intent. + */ + receiverActivity?: string; + } + interface Policy { + /** Whether adding new users and profiles is disabled. */ + addUserDisabled?: boolean; + /** Whether adjusting the master volume is disabled. */ + adjustVolumeDisabled?: boolean; + /** Policy applied to apps. */ + applications?: ApplicationPolicy[]; + /** Whether auto time is required, which prevents the user from manually setting the date and time. */ + autoTimeRequired?: boolean; + /** + * Whether applications other than the ones configured in applications are blocked from being installed. When set, applications that were installed under + * a previous policy but no longer appear in the policy are automatically uninstalled. + */ + blockApplicationsEnabled?: boolean; + /** Whether all cameras on the device are disabled. */ + cameraDisabled?: boolean; + /** + * Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, + * all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules. + */ + complianceRules?: ComplianceRule[]; + /** Whether the user is allowed to enable debugging features. */ + debuggingFeaturesAllowed?: boolean; + /** The default permission policy for requests for runtime permissions. */ + defaultPermissionPolicy?: string; + /** Whether factory resetting from settings is disabled. */ + factoryResetDisabled?: boolean; + /** + * Email addresses of device administrators for factory reset protection. When the device is factory reset, it will require one of these admins to log in + * with the Google account email and password to unlock the device. If no admins are specified, the device will not provide factory reset protection. + */ + frpAdminEmails?: string[]; + /** Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled. */ + funDisabled?: boolean; + /** Whether the user is allowed to enable the "Unknown Sources" setting, which allows installation of apps from unknown sources. */ + installUnknownSourcesAllowed?: boolean; + /** Whether the keyguard is disabled. */ + keyguardDisabled?: boolean; + /** Maximum time in milliseconds for user activity until the device will lock. A value of 0 means there is no restriction. */ + maximumTimeToLock?: string; + /** Whether adding or removing accounts is disabled. */ + modifyAccountsDisabled?: boolean; + /** The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId} */ + name?: string; + /** + * Whether the network escape hatch is enabled. If a network connection can't be made at boot time, the escape hatch prompts the user to temporarily + * connect to a network in order to refresh the device policy. After applying policy, the temporary network will be forgotten and the device will continue + * booting. This prevents being unable to connect to a network if there is no suitable network in the last policy and the device boots into an app in lock + * task mode, or the user is otherwise unable to reach device settings. + */ + networkEscapeHatchEnabled?: boolean; + /** Network configuration for the device. See configure networks for more information. */ + openNetworkConfiguration?: Record; + /** Password requirements. */ + passwordRequirements?: PasswordRequirements; + /** Default intent handler activities. */ + persistentPreferredActivities?: PersistentPreferredActivity[]; + /** Whether removing other users is disabled. */ + removeUserDisabled?: boolean; + /** Whether rebooting the device into safe boot is disabled. */ + safeBootDisabled?: boolean; + /** Whether screen capture is disabled. */ + screenCaptureDisabled?: boolean; + /** Whether the status bar is disabled. This disables notifications, quick settings and other screen overlays that allow escape from full-screen mode. */ + statusBarDisabled?: boolean; + /** Status reporting settings */ + statusReportingSettings?: StatusReportingSettings; + /** + * The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximum_time_to_lock so that the device + * doesn't lock itself while it stays on. + */ + stayOnPluggedModes?: string[]; + /** + * The system update policy, which controls how OS updates are applied. If the update type is WINDOWED and the device has a device account, the update + * window will automatically apply to Play app updates as well. + */ + systemUpdate?: SystemUpdate; + /** Whether the microphone is muted and adjusting microphone volume is disabled. */ + unmuteMicrophoneDisabled?: boolean; + /** The version of the policy. This is a read-only field. The version is incremented each time the policy is updated. */ + version?: string; + /** Whether configuring WiFi access points is disabled. */ + wifiConfigDisabled?: boolean; + /** Whether WiFi networks defined in Open Network Configuration are locked so they cannot be edited by the user. */ + wifiConfigsLockdownEnabled?: boolean; + } + interface PowerManagementEvent { + /** For BATTERY_LEVEL_COLLECTED events, the battery level as a percentage. */ + batteryLevel?: number; + /** The creation time of the event. */ + createTime?: string; + /** Event type. */ + eventType?: string; + } + interface SignupUrl { + /** The name of the resource. This must be included in the create enterprise request at the end of the signup flow. */ + name?: string; + /** A URL under which the Admin can sign up for an enterprise. The page pointed to cannot be rendered in an iframe. */ + url?: string; + } + interface SoftwareInfo { + /** Android build Id string meant for displaying to the user, e.g. shamu-userdebug 6.0.1 MOB30I 2756745 dev-keys. */ + androidBuildNumber?: string; + /** Build time. */ + androidBuildTime?: string; + /** The user visible Android version string, e.g. 6.0.1. */ + androidVersion?: string; + /** The system bootloader version number, e.g. 0.6.7. */ + bootloaderVersion?: string; + /** Kernel version, e.g. 2.6.32.9-g103d848. */ + deviceKernelVersion?: string; + /** Security patch level, e.g. 2016-05-01. */ + securityPatchLevel?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ + details?: Array>; + /** + * 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; + } + interface StatusReportingSettings { + /** Whether displays reporting is enabled. */ + displayInfoEnabled?: boolean; + /** Whether hardware status reporting is enabled. */ + hardwareStatusEnabled?: boolean; + /** Whether memory info reporting is enabled. */ + memoryInfoEnabled?: boolean; + /** Whether network info reporting is enabled. */ + networkInfoEnabled?: boolean; + /** Whether power management event reporting is enabled. */ + powerManagementEventsEnabled?: boolean; + /** Whether software info reporting is enabled. */ + softwareInfoEnabled?: boolean; + } + interface SystemUpdate { + /** + * If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device local time. This value must be + * between 0 and 1439, inclusive. If this value is less than start_minutes, then the maintenance window spans midnight. If the maintenance window + * specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time. + */ + endMinutes?: number; + /** + * If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in device local time. This value must be + * between 0 and 1439, inclusive. + */ + startMinutes?: number; + /** The type of system update to configure. */ + type?: string; + } + interface UserFacingMessage { + /** + * The default message that gets displayed if no localized message is specified, or the user's locale does not match with any of the localized messages. A + * default message must be provided if any localized messages are provided. + */ + defaultMessage?: string; + /** A map which contains pairs. The locale is a BCP 47 language code, e.g. en-US, es-ES, fr. */ + localizedMessages?: Record; + } + interface WebToken { + /** The name of the web token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/webTokens/{webTokenId}. */ + name?: string; + /** + * The URL of the parent frame hosting the iframe with the embedded UI. To prevent XSS, the iframe may not be hosted at other URLs. The URL must use the + * https scheme. + */ + parentFrameUrl?: string; + /** Permissions the admin may exercise in the embedded UI. The admin must have all of these permissions in order to view the UI. */ + permissions?: string[]; + /** The token value which is used in the hosting page to generate the iframe with the embedded UI. This is a read-only field generated by the server. */ + value?: string; + } + interface ApplicationsResource { + /** Gets info about an application. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The preferred language for localized application info, as a BCP47 tag (e.g. "en-US", "de"). If not specified the default language of the application + * will be used. + */ + languageCode?: string; + /** The name of the application in the form enterprises/{enterpriseId}/applications/{package_name} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface OperationsResource { + /** + * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If + * the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check + * whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; + * instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be cancelled. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be deleted. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name + * binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API + * services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name + * includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection + * id. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation's parent resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DevicesResource { + /** Deletes a device, which causes the device to be wiped. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets a device. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status + * of the command. + */ + issueCommand(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists devices for a given enterprise. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The requested page size. The actual page size may be fixed to a min or max value. */ + pageSize?: number; + /** A token identifying a page of results the server should return. */ + pageToken?: string; + /** The name of the enterprise in the form enterprises/{enterpriseId} */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates a device. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The field mask indicating the fields to update. If not set, all modifiable fields will be modified. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + operations: OperationsResource; + } + interface EnrollmentTokensResource { + /** Creates an enrollment token for a given enterprise. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The name of the enterprise in the form enterprises/{enterpriseId} */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes an enrollment token, which prevents future use of the token. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface PoliciesResource { + /** Deletes a policy. This operation is only permitted if no devices are currently referencing the policy. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets a policy. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists policies for a given enterprise. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The requested page size. The actual page size may be fixed to a min or max value. */ + pageSize?: number; + /** A token identifying a page of results the server should return. */ + pageToken?: string; + /** The name of the enterprise in the form enterprises/{enterpriseId} */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates or creates a policy. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The field mask indicating the fields to update. If not set, all modifiable fields will be modified. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface WebTokensResource { + /** Creates a web token to access an embeddable managed Google Play web UI for a given enterprise. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The name of the enterprise in the form enterprises/{enterpriseId} */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface EnterprisesResource { + /** Creates an enterprise by completing the enterprise signup flow. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The enterprise token appended to the callback URL. */ + enterpriseToken?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The id of the Google Cloud Platform project which will own the enterprise. */ + projectId?: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The name of the SignupUrl used to sign up for the enterprise. */ + signupUrlName?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets an enterprise. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the enterprise in the form enterprises/{enterpriseId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates an enterprise. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the enterprise in the form enterprises/{enterpriseId} */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The field mask indicating the fields to update. If not set, all modifiable fields will be modified. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + applications: ApplicationsResource; + devices: DevicesResource; + enrollmentTokens: EnrollmentTokensResource; + policies: PoliciesResource; + webTokens: WebTokensResource; + } + interface SignupUrlsResource { + /** Creates an enterprise signup URL. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The callback URL to which the admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a query + * parameter to this URL named enterpriseToken which will contain an opaque token to be used for the create enterprise request. The URL will be parsed + * then reformatted in order to add the enterpriseToken parameter, so there may be some minor formatting changes. + */ + callbackUrl?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The id of the Google Cloud Platform project which will own the enterprise. */ + projectId?: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.androidmanagement/readme.md b/types/gapi.client.androidmanagement/readme.md new file mode 100644 index 0000000000..e38e2b2653 --- /dev/null +++ b/types/gapi.client.androidmanagement/readme.md @@ -0,0 +1,74 @@ +# TypeScript typings for Android Management API v1 +The Android Management API provides remote enterprise management of Android devices and apps. +For detailed description please check [documentation](https://developers.google.com/android/management). + +## Installing + +Install typings for Android Management API: +``` +npm install @types/gapi.client.androidmanagement@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('androidmanagement', 'v1', () => { + // now we can use gapi.client.androidmanagement + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage Android devices and apps for your customers + 'https://www.googleapis.com/auth/androidmanagement', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Android Management API resources: + +```typescript + +/* +Creates an enterprise by completing the enterprise signup flow. +*/ +await gapi.client.enterprises.create({ }); + +/* +Gets an enterprise. +*/ +await gapi.client.enterprises.get({ name: "name", }); + +/* +Updates an enterprise. +*/ +await gapi.client.enterprises.patch({ name: "name", }); + +/* +Creates an enterprise signup URL. +*/ +await gapi.client.signupUrls.create({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.androidmanagement/tsconfig.json b/types/gapi.client.androidmanagement/tsconfig.json new file mode 100644 index 0000000000..3cfbad08e0 --- /dev/null +++ b/types/gapi.client.androidmanagement/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.androidmanagement-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.androidmanagement/tslint.json b/types/gapi.client.androidmanagement/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.androidmanagement/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.androidpublisher/gapi.client.androidpublisher-tests.ts b/types/gapi.client.androidpublisher/gapi.client.androidpublisher-tests.ts new file mode 100644 index 0000000000..6dfad512ac --- /dev/null +++ b/types/gapi.client.androidpublisher/gapi.client.androidpublisher-tests.ts @@ -0,0 +1,122 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('androidpublisher', 'v2', () => { + /** now we can use gapi.client.androidpublisher */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your Google Play Developer account */ + 'https://www.googleapis.com/auth/androidpublisher', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Commits/applies the changes made in this edit back to the app. */ + await gapi.client.edits.commit({ + editId: "editId", + packageName: "packageName", + }); + /** + * 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. + */ + await gapi.client.edits.delete({ + editId: "editId", + packageName: "packageName", + }); + /** Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired). */ + await gapi.client.edits.get({ + editId: "editId", + packageName: "packageName", + }); + /** Creates a new edit for an app, populated with the app's current state. */ + await gapi.client.edits.insert({ + packageName: "packageName", + }); + /** Checks that the edit can be successfully committed. The edit's changes are not applied to the live app. */ + await gapi.client.edits.validate({ + editId: "editId", + packageName: "packageName", + }); + /** Lists the user's current inapp item or subscription entitlements */ + await gapi.client.entitlements.list({ + maxResults: 1, + packageName: "packageName", + productId: "productId", + startIndex: 4, + token: "token", + }); + await gapi.client.inappproducts.batch({ + }); + /** Delete an in-app product for an app. */ + await gapi.client.inappproducts.delete({ + packageName: "packageName", + sku: "sku", + }); + /** Returns information about the in-app product specified. */ + await gapi.client.inappproducts.get({ + packageName: "packageName", + sku: "sku", + }); + /** Creates a new in-app product for an app. */ + await gapi.client.inappproducts.insert({ + autoConvertMissingPrices: true, + packageName: "packageName", + }); + /** List all the in-app products for an Android app, both subscriptions and managed in-app products.. */ + await gapi.client.inappproducts.list({ + maxResults: 1, + packageName: "packageName", + startIndex: 3, + token: "token", + }); + /** Updates the details of an in-app product. This method supports patch semantics. */ + await gapi.client.inappproducts.patch({ + autoConvertMissingPrices: true, + packageName: "packageName", + sku: "sku", + }); + /** Updates the details of an in-app product. */ + await gapi.client.inappproducts.update({ + autoConvertMissingPrices: true, + packageName: "packageName", + sku: "sku", + }); + /** Returns a single review. */ + await gapi.client.reviews.get({ + packageName: "packageName", + reviewId: "reviewId", + translationLanguage: "translationLanguage", + }); + /** Returns a list of reviews. Only reviews from last week will be returned. */ + await gapi.client.reviews.list({ + maxResults: 1, + packageName: "packageName", + startIndex: 3, + token: "token", + translationLanguage: "translationLanguage", + }); + /** Reply to a single review, or update an existing reply. */ + await gapi.client.reviews.reply({ + packageName: "packageName", + reviewId: "reviewId", + }); + } +}); diff --git a/types/gapi.client.androidpublisher/index.d.ts b/types/gapi.client.androidpublisher/index.d.ts new file mode 100644 index 0000000000..beae0fb512 --- /dev/null +++ b/types/gapi.client.androidpublisher/index.d.ts @@ -0,0 +1,2062 @@ +// Type definitions for Google Google Play Developer API v2 2.0 +// Project: https://developers.google.com/android-publisher +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/androidpublisher/v2/rest + +/// + +declare namespace gapi.client { + /** Load Google Play Developer API v2 */ + function load(name: "androidpublisher", version: "v2"): PromiseLike; + function load(name: "androidpublisher", version: "v2", callback: () => any): void; + + const edits: androidpublisher.EditsResource; + + const entitlements: androidpublisher.EntitlementsResource; + + const inappproducts: androidpublisher.InappproductsResource; + + const purchases: androidpublisher.PurchasesResource; + + const reviews: androidpublisher.ReviewsResource; + + namespace androidpublisher { + interface Apk { + /** Information about the binary payload of this APK. */ + binary?: ApkBinary; + /** The version code of the APK, as specified in the APK's manifest file. */ + versionCode?: number; + } + interface 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; + } + interface ApkListing { + /** The language code, in BCP 47 format (eg "en-US"). */ + language?: string; + /** Describe what's new in your APK. */ + recentChanges?: string; + } + interface ApkListingsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidpublisher#apkListingsListResponse". */ + kind?: string; + listings?: ApkListing[]; + } + interface ApksAddExternallyHostedRequest { + /** The definition of the externally-hosted APK and where it is located. */ + externallyHostedApk?: ExternallyHostedApk; + } + interface ApksAddExternallyHostedResponse { + /** The definition of the externally-hosted APK and where it is located. */ + externallyHostedApk?: ExternallyHostedApk; + } + interface ApksListResponse { + apks?: Apk[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidpublisher#apksListResponse". */ + kind?: string; + } + interface 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; + } + interface 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; + } + interface Comment { + /** A comment from a developer. */ + developerComment?: DeveloperComment; + /** A comment from a user. */ + userComment?: UserComment; + } + interface DeobfuscationFile { + /** The type of the deobfuscation file. */ + symbolType?: string; + } + interface DeobfuscationFilesUploadResponse { + deobfuscationFile?: DeobfuscationFile; + } + interface DeveloperComment { + /** The last time at which this comment was updated. */ + lastModified?: Timestamp; + /** The content of the comment, i.e. reply body. */ + text?: string; + } + interface 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; + } + interface Entitlement { + /** This kind represents an entitlement object in the androidpublisher service. */ + kind?: string; + /** The SKU of the product. */ + productId?: string; + /** + * The type of the inapp product. Possible values are: + * - In-app item: "inapp" + * - Subscription: "subs" + */ + productType?: string; + /** The token which can be verified using the subscriptions or products API. */ + token?: string; + } + interface EntitlementsListResponse { + pageInfo?: PageInfo; + resources?: Entitlement[]; + tokenPagination?: TokenPagination; + } + interface 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; + } + interface ExpansionFilesUploadResponse { + expansionFile?: ExpansionFile; + } + interface 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?: ExternallyHostedApkUsesPermission[]; + /** The version code of this APK. */ + versionCode?: number; + /** The version name of this APK. */ + versionName?: string; + } + interface ExternallyHostedApkUsesPermission { + /** Optionally, the maximum SDK version for which the permission is required. */ + maxSdkVersion?: number; + /** The name of the permission requested. */ + name?: string; + } + interface 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; + } + interface ImagesDeleteAllResponse { + deleted?: Image[]; + } + interface ImagesListResponse { + images?: Image[]; + } + interface ImagesUploadResponse { + image?: Image; + } + interface 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?: Price; + /** List of localized title and description data. */ + listings?: Record; + /** 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?: Record; + /** 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?: 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; + } + interface InAppProductListing { + description?: string; + title?: string; + } + interface InappproductsBatchRequest { + entrys?: InappproductsBatchRequestEntry[]; + } + interface InappproductsBatchRequestEntry { + batchId?: number; + inappproductsinsertrequest?: InappproductsInsertRequest; + inappproductsupdaterequest?: InappproductsUpdateRequest; + methodName?: string; + } + interface InappproductsBatchResponse { + entrys?: InappproductsBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidpublisher#inappproductsBatchResponse". */ + kind?: string; + } + interface InappproductsBatchResponseEntry { + batchId?: number; + inappproductsinsertresponse?: InappproductsInsertResponse; + inappproductsupdateresponse?: InappproductsUpdateResponse; + } + interface InappproductsInsertRequest { + inappproduct?: InAppProduct; + } + interface InappproductsInsertResponse { + inappproduct?: InAppProduct; + } + interface InappproductsListResponse { + inappproduct?: InAppProduct[]; + /** Identifies what kind of resource this is. Value: the fixed string "androidpublisher#inappproductsListResponse". */ + kind?: string; + pageInfo?: PageInfo; + tokenPagination?: TokenPagination; + } + interface InappproductsUpdateRequest { + inappproduct?: InAppProduct; + } + interface InappproductsUpdateResponse { + inappproduct?: InAppProduct; + } + interface 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; + } + interface ListingsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidpublisher#listingsListResponse". */ + kind?: string; + listings?: Listing[]; + } + interface 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; + } + interface PageInfo { + resultPerPage?: number; + startIndex?: number; + totalResults?: number; + } + interface 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; + } + interface 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 + * - Cancelled + */ + purchaseState?: number; + /** The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). */ + purchaseTimeMillis?: string; + } + interface 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?: Price; + /** Defines the first day on which the price takes effect. */ + start?: MonthDay; + } + interface Review { + /** The name of the user who wrote the review. */ + authorName?: string; + /** A repeated field containing comments for the review. */ + comments?: Comment[]; + /** Unique identifier for this review. */ + reviewId?: string; + } + interface ReviewReplyResult { + /** The time at which the reply took effect. */ + lastEdited?: Timestamp; + /** The reply text that was applied. */ + replyText?: string; + } + interface ReviewsListResponse { + pageInfo?: PageInfo; + reviews?: Review[]; + tokenPagination?: TokenPagination; + } + interface 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; + } + interface ReviewsReplyResponse { + result?: ReviewReplyResult; + } + interface Season { + /** Inclusive end date of the recurrence period. */ + end?: 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?: Prorate[]; + /** Inclusive start date of the recurrence period. */ + start?: MonthDay; + } + interface 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; + } + interface SubscriptionPurchase { + /** Whether the subscription will automatically be renewed when it reaches its current expiry time. */ + autoRenewing?: boolean; + /** + * The reason why a subscription was cancelled or is not auto-renewing. Possible values are: + * - User cancelled the subscription + * - Subscription was cancelled by the system, for example because of a billing problem + * - Subscription was replaced with a new subscription + */ + cancelReason?: number; + /** 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; + /** Time at which the subscription will expire, in milliseconds since the Epoch. */ + expiryTimeMillis?: string; + /** This kind represents a subscriptionPurchase object in the androidpublisher service. */ + kind?: 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; + /** 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; + } + interface SubscriptionPurchasesDeferRequest { + /** The information about the new desired expiry time for the subscription. */ + deferralInfo?: SubscriptionDeferralInfo; + } + interface SubscriptionPurchasesDeferResponse { + /** The new expiry time for the subscription in milliseconds since the Epoch. */ + newExpiryTimeMillis?: string; + } + interface Testers { + googleGroups?: string[]; + googlePlusCommunities?: string[]; + } + interface Timestamp { + nanos?: number; + seconds?: string; + } + interface TokenPagination { + nextPageToken?: string; + previousPageToken?: string; + } + interface Track { + track?: string; + userFraction?: number; + versionCodes?: number[]; + } + interface TracksListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "androidpublisher#tracksListResponse". */ + kind?: string; + tracks?: Track[]; + } + interface 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?: DeviceMetadata; + /** The last time at which this comment was updated. */ + lastModified?: 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; + } + interface 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 cancelled/refunded/charged-back, in milliseconds since the epoch (Jan 1, 1970). */ + voidedTimeMillis?: string; + } + interface VoidedPurchasesListResponse { + pageInfo?: PageInfo; + tokenPagination?: TokenPagination; + voidedPurchases?: VoidedPurchase[]; + } + interface ApklistingsResource { + /** Deletes the APK-specific localized listing for a specified APK and language code. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The APK version code whose APK-specific listings should be read or modified. */ + apkVersionCode: number; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass + * "de-AT". + */ + language: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes all the APK-specific localized listings for a specified APK. */ + deleteall(request: { + /** Data format for the response. */ + alt?: string; + /** The APK version code whose APK-specific listings should be read or modified. */ + apkVersionCode: number; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Fetches the APK-specific localized listing for a specified APK and language code. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The APK version code whose APK-specific listings should be read or modified. */ + apkVersionCode: number; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass + * "de-AT". + */ + language: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all the APK-specific localized listings for a specified APK. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The APK version code whose APK-specific listings should be read or modified. */ + apkVersionCode: number; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates or creates the APK-specific localized listing for a specified APK and language code. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The APK version code whose APK-specific listings should be read or modified. */ + apkVersionCode: number; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass + * "de-AT". + */ + language: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates or creates the APK-specific localized listing for a specified APK and language code. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The APK version code whose APK-specific listings should be read or modified. */ + apkVersionCode: number; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass + * "de-AT". + */ + language: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ApksResource { + /** + * 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. + */ + addexternallyhosted(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + list(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + upload(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DeobfuscationfilesResource { + /** Uploads the deobfuscation file of the specified APK. If a deobfuscation file already exists, it will be replaced. */ + upload(request: { + /** Data format for the response. */ + alt?: string; + /** The version code of the APK whose deobfuscation file is being uploaded. */ + apkVersionCode: number; + deobfuscationFileType: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier of the Android app for which the deobfuscatiuon files are being uploaded; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DetailsResource { + /** Fetches app details for this edit. This includes the default language and developer support contact information. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates app details for this edit. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates app details for this edit. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ExpansionfilesResource { + /** Fetches the Expansion File configuration for the APK specified. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * 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. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Uploads and attaches a new Expansion File to the APK specified. */ + upload(request: { + /** Data format for the response. */ + alt?: string; + /** 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ImagesResource { + /** Deletes the image (specified by id) from the edit. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Unique identifier an image within the set of images attached to this edit. */ + imageId: string; + imageType: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes all images for the specified language and image type. */ + deleteall(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + imageType: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all images for the specified language and image type. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + imageType: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Uploads a new image and adds it to the list of images for the specified language and image type. */ + upload(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + imageType: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ListingsResource { + /** Deletes the specified localized store listing from an edit. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes all localized listings from an edit. */ + deleteall(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Fetches information about a localized store listing. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns all of the localized store listings attached to this edit. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates or updates a localized store listing. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates or updates a localized store listing. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** 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; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TestersResource { + get(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + track: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + track: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + update(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + track: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TracksResource { + /** Fetches the track configuration for the specified track type. Includes the APK version codes that are in this track. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The track type to read or modify. */ + track: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all the track configurations for this edit. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * 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. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The track type to read or modify. */ + track: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * 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. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The track type to read or modify. */ + track: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface EditsResource { + /** Commits/applies the changes made in this edit back to the app. */ + commit(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * 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. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired). */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a new edit for an app, populated with the app's current state. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Checks that the edit can be successfully committed. The edit's changes are not applied to the live app. */ + validate(request: { + /** Data format for the response. */ + alt?: string; + /** Unique identifier for this edit. */ + editId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app that is being updated; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + apklistings: ApklistingsResource; + apks: ApksResource; + deobfuscationfiles: DeobfuscationfilesResource; + details: DetailsResource; + expansionfiles: ExpansionfilesResource; + images: ImagesResource; + listings: ListingsResource; + testers: TestersResource; + tracks: TracksResource; + } + interface EntitlementsResource { + /** Lists the user's current inapp item or subscription entitlements */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application the inapp product was sold in (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The product id of the inapp product (for example, 'sku1'). This can be used to restrict the result set. */ + productId?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + startIndex?: number; + token?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface InappproductsResource { + batch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Delete an in-app product for an app. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Unique identifier for the in-app product. */ + sku: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns information about the in-app product specified. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Unique identifier for the in-app product. */ + sku: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a new in-app product for an app. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all the in-app products for an Android app, both subscriptions and managed in-app products.. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app with in-app products; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + startIndex?: number; + token?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the details of an in-app product. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Unique identifier for the in-app product. */ + sku: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the details of an in-app product. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Unique identifier for the in-app product. */ + sku: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProductsResource { + /** Checks the purchase and consumption status of an inapp item. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application the inapp product was sold in (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The inapp product SKU (for example, 'com.some.thing.inapp1'). */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The token provided to the user's device when the inapp product was purchased. */ + token: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SubscriptionsResource { + /** Cancels a user's subscription purchase. The subscription remains valid until its expiration time. */ + cancel(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Defers a user's subscription purchase until a specified future expiration time. */ + defer(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Checks whether a user's subscription purchase is valid and returns its expiry time. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Refunds a user's subscription purchase, but the subscription remains valid until its expiration time and it will continue to recur. */ + refund(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Refunds and immediately revokes a user's subscription purchase. Access to the subscription will be terminated immediately and it will stop recurring. */ + revoke(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface VoidedpurchasesResource { + /** Lists the purchases that were cancelled, refunded or charged-back. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The package name of the application for which voided purchases need to be returned (for example, 'com.some.thing'). */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PurchasesResource { + products: ProductsResource; + subscriptions: SubscriptionsResource; + voidedpurchases: VoidedpurchasesResource; + } + interface ReviewsResource { + /** Returns a single review. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + reviewId: string; + translationLanguage?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns a list of reviews. Only reviews from last week will be returned. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + startIndex?: number; + token?: string; + translationLanguage?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Reply to a single review, or update an existing reply. */ + reply(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". */ + packageName: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + reviewId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.androidpublisher/readme.md b/types/gapi.client.androidpublisher/readme.md new file mode 100644 index 0000000000..a4bbff05c0 --- /dev/null +++ b/types/gapi.client.androidpublisher/readme.md @@ -0,0 +1,134 @@ +# TypeScript typings for Google Play Developer API v2 +Lets Android application developers access their Google Play accounts. +For detailed description please check [documentation](https://developers.google.com/android-publisher). + +## Installing + +Install typings for Google Play Developer API: +``` +npm install @types/gapi.client.androidpublisher@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('androidpublisher', 'v2', () => { + // now we can use gapi.client.androidpublisher + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your Google Play Developer account + 'https://www.googleapis.com/auth/androidpublisher', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Play Developer API resources: + +```typescript + +/* +Commits/applies the changes made in this edit back to the app. +*/ +await gapi.client.edits.commit({ editId: "editId", packageName: "packageName", }); + +/* +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. +*/ +await gapi.client.edits.delete({ editId: "editId", packageName: "packageName", }); + +/* +Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired). +*/ +await gapi.client.edits.get({ editId: "editId", packageName: "packageName", }); + +/* +Creates a new edit for an app, populated with the app's current state. +*/ +await gapi.client.edits.insert({ packageName: "packageName", }); + +/* +Checks that the edit can be successfully committed. The edit's changes are not applied to the live app. +*/ +await gapi.client.edits.validate({ editId: "editId", packageName: "packageName", }); + +/* +Lists the user's current inapp item or subscription entitlements +*/ +await gapi.client.entitlements.list({ packageName: "packageName", }); + +/* +undefined +*/ +await gapi.client.inappproducts.batch({ }); + +/* +Delete an in-app product for an app. +*/ +await gapi.client.inappproducts.delete({ packageName: "packageName", sku: "sku", }); + +/* +Returns information about the in-app product specified. +*/ +await gapi.client.inappproducts.get({ packageName: "packageName", sku: "sku", }); + +/* +Creates a new in-app product for an app. +*/ +await gapi.client.inappproducts.insert({ packageName: "packageName", }); + +/* +List all the in-app products for an Android app, both subscriptions and managed in-app products.. +*/ +await gapi.client.inappproducts.list({ packageName: "packageName", }); + +/* +Updates the details of an in-app product. This method supports patch semantics. +*/ +await gapi.client.inappproducts.patch({ packageName: "packageName", sku: "sku", }); + +/* +Updates the details of an in-app product. +*/ +await gapi.client.inappproducts.update({ packageName: "packageName", sku: "sku", }); + +/* +Returns a single review. +*/ +await gapi.client.reviews.get({ packageName: "packageName", reviewId: "reviewId", }); + +/* +Returns a list of reviews. Only reviews from last week will be returned. +*/ +await gapi.client.reviews.list({ packageName: "packageName", }); + +/* +Reply to a single review, or update an existing reply. +*/ +await gapi.client.reviews.reply({ packageName: "packageName", reviewId: "reviewId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.androidpublisher/tsconfig.json b/types/gapi.client.androidpublisher/tsconfig.json new file mode 100644 index 0000000000..6f724fe172 --- /dev/null +++ b/types/gapi.client.androidpublisher/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.androidpublisher-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.androidpublisher/tslint.json b/types/gapi.client.androidpublisher/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.androidpublisher/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.appengine/gapi.client.appengine-tests.ts b/types/gapi.client.appengine/gapi.client.appengine-tests.ts new file mode 100644 index 0000000000..221a648770 --- /dev/null +++ b/types/gapi.client.appengine/gapi.client.appengine-tests.ts @@ -0,0 +1,64 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('appengine', 'v1', () => { + /** now we can use gapi.client.appengine */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your applications deployed on Google App Engine */ + 'https://www.googleapis.com/auth/appengine.admin', + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Creates an App Engine application for a Google Cloud Platform project. Required fields: + * id - The ID of the target Cloud Platform project. + * location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about + * App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). + */ + await gapi.client.apps.create({ + }); + /** Gets information about an application. */ + await gapi.client.apps.get({ + appsId: "appsId", + }); + /** + * Updates the specified Application resource. You can update the following fields: + * auth_domain - Google authentication domain for controlling user access to the application. + * default_cookie_expiration - Cookie expiration policy for the application. + */ + await gapi.client.apps.patch({ + appsId: "appsId", + updateMask: "updateMask", + }); + /** + * Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. + * Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. + */ + await gapi.client.apps.repair({ + appsId: "appsId", + }); + } +}); diff --git a/types/gapi.client.appengine/index.d.ts b/types/gapi.client.appengine/index.d.ts new file mode 100644 index 0000000000..2b97368fb5 --- /dev/null +++ b/types/gapi.client.appengine/index.d.ts @@ -0,0 +1,2263 @@ +// Type definitions for Google Google App Engine Admin API v1 1.0 +// Project: https://cloud.google.com/appengine/docs/admin-api/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://appengine.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google App Engine Admin API v1 */ + function load(name: "appengine", version: "v1"): PromiseLike; + function load(name: "appengine", version: "v1", callback: () => any): void; + + const apps: appengine.AppsResource; + + namespace appengine { + interface ApiConfigHandler { + /** Action to take when users access resources that require authentication. Defaults to redirect. */ + authFailAction?: string; + /** Level of login required to access this resource. Defaults to optional. */ + login?: string; + /** Path to the script from the application root directory. */ + script?: string; + /** Security (HTTPS) enforcement for this URL. */ + securityLevel?: string; + /** URL to serve the endpoint at. */ + url?: string; + } + interface ApiEndpointHandler { + /** Path to the script from the application root directory. */ + scriptPath?: string; + } + interface Application { + /** Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. */ + authDomain?: string; + /** + * Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can + * be used by the gcloud deployment commands.@OutputOnly + */ + codeBucket?: string; + /** Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly */ + defaultBucket?: string; + /** Cookie expiration policy for this application. */ + defaultCookieExpiration?: string; + /** Hostname used to reach this application, as resolved by App Engine.@OutputOnly */ + defaultHostname?: string; + /** + * HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. Up to 20 + * dispatch rules can be supported.@OutputOnly + */ + dispatchRules?: UrlDispatchRule[]; + /** The feature specific settings to be used in the application. */ + featureSettings?: FeatureSettings; + /** The Google Container Registry domain used for storing managed build docker images for this application. */ + gcrDomain?: string; + iap?: IdentityAwareProxy; + /** + * Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy + * your application. Example: myapp. + */ + id?: string; + /** + * Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of + * the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern + * US + */ + locationId?: string; + /** Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly */ + name?: string; + /** Serving status of this application. */ + servingStatus?: string; + } + interface AuthorizedCertificate { + /** The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority. */ + certificateRawData?: CertificateRawData; + /** The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate. */ + displayName?: string; + /** + * Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not + * have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly + */ + domainMappingsCount?: number; + /** Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly */ + domainNames?: string[]; + /** + * The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time + * using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly + */ + expireTime?: string; + /** Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly */ + id?: string; + /** Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly */ + name?: string; + /** + * The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not + * represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate + * mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE + * option.@OutputOnly + */ + visibleDomainMappings?: string[]; + } + interface AuthorizedDomain { + /** Fully qualified domain name of the domain authorized for use. Example: example.com. */ + id?: string; + /** Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly */ + name?: string; + } + interface AutomaticScaling { + /** + * Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. + * Only applicable for VM runtimes. + */ + coolDownPeriod?: string; + /** Target scaling by CPU usage. */ + cpuUtilization?: CpuUtilization; + /** Target scaling by disk usage. */ + diskUtilization?: DiskUtilization; + /** Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value. */ + maxConcurrentRequests?: number; + /** Maximum number of idle instances that should be maintained for this version. */ + maxIdleInstances?: number; + /** Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. */ + maxPendingLatency?: string; + /** Maximum number of instances that should be started to handle requests. */ + maxTotalInstances?: number; + /** Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service. */ + minIdleInstances?: number; + /** Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it. */ + minPendingLatency?: string; + /** Minimum number of instances that should be maintained for this version. */ + minTotalInstances?: number; + /** Target scaling by network usage. */ + networkUtilization?: NetworkUtilization; + /** Target scaling by request utilization. */ + requestUtilization?: RequestUtilization; + } + interface BasicScaling { + /** Duration of time after the last request that an instance must wait before the instance is shut down. */ + idleTimeout?: string; + /** Maximum number of instances to create for this version. */ + maxInstances?: number; + } + interface BatchUpdateIngressRulesRequest { + /** A list of FirewallRules to replace the existing set. */ + ingressRules?: FirewallRule[]; + } + interface BatchUpdateIngressRulesResponse { + /** The full list of ingress FirewallRules for this application. */ + ingressRules?: FirewallRule[]; + } + interface CertificateRawData { + /** + * Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. + * Must include the header and footer. Example:
 -----BEGIN RSA PRIVATE KEY-----  -----END RSA PRIVATE KEY----- 
+ * @InputOnly + */ + privateKey?: string; + /** + * PEM encoded x.509 public key certificate. This field is set once on certificate creation. Must include the header and footer. Example:
 -----BEGIN
+             * CERTIFICATE-----  -----END CERTIFICATE----- 
+ */ + publicCertificate?: string; + } + interface ContainerInfo { + /** + * URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: + * "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" + */ + image?: string; + } + interface CpuUtilization { + /** Period of time over which CPU utilization is calculated. */ + aggregationWindowLength?: string; + /** Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1. */ + targetUtilization?: number; + } + interface DebugInstanceRequest { + /** + * Public SSH key to add to the instance. Examples: + * [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] + * [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys + * (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + */ + sshKey?: string; + } + interface Deployment { + /** The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment. */ + container?: ContainerInfo; + /** + * Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials + * supplied with this call. + */ + files?: Record; + /** The zip file for this deployment, if this is a zip deployment. */ + zip?: ZipInfo; + } + interface DiskUtilization { + /** Target bytes read per second. */ + targetReadBytesPerSecond?: number; + /** Target ops read per seconds. */ + targetReadOpsPerSecond?: number; + /** Target bytes written per second. */ + targetWriteBytesPerSecond?: number; + /** Target ops written per second. */ + targetWriteOpsPerSecond?: number; + } + interface DomainMapping { + /** Relative name of the domain serving the application. Example: example.com. */ + id?: string; + /** Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly */ + name?: string; + /** + * The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the + * application via this domain mapping.@OutputOnly + */ + resourceRecords?: ResourceRecord[]; + /** SSL configuration for this domain. If unconfigured, this domain will not serve with SSL. */ + sslSettings?: SslSettings; + } + interface EndpointsApiService { + /** Endpoints service configuration id as specified by the Service Management API. For example "2016-09-19r1" */ + configId?: string; + /** Endpoints service name which is the name of the "service" resource in the Service Management API. For example "myapi.endpoints.myproject.cloud.goog" */ + name?: string; + } + interface ErrorHandler { + /** Error condition this handler applies to. */ + errorCode?: string; + /** MIME type of file. Defaults to text/html. */ + mimeType?: string; + /** Static file content to be served for this error. */ + staticFile?: string; + } + interface FeatureSettings { + /** + * Boolean value indicating if split health checks should be used instead of the legacy health checks. At an app.yaml level, this means defaulting to + * 'readiness_check' and 'liveness_check' values instead of 'health_check' ones. Once the legacy 'health_check' behavior is deprecated, and this value is + * always true, this setting can be removed. + */ + splitHealthChecks?: boolean; + } + interface FileInfo { + /** The MIME type of the file.Defaults to the value from Google Cloud Storage. */ + mimeType?: string; + /** The SHA1 hash of the file, in hex. */ + sha1Sum?: string; + /** + * URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form + * 'http(s)://storage.googleapis.com//'. + */ + sourceUrl?: string; + } + interface FirewallRule { + /** The action to take on matched requests. */ + action?: string; + /** An optional string description of this rule. This field has a maximum length of 100 characters. */ + description?: string; + /** + * A positive integer between 1, Int32.MaxValue-1 that defines the order of rule evaluation. Rules with the lowest priority are evaluated first.A default + * rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the + * user. + */ + priority?: number; + /** + * IP address or range, defined using CIDR notation, of requests that this rule applies to. You can use the wildcard character "*" to match all IPs + * equivalent to "0/0" and "::/0" together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 or + * 2001:0db8:0000:0042:0000:8a2e:0370:7334.

Truncation will be silently performed on addresses which are not properly truncated. For example, 1.2.3.4/24 + * is accepted as the same address as 1.2.3.0/24. Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address as 2001:db8::/32. + */ + sourceRange?: string; + } + interface HealthCheck { + /** Interval between health checks. */ + checkInterval?: string; + /** Whether to explicitly disable health checks for this instance. */ + disableHealthCheck?: boolean; + /** Number of consecutive successful health checks required before receiving traffic. */ + healthyThreshold?: number; + /** Host header to send when performing an HTTP health check. Example: "myapp.appspot.com" */ + host?: string; + /** Number of consecutive failed health checks required before an instance is restarted. */ + restartThreshold?: number; + /** Time before the health check is considered failed. */ + timeout?: string; + /** Number of consecutive failed health checks required before removing traffic. */ + unhealthyThreshold?: number; + } + interface IdentityAwareProxy { + /** + * Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields + * must be non-empty. + */ + enabled?: boolean; + /** OAuth2 client ID to use for the authentication flow. */ + oauth2ClientId?: string; + /** + * OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of + * the value is returned in the oauth2_client_secret_sha256 field.@InputOnly + */ + oauth2ClientSecret?: string; + /** Hex-encoded SHA-256 hash of the client secret.@OutputOnly */ + oauth2ClientSecretSha256?: string; + } + interface Instance { + /** App Engine release this instance is running on.@OutputOnly */ + appEngineRelease?: string; + /** Availability of the instance.@OutputOnly */ + availability?: string; + /** Average latency (ms) over the last minute.@OutputOnly */ + averageLatency?: number; + /** Number of errors since this instance was started.@OutputOnly */ + errors?: number; + /** Relative name of the instance within the version. Example: instance-1.@OutputOnly */ + id?: string; + /** Total memory in use (bytes).@OutputOnly */ + memoryUsage?: string; + /** Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly */ + name?: string; + /** Average queries per second (QPS) over the last minute.@OutputOnly */ + qps?: number; + /** Number of requests since this instance was started.@OutputOnly */ + requests?: number; + /** Time that this instance was started.@OutputOnly */ + startTime?: string; + /** Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly */ + vmDebugEnabled?: boolean; + /** Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly */ + vmId?: string; + /** The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly */ + vmIp?: string; + /** Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly */ + vmName?: string; + /** Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly */ + vmStatus?: string; + /** Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly */ + vmZoneName?: string; + } + interface Library { + /** Name of the library. Example: "django". */ + name?: string; + /** Version of the library to select, or "latest". */ + version?: string; + } + interface ListAuthorizedCertificatesResponse { + /** The SSL certificates the user is authorized to administer. */ + certificates?: AuthorizedCertificate[]; + /** Continuation token for fetching the next page of results. */ + nextPageToken?: string; + } + interface ListAuthorizedDomainsResponse { + /** The authorized domains belonging to the user. */ + domains?: AuthorizedDomain[]; + /** Continuation token for fetching the next page of results. */ + nextPageToken?: string; + } + interface ListDomainMappingsResponse { + /** The domain mappings for the application. */ + domainMappings?: DomainMapping[]; + /** Continuation token for fetching the next page of results. */ + nextPageToken?: string; + } + interface ListIngressRulesResponse { + /** The ingress FirewallRules for this application. */ + ingressRules?: FirewallRule[]; + /** Continuation token for fetching the next page of results. */ + nextPageToken?: string; + } + interface ListInstancesResponse { + /** The instances belonging to the requested version. */ + instances?: Instance[]; + /** Continuation token for fetching the next page of results. */ + nextPageToken?: string; + } + interface ListLocationsResponse { + /** A list of locations that matches the specified filter in the request. */ + locations?: Location[]; + /** The standard List next-page token. */ + nextPageToken?: string; + } + interface ListOperationsResponse { + /** The standard List next-page token. */ + nextPageToken?: string; + /** A list of operations that matches the specified filter in the request. */ + operations?: Operation[]; + } + interface ListServicesResponse { + /** Continuation token for fetching the next page of results. */ + nextPageToken?: string; + /** The services belonging to the requested application. */ + services?: Service[]; + } + interface ListVersionsResponse { + /** Continuation token for fetching the next page of results. */ + nextPageToken?: string; + /** The versions belonging to the requested service. */ + versions?: Version[]; + } + interface LivenessCheck { + /** Interval between health checks. */ + checkInterval?: string; + /** Number of consecutive failed checks required before considering the VM unhealthy. */ + failureThreshold?: number; + /** Host header to send when performing a HTTP Liveness check. Example: "myapp.appspot.com" */ + host?: string; + /** The initial delay before starting to execute the checks. */ + initialDelay?: string; + /** The request path. */ + path?: string; + /** Number of consecutive successful checks required before considering the VM healthy. */ + successThreshold?: number; + /** Time before the check is considered failed. */ + timeout?: string; + } + interface Location { + /** + * Cross-service attributes for the location. For example + * {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: Record; + /** The canonical id for this location. For example: "us-east1". */ + locationId?: string; + /** Service-specific metadata. For example the available capacity at the given location. */ + metadata?: Record; + /** Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" */ + name?: string; + } + interface LocationMetadata { + /** App Engine Flexible Environment is available in the given location.@OutputOnly */ + flexibleEnvironmentAvailable?: boolean; + /** App Engine Standard Environment is available in the given location.@OutputOnly */ + standardEnvironmentAvailable?: boolean; + } + interface ManualScaling { + /** + * Number of instances to assign to the service at the start. This number can later be altered by using the Modules API + * (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function. + */ + instances?: number; + } + interface Network { + /** + * List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable for App Engine flexible environment + * versions. + */ + forwardedPorts?: string[]; + /** Tag to apply to the VM instance during creation. Only applicable for for App Engine flexible environment versions. */ + instanceTag?: string; + /** Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default. */ + name?: string; + /** + * Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is + * specified, a network name will also be required unless it is for the default network. + * If the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. + * If the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) + * and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. + * If the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is + * created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment + * application. + */ + subnetworkName?: string; + } + interface NetworkUtilization { + /** Target bytes received per second. */ + targetReceivedBytesPerSecond?: number; + /** Target packets received per second. */ + targetReceivedPacketsPerSecond?: number; + /** Target bytes sent per second. */ + targetSentBytesPerSecond?: number; + /** Target packets sent per second. */ + targetSentPacketsPerSecond?: number; + } + interface Operation { + /** If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some + * services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should + * have the format of operations/some/unique/name. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is + * google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response + * should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred + * response type is TakeSnapshotResponse. + */ + response?: Record; + } + interface OperationMetadata { + /** Timestamp that this operation completed.@OutputOnly */ + endTime?: string; + /** Timestamp that this operation was created.@OutputOnly */ + insertTime?: string; + /** API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly */ + method?: string; + /** Type of this operation. Deprecated, use method field instead. Example: "create_version".@OutputOnly */ + operationType?: string; + /** Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly */ + target?: string; + /** User who requested this operation.@OutputOnly */ + user?: string; + } + interface OperationMetadataExperimental { + /** Time that this operation completed.@OutputOnly */ + endTime?: string; + /** Time that this operation was created.@OutputOnly */ + insertTime?: string; + /** API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly */ + method?: string; + /** Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly */ + target?: string; + /** User who requested this operation.@OutputOnly */ + user?: string; + } + interface OperationMetadataV1 { + /** Time that this operation completed.@OutputOnly */ + endTime?: string; + /** Ephemeral message that may change every time the operation is polled. @OutputOnly */ + ephemeralMessage?: string; + /** Time that this operation was created.@OutputOnly */ + insertTime?: string; + /** API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly */ + method?: string; + /** Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly */ + target?: string; + /** User who requested this operation.@OutputOnly */ + user?: string; + /** Durable messages that persist on every operation poll. @OutputOnly */ + warning?: string[]; + } + interface OperationMetadataV1Alpha { + /** Time that this operation completed.@OutputOnly */ + endTime?: string; + /** Ephemeral message that may change every time the operation is polled. @OutputOnly */ + ephemeralMessage?: string; + /** Time that this operation was created.@OutputOnly */ + insertTime?: string; + /** API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly */ + method?: string; + /** Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly */ + target?: string; + /** User who requested this operation.@OutputOnly */ + user?: string; + /** Durable messages that persist on every operation poll. @OutputOnly */ + warning?: string[]; + } + interface OperationMetadataV1Beta { + /** Time that this operation completed.@OutputOnly */ + endTime?: string; + /** Ephemeral message that may change every time the operation is polled. @OutputOnly */ + ephemeralMessage?: string; + /** Time that this operation was created.@OutputOnly */ + insertTime?: string; + /** API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly */ + method?: string; + /** Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly */ + target?: string; + /** User who requested this operation.@OutputOnly */ + user?: string; + /** Durable messages that persist on every operation poll. @OutputOnly */ + warning?: string[]; + } + interface OperationMetadataV1Beta5 { + /** Timestamp that this operation completed.@OutputOnly */ + endTime?: string; + /** Timestamp that this operation was created.@OutputOnly */ + insertTime?: string; + /** API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly */ + method?: string; + /** Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly */ + target?: string; + /** User who requested this operation.@OutputOnly */ + user?: string; + } + interface ReadinessCheck { + /** + * A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to + * serve traffic. + */ + appStartTimeout?: string; + /** Interval between health checks. */ + checkInterval?: string; + /** Number of consecutive failed checks required before removing traffic. */ + failureThreshold?: number; + /** Host header to send when performing a HTTP Readiness check. Example: "myapp.appspot.com" */ + host?: string; + /** The request path. */ + path?: string; + /** Number of consecutive successful checks required before receiving traffic. */ + successThreshold?: number; + /** Time before the check is considered failed. */ + timeout?: string; + } + interface RequestUtilization { + /** Target number of concurrent requests. */ + targetConcurrentRequests?: number; + /** Target requests per second. */ + targetRequestCountPerSecond?: number; + } + interface ResourceRecord { + /** Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'. */ + name?: string; + /** Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). */ + rrdata?: string; + /** Resource record type. Example: AAAA. */ + type?: string; + } + interface Resources { + /** Number of CPU cores needed. */ + cpu?: number; + /** Disk size (GB) needed. */ + diskGb?: number; + /** Memory (GB) needed. */ + memoryGb?: number; + /** User specified volumes. */ + volumes?: Volume[]; + } + interface ScriptHandler { + /** Path to the script from the application root directory. */ + scriptPath?: string; + } + interface Service { + /** Relative name of the service within the application. Example: default.@OutputOnly */ + id?: string; + /** Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly */ + name?: string; + /** Mapping that defines fractional HTTP traffic diversion to different versions within the service. */ + split?: TrafficSplit; + } + interface SslSettings { + /** ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will remove SSL support. Example: 12345. */ + certificateId?: string; + } + interface StaticFilesHandler { + /** + * Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served + * to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas. + */ + applicationReadable?: boolean; + /** Time a static file served by this handler should be cached by web proxies and browsers. */ + expiration?: string; + /** HTTP headers to use for all responses from these URLs. */ + httpHeaders?: Record; + /** MIME type used to serve all files served by this handler.Defaults to file-specific MIME types, which are derived from each file's filename extension. */ + mimeType?: string; + /** + * Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL + * pattern. + */ + path?: string; + /** Whether this handler should match the request if the file referenced by the handler does not exist. */ + requireMatchingFile?: boolean; + /** Regular expression that matches the file paths for all files that should be referenced by this handler. */ + uploadPathRegex?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ + details?: Array>; + /** + * 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; + } + interface TrafficSplit { + /** + * Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, + * but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service + * is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up + * to three decimal places is supported for cookie-based splits. + */ + allocations?: Record; + /** + * Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are + * changed. + */ + shardBy?: string; + } + interface UrlDispatchRule { + /** Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". */ + domain?: string; + /** + * Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path.The sum of the lengths of the domain and path may + * not exceed 100 characters. + */ + path?: string; + /** Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default. */ + service?: string; + } + interface UrlMap { + /** Uses API Endpoints to handle requests. */ + apiEndpoint?: ApiEndpointHandler; + /** Action to take when users access resources that require authentication. Defaults to redirect. */ + authFailAction?: string; + /** Level of login required to access this resource. */ + login?: string; + /** 30x code to use when performing redirects for the secure field. Defaults to 302. */ + redirectHttpResponseCode?: string; + /** Executes a script to handle the request that matches this URL pattern. */ + script?: ScriptHandler; + /** Security (HTTPS) enforcement for this URL. */ + securityLevel?: string; + /** Returns the contents of a file, such as an image, as the response. */ + staticFiles?: StaticFilesHandler; + /** + * URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that + * begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path. + */ + urlRegex?: string; + } + interface Version { + /** + * Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL + * is set. + */ + apiConfig?: ApiConfigHandler; + /** Automatic scaling is based on request rate, response latencies, and other application metrics. */ + automaticScaling?: AutomaticScaling; + /** + * A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes + * idle. Basic scaling is ideal for work that is intermittent or driven by user activity. + */ + basicScaling?: BasicScaling; + /** Metadata settings that are supplied to this version to enable beta runtime features. */ + betaSettings?: Record; + /** Time that this version was created.@OutputOnly */ + createTime?: string; + /** Email address of the user who created this version.@OutputOnly */ + createdBy?: string; + /** + * Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration + * time.Only returned in GET requests if view=FULL is set. + */ + defaultExpiration?: string; + /** Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set. */ + deployment?: Deployment; + /** Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly */ + diskUsageBytes?: string; + /** + * Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API + * implemented by the app. + */ + endpointsApiService?: EndpointsApiService; + /** App Engine execution environment for this version.Defaults to standard. */ + env?: string; + /** Environment variables available to the application.Only returned in GET requests if view=FULL is set. */ + envVariables?: Record; + /** Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set. */ + errorHandlers?: ErrorHandler[]; + /** + * An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request + * handlers are not attempted.Only returned in GET requests if view=FULL is set. + */ + handlers?: UrlMap[]; + /** + * Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only + * returned in GET requests if view=FULL is set. + */ + healthCheck?: HealthCheck; + /** + * Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: + * "default", "latest", and any name with the prefix "ah-". + */ + id?: string; + /** Before an application can receive email or XMPP messages, the application must be configured to enable the service. */ + inboundServices?: string[]; + /** + * Instance class that is used to run this version. Valid values are: + * AutomaticScaling: F1, F2, F4, F4_1G + * ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling. + */ + instanceClass?: string; + /** Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set. */ + libraries?: Library[]; + /** + * Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if + * view=FULL is set. + */ + livenessCheck?: LivenessCheck; + /** A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. */ + manualScaling?: ManualScaling; + /** Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly */ + name?: string; + /** Extra network settings. Only applicable for App Engine flexible environment versions. */ + network?: Network; + /** Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set. */ + nobuildFilesRegex?: string; + /** + * Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests + * if view=FULL is set. + */ + readinessCheck?: ReadinessCheck; + /** Machine resources for this version. Only applicable for VM runtimes. */ + resources?: Resources; + /** Desired runtime. Example: python27. */ + runtime?: string; + /** + * The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at + * https://cloud.google.com/appengine/docs/standard//config/appref + */ + runtimeApiVersion?: string; + /** + * Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an + * invalid value. Defaults to SERVING. + */ + servingStatus?: string; + /** Whether multiple requests can be dispatched to this version at once. */ + threadsafe?: boolean; + /** Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly */ + versionUrl?: string; + /** Whether to deploy this version in a container on a virtual machine. */ + vm?: boolean; + } + interface Volume { + /** Unique name for the volume. */ + name?: string; + /** Volume size in gigabytes. */ + sizeGb?: number; + /** Underlying volume type, e.g. 'tmpfs'. */ + volumeType?: string; + } + interface ZipInfo { + /** + * An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for + * optimizing performance; if not provided, deployment may be slow. + */ + filesCount?: number; + /** + * URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form + * 'http(s)://storage.googleapis.com//'. + */ + sourceUrl?: string; + } + interface AuthorizedCertificatesResource { + /** Uploads the specified SSL certificate. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Application resource. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes the specified SSL certificate. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345. */ + appsId: string; + /** Part of `name`. See documentation of `appsId`. */ + authorizedCertificatesId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets the specified SSL certificate. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345. */ + appsId: string; + /** Part of `name`. See documentation of `appsId`. */ + authorizedCertificatesId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Controls the set of fields returned in the GET response. */ + view?: string; + }): Request; + /** Lists all SSL certificates the user is authorized to administer. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Application resource. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum results to return per page. */ + pageSize?: number; + /** Continuation token for fetching the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Controls the set of fields returned in the LIST response. */ + view?: string; + }): Request; + /** + * Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new + * certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345. */ + appsId: string; + /** Part of `name`. See documentation of `appsId`. */ + authorizedCertificatesId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface AuthorizedDomainsResource { + /** Lists all domains the user is authorized to administer. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Application resource. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum results to return per page. */ + pageSize?: number; + /** Continuation token for fetching the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DomainMappingsResource { + /** + * Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available + * authorized domains, see AuthorizedDomains.ListAuthorizedDomains. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Application resource. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Part of `name`. See documentation of `appsId`. */ + domainMappingsId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets the specified domain mapping. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Part of `name`. See documentation of `appsId`. */ + domainMappingsId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists the domain mappings on an application. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Application resource. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum results to return per page. */ + pageSize?: number; + /** Continuation token for fetching the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate + * resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Part of `name`. See documentation of `appsId`. */ + domainMappingsId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Standard field mask for the set of fields to be updated. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface IngressRulesResource { + /** + * Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the + * final rule does not match traffic with the '*' wildcard IP range, then an "allow all" rule is explicitly added to the end of the list. + */ + batchUpdate(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Creates a firewall rule for the application. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes the specified firewall rule. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Part of `name`. See documentation of `appsId`. */ + ingressRulesId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets the specified firewall rule. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Part of `name`. See documentation of `appsId`. */ + ingressRulesId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists the firewall rules of an application. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from + * this IP. + */ + matchingAddress?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum results to return per page. */ + pageSize?: number; + /** Continuation token for fetching the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates the specified firewall rule. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Part of `name`. See documentation of `appsId`. */ + ingressRulesId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Standard field mask for the set of fields to be updated. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface FirewallResource { + ingressRules: IngressRulesResource; + } + interface LocationsResource { + /** Get information about a location. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Resource name for the location. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Part of `name`. See documentation of `appsId`. */ + locationsId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists information about the supported locations for this service. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. The resource that owns the locations collection, if applicable. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface OperationsResource { + /** + * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. The name of the operation resource. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Part of `name`. See documentation of `appsId`. */ + operationsId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name + * binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API + * services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name + * includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection + * id. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. The name of the operation's parent resource. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface InstancesResource { + /** + * Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in "debug + * mode", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over + * and determine if another instance should be started.Only applicable for instances in App Engine flexible environment. + */ + debug(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Part of `name`. See documentation of `appsId`. */ + instancesId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Part of `name`. See documentation of `appsId`. */ + versionsId: string; + }): Request; + /** Stops a running instance. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Part of `name`. See documentation of `appsId`. */ + instancesId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Part of `name`. See documentation of `appsId`. */ + versionsId: string; + }): Request; + /** Gets instance information. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Part of `name`. See documentation of `appsId`. */ + instancesId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Part of `name`. See documentation of `appsId`. */ + versionsId: string; + }): Request; + /** + * Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API + * (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum results to return per page. */ + pageSize?: number; + /** Continuation token for fetching the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `parent`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Part of `parent`. See documentation of `appsId`. */ + versionsId: string; + }): Request; + } + interface VersionsResource { + /** Deploys code and resource files to a new version. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `parent`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes an existing Version resource. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Part of `name`. See documentation of `appsId`. */ + versionsId: string; + }): Request; + /** Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Part of `name`. See documentation of `appsId`. */ + versionsId: string; + /** Controls the set of fields returned in the Get response. */ + view?: string; + }): Request; + /** Lists the versions of a service. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum results to return per page. */ + pageSize?: number; + /** Continuation token for fetching the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `parent`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Controls the set of fields returned in the List response. */ + view?: string; + }): Request; + /** + * Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the + * version resource uses: + * serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version + * resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. + * instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version + * resources that run in the App Engine standard environment. + * automatic_scaling.min_idle_instances + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources + * that use automatic scaling and run in the App Engine standard environment. + * automatic_scaling.max_idle_instances + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources + * that use automatic scaling and run in the App Engine standard environment. + * automatic_scaling.min_total_instances + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources + * that use automatic scaling and run in the App Engine Flexible environment. + * automatic_scaling.max_total_instances + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources + * that use automatic scaling and run in the App Engine Flexible environment. + * automatic_scaling.cool_down_period_sec + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources + * that use automatic scaling and run in the App Engine Flexible environment. + * automatic_scaling.cpu_utilization.target_utilization + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources + * that use automatic scaling and run in the App Engine Flexible environment. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Standard field mask for the set of fields to be updated. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Part of `name`. See documentation of `appsId`. */ + versionsId: string; + }): Request; + instances: InstancesResource; + } + interface ServicesResource { + /** Deletes the specified service and all enclosed versions. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/services/default. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets the current configuration of the specified service. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource requested. Example: apps/myapp/services/default. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all the services in the application. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `parent`. Name of the parent Application resource. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum results to return per page. */ + pageSize?: number; + /** Continuation token for fetching the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates the configuration of the specified service. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the resource to update. Example: apps/myapp/services/default. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic + * migration, the target versions must be located within instances that are configured for both warmup requests + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is + * not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic + * (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + */ + migrateTraffic?: boolean; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Part of `name`. See documentation of `appsId`. */ + servicesId: string; + /** Standard field mask for the set of fields to be updated. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + versions: VersionsResource; + } + interface AppsResource { + /** + * Creates an App Engine application for a Google Cloud Platform project. Required fields: + * id - The ID of the target Cloud Platform project. + * location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about + * App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets information about an application. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the Application resource to get. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates the specified Application resource. You can update the following fields: + * auth_domain - Google authentication domain for controlling user access to the application. + * default_cookie_expiration - Cookie expiration policy for the application. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the Application resource to update. Example: apps/myapp. */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Standard field mask for the set of fields to be updated. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. + * Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. + */ + repair(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** Part of `name`. Name of the application to repair. Example: apps/myapp */ + appsId: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + authorizedCertificates: AuthorizedCertificatesResource; + authorizedDomains: AuthorizedDomainsResource; + domainMappings: DomainMappingsResource; + firewall: FirewallResource; + locations: LocationsResource; + operations: OperationsResource; + services: ServicesResource; + } + } +} diff --git a/types/gapi.client.appengine/readme.md b/types/gapi.client.appengine/readme.md new file mode 100644 index 0000000000..c038ebf322 --- /dev/null +++ b/types/gapi.client.appengine/readme.md @@ -0,0 +1,84 @@ +# TypeScript typings for Google App Engine Admin API v1 +The App Engine Admin API enables developers to provision and manage their App Engine applications. +For detailed description please check [documentation](https://cloud.google.com/appengine/docs/admin-api/). + +## Installing + +Install typings for Google App Engine Admin API: +``` +npm install @types/gapi.client.appengine@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('appengine', 'v1', () => { + // now we can use gapi.client.appengine + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your applications deployed on Google App Engine + 'https://www.googleapis.com/auth/appengine.admin', + + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google App Engine Admin API resources: + +```typescript + +/* +Creates an App Engine application for a Google Cloud Platform project. Required fields: +id - The ID of the target Cloud Platform project. +location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). +*/ +await gapi.client.apps.create({ }); + +/* +Gets information about an application. +*/ +await gapi.client.apps.get({ appsId: "appsId", }); + +/* +Updates the specified Application resource. You can update the following fields: +auth_domain - Google authentication domain for controlling user access to the application. +default_cookie_expiration - Cookie expiration policy for the application. +*/ +await gapi.client.apps.patch({ appsId: "appsId", }); + +/* +Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. +*/ +await gapi.client.apps.repair({ appsId: "appsId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.appengine/tsconfig.json b/types/gapi.client.appengine/tsconfig.json new file mode 100644 index 0000000000..0af2b9eade --- /dev/null +++ b/types/gapi.client.appengine/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.appengine-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.appengine/tslint.json b/types/gapi.client.appengine/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.appengine/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.appsactivity/gapi.client.appsactivity-tests.ts b/types/gapi.client.appsactivity/gapi.client.appsactivity-tests.ts new file mode 100644 index 0000000000..aa972684b8 --- /dev/null +++ b/types/gapi.client.appsactivity/gapi.client.appsactivity-tests.ts @@ -0,0 +1,54 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('appsactivity', 'v1', () => { + /** now we can use gapi.client.appsactivity */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View the activity history of your Google apps */ + 'https://www.googleapis.com/auth/activity', + /** View and manage the files in your Google Drive */ + 'https://www.googleapis.com/auth/drive', + /** View and manage metadata of files in your Google Drive */ + 'https://www.googleapis.com/auth/drive.metadata', + /** View metadata for files in your Google Drive */ + 'https://www.googleapis.com/auth/drive.metadata.readonly', + /** View the files in your Google Drive */ + 'https://www.googleapis.com/auth/drive.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was + * acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is + * scoped to activities from a given Google service using the source parameter. + */ + await gapi.client.activities.list({ + "drive.ancestorId": "drive.ancestorId", + "drive.fileId": "drive.fileId", + groupingStrategy: "groupingStrategy", + pageSize: 4, + pageToken: "pageToken", + source: "source", + userId: "userId", + }); + } +}); diff --git a/types/gapi.client.appsactivity/index.d.ts b/types/gapi.client.appsactivity/index.d.ts new file mode 100644 index 0000000000..e8c9c49f18 --- /dev/null +++ b/types/gapi.client.appsactivity/index.d.ts @@ -0,0 +1,168 @@ +// Type definitions for Google G Suite Activity API v1 1.0 +// Project: https://developers.google.com/google-apps/activity/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/appsactivity/v1/rest + +/// + +declare namespace gapi.client { + /** Load G Suite Activity API v1 */ + function load(name: "appsactivity", version: "v1"): PromiseLike; + function load(name: "appsactivity", version: "v1", callback: () => any): void; + + const activities: appsactivity.ActivitiesResource; + + namespace appsactivity { + interface Activity { + /** The fields common to all of the singleEvents that make up the Activity. */ + combinedEvent?: Event; + /** A list of all the Events that make up the Activity. */ + singleEvents?: Event[]; + } + interface Event { + /** + * Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, + * renaming it, and sharing it may be part of a single file-creation event. + */ + additionalEventTypes?: string[]; + /** The time at which the event occurred formatted as Unix time in milliseconds. */ + eventTimeMillis?: string; + /** Whether this event is caused by a user being deleted. */ + fromUserDeletion?: boolean; + /** Extra information for move type events, such as changes in an object's parents. */ + move?: Move; + /** Extra information for permissionChange type events, such as the user or group the new permission applies to. */ + permissionChanges?: PermissionChange[]; + /** The main type of event that occurred. */ + primaryEventType?: string; + /** Extra information for rename type events, such as the old and new names. */ + rename?: Rename; + /** Information specific to the Target object modified by the event. */ + target?: Target; + /** Represents the user responsible for the event. */ + user?: User; + } + interface ListActivitiesResponse { + /** List of activities. */ + activities?: Activity[]; + /** Token for the next page of results. */ + nextPageToken?: string; + } + interface Move { + /** The added parent(s). */ + addedParents?: Parent[]; + /** The removed parent(s). */ + removedParents?: Parent[]; + } + interface Parent { + /** The parent's ID. */ + id?: string; + /** Whether this is the root folder. */ + isRoot?: boolean; + /** The parent's title. */ + title?: string; + } + interface Permission { + /** The name of the user or group the permission applies to. */ + name?: string; + /** The ID for this permission. Corresponds to the Drive API's permission ID returned as part of the Drive Permissions resource. */ + permissionId?: string; + /** Indicates the Google Drive permissions role. The role determines a user's ability to read, write, or comment on the file. */ + role?: string; + /** Indicates how widely permissions are granted. */ + type?: string; + /** The user's information if the type is USER. */ + user?: User; + /** Whether the permission requires a link to the file. */ + withLink?: boolean; + } + interface PermissionChange { + /** Lists all Permission objects added. */ + addedPermissions?: Permission[]; + /** Lists all Permission objects removed. */ + removedPermissions?: Permission[]; + } + interface Photo { + /** The URL of the photo. */ + url?: string; + } + interface Rename { + /** The new title. */ + newTitle?: string; + /** The old title. */ + oldTitle?: string; + } + interface Target { + /** The ID of the target. For example, in Google Drive, this is the file or folder ID. */ + id?: string; + /** The MIME type of the target. */ + mimeType?: string; + /** The name of the target. For example, in Google Drive, this is the title of the file. */ + name?: string; + } + interface User { + /** A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted. */ + isDeleted?: boolean; + /** Whether the user is the authenticated user. */ + isMe?: boolean; + /** The displayable name of the user. */ + name?: string; + /** + * The permission ID associated with this user. Equivalent to the Drive API's permission ID for this user, returned as part of the Drive Permissions + * resource. + */ + permissionId?: string; + /** The profile photo of the user. Not present if the user has no profile photo. */ + photo?: Photo; + } + interface ActivitiesResource { + /** + * Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was + * acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is + * scoped to activities from a given Google service using the source parameter. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Identifies the Drive folder containing the items for which to return activities. */ + "drive.ancestorId"?: string; + /** Identifies the Drive item to return activities for. */ + "drive.fileId"?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object. */ + groupingStrategy?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of events to return on a page. The response includes a continuation token if there are more events. */ + pageSize?: number; + /** A token to retrieve a specific page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * The Google service from which to return activities. Possible values of source are: + * - drive.google.com + */ + source?: string; + /** Indicates the user to return activity for. Use the special value me to indicate the currently authenticated user. */ + userId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.appsactivity/readme.md b/types/gapi.client.appsactivity/readme.md new file mode 100644 index 0000000000..9f6052ff29 --- /dev/null +++ b/types/gapi.client.appsactivity/readme.md @@ -0,0 +1,71 @@ +# TypeScript typings for G Suite Activity API v1 +Provides a historical view of activity. +For detailed description please check [documentation](https://developers.google.com/google-apps/activity/). + +## Installing + +Install typings for G Suite Activity API: +``` +npm install @types/gapi.client.appsactivity@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('appsactivity', 'v1', () => { + // now we can use gapi.client.appsactivity + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View the activity history of your Google apps + 'https://www.googleapis.com/auth/activity', + + // View and manage the files in your Google Drive + 'https://www.googleapis.com/auth/drive', + + // View and manage metadata of files in your Google Drive + 'https://www.googleapis.com/auth/drive.metadata', + + // View metadata for files in your Google Drive + 'https://www.googleapis.com/auth/drive.metadata.readonly', + + // View the files in your Google Drive + 'https://www.googleapis.com/auth/drive.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use G Suite Activity API resources: + +```typescript + +/* +Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. +*/ +await gapi.client.activities.list({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.appsactivity/tsconfig.json b/types/gapi.client.appsactivity/tsconfig.json new file mode 100644 index 0000000000..0afc87f3ad --- /dev/null +++ b/types/gapi.client.appsactivity/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.appsactivity-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.appsactivity/tslint.json b/types/gapi.client.appsactivity/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.appsactivity/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.appstate/gapi.client.appstate-tests.ts b/types/gapi.client.appstate/gapi.client.appstate-tests.ts new file mode 100644 index 0000000000..d34d46e2ee --- /dev/null +++ b/types/gapi.client.appstate/gapi.client.appstate-tests.ts @@ -0,0 +1,64 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('appstate', 'v1', () => { + /** now we can use gapi.client.appstate */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data for this application */ + 'https://www.googleapis.com/auth/appstate', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a + * conflict error on version mismatch. + */ + await gapi.client.states.clear({ + currentDataVersion: "currentDataVersion", + stateKey: 2, + }); + /** + * Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe + * in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result + * in data loss and data corruption. + */ + await gapi.client.states.delete({ + stateKey: 1, + }); + /** Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned. */ + await gapi.client.states.get({ + stateKey: 1, + }); + /** Lists all the states keys, and optionally the state data. */ + await gapi.client.states.list({ + includeData: true, + }); + /** + * Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face + * of concurrent writes. Maximum per-key size is 128KB. + */ + await gapi.client.states.update({ + currentStateVersion: "currentStateVersion", + stateKey: 2, + }); + } +}); diff --git a/types/gapi.client.appstate/index.d.ts b/types/gapi.client.appstate/index.d.ts new file mode 100644 index 0000000000..9ae6561cb1 --- /dev/null +++ b/types/gapi.client.appstate/index.d.ts @@ -0,0 +1,184 @@ +// Type definitions for Google Google App State API v1 1.0 +// Project: https://developers.google.com/games/services/web/api/states +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/appstate/v1/rest + +/// + +declare namespace gapi.client { + /** Load Google App State API v1 */ + function load(name: "appstate", version: "v1"): PromiseLike; + function load(name: "appstate", version: "v1", callback: () => any): void; + + const states: appstate.StatesResource; + + namespace appstate { + interface GetResponse { + /** The current app state version. */ + currentStateVersion?: string; + /** The requested data. */ + data?: string; + /** Uniquely identifies the type of this resource. Value is always the fixed string appstate#getResponse. */ + kind?: string; + /** The key for the data. */ + stateKey?: number; + } + interface ListResponse { + /** The app state data. */ + items?: GetResponse[]; + /** Uniquely identifies the type of this resource. Value is always the fixed string appstate#listResponse. */ + kind?: string; + /** The maximum number of keys allowed for this user. */ + maximumKeyCount?: number; + } + interface UpdateRequest { + /** The new app state data that your application is trying to update with. */ + data?: string; + /** Uniquely identifies the type of this resource. Value is always the fixed string appstate#updateRequest. */ + kind?: string; + } + interface WriteResult { + /** The version of the data for this key on the server. */ + currentStateVersion?: string; + /** Uniquely identifies the type of this resource. Value is always the fixed string appstate#writeResult. */ + kind?: string; + /** The written key. */ + stateKey?: number; + } + interface StatesResource { + /** + * Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a + * conflict error on version mismatch. + */ + clear(request: { + /** Data format for the response. */ + alt?: string; + /** The version of the data to be cleared. Version strings are returned by the server. */ + currentDataVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The key for the data to be retrieved. */ + stateKey: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe + * in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result + * in data loss and data corruption. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The key for the data to be retrieved. */ + stateKey: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The key for the data to be retrieved. */ + stateKey: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all the states keys, and optionally the state data. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to include the full data in addition to the version number */ + includeData?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face + * of concurrent writes. Maximum per-key size is 128KB. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** + * The version of the app state your application is attempting to update. If this does not match the current version, this method will return a conflict + * error. If there is no data stored on the server for this key, the update will succeed irrespective of the value of this parameter. + */ + currentStateVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The key for the data to be retrieved. */ + stateKey: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.appstate/readme.md b/types/gapi.client.appstate/readme.md new file mode 100644 index 0000000000..a98a3e7942 --- /dev/null +++ b/types/gapi.client.appstate/readme.md @@ -0,0 +1,79 @@ +# TypeScript typings for Google App State API v1 +The Google App State API. +For detailed description please check [documentation](https://developers.google.com/games/services/web/api/states). + +## Installing + +Install typings for Google App State API: +``` +npm install @types/gapi.client.appstate@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('appstate', 'v1', () => { + // now we can use gapi.client.appstate + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data for this application + 'https://www.googleapis.com/auth/appstate', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google App State API resources: + +```typescript + +/* +Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a conflict error on version mismatch. +*/ +await gapi.client.states.clear({ stateKey: 1, }); + +/* +Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result in data loss and data corruption. +*/ +await gapi.client.states.delete({ stateKey: 1, }); + +/* +Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned. +*/ +await gapi.client.states.get({ stateKey: 1, }); + +/* +Lists all the states keys, and optionally the state data. +*/ +await gapi.client.states.list({ }); + +/* +Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face of concurrent writes. Maximum per-key size is 128KB. +*/ +await gapi.client.states.update({ stateKey: 1, }); +``` \ No newline at end of file diff --git a/types/gapi.client.appstate/tsconfig.json b/types/gapi.client.appstate/tsconfig.json new file mode 100644 index 0000000000..e9b5b7a850 --- /dev/null +++ b/types/gapi.client.appstate/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.appstate-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.appstate/tslint.json b/types/gapi.client.appstate/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.appstate/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.bigquery/gapi.client.bigquery-tests.ts b/types/gapi.client.bigquery/gapi.client.bigquery-tests.ts new file mode 100644 index 0000000000..3bdcc43b1d --- /dev/null +++ b/types/gapi.client.bigquery/gapi.client.bigquery-tests.ts @@ -0,0 +1,202 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('bigquery', 'v2', () => { + /** now we can use gapi.client.bigquery */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data in Google BigQuery */ + 'https://www.googleapis.com/auth/bigquery', + /** Insert data into Google BigQuery */ + 'https://www.googleapis.com/auth/bigquery.insertdata', + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform.read-only', + /** Manage your data and permissions in Google Cloud Storage */ + 'https://www.googleapis.com/auth/devstorage.full_control', + /** View your data in Google Cloud Storage */ + 'https://www.googleapis.com/auth/devstorage.read_only', + /** Manage your data in Google Cloud Storage */ + 'https://www.googleapis.com/auth/devstorage.read_write', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying + * deleteContents. Immediately after deletion, you can create another dataset with the same name. + */ + await gapi.client.datasets.delete({ + datasetId: "datasetId", + deleteContents: true, + projectId: "projectId", + }); + /** Returns the dataset specified by datasetID. */ + await gapi.client.datasets.get({ + datasetId: "datasetId", + projectId: "projectId", + }); + /** Creates a new empty dataset. */ + await gapi.client.datasets.insert({ + projectId: "projectId", + }); + /** Lists all datasets in the specified project to which you have been granted the READER dataset role. */ + await gapi.client.datasets.list({ + all: true, + filter: "filter", + maxResults: 3, + pageToken: "pageToken", + projectId: "projectId", + }); + /** + * Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that + * are provided in the submitted dataset resource. This method supports patch semantics. + */ + await gapi.client.datasets.patch({ + datasetId: "datasetId", + projectId: "projectId", + }); + /** + * Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that + * are provided in the submitted dataset resource. + */ + await gapi.client.datasets.update({ + datasetId: "datasetId", + projectId: "projectId", + }); + /** + * Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed + * successfully. Cancelled jobs may still incur costs. + */ + await gapi.client.jobs.cancel({ + jobId: "jobId", + projectId: "projectId", + }); + /** + * Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran + * the job, or have the Is Owner project role. + */ + await gapi.client.jobs.get({ + jobId: "jobId", + projectId: "projectId", + }); + /** Retrieves the results of a query job. */ + await gapi.client.jobs.getQueryResults({ + jobId: "jobId", + maxResults: 2, + pageToken: "pageToken", + projectId: "projectId", + startIndex: "startIndex", + timeoutMs: 6, + }); + /** Starts a new asynchronous job. Requires the Can View project role. */ + await gapi.client.jobs.insert({ + projectId: "projectId", + }); + /** + * Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in + * reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. + */ + await gapi.client.jobs.list({ + allUsers: true, + maxResults: 2, + pageToken: "pageToken", + projectId: "projectId", + projection: "projection", + stateFilter: "stateFilter", + }); + /** Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. */ + await gapi.client.jobs.query({ + projectId: "projectId", + }); + /** Returns the email address of the service account for your project used for interactions with Google Cloud KMS. */ + await gapi.client.projects.getServiceAccount({ + projectId: "projectId", + }); + /** Lists all projects to which you have been granted any project role. */ + await gapi.client.projects.list({ + maxResults: 1, + pageToken: "pageToken", + }); + /** Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role. */ + await gapi.client.tabledata.insertAll({ + datasetId: "datasetId", + projectId: "projectId", + tableId: "tableId", + }); + /** Retrieves table data from a specified set of rows. Requires the READER dataset role. */ + await gapi.client.tabledata.list({ + datasetId: "datasetId", + maxResults: 2, + pageToken: "pageToken", + projectId: "projectId", + selectedFields: "selectedFields", + startIndex: "startIndex", + tableId: "tableId", + }); + /** Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. */ + await gapi.client.tables.delete({ + datasetId: "datasetId", + projectId: "projectId", + tableId: "tableId", + }); + /** + * Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes + * the structure of this table. + */ + await gapi.client.tables.get({ + datasetId: "datasetId", + projectId: "projectId", + selectedFields: "selectedFields", + tableId: "tableId", + }); + /** Creates a new, empty table in the dataset. */ + await gapi.client.tables.insert({ + datasetId: "datasetId", + projectId: "projectId", + }); + /** Lists all tables in the specified dataset. Requires the READER dataset role. */ + await gapi.client.tables.list({ + datasetId: "datasetId", + maxResults: 2, + pageToken: "pageToken", + projectId: "projectId", + }); + /** + * Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are + * provided in the submitted table resource. This method supports patch semantics. + */ + await gapi.client.tables.patch({ + datasetId: "datasetId", + projectId: "projectId", + tableId: "tableId", + }); + /** + * Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are + * provided in the submitted table resource. + */ + await gapi.client.tables.update({ + datasetId: "datasetId", + projectId: "projectId", + tableId: "tableId", + }); + } +}); diff --git a/types/gapi.client.bigquery/index.d.ts b/types/gapi.client.bigquery/index.d.ts new file mode 100644 index 0000000000..813d668ea7 --- /dev/null +++ b/types/gapi.client.bigquery/index.d.ts @@ -0,0 +1,1810 @@ +// Type definitions for Google BigQuery API v2 2.0 +// Project: https://cloud.google.com/bigquery/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/bigquery/v2/rest + +/// + +declare namespace gapi.client { + /** Load BigQuery API v2 */ + function load(name: "bigquery", version: "v2"): PromiseLike; + function load(name: "bigquery", version: "v2", callback: () => any): void; + + const datasets: bigquery.DatasetsResource; + + const jobs: bigquery.JobsResource; + + const projects: bigquery.ProjectsResource; + + const tabledata: bigquery.TabledataResource; + + const tables: bigquery.TablesResource; + + namespace bigquery { + interface BigtableColumn { + /** + * [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text + * strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. + * However, the setting at this level takes precedence if 'encoding' is set at both levels. + */ + encoding?: string; + /** + * [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as + * the column field name and is used as field name in queries. + */ + fieldName?: string; + /** + * [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. + * However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. + */ + onlyReadLatest?: boolean; + /** + * [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid + * UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field + * name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, + * a valid identifier must be provided as field_name. + */ + qualifierEncoded?: string; + qualifierString?: string; + /** + * [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using + * the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can + * also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. + */ + type?: string; + } + interface BigtableColumnFamily { + /** + * [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier + * matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field. + */ + columns?: BigtableColumn[]; + /** + * [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text + * strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing + * that column in 'columns' and specifying an encoding for it. + */ + encoding?: string; + /** Identifier of the column family. */ + familyId?: string; + /** + * [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific + * column by listing that column in 'columns' and specifying a different setting for that column. + */ + onlyReadLatest?: boolean; + /** + * [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when + * using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This + * can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. + */ + type?: string; + } + interface BigtableOptions { + /** + * [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced + * in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this + * list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced + * in that query are read from Bigtable. + */ + columnFamilies?: BigtableColumnFamily[]; + /** + * [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, + * they are read with BYTES type values. The default value is false. + */ + ignoreUnspecifiedColumnFamilies?: boolean; + /** + * [Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and + * users need to manually cast them with CAST if necessary. The default value is false. + */ + readRowkeyAsString?: boolean; + } + interface CsvOptions { + /** + * [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as + * null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is + * returned in the job result. The default value is false. + */ + allowJaggedRows?: boolean; + /** [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. */ + allowQuotedNewlines?: boolean; + /** + * [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data + * after the raw, binary data has been split using the values of the quote and fieldDelimiter properties. + */ + encoding?: string; + /** + * [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded + * string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a + * comma (','). + */ + fieldDelimiter?: string; + /** + * [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first + * byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted + * sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines + * property to true. + */ + quote?: string; + /** + * [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful + * if you have header rows in the file that should be skipped. + */ + skipLeadingRows?: string; + } + interface Dataset { + /** + * [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in + * order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following + * entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: + * projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; + */ + access?: Array<{ + /** [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com". */ + domain?: string; + /** [Pick one] An email address of a Google Group to grant access to. */ + groupByEmail?: string; + /** + * [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: + * READER, WRITER, OWNER. + */ + role?: string; + /** + * [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the + * enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users. + */ + specialGroup?: string; + /** [Pick one] An email address of a user to grant access to. For example: fred@example.com. */ + userByEmail?: string; + /** + * [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The + * role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update + * operation. + */ + view?: TableReference; + }>; + /** [Output-only] The time when this dataset was created, in milliseconds since the epoch. */ + creationTime?: string; + /** [Required] A reference that identifies the dataset. */ + datasetReference?: DatasetReference; + /** + * [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property + * is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and + * changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted + * automatically. If a table's expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating + * a table, that value takes precedence over the default expiration time indicated by this property. + */ + defaultTableExpirationMs?: string; + /** [Optional] A user-friendly description of the dataset. */ + description?: string; + /** [Output-only] A hash of the resource. */ + etag?: string; + /** [Optional] A descriptive name for the dataset. */ + friendlyName?: string; + /** + * [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in + * the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field. + */ + id?: string; + /** [Output-only] The resource type. */ + kind?: string; + /** + * The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a + * dataset. See Labeling Datasets for more information. + */ + labels?: Record; + /** [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch. */ + lastModifiedTime?: string; + /** The geographic location where the dataset should reside. Possible values include EU and US. The default value is US. */ + location?: string; + /** [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource. */ + selfLink?: string; + } + interface DatasetList { + /** + * An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, + * use the Datasets: get method. This property is omitted when there are no datasets in the project. + */ + datasets?: Array<{ + /** The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID. */ + datasetReference?: DatasetReference; + /** A descriptive name for the dataset, if one exists. */ + friendlyName?: string; + /** The fully-qualified, unique, opaque ID of the dataset. */ + id?: string; + /** The resource type. This property always returns the value "bigquery#dataset". */ + kind?: string; + /** The labels associated with this dataset. You can use these to organize and group your datasets. */ + labels?: Record; + }>; + /** A hash value of the results page. You can use this property to determine if the page has changed since the last request. */ + etag?: string; + /** The list type. This property always returns the value "bigquery#datasetList". */ + kind?: string; + /** A token that can be used to request the next results page. This property is omitted on the final results page. */ + nextPageToken?: string; + } + interface DatasetReference { + /** + * [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The + * maximum length is 1,024 characters. + */ + datasetId?: string; + /** [Optional] The ID of the project containing this dataset. */ + projectId?: string; + } + interface EncryptionConfiguration { + /** + * [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with + * your project requires access to this encryption key. + */ + kmsKeyName?: string; + } + interface ErrorProto { + /** Debugging information. This property is internal to Google and should not be used. */ + debugInfo?: string; + /** Specifies where the error occurred, if present. */ + location?: string; + /** A human-readable description of the error. */ + message?: string; + /** A short error code that summarizes the error. */ + reason?: string; + } + interface ExplainQueryStage { + /** Milliseconds the average shard spent on CPU-bound tasks. */ + computeMsAvg?: string; + /** Milliseconds the slowest shard spent on CPU-bound tasks. */ + computeMsMax?: string; + /** Relative amount of time the average shard spent on CPU-bound tasks. */ + computeRatioAvg?: number; + /** Relative amount of time the slowest shard spent on CPU-bound tasks. */ + computeRatioMax?: number; + /** Unique ID for stage within plan. */ + id?: string; + /** Human-readable name for stage. */ + name?: string; + /** Milliseconds the average shard spent reading input. */ + readMsAvg?: string; + /** Milliseconds the slowest shard spent reading input. */ + readMsMax?: string; + /** Relative amount of time the average shard spent reading input. */ + readRatioAvg?: number; + /** Relative amount of time the slowest shard spent reading input. */ + readRatioMax?: number; + /** Number of records read into the stage. */ + recordsRead?: string; + /** Number of records written by the stage. */ + recordsWritten?: string; + /** Total number of bytes written to shuffle. */ + shuffleOutputBytes?: string; + /** Total number of bytes written to shuffle and spilled to disk. */ + shuffleOutputBytesSpilled?: string; + /** Current status for the stage. */ + status?: string; + /** List of operations within the stage in dependency order (approximately chronological). */ + steps?: ExplainQueryStep[]; + /** Milliseconds the average shard spent waiting to be scheduled. */ + waitMsAvg?: string; + /** Milliseconds the slowest shard spent waiting to be scheduled. */ + waitMsMax?: string; + /** Relative amount of time the average shard spent waiting to be scheduled. */ + waitRatioAvg?: number; + /** Relative amount of time the slowest shard spent waiting to be scheduled. */ + waitRatioMax?: number; + /** Milliseconds the average shard spent on writing output. */ + writeMsAvg?: string; + /** Milliseconds the slowest shard spent on writing output. */ + writeMsMax?: string; + /** Relative amount of time the average shard spent on writing output. */ + writeRatioAvg?: number; + /** Relative amount of time the slowest shard spent on writing output. */ + writeRatioMax?: number; + } + interface ExplainQueryStep { + /** Machine-readable operation type. */ + kind?: string; + /** Human-readable stage descriptions. */ + substeps?: string[]; + } + interface ExternalDataConfiguration { + /** Try to detect schema and format options automatically. Any option specified explicitly will be honored. */ + autodetect?: boolean; + /** [Optional] Additional options if sourceFormat is set to BIGTABLE. */ + bigtableOptions?: BigtableOptions; + /** + * [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for + * Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. + */ + compression?: string; + /** Additional properties to set if sourceFormat is set to CSV. */ + csvOptions?: CsvOptions; + /** [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. */ + googleSheetsOptions?: GoogleSheetsOptions; + /** + * [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If + * false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. + * The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that + * don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This + * setting is ignored. + */ + ignoreUnknownValues?: boolean; + /** + * [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid + * error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud + * Bigtable, Google Cloud Datastore backups and Avro formats. + */ + maxBadRecords?: number; + /** + * [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore + * backups, and Avro formats. + */ + schema?: TableSchema; + /** + * [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify + * "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud + * Bigtable, specify "BIGTABLE". + */ + sourceFormat?: string; + /** + * [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard + * character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: + * Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore + * backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. + */ + sourceUris?: string[]; + } + interface GetQueryResultsResponse { + /** Whether the query result was fetched from the query cache. */ + cacheHit?: boolean; + /** + * [Output-only] The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the + * process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. + */ + errors?: ErrorProto[]; + /** A hash of this response. */ + etag?: string; + /** Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. */ + jobComplete?: boolean; + /** + * Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case + * GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages + * can be fetched via the same mechanism (GetQueryResults). + */ + jobReference?: JobReference; + /** The resource type of the response. */ + kind?: string; + /** [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. */ + numDmlAffectedRows?: string; + /** A token used for paging results. */ + pageToken?: string; + /** + * An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults + * and specify the jobReference returned above. Present only when the query completes successfully. + */ + rows?: TableRow[]; + /** The schema of the results. Present only when the query completes successfully. */ + schema?: TableSchema; + /** The total number of bytes processed for this query. */ + totalBytesProcessed?: string; + /** + * The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when + * the query completes successfully. + */ + totalRows?: string; + } + interface GetServiceAccountResponse { + /** The service account email address. */ + email?: string; + /** The resource type of the response. */ + kind?: string; + } + interface GoogleSheetsOptions { + /** + * [Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if + * you have header rows that should be skipped. When autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to + * detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * + * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - + * Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract + * column names for the detected schema. + */ + skipLeadingRows?: string; + } + interface Job { + /** [Required] Describes the job configuration. */ + configuration?: JobConfiguration; + /** [Output-only] A hash of this resource. */ + etag?: string; + /** [Output-only] Opaque ID field of the job */ + id?: string; + /** [Optional] Reference describing the unique-per-user name of the job. */ + jobReference?: JobReference; + /** [Output-only] The type of the resource. */ + kind?: string; + /** [Output-only] A URL that can be used to access this resource again. */ + selfLink?: string; + /** [Output-only] Information about the job, including starting time and ending time of the job. */ + statistics?: JobStatistics; + /** [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. */ + status?: JobStatus; + /** [Output-only] Email address of the user who ran the job. */ + user_email?: string; + } + interface JobCancelResponse { + /** The final state of the job. */ + job?: Job; + /** The resource type of the response. */ + kind?: string; + } + interface JobConfiguration { + /** [Pick one] Copies a table. */ + copy?: JobConfigurationTableCopy; + /** + * [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid + * query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined. + */ + dryRun?: boolean; + /** [Pick one] Configures an extract job. */ + extract?: JobConfigurationExtract; + /** + * [Experimental] The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 + * characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are + * optional. Label keys must start with a letter and each label in the list must have a different key. + */ + labels?: Record; + /** [Pick one] Configures a load job. */ + load?: JobConfigurationLoad; + /** [Pick one] Configures a query job. */ + query?: JobConfigurationQuery; + } + interface JobConfigurationExtract { + /** [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE. */ + compression?: string; + /** + * [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or + * repeated fields cannot be exported as CSV. + */ + destinationFormat?: string; + /** + * [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted + * table should be written. + */ + destinationUri?: string; + /** [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. */ + destinationUris?: string[]; + /** [Optional] Delimiter to use between fields in the exported data. Default is ',' */ + fieldDelimiter?: string; + /** [Optional] Whether to print out a header row in the results. Default is true. */ + printHeader?: boolean; + /** [Required] A reference to the table being exported. */ + sourceTable?: TableReference; + } + interface JobConfigurationLoad { + /** + * [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing + * columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. + * Only applicable to CSV, ignored for other formats. + */ + allowJaggedRows?: boolean; + /** Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. */ + allowQuotedNewlines?: boolean; + /** Indicates if we should automatically infer the options and schema for CSV and JSON sources. */ + autodetect?: boolean; + /** + * [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not + * exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The + * default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. + */ + createDisposition?: string; + /** [Experimental] Custom encryption configuration (e.g., Cloud KMS keys). */ + destinationEncryptionConfiguration?: EncryptionConfiguration; + /** [Required] The destination table to load the data into. */ + destinationTable?: TableReference; + /** + * [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data + * after the raw, binary data has been split using the values of the quote and fieldDelimiter properties. + */ + encoding?: string; + /** + * [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, + * you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split + * the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). + */ + fieldDelimiter?: string; + /** + * [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If + * false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. + * The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that + * don't match any column names + */ + ignoreUnknownValues?: boolean; + /** + * [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid + * error is returned in the job result. The default value is 0, which requires that all records are valid. + */ + maxBadRecords?: number; + /** + * [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify "\N", BigQuery interprets "\N" as a null value + * when loading a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string + * is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value. + */ + nullMarker?: string; + /** + * If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are + * case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in + * the Cloud Datastore backup, an invalid error is returned in the job result. + */ + projectionFields?: string[]; + /** + * [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first + * byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted + * sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines + * property to true. + */ + quote?: string; + /** + * [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from + * Google Cloud Datastore. + */ + schema?: TableSchema; + /** [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". */ + schemaInline?: string; + /** [Deprecated] The format of the schemaInline property. */ + schemaInlineFormat?: string; + /** + * [Experimental] Allows the schema of the desitination table to be updated as a side effect of the load job if a schema is autodetected or supplied in + * the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE + * and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the + * schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: + * allow relaxing a required field in the original schema to nullable. + */ + schemaUpdateOptions?: string[]; + /** + * [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful + * if you have header rows in the file that should be skipped. + */ + skipLeadingRows?: number; + /** + * [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, + * specify "NEWLINE_DELIMITED_JSON". For Avro, specify "AVRO". The default value is CSV. + */ + sourceFormat?: string; + /** + * [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard + * character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: + * Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore + * backups: Exactly one URI can be specified. Also, the '*' wildcard character is not allowed. + */ + sourceUris?: string[]; + /** [Experimental] If specified, configures time-based partitioning for the destination table. */ + timePartitioning?: TimePartitioning; + /** + * [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table + * already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If + * the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic + * and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job + * completion. + */ + writeDisposition?: string; + } + interface JobConfigurationQuery { + /** + * [Optional] If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. + * Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed. However, you must still set + * destinationTable when result size exceeds the allowed maximum response size. + */ + allowLargeResults?: boolean; + /** + * [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not + * exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The + * default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. + */ + createDisposition?: string; + /** [Optional] Specifies the default dataset to use for unqualified table names in the query. */ + defaultDataset?: DatasetReference; + /** [Experimental] Custom encryption configuration (e.g., Cloud KMS keys). */ + destinationEncryptionConfiguration?: EncryptionConfiguration; + /** + * [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This + * property must be set for large results that exceed the maximum response size. + */ + destinationTable?: TableReference; + /** + * [Optional] If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if + * this is set to false. For standard SQL queries, this flag is ignored and results are never flattened. + */ + flattenResults?: boolean; + /** + * [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If + * unspecified, this will be set to your project default. + */ + maximumBillingTier?: number; + /** + * [Optional] Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If + * unspecified, this will be set to your project default. + */ + maximumBytesBilled?: string; + /** Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. */ + parameterMode?: string; + /** [Deprecated] This property is deprecated. */ + preserveNulls?: boolean; + /** [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. */ + priority?: string; + /** [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. */ + query?: string; + /** Query parameters for standard SQL queries. */ + queryParameters?: QueryParameter[]; + /** + * [Experimental] Allows the schema of the destination table to be updated as a side effect of the query job. Schema update options are supported in two + * cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by + * partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: + * ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to + * nullable. + */ + schemaUpdateOptions?: string[]; + /** + * [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By + * defining these properties, the data source can then be queried as if it were a standard BigQuery table. + */ + tableDefinitions?: Record; + /** [Experimental] If specified, configures time-based partitioning for the destination table. */ + timePartitioning?: TimePartitioning; + /** + * Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's + * standard SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to false, the value of flattenResults is ignored; query will be + * run as if flattenResults is false. + */ + useLegacySql?: boolean; + /** + * [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query + * are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true. + */ + useQueryCache?: boolean; + /** Describes user-defined function resources used in the query. */ + userDefinedFunctionResources?: UserDefinedFunctionResource[]; + /** + * [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table + * already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery + * appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The + * default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and + * append actions occur as one atomic update upon job completion. + */ + writeDisposition?: string; + } + interface JobConfigurationTableCopy { + /** + * [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not + * exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The + * default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. + */ + createDisposition?: string; + /** [Experimental] Custom encryption configuration (e.g., Cloud KMS keys). */ + destinationEncryptionConfiguration?: EncryptionConfiguration; + /** [Required] The destination table */ + destinationTable?: TableReference; + /** [Pick one] Source table to copy. */ + sourceTable?: TableReference; + /** [Pick one] Source tables to copy. */ + sourceTables?: TableReference[]; + /** + * [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table + * already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If + * the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic + * and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job + * completion. + */ + writeDisposition?: string; + } + interface JobList { + /** A hash of this page of results. */ + etag?: string; + /** List of jobs that were requested. */ + jobs?: Array<{ + /** [Full-projection-only] Specifies the job configuration. */ + configuration?: JobConfiguration; + /** A result object that will be present only if the job has failed. */ + errorResult?: ErrorProto; + /** Unique opaque ID of the job. */ + id?: string; + /** Job reference uniquely identifying the job. */ + jobReference?: JobReference; + /** The resource type. */ + kind?: string; + /** Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed. */ + state?: string; + /** [Output-only] Information about the job, including starting time and ending time of the job. */ + statistics?: JobStatistics; + /** [Full-projection-only] Describes the state of the job. */ + status?: JobStatus; + /** [Full-projection-only] Email address of the user who ran the job. */ + user_email?: string; + }>; + /** The resource type of the response. */ + kind?: string; + /** A token to request the next page of results. */ + nextPageToken?: string; + } + interface JobReference { + /** + * [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 + * characters. + */ + jobId?: string; + /** [Required] The ID of the project containing this job. */ + projectId?: string; + } + interface JobStatistics { + /** [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. */ + creationTime?: string; + /** [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state. */ + endTime?: string; + /** [Output-only] Statistics for an extract job. */ + extract?: JobStatistics4; + /** [Output-only] Statistics for a load job. */ + load?: JobStatistics3; + /** [Output-only] Statistics for a query job. */ + query?: JobStatistics2; + /** + * [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to + * either RUNNING or DONE. + */ + startTime?: string; + /** [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. */ + totalBytesProcessed?: string; + } + interface JobStatistics2 { + /** [Output-only] Billing tier for the job. */ + billingTier?: number; + /** [Output-only] Whether the query result was fetched from the query cache. */ + cacheHit?: boolean; + /** [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. */ + numDmlAffectedRows?: string; + /** [Output-only] Describes execution plan for the query. */ + queryPlan?: ExplainQueryStage[]; + /** [Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. */ + referencedTables?: TableReference[]; + /** [Output-only, Experimental] The schema of the results. Present only for successful dry run of non-legacy SQL queries. */ + schema?: TableSchema; + /** [Output-only, Experimental] The type of query statement, if valid. */ + statementType?: string; + /** [Output-only] Total bytes billed for the job. */ + totalBytesBilled?: string; + /** [Output-only] Total bytes processed for the job. */ + totalBytesProcessed?: string; + /** [Output-only] Slot-milliseconds for the job. */ + totalSlotMs?: string; + /** [Output-only, Experimental] Standard SQL only: list of undeclared query parameters detected during a dry run validation. */ + undeclaredQueryParameters?: QueryParameter[]; + } + interface JobStatistics3 { + /** + * [Output-only] The number of bad records encountered. Note that if the job has failed because of more bad records encountered than the maximum allowed + * in the load job configuration, then this number can be less than the total number of bad records present in the input data. + */ + badRecords?: string; + /** [Output-only] Number of bytes of source data in a load job. */ + inputFileBytes?: string; + /** [Output-only] Number of source files in a load job. */ + inputFiles?: string; + /** [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change. */ + outputBytes?: string; + /** [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change. */ + outputRows?: string; + } + interface JobStatistics4 { + /** + * [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the + * URIs specified in the 'destinationUris' field. + */ + destinationUriFileCounts?: string[]; + } + interface JobStatus { + /** [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. */ + errorResult?: ErrorProto; + /** + * [Output-only] The first errors encountered during the running of the job. The final message includes the number of errors that caused the process to + * stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. + */ + errors?: ErrorProto[]; + /** [Output-only] Running state of the job. */ + state?: string; + } + interface JsonObject { + [key: string]: any; + } + interface ProjectList { + /** A hash of the page of results */ + etag?: string; + /** The type of list. */ + kind?: string; + /** A token to request the next page of results. */ + nextPageToken?: string; + /** Projects to which you have at least READ access. */ + projects?: Array<{ + /** A descriptive name for this project. */ + friendlyName?: string; + /** An opaque ID of this project. */ + id?: string; + /** The resource type. */ + kind?: string; + /** The numeric ID of this project. */ + numericId?: string; + /** A unique reference to this project. */ + projectReference?: ProjectReference; + }>; + /** The total number of projects in the list. */ + totalItems?: number; + } + interface ProjectReference { + /** [Required] ID of the project. Can be either the numeric ID or the assigned ID of the project. */ + projectId?: string; + } + interface QueryParameter { + /** [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query. */ + name?: string; + /** [Required] The type of this parameter. */ + parameterType?: QueryParameterType; + /** [Required] The value of this parameter. */ + parameterValue?: QueryParameterValue; + } + interface QueryParameterType { + /** [Optional] The type of the array's elements, if this is an array. */ + arrayType?: QueryParameterType; + /** [Optional] The types of the fields of this struct, in order, if this is a struct. */ + structTypes?: Array<{ + /** [Optional] Human-oriented description of the field. */ + description?: string; + /** [Optional] The name of this field. */ + name?: string; + /** [Required] The type of this field. */ + type?: QueryParameterType; + }>; + /** [Required] The top level type of this field. */ + type?: string; + } + interface QueryParameterValue { + /** [Optional] The array values, if this is an array type. */ + arrayValues?: QueryParameterValue[]; + /** [Optional] The struct field values, in order of the struct type's declaration. */ + structValues?: Record; + /** [Optional] The value of this value, if a simple scalar type. */ + value?: string; + } + interface QueryRequest { + /** + * [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the + * query string must be qualified in the format 'datasetId.tableId'. + */ + defaultDataset?: DatasetReference; + /** + * [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many + * bytes would be processed. If the query is invalid, an error returns. The default value is false. + */ + dryRun?: boolean; + /** The resource type of the request. */ + kind?: string; + /** + * [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through + * results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there + * is no maximum row count, and only the byte limit applies. + */ + maxResults?: number; + /** Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. */ + parameterMode?: string; + /** [Deprecated] This property is deprecated. */ + preserveNulls?: boolean; + /** + * [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM + * [myProjectId:myDatasetId.myTableId]". + */ + query?: string; + /** Query parameters for Standard SQL queries. */ + queryParameters?: QueryParameter[]; + /** + * [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for + * the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' + * flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 + * seconds). + */ + timeoutMs?: number; + /** + * Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's + * standard SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to false, the value of flattenResults is ignored; query will be + * run as if flattenResults is false. + */ + useLegacySql?: boolean; + /** + * [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query + * are modified. The default value is true. + */ + useQueryCache?: boolean; + } + interface QueryResponse { + /** Whether the query result was fetched from the query cache. */ + cacheHit?: boolean; + /** + * [Output-only] The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the + * process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. + */ + errors?: ErrorProto[]; + /** Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. */ + jobComplete?: boolean; + /** + * Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case + * GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages + * can be fetched via the same mechanism (GetQueryResults). + */ + jobReference?: JobReference; + /** The resource type. */ + kind?: string; + /** [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. */ + numDmlAffectedRows?: string; + /** A token used for paging results. */ + pageToken?: string; + /** + * An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults + * and specify the jobReference returned above. + */ + rows?: TableRow[]; + /** The schema of the results. Present only when the query completes successfully. */ + schema?: TableSchema; + /** + * The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were + * run. + */ + totalBytesProcessed?: string; + /** The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. */ + totalRows?: string; + } + interface Streamingbuffer { + /** [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. */ + estimatedBytes?: string; + /** [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. */ + estimatedRows?: string; + /** + * [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is + * available. + */ + oldestEntryTime?: string; + } + interface Table { + /** [Output-only] The time when this table was created, in milliseconds since the epoch. */ + creationTime?: string; + /** [Optional] A user-friendly description of this table. */ + description?: string; + /** [Experimental] Custom encryption configuration (e.g., Cloud KMS keys). */ + encryptionConfiguration?: EncryptionConfiguration; + /** [Output-only] A hash of this resource. */ + etag?: string; + /** + * [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will + * be deleted and their storage reclaimed. + */ + expirationTime?: string; + /** + * [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data + * source can then be queried as if it were a standard BigQuery table. + */ + externalDataConfiguration?: ExternalDataConfiguration; + /** [Optional] A descriptive name for this table. */ + friendlyName?: string; + /** [Output-only] An opaque ID uniquely identifying the table. */ + id?: string; + /** [Output-only] The type of the resource. */ + kind?: string; + /** + * [Experimental] The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than + * 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are + * optional. Label keys must start with a letter and each label in the list must have a different key. + */ + labels?: Record; + /** [Output-only] The time when this table was last modified, in milliseconds since the epoch. */ + lastModifiedTime?: string; + /** [Output-only] The geographic location where the table resides. This value is inherited from the dataset. */ + location?: string; + /** [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. */ + numBytes?: string; + /** [Output-only] The number of bytes in the table that are considered "long-term storage". */ + numLongTermBytes?: string; + /** [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. */ + numRows?: string; + /** [Optional] Describes the schema of this table. */ + schema?: TableSchema; + /** [Output-only] A URL that can be used to access this resource again. */ + selfLink?: string; + /** + * [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being + * streamed to or if there is no data in the streaming buffer. + */ + streamingBuffer?: Streamingbuffer; + /** [Required] Reference describing the ID of this table. */ + tableReference?: TableReference; + /** [Experimental] If specified, configures time-based partitioning for this table. */ + timePartitioning?: TimePartitioning; + /** + * [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL + * query. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. + */ + type?: string; + /** [Optional] The view definition. */ + view?: ViewDefinition; + } + interface TableCell { + v?: any; + } + interface TableDataInsertAllRequest { + /** + * [Optional] Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false, which treats unknown values + * as errors. + */ + ignoreUnknownValues?: boolean; + /** The resource type of the response. */ + kind?: string; + /** The rows to insert. */ + rows?: Array<{ + /** [Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion requests on a best-effort basis. */ + insertId?: string; + /** [Required] A JSON object that contains a row of data. The object's properties and values must match the destination table's schema. */ + json?: JsonObject; + }>; + /** + * [Optional] Insert all valid rows of a request, even if invalid rows exist. The default value is false, which causes the entire request to fail if any + * invalid rows exist. + */ + skipInvalidRows?: boolean; + /** + * [Experimental] If specified, treats the destination table as a base template, and inserts the rows into an instance table named + * "{destination}{templateSuffix}". BigQuery will manage creation of the instance table, using the schema of the base template table. See + * https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables for considerations when working with templates tables. + */ + templateSuffix?: string; + } + interface TableDataInsertAllResponse { + /** An array of errors for rows that were not inserted. */ + insertErrors?: Array<{ + /** Error information for the row indicated by the index property. */ + errors?: ErrorProto[]; + /** The index of the row that error applies to. */ + index?: number; + }>; + /** The resource type of the response. */ + kind?: string; + } + interface TableDataList { + /** A hash of this page of results. */ + etag?: string; + /** The resource type of the response. */ + kind?: string; + /** + * A token used for paging results. Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table + * is changing. + */ + pageToken?: string; + /** Rows of results. */ + rows?: TableRow[]; + /** The total number of rows in the complete table. */ + totalRows?: string; + } + interface TableFieldSchema { + /** [Optional] The field description. The maximum length is 1,024 characters. */ + description?: string; + /** [Optional] Describes the nested schema fields if the type property is set to RECORD. */ + fields?: TableFieldSchema[]; + /** [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. */ + mode?: string; + /** + * [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + */ + name?: string; + /** + * [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL + * (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). + */ + type?: string; + } + interface TableList { + /** A hash of this page of results. */ + etag?: string; + /** The type of list. */ + kind?: string; + /** A token to request the next page of results. */ + nextPageToken?: string; + /** Tables in the requested dataset. */ + tables?: Array<{ + /** The time when this table was created, in milliseconds since the epoch. */ + creationTime?: string; + /** + * [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will + * be deleted and their storage reclaimed. + */ + expirationTime?: string; + /** The user-friendly name for this table. */ + friendlyName?: string; + /** An opaque ID of the table */ + id?: string; + /** The resource type. */ + kind?: string; + /** [Experimental] The labels associated with this table. You can use these to organize and group your tables. */ + labels?: Record; + /** A reference uniquely identifying the table. */ + tableReference?: TableReference; + /** [Experimental] The time-based partitioning for this table. */ + timePartitioning?: TimePartitioning; + /** The type of table. Possible values are: TABLE, VIEW. */ + type?: string; + /** Additional details for a view. */ + view?: { + /** True if view is defined in legacy SQL dialect, false if in standard SQL. */ + useLegacySql?: boolean; + }; + }>; + /** The total number of tables in the dataset. */ + totalItems?: number; + } + interface TableReference { + /** [Required] The ID of the dataset containing this table. */ + datasetId?: string; + /** [Required] The ID of the project containing this table. */ + projectId?: string; + /** [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. */ + tableId?: string; + } + interface TableRow { + /** Represents a single row in the result set, consisting of one or more fields. */ + f?: TableCell[]; + } + interface TableSchema { + /** Describes the fields in a table. */ + fields?: TableFieldSchema[]; + } + interface TimePartitioning { + /** [Optional] Number of milliseconds for which to keep the storage for a partition. */ + expirationMs?: string; + /** + * [Experimental] [Optional] If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partitioned by this field. The + * field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. + */ + field?: string; + /** [Required] The only type supported is DAY, which will generate one partition per day. */ + type?: string; + } + interface UserDefinedFunctionResource { + /** + * [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI + * for a file containing the same code. + */ + inlineCode?: string; + /** [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). */ + resourceUri?: string; + } + interface ViewDefinition { + /** [Required] A query that BigQuery executes when the view is referenced. */ + query?: string; + /** + * Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: + * https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. + */ + useLegacySql?: boolean; + /** Describes user-defined function resources used in the query. */ + userDefinedFunctionResources?: UserDefinedFunctionResource[]; + } + interface DatasetsResource { + /** + * Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying + * deleteContents. Immediately after deletion, you can create another dataset with the same name. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of dataset being deleted */ + datasetId: string; + /** If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False */ + deleteContents?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the dataset being deleted */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the dataset specified by datasetID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the requested dataset */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the requested dataset */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a new empty dataset. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the new dataset */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all datasets in the specified project to which you have been granted the READER dataset role. */ + list(request: { + /** Whether to list all datasets, including hidden ones */ + all?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * An expression for filtering the results of the request by label. The syntax is "labels.[:]". Multiple filters can be ANDed together by + * connecting with a space. Example: "labels.department:receiving labels.active". See Filtering datasets using labels for details. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page token, returned by a previous call, to request the next page of results */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the datasets to be listed */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that + * are provided in the submitted dataset resource. This method supports patch semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the dataset being updated */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the dataset being updated */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that + * are provided in the submitted dataset resource. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the dataset being updated */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the dataset being updated */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface JobsResource { + /** + * Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed + * successfully. Cancelled jobs may still incur costs. + */ + cancel(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** [Required] Job ID of the job to cancel */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** [Required] Project ID of the job to cancel */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran + * the job, or have the Is Owner project role. + */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** [Required] Job ID of the requested job */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** [Required] Project ID of the requested job */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the results of a query job. */ + getQueryResults(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** [Required] Job ID of the query job */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to read */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page token, returned by a previous call, to request the next page of results */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** [Required] Project ID of the query job */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Zero-based index of the starting row */ + startIndex?: string; + /** + * How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, + * the 'jobComplete' field in the response will be false + */ + timeoutMs?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Starts a new asynchronous job. Requires the Can View project role. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the project that will be billed for the job */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in + * reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. + */ + list(request: { + /** Whether to display jobs owned by all users in the project. Default false */ + allUsers?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page token, returned by a previous call, to request the next page of results */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the jobs to list */ + projectId: string; + /** Restrict information returned to a set of selected fields */ + projection?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Filter for job state */ + stateFilter?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. */ + query(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the project billed for the query */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProjectsResource { + /** Returns the email address of the service account for your project used for interactions with Google Cloud KMS. */ + getServiceAccount(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for which the service account is requested. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all projects to which you have been granted any project role. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page token, returned by a previous call, to request the next page of results */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TabledataResource { + /** Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role. */ + insertAll(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the destination table. */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the destination table. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table ID of the destination table. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves table data from a specified set of rows. Requires the READER dataset role. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the table to read */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page token, returned by a previous call, identifying the result set */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the table to read */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** List of fields to return (comma-separated). If unspecified, all fields are returned */ + selectedFields?: string; + /** Zero-based index of the starting row to read */ + startIndex?: string; + /** Table ID of the table to read */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TablesResource { + /** Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the table to delete */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the table to delete */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table ID of the table to delete */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes + * the structure of this table. + */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the requested table */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the requested table */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** List of fields to return (comma-separated). If unspecified, all fields are returned */ + selectedFields?: string; + /** Table ID of the requested table */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a new, empty table in the dataset. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the new table */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the new table */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** Lists all tables in the specified dataset. Requires the READER dataset role. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the tables to list */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page token, returned by a previous call, to request the next page of results */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the tables to list */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are + * provided in the submitted table resource. This method supports patch semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the table to update */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the table to update */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table ID of the table to update */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** + * Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are + * provided in the submitted table resource. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Dataset ID of the table to update */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID of the table to update */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table ID of the table to update */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + } + } +} diff --git a/types/gapi.client.bigquery/readme.md b/types/gapi.client.bigquery/readme.md new file mode 100644 index 0000000000..4a76f83277 --- /dev/null +++ b/types/gapi.client.bigquery/readme.md @@ -0,0 +1,182 @@ +# TypeScript typings for BigQuery API v2 +A data platform for customers to create, manage, share and query data. +For detailed description please check [documentation](https://cloud.google.com/bigquery/). + +## Installing + +Install typings for BigQuery API: +``` +npm install @types/gapi.client.bigquery@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('bigquery', 'v2', () => { + // now we can use gapi.client.bigquery + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data in Google BigQuery + 'https://www.googleapis.com/auth/bigquery', + + // Insert data into Google BigQuery + 'https://www.googleapis.com/auth/bigquery.insertdata', + + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + + // Manage your data and permissions in Google Cloud Storage + 'https://www.googleapis.com/auth/devstorage.full_control', + + // View your data in Google Cloud Storage + 'https://www.googleapis.com/auth/devstorage.read_only', + + // Manage your data in Google Cloud Storage + 'https://www.googleapis.com/auth/devstorage.read_write', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use BigQuery API resources: + +```typescript + +/* +Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. +*/ +await gapi.client.datasets.delete({ datasetId: "datasetId", projectId: "projectId", }); + +/* +Returns the dataset specified by datasetID. +*/ +await gapi.client.datasets.get({ datasetId: "datasetId", projectId: "projectId", }); + +/* +Creates a new empty dataset. +*/ +await gapi.client.datasets.insert({ projectId: "projectId", }); + +/* +Lists all datasets in the specified project to which you have been granted the READER dataset role. +*/ +await gapi.client.datasets.list({ projectId: "projectId", }); + +/* +Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics. +*/ +await gapi.client.datasets.patch({ datasetId: "datasetId", projectId: "projectId", }); + +/* +Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. +*/ +await gapi.client.datasets.update({ datasetId: "datasetId", projectId: "projectId", }); + +/* +Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs. +*/ +await gapi.client.jobs.cancel({ jobId: "jobId", projectId: "projectId", }); + +/* +Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. +*/ +await gapi.client.jobs.get({ jobId: "jobId", projectId: "projectId", }); + +/* +Retrieves the results of a query job. +*/ +await gapi.client.jobs.getQueryResults({ jobId: "jobId", projectId: "projectId", }); + +/* +Starts a new asynchronous job. Requires the Can View project role. +*/ +await gapi.client.jobs.insert({ projectId: "projectId", }); + +/* +Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. +*/ +await gapi.client.jobs.list({ projectId: "projectId", }); + +/* +Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. +*/ +await gapi.client.jobs.query({ projectId: "projectId", }); + +/* +Returns the email address of the service account for your project used for interactions with Google Cloud KMS. +*/ +await gapi.client.projects.getServiceAccount({ projectId: "projectId", }); + +/* +Lists all projects to which you have been granted any project role. +*/ +await gapi.client.projects.list({ }); + +/* +Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role. +*/ +await gapi.client.tabledata.insertAll({ datasetId: "datasetId", projectId: "projectId", tableId: "tableId", }); + +/* +Retrieves table data from a specified set of rows. Requires the READER dataset role. +*/ +await gapi.client.tabledata.list({ datasetId: "datasetId", projectId: "projectId", tableId: "tableId", }); + +/* +Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. +*/ +await gapi.client.tables.delete({ datasetId: "datasetId", projectId: "projectId", tableId: "tableId", }); + +/* +Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. +*/ +await gapi.client.tables.get({ datasetId: "datasetId", projectId: "projectId", tableId: "tableId", }); + +/* +Creates a new, empty table in the dataset. +*/ +await gapi.client.tables.insert({ datasetId: "datasetId", projectId: "projectId", }); + +/* +Lists all tables in the specified dataset. Requires the READER dataset role. +*/ +await gapi.client.tables.list({ datasetId: "datasetId", projectId: "projectId", }); + +/* +Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics. +*/ +await gapi.client.tables.patch({ datasetId: "datasetId", projectId: "projectId", tableId: "tableId", }); + +/* +Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. +*/ +await gapi.client.tables.update({ datasetId: "datasetId", projectId: "projectId", tableId: "tableId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.bigquery/tsconfig.json b/types/gapi.client.bigquery/tsconfig.json new file mode 100644 index 0000000000..23f55a96a4 --- /dev/null +++ b/types/gapi.client.bigquery/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.bigquery-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.bigquery/tslint.json b/types/gapi.client.bigquery/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.bigquery/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.bigquerydatatransfer/gapi.client.bigquerydatatransfer-tests.ts b/types/gapi.client.bigquerydatatransfer/gapi.client.bigquerydatatransfer-tests.ts new file mode 100644 index 0000000000..2b3fcba3be --- /dev/null +++ b/types/gapi.client.bigquerydatatransfer/gapi.client.bigquerydatatransfer-tests.ts @@ -0,0 +1,36 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('bigquerydatatransfer', 'v1', () => { + /** now we can use gapi.client.bigquerydatatransfer */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data in Google BigQuery */ + 'https://www.googleapis.com/auth/bigquery', + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.bigquerydatatransfer/index.d.ts b/types/gapi.client.bigquerydatatransfer/index.d.ts new file mode 100644 index 0000000000..0bc090fdf5 --- /dev/null +++ b/types/gapi.client.bigquerydatatransfer/index.d.ts @@ -0,0 +1,1579 @@ +// Type definitions for Google BigQuery Data Transfer API v1 1.0 +// Project: https://cloud.google.com/bigquery/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://bigquerydatatransfer.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load BigQuery Data Transfer API v1 */ + function load(name: "bigquerydatatransfer", version: "v1"): PromiseLike; + function load(name: "bigquerydatatransfer", version: "v1", callback: () => any): void; + + const projects: bigquerydatatransfer.ProjectsResource; + + namespace bigquerydatatransfer { + interface CheckValidCredsResponse { + /** If set to `true`, the credentials exist and are valid. */ + hasValidCreds?: boolean; + } + interface DataSource { + /** Indicates the type of authorization. */ + authorizationType?: string; + /** + * Data source client id which should be used to receive refresh token. + * When not supplied, no offline credentials are populated for data transfer. + */ + clientId?: string; + /** + * Specifies whether the data source supports automatic data refresh for the + * past few days, and how it's supported. + * For some data sources, data might not be complete until a few days later, + * so it's useful to refresh data automatically. + */ + dataRefreshType?: string; + /** Data source id. */ + dataSourceId?: string; + /** + * Default data refresh window on days. + * Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. + */ + defaultDataRefreshWindowDays?: number; + /** + * Default data transfer schedule. + * Examples of valid schedules include: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + */ + defaultSchedule?: string; + /** User friendly data source description string. */ + description?: string; + /** User friendly data source name. */ + displayName?: string; + /** Url for the help document for this data source. */ + helpUrl?: string; + /** + * Disables backfilling and manual run scheduling + * for the data source. + */ + manualRunsDisabled?: boolean; + /** The minimum interval between two consecutive scheduled runs. */ + minimumScheduleInterval?: string; + /** Data source resource name. */ + name?: string; + /** Data source parameters. */ + parameters?: DataSourceParameter[]; + /** + * Api auth scopes for which refresh token needs to be obtained. Only valid + * when `client_id` is specified. Ignored otherwise. These are scopes needed + * by a data source to prepare data and ingest them into BigQuery, + * e.g., https://www.googleapis.com/auth/bigquery + */ + scopes?: string[]; + /** + * Specifies whether the data source supports a user defined schedule, or + * operates on the default schedule. + * When set to `true`, user can override default schedule. + */ + supportsCustomSchedule?: boolean; + /** + * Indicates whether the data source supports multiple transfers + * to different BigQuery targets. + */ + supportsMultipleTransfers?: boolean; + /** + * Transfer type. Currently supports only batch transfers, + * which are transfers that use the BigQuery batch APIs (load or + * query) to ingest the data. + */ + transferType?: string; + /** + * The number of seconds to wait for an update from the data source + * before BigQuery marks the transfer as failed. + */ + updateDeadlineSeconds?: number; + } + interface DataSourceParameter { + /** All possible values for the parameter. */ + allowedValues?: string[]; + /** Parameter description. */ + description?: string; + /** Parameter display name in the user interface. */ + displayName?: string; + /** When parameter is a record, describes child fields. */ + fields?: DataSourceParameter[]; + /** Cannot be changed after initial creation. */ + immutable?: boolean; + /** For integer and double values specifies maxminum allowed value. */ + maxValue?: number; + /** For integer and double values specifies minimum allowed value. */ + minValue?: number; + /** Parameter identifier. */ + paramId?: string; + /** + * If set to true, schema should be taken from the parent with the same + * parameter_id. Only applicable when parameter type is RECORD. + */ + recurse?: boolean; + /** Can parameter have multiple values. */ + repeated?: boolean; + /** Is parameter required. */ + required?: boolean; + /** Parameter type. */ + type?: string; + /** + * Description of the requirements for this field, in case the user input does + * not fulfill the regex pattern or min/max values. + */ + validationDescription?: string; + /** URL to a help document to further explain the naming requirements. */ + validationHelpUrl?: string; + /** Regular expression which can be used for parameter validation. */ + validationRegex?: string; + } + interface ListDataSourcesResponse { + /** List of supported data sources and their transfer settings. */ + dataSources?: DataSource[]; + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListDataSourcesRequest.page_token` + * to request the next page of list results. + */ + nextPageToken?: string; + } + interface ListLocationsResponse { + /** A list of locations that matches the specified filter in the request. */ + locations?: Location[]; + /** The standard List next-page token. */ + nextPageToken?: string; + } + interface ListTransferConfigsResponse { + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferConfigsRequest.page_token` + * to request the next page of list results. + */ + nextPageToken?: string; + /** Output only. The stored pipeline transfer configurations. */ + transferConfigs?: TransferConfig[]; + } + interface ListTransferLogsResponse { + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `GetTransferRunLogRequest.page_token` + * to request the next page of list results. + */ + nextPageToken?: string; + /** Output only. The stored pipeline transfer messages. */ + transferMessages?: TransferMessage[]; + } + interface ListTransferRunsResponse { + /** + * Output only. The next-pagination token. For multiple-page list results, + * this token can be used as the + * `ListTransferRunsRequest.page_token` + * to request the next page of list results. + */ + nextPageToken?: string; + /** Output only. The stored pipeline transfer runs. */ + transferRuns?: TransferRun[]; + } + interface Location { + /** + * Cross-service attributes for the location. For example + * + * {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: Record; + /** The canonical id for this location. For example: `"us-east1"`. */ + locationId?: string; + /** + * Service-specific metadata. For example the available capacity at the given + * location. + */ + metadata?: Record; + /** + * Resource name for the location, which may vary between implementations. + * For example: `"projects/example-project/locations/us-east1"` + */ + name?: string; + } + interface ScheduleTransferRunsRequest { + /** + * End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + */ + endTime?: string; + /** + * Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + */ + startTime?: string; + } + interface ScheduleTransferRunsResponse { + /** The transfer runs that were scheduled. */ + runs?: TransferRun[]; + } + interface TransferConfig { + /** + * The number of days to look back to automatically refresh the data. + * For example, if `data_refresh_window_days = 10`, then every day + * BigQuery reingests data for [today-10, today-1], rather than ingesting data + * for just [today-1]. + * Only valid if the data source supports the feature. Set the value to 0 + * to use the default value. + */ + dataRefreshWindowDays?: number; + /** Data source id. Cannot be changed once data transfer is created. */ + dataSourceId?: string; + /** Output only. Region in which BigQuery dataset is located. */ + datasetRegion?: string; + /** The BigQuery target dataset id. */ + destinationDatasetId?: string; + /** + * Is this config disabled. When set to true, no runs are scheduled + * for a given transfer. + */ + disabled?: boolean; + /** User specified display name for the data transfer. */ + displayName?: string; + /** + * The resource name of the transfer config. + * Transfer config names have the form + * `projects/{project_id}/transferConfigs/{config_id}`. + * Where `config_id` is usually a uuid, even though it is not + * guaranteed or required. The name is ignored when creating a transfer + * config. + */ + name?: string; + /** Output only. Next time when data transfer will run. */ + nextRunTime?: string; + /** Data transfer specific parameters. */ + params?: Record; + /** + * Data transfer schedule. + * If the data source does not support a custom schedule, this should be + * empty. If it is empty, the default value for the data source will be + * used. + * The specified times are in UTC. + * Examples of valid format: + * `1st,3rd monday of month 15:30`, + * `every wed,fri of jan,jun 13:15`, and + * `first sunday of quarter 00:00`. + * See more explanation about the format here: + * https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + * NOTE: the granularity should be at least 8 hours, or less frequent. + */ + schedule?: string; + /** Output only. State of the most recently updated transfer run. */ + state?: string; + /** Output only. Data transfer modification time. Ignored by server on input. */ + updateTime?: string; + /** + * Output only. Unique ID of the user on whose behalf transfer is done. + * Applicable only to data sources that do not support service accounts. + * When set to 0, the data source service account credentials are used. + */ + userId?: string; + } + interface TransferMessage { + /** Message text. */ + messageText?: string; + /** Time when message was logged. */ + messageTime?: string; + /** Message severity. */ + severity?: string; + } + interface TransferRun { + /** Output only. Data source id. */ + dataSourceId?: string; + /** Output only. Region in which BigQuery dataset is located. */ + datasetRegion?: string; + /** The BigQuery target dataset id. */ + destinationDatasetId?: string; + /** + * Output only. Time when transfer run ended. + * Parameter ignored by server for input requests. + */ + endTime?: string; + /** + * The resource name of the transfer run. + * Transfer run names have the form + * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. + * The name is ignored when creating a transfer run. + */ + name?: string; + /** Data transfer specific parameters. */ + params?: Record; + /** + * For batch transfer runs, specifies the date and time that + * data should be ingested. + */ + runTime?: string; + /** + * Output only. Describes the schedule of this transfer run if it was + * created as part of a regular schedule. For batch transfer runs that are + * scheduled manually, this is empty. + * NOTE: the system might choose to delay the schedule depending on the + * current load, so `schedule_time` doesn't always matches this. + */ + schedule?: string; + /** Minimum time after which a transfer run can be started. */ + scheduleTime?: string; + /** + * Output only. Time when transfer run was started. + * Parameter ignored by server for input requests. + */ + startTime?: string; + /** Output only. Data transfer run state. Ignored for input requests. */ + state?: string; + /** Output only. Last time the data transfer run state was updated. */ + updateTime?: string; + /** + * Output only. Unique ID of the user on whose behalf transfer is done. + * Applicable only to data sources that do not support service accounts. + * When set to 0, the data source service account credentials are used. + */ + userId?: string; + } + interface DataSourcesResource { + /** + * Returns true if valid credentials exist for the given data source and + * requesting user. + * Some data sources doesn't support service account, so we need to talk to + * them on behalf of the end user. This API just checks whether we have OAuth + * token for the particular user, which is a pre-requisite before user can + * create a transfer config. + */ + checkValidCreds(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Retrieves a supported data source and returns its settings, + * which can be used for UI rendering. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/dataSources/{data_source_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists supported data sources and returns their settings, + * which can be used for UI rendering. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListDataSourcesRequest` list results. For multiple-page + * results, `ListDataSourcesResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * The BigQuery project id for which data sources should be returned. + * Must be in the form: `projects/{project_id}` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DataSourcesResource { + /** + * Returns true if valid credentials exist for the given data source and + * requesting user. + * Some data sources doesn't support service account, so we need to talk to + * them on behalf of the end user. This API just checks whether we have OAuth + * token for the particular user, which is a pre-requisite before user can + * create a transfer config. + */ + checkValidCreds(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Retrieves a supported data source and returns its settings, + * which can be used for UI rendering. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/dataSources/{data_source_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists supported data sources and returns their settings, + * which can be used for UI rendering. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListDataSourcesRequest` list results. For multiple-page + * results, `ListDataSourcesResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * The BigQuery project id for which data sources should be returned. + * Must be in the form: `projects/{project_id}` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface TransferLogsResource { + /** Returns user facing log messages for the data transfer run. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Message types to return. If not populated - INFO, WARNING and ERROR + * messages are returned. + */ + messageTypes?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferLogsRequest` list results. For multiple-page + * results, `ListTransferLogsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface RunsResource { + /** Deletes the specified transfer run. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Returns information about the particular transfer run. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Returns information about running and completed jobs. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferRunsRequest` list results. For multiple-page + * results, `ListTransferRunsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * Name of transfer configuration for which transfer runs should be retrieved. + * Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Indicates how run attempts are to be pulled. */ + runAttempt?: string; + /** When specified, only transfer runs with requested states are returned. */ + states?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + transferLogs: TransferLogsResource; + } + interface TransferConfigsResource { + /** Creates a new data transfer configuration. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required if new credentials are needed, as indicated by + * `CheckValidCreds`. + * In order to obtain authorization_code, please make a + * request to + * https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= + * + * * client_id should be OAuth client_id of BigQuery DTS API for the given + * data source returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources method. + * * redirect_uri is an optional parameter. If not specified, then + * authorization code is posted to the opener of authorization flow window. + * Otherwise it will be sent to the redirect uri. A special value of + * urn:ietf:wg:oauth:2.0:oob means that authorization code should be + * returned in the title bar of the browser, with the page text prompting + * the user to copy the code and paste it in the application. + */ + authorizationCode?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The BigQuery project id where the transfer configuration should be created. + * Must be in the format /projects/{project_id}/locations/{location_id} + * or + * /projects/{project_id}/locations/- + * In case when '-' is specified as location_id, location is infered from + * the destination dataset region. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a data transfer configuration, + * including any associated transfer runs and logs. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Returns information about a data transfer config. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Returns information about all data transfers in the project. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** When specified, only configurations of requested data sources are returned. */ + dataSourceIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransfersRequest` list results. For multiple-page + * results, `ListTransfersResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * The BigQuery project id for which data sources + * should be returned: `projects/{project_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates a data transfer configuration. + * All fields must be set, even if they are not updated. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** + * Optional OAuth2 authorization code to use with this transfer configuration. + * If it is provided, the transfer configuration will be associated with the + * gaia id of the authorizing user. + * In order to obtain authorization_code, please make a + * request to + * https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= + * + * * client_id should be OAuth client_id of BigQuery DTS API for the given + * data source returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources method. + * * redirect_uri is an optional parameter. If not specified, then + * authorization code is posted to the opener of authorization flow window. + * Otherwise it will be sent to the redirect uri. A special value of + * urn:ietf:wg:oauth:2.0:oob means that authorization code should be + * returned in the title bar of the browser, with the page text prompting + * the user to copy the code and paste it in the application. + */ + authorizationCode?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the transfer config. + * Transfer config names have the form + * `projects/{project_id}/transferConfigs/{config_id}`. + * Where `config_id` is usually a uuid, even though it is not + * guaranteed or required. The name is ignored when creating a transfer + * config. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required list of fields to be updated in this request. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Creates transfer runs for a time range [range_start_time, range_end_time]. + * For each date - or whatever granularity the data source supports - in the + * range, one transfer run is created. + * Note that runs are created per UTC time in the time range. + */ + scheduleRuns(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + runs: RunsResource; + } + interface LocationsResource { + /** Get information about a location. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Resource name for the location. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists information about the supported locations for this service. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource that owns the locations collection, if applicable. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + dataSources: DataSourcesResource; + transferConfigs: TransferConfigsResource; + } + interface TransferLogsResource { + /** Returns user facing log messages for the data transfer run. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Message types to return. If not populated - INFO, WARNING and ERROR + * messages are returned. + */ + messageTypes?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferLogsRequest` list results. For multiple-page + * results, `ListTransferLogsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface RunsResource { + /** Deletes the specified transfer run. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Returns information about the particular transfer run. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Returns information about running and completed jobs. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransferRunsRequest` list results. For multiple-page + * results, `ListTransferRunsResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * Name of transfer configuration for which transfer runs should be retrieved. + * Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Indicates how run attempts are to be pulled. */ + runAttempt?: string; + /** When specified, only transfer runs with requested states are returned. */ + states?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + transferLogs: TransferLogsResource; + } + interface TransferConfigsResource { + /** Creates a new data transfer configuration. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** + * Optional OAuth2 authorization code to use with this transfer configuration. + * This is required if new credentials are needed, as indicated by + * `CheckValidCreds`. + * In order to obtain authorization_code, please make a + * request to + * https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= + * + * * client_id should be OAuth client_id of BigQuery DTS API for the given + * data source returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources method. + * * redirect_uri is an optional parameter. If not specified, then + * authorization code is posted to the opener of authorization flow window. + * Otherwise it will be sent to the redirect uri. A special value of + * urn:ietf:wg:oauth:2.0:oob means that authorization code should be + * returned in the title bar of the browser, with the page text prompting + * the user to copy the code and paste it in the application. + */ + authorizationCode?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The BigQuery project id where the transfer configuration should be created. + * Must be in the format /projects/{project_id}/locations/{location_id} + * or + * /projects/{project_id}/locations/- + * In case when '-' is specified as location_id, location is infered from + * the destination dataset region. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a data transfer configuration, + * including any associated transfer runs and logs. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Returns information about a data transfer config. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Returns information about all data transfers in the project. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** When specified, only configurations of requested data sources are returned. */ + dataSourceIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Page size. The default page size is the maximum value of 1000 results. */ + pageSize?: number; + /** + * Pagination token, which can be used to request a specific page + * of `ListTransfersRequest` list results. For multiple-page + * results, `ListTransfersResponse` outputs + * a `next_page` token, which can be used as the + * `page_token` value to request the next page of list results. + */ + pageToken?: string; + /** + * The BigQuery project id for which data sources + * should be returned: `projects/{project_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates a data transfer configuration. + * All fields must be set, even if they are not updated. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** + * Optional OAuth2 authorization code to use with this transfer configuration. + * If it is provided, the transfer configuration will be associated with the + * gaia id of the authorizing user. + * In order to obtain authorization_code, please make a + * request to + * https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= + * + * * client_id should be OAuth client_id of BigQuery DTS API for the given + * data source returned by ListDataSources method. + * * data_source_scopes are the scopes returned by ListDataSources method. + * * redirect_uri is an optional parameter. If not specified, then + * authorization code is posted to the opener of authorization flow window. + * Otherwise it will be sent to the redirect uri. A special value of + * urn:ietf:wg:oauth:2.0:oob means that authorization code should be + * returned in the title bar of the browser, with the page text prompting + * the user to copy the code and paste it in the application. + */ + authorizationCode?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the transfer config. + * Transfer config names have the form + * `projects/{project_id}/transferConfigs/{config_id}`. + * Where `config_id` is usually a uuid, even though it is not + * guaranteed or required. The name is ignored when creating a transfer + * config. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required list of fields to be updated in this request. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Creates transfer runs for a time range [range_start_time, range_end_time]. + * For each date - or whatever granularity the data source supports - in the + * range, one transfer run is created. + * Note that runs are created per UTC time in the time range. + */ + scheduleRuns(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + runs: RunsResource; + } + interface ProjectsResource { + dataSources: DataSourcesResource; + locations: LocationsResource; + transferConfigs: TransferConfigsResource; + } + } +} diff --git a/types/gapi.client.bigquerydatatransfer/readme.md b/types/gapi.client.bigquerydatatransfer/readme.md new file mode 100644 index 0000000000..539a25cecc --- /dev/null +++ b/types/gapi.client.bigquerydatatransfer/readme.md @@ -0,0 +1,60 @@ +# TypeScript typings for BigQuery Data Transfer API v1 +Transfers data from partner SaaS applications to Google BigQuery on a scheduled, managed basis. +For detailed description please check [documentation](https://cloud.google.com/bigquery/). + +## Installing + +Install typings for BigQuery Data Transfer API: +``` +npm install @types/gapi.client.bigquerydatatransfer@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('bigquerydatatransfer', 'v1', () => { + // now we can use gapi.client.bigquerydatatransfer + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data in Google BigQuery + 'https://www.googleapis.com/auth/bigquery', + + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use BigQuery Data Transfer API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.bigquerydatatransfer/tsconfig.json b/types/gapi.client.bigquerydatatransfer/tsconfig.json new file mode 100644 index 0000000000..312df37f3f --- /dev/null +++ b/types/gapi.client.bigquerydatatransfer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.bigquerydatatransfer-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.bigquerydatatransfer/tslint.json b/types/gapi.client.bigquerydatatransfer/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.bigquerydatatransfer/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.blogger/gapi.client.blogger-tests.ts b/types/gapi.client.blogger/gapi.client.blogger-tests.ts new file mode 100644 index 0000000000..09f3da8912 --- /dev/null +++ b/types/gapi.client.blogger/gapi.client.blogger-tests.ts @@ -0,0 +1,277 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('blogger', 'v3', () => { + /** now we can use gapi.client.blogger */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage your Blogger account */ + 'https://www.googleapis.com/auth/blogger', + /** View your Blogger account */ + 'https://www.googleapis.com/auth/blogger.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Gets one blog and user info pair by blogId and userId. */ + await gapi.client.blogUserInfos.get({ + blogId: "blogId", + maxPosts: 2, + userId: "userId", + }); + /** Gets one blog by ID. */ + await gapi.client.blogs.get({ + blogId: "blogId", + maxPosts: 2, + view: "view", + }); + /** Retrieve a Blog by URL. */ + await gapi.client.blogs.getByUrl({ + url: "url", + view: "view", + }); + /** Retrieves a list of blogs, possibly filtered. */ + await gapi.client.blogs.listByUser({ + fetchUserInfo: true, + role: "role", + status: "status", + userId: "userId", + view: "view", + }); + /** Marks a comment as not spam. */ + await gapi.client.comments.approve({ + blogId: "blogId", + commentId: "commentId", + postId: "postId", + }); + /** Delete a comment by ID. */ + await gapi.client.comments.delete({ + blogId: "blogId", + commentId: "commentId", + postId: "postId", + }); + /** Gets one comment by ID. */ + await gapi.client.comments.get({ + blogId: "blogId", + commentId: "commentId", + postId: "postId", + view: "view", + }); + /** Retrieves the comments for a post, possibly filtered. */ + await gapi.client.comments.list({ + blogId: "blogId", + endDate: "endDate", + fetchBodies: true, + maxResults: 4, + pageToken: "pageToken", + postId: "postId", + startDate: "startDate", + status: "status", + view: "view", + }); + /** Retrieves the comments for a blog, across all posts, possibly filtered. */ + await gapi.client.comments.listByBlog({ + blogId: "blogId", + endDate: "endDate", + fetchBodies: true, + maxResults: 4, + pageToken: "pageToken", + startDate: "startDate", + status: "status", + }); + /** Marks a comment as spam. */ + await gapi.client.comments.markAsSpam({ + blogId: "blogId", + commentId: "commentId", + postId: "postId", + }); + /** Removes the content of a comment. */ + await gapi.client.comments.removeContent({ + blogId: "blogId", + commentId: "commentId", + postId: "postId", + }); + /** Retrieve pageview stats for a Blog. */ + await gapi.client.pageViews.get({ + blogId: "blogId", + range: "range", + }); + /** Delete a page by ID. */ + await gapi.client.pages.delete({ + blogId: "blogId", + pageId: "pageId", + }); + /** Gets one blog page by ID. */ + await gapi.client.pages.get({ + blogId: "blogId", + pageId: "pageId", + view: "view", + }); + /** Add a page. */ + await gapi.client.pages.insert({ + blogId: "blogId", + isDraft: true, + }); + /** Retrieves the pages for a blog, optionally including non-LIVE statuses. */ + await gapi.client.pages.list({ + blogId: "blogId", + fetchBodies: true, + maxResults: 3, + pageToken: "pageToken", + status: "status", + view: "view", + }); + /** Update a page. This method supports patch semantics. */ + await gapi.client.pages.patch({ + blogId: "blogId", + pageId: "pageId", + publish: true, + revert: true, + }); + /** Publishes a draft page. */ + await gapi.client.pages.publish({ + blogId: "blogId", + pageId: "pageId", + }); + /** Revert a published or scheduled page to draft state. */ + await gapi.client.pages.revert({ + blogId: "blogId", + pageId: "pageId", + }); + /** Update a page. */ + await gapi.client.pages.update({ + blogId: "blogId", + pageId: "pageId", + publish: true, + revert: true, + }); + /** + * Gets one post and user info pair, by post ID and user ID. The post user info contains per-user information about the post, such as access rights, + * specific to the user. + */ + await gapi.client.postUserInfos.get({ + blogId: "blogId", + maxComments: 2, + postId: "postId", + userId: "userId", + }); + /** + * Retrieves a list of post and post user info pairs, possibly filtered. The post user info contains per-user information about the post, such as access + * rights, specific to the user. + */ + await gapi.client.postUserInfos.list({ + blogId: "blogId", + endDate: "endDate", + fetchBodies: true, + labels: "labels", + maxResults: 5, + orderBy: "orderBy", + pageToken: "pageToken", + startDate: "startDate", + status: "status", + userId: "userId", + view: "view", + }); + /** Delete a post by ID. */ + await gapi.client.posts.delete({ + blogId: "blogId", + postId: "postId", + }); + /** Get a post by ID. */ + await gapi.client.posts.get({ + blogId: "blogId", + fetchBody: true, + fetchImages: true, + maxComments: 4, + postId: "postId", + view: "view", + }); + /** Retrieve a Post by Path. */ + await gapi.client.posts.getByPath({ + blogId: "blogId", + maxComments: 2, + path: "path", + view: "view", + }); + /** Add a post. */ + await gapi.client.posts.insert({ + blogId: "blogId", + fetchBody: true, + fetchImages: true, + isDraft: true, + }); + /** Retrieves a list of posts, possibly filtered. */ + await gapi.client.posts.list({ + blogId: "blogId", + endDate: "endDate", + fetchBodies: true, + fetchImages: true, + labels: "labels", + maxResults: 6, + orderBy: "orderBy", + pageToken: "pageToken", + startDate: "startDate", + status: "status", + view: "view", + }); + /** Update a post. This method supports patch semantics. */ + await gapi.client.posts.patch({ + blogId: "blogId", + fetchBody: true, + fetchImages: true, + maxComments: 4, + postId: "postId", + publish: true, + revert: true, + }); + /** Publishes a draft post, optionally at the specific time of the given publishDate parameter. */ + await gapi.client.posts.publish({ + blogId: "blogId", + postId: "postId", + publishDate: "publishDate", + }); + /** Revert a published or scheduled post to draft state. */ + await gapi.client.posts.revert({ + blogId: "blogId", + postId: "postId", + }); + /** Search for a post. */ + await gapi.client.posts.search({ + blogId: "blogId", + fetchBodies: true, + orderBy: "orderBy", + q: "q", + }); + /** Update a post. */ + await gapi.client.posts.update({ + blogId: "blogId", + fetchBody: true, + fetchImages: true, + maxComments: 4, + postId: "postId", + publish: true, + revert: true, + }); + /** Gets one user by ID. */ + await gapi.client.users.get({ + userId: "userId", + }); + } +}); diff --git a/types/gapi.client.blogger/index.d.ts b/types/gapi.client.blogger/index.d.ts new file mode 100644 index 0000000000..85240dfee5 --- /dev/null +++ b/types/gapi.client.blogger/index.d.ts @@ -0,0 +1,1346 @@ +// Type definitions for Google Blogger API v3 3.0 +// Project: https://developers.google.com/blogger/docs/3.0/getting_started +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/blogger/v3/rest + +/// + +declare namespace gapi.client { + /** Load Blogger API v3 */ + function load(name: "blogger", version: "v3"): PromiseLike; + function load(name: "blogger", version: "v3", callback: () => any): void; + + const blogUserInfos: blogger.BlogUserInfosResource; + + const blogs: blogger.BlogsResource; + + const comments: blogger.CommentsResource; + + const pageViews: blogger.PageViewsResource; + + const pages: blogger.PagesResource; + + const postUserInfos: blogger.PostUserInfosResource; + + const posts: blogger.PostsResource; + + const users: blogger.UsersResource; + + namespace blogger { + interface Blog { + /** The JSON custom meta-data for the Blog */ + customMetaData?: string; + /** The description of this blog. This is displayed underneath the title. */ + description?: string; + /** The identifier for this resource. */ + id?: string; + /** The kind of this entry. Always blogger#blog */ + kind?: string; + /** The locale this Blog is set to. */ + locale?: { + /** The country this blog's locale is set to. */ + country?: string; + /** The language this blog is authored in. */ + language?: string; + /** The language variant this blog is authored in. */ + variant?: string; + }; + /** The name of this blog. This is displayed as the title. */ + name?: string; + /** The container of pages in this blog. */ + pages?: { + /** The URL of the container for pages in this blog. */ + selfLink?: string; + /** The count of pages in this blog. */ + totalItems?: number; + }; + /** The container of posts in this blog. */ + posts?: { + /** The List of Posts for this Blog. */ + items?: Post[]; + /** The URL of the container for posts in this blog. */ + selfLink?: string; + /** The count of posts in this blog. */ + totalItems?: number; + }; + /** RFC 3339 date-time when this blog was published. */ + published?: string; + /** The API REST URL to fetch this resource from. */ + selfLink?: string; + /** The status of the blog. */ + status?: string; + /** RFC 3339 date-time when this blog was last updated. */ + updated?: string; + /** The URL where this blog is published. */ + url?: string; + } + interface BlogList { + /** Admin level list of blog per-user information */ + blogUserInfos?: BlogUserInfo[]; + /** The list of Blogs this user has Authorship or Admin rights over. */ + items?: Blog[]; + /** The kind of this entity. Always blogger#blogList */ + kind?: string; + } + interface BlogPerUserInfo { + /** ID of the Blog resource */ + blogId?: string; + /** True if the user has Admin level access to the blog. */ + hasAdminAccess?: boolean; + /** The kind of this entity. Always blogger#blogPerUserInfo */ + kind?: string; + /** The Photo Album Key for the user when adding photos to the blog */ + photosAlbumKey?: string; + /** Access permissions that the user has for the blog (ADMIN, AUTHOR, or READER). */ + role?: string; + /** ID of the User */ + userId?: string; + } + interface BlogUserInfo { + /** The Blog resource. */ + blog?: Blog; + /** Information about a User for the Blog. */ + blog_user_info?: BlogPerUserInfo; + /** The kind of this entity. Always blogger#blogUserInfo */ + kind?: string; + } + interface Comment { + /** The author of this Comment. */ + author?: { + /** The display name. */ + displayName?: string; + /** The identifier of the Comment creator. */ + id?: string; + /** The comment creator's avatar. */ + image?: { + /** The comment creator's avatar URL. */ + url?: string; + }; + /** The URL of the Comment creator's Profile page. */ + url?: string; + }; + /** Data about the blog containing this comment. */ + blog?: { + /** The identifier of the blog containing this comment. */ + id?: string; + }; + /** The actual content of the comment. May include HTML markup. */ + content?: string; + /** The identifier for this resource. */ + id?: string; + /** Data about the comment this is in reply to. */ + inReplyTo?: { + /** The identified of the parent of this comment. */ + id?: string; + }; + /** The kind of this entry. Always blogger#comment */ + kind?: string; + /** Data about the post containing this comment. */ + post?: { + /** The identifier of the post containing this comment. */ + id?: string; + }; + /** RFC 3339 date-time when this comment was published. */ + published?: string; + /** The API REST URL to fetch this resource from. */ + selfLink?: string; + /** The status of the comment (only populated for admin users) */ + status?: string; + /** RFC 3339 date-time when this comment was last updated. */ + updated?: string; + } + interface CommentList { + /** Etag of the response. */ + etag?: string; + /** The List of Comments for a Post. */ + items?: Comment[]; + /** The kind of this entry. Always blogger#commentList */ + kind?: string; + /** Pagination token to fetch the next page, if one exists. */ + nextPageToken?: string; + /** Pagination token to fetch the previous page, if one exists. */ + prevPageToken?: string; + } + interface Page { + /** The author of this Page. */ + author?: { + /** The display name. */ + displayName?: string; + /** The identifier of the Page creator. */ + id?: string; + /** The page author's avatar. */ + image?: { + /** The page author's avatar URL. */ + url?: string; + }; + /** The URL of the Page creator's Profile page. */ + url?: string; + }; + /** Data about the blog containing this Page. */ + blog?: { + /** The identifier of the blog containing this page. */ + id?: string; + }; + /** The body content of this Page, in HTML. */ + content?: string; + /** Etag of the resource. */ + etag?: string; + /** The identifier for this resource. */ + id?: string; + /** The kind of this entity. Always blogger#page */ + kind?: string; + /** RFC 3339 date-time when this Page was published. */ + published?: string; + /** The API REST URL to fetch this resource from. */ + selfLink?: string; + /** The status of the page for admin resources (either LIVE or DRAFT). */ + status?: string; + /** The title of this entity. This is the name displayed in the Admin user interface. */ + title?: string; + /** RFC 3339 date-time when this Page was last updated. */ + updated?: string; + /** The URL that this Page is displayed at. */ + url?: string; + } + interface PageList { + /** Etag of the response. */ + etag?: string; + /** The list of Pages for a Blog. */ + items?: Page[]; + /** The kind of this entity. Always blogger#pageList */ + kind?: string; + /** Pagination token to fetch the next page, if one exists. */ + nextPageToken?: string; + } + interface Pageviews { + /** Blog Id */ + blogId?: string; + /** The container of posts in this blog. */ + counts?: Array<{ + /** Count of page views for the given time range */ + count?: string; + /** Time range the given count applies to */ + timeRange?: string; + }>; + /** The kind of this entry. Always blogger#page_views */ + kind?: string; + } + interface Post { + /** The author of this Post. */ + author?: { + /** The display name. */ + displayName?: string; + /** The identifier of the Post creator. */ + id?: string; + /** The Post author's avatar. */ + image?: { + /** The Post author's avatar URL. */ + url?: string; + }; + /** The URL of the Post creator's Profile page. */ + url?: string; + }; + /** Data about the blog containing this Post. */ + blog?: { + /** The identifier of the Blog that contains this Post. */ + id?: string; + }; + /** The content of the Post. May contain HTML markup. */ + content?: string; + /** The JSON meta-data for the Post. */ + customMetaData?: string; + /** Etag of the resource. */ + etag?: string; + /** The identifier of this Post. */ + id?: string; + /** Display image for the Post. */ + images?: Array<{ + url?: string; + }>; + /** The kind of this entity. Always blogger#post */ + kind?: string; + /** The list of labels this Post was tagged with. */ + labels?: string[]; + /** The location for geotagged posts. */ + location?: { + /** Location's latitude. */ + lat?: number; + /** Location's longitude. */ + lng?: number; + /** Location name. */ + name?: string; + /** Location's viewport span. Can be used when rendering a map preview. */ + span?: string; + }; + /** RFC 3339 date-time when this Post was published. */ + published?: string; + /** Comment control and display setting for readers of this post. */ + readerComments?: string; + /** The container of comments on this Post. */ + replies?: { + /** The List of Comments for this Post. */ + items?: Comment[]; + /** The URL of the comments on this post. */ + selfLink?: string; + /** The count of comments on this post. */ + totalItems?: string; + }; + /** The API REST URL to fetch this resource from. */ + selfLink?: string; + /** Status of the post. Only set for admin-level requests */ + status?: string; + /** The title of the Post. */ + title?: string; + /** The title link URL, similar to atom's related link. */ + titleLink?: string; + /** RFC 3339 date-time when this Post was last updated. */ + updated?: string; + /** The URL where this Post is displayed. */ + url?: string; + } + interface PostList { + /** Etag of the response. */ + etag?: string; + /** The list of Posts for this Blog. */ + items?: Post[]; + /** The kind of this entity. Always blogger#postList */ + kind?: string; + /** Pagination token to fetch the next page, if one exists. */ + nextPageToken?: string; + } + interface PostPerUserInfo { + /** ID of the Blog that the post resource belongs to. */ + blogId?: string; + /** True if the user has Author level access to the post. */ + hasEditAccess?: boolean; + /** The kind of this entity. Always blogger#postPerUserInfo */ + kind?: string; + /** ID of the Post resource. */ + postId?: string; + /** ID of the User. */ + userId?: string; + } + interface PostUserInfo { + /** The kind of this entity. Always blogger#postUserInfo */ + kind?: string; + /** The Post resource. */ + post?: Post; + /** Information about a User for the Post. */ + post_user_info?: PostPerUserInfo; + } + interface PostUserInfosList { + /** The list of Posts with User information for the post, for this Blog. */ + items?: PostUserInfo[]; + /** The kind of this entity. Always blogger#postList */ + kind?: string; + /** Pagination token to fetch the next page, if one exists. */ + nextPageToken?: string; + } + interface User { + /** Profile summary information. */ + about?: string; + /** The container of blogs for this user. */ + blogs?: { + /** The URL of the Blogs for this user. */ + selfLink?: string; + }; + /** The timestamp of when this profile was created, in seconds since epoch. */ + created?: string; + /** The display name. */ + displayName?: string; + /** The identifier for this User. */ + id?: string; + /** The kind of this entity. Always blogger#user */ + kind?: string; + /** This user's locale */ + locale?: { + /** The user's country setting. */ + country?: string; + /** The user's language setting. */ + language?: string; + /** The user's language variant setting. */ + variant?: string; + }; + /** The API REST URL to fetch this resource from. */ + selfLink?: string; + /** The user's profile page. */ + url?: string; + } + interface BlogUserInfosResource { + /** Gets one blog and user info pair by blogId and userId. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the blog to get. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of posts to pull back with the blog. */ + maxPosts?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface BlogsResource { + /** Gets one blog by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the blog to get. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of posts to pull back with the blog. */ + maxPosts?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the blog. Note that some fields require elevated access. */ + view?: string; + }): Request; + /** Retrieve a Blog by URL. */ + getByUrl(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The URL of the blog to retrieve. */ + url: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the blog. Note that some fields require elevated access. */ + view?: string; + }): Request; + /** Retrieves a list of blogs, possibly filtered. */ + listByUser(request: { + /** Data format for the response. */ + alt?: string; + /** Whether the response is a list of blogs with per-user information instead of just blogs. */ + fetchUserInfo?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * User access types for blogs to include in the results, e.g. AUTHOR will return blogs where the user has author level access. If no roles are specified, + * defaults to ADMIN and AUTHOR roles. + */ + role?: string; + /** Blog statuses to include in the result (default: Live blogs only). Note that ADMIN access is required to view deleted blogs. */ + status?: string; + /** ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the blogs. Note that some fields require elevated access. */ + view?: string; + }): Request; + } + interface CommentsResource { + /** Marks a comment as not spam. */ + approve(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** The ID of the comment to mark as not spam. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Delete a comment by ID. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** The ID of the comment to delete. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one comment by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to containing the comment. */ + blogId: string; + /** The ID of the comment to get. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** ID of the post to fetch posts from. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * Access level for the requested comment (default: READER). Note that some comments will require elevated permissions, for example comments where the + * parent posts which is in a draft state, or comments that are pending moderation. + */ + view?: string; + }): Request; + /** Retrieves the comments for a post, possibly filtered. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch comments from. */ + blogId: string; + /** Latest date of comment to fetch, a date-time with RFC 3339 formatting. */ + endDate?: string; + /** Whether the body content of the comments is included. */ + fetchBodies?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of comments to include in the result. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Continuation token if request is paged. */ + pageToken?: string; + /** ID of the post to fetch posts from. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Earliest date of comment to fetch, a date-time with RFC 3339 formatting. */ + startDate?: string; + status?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the returned result. Note that some fields require elevated access. */ + view?: string; + }): Request; + /** Retrieves the comments for a blog, across all posts, possibly filtered. */ + listByBlog(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch comments from. */ + blogId: string; + /** Latest date of comment to fetch, a date-time with RFC 3339 formatting. */ + endDate?: string; + /** Whether the body content of the comments is included. */ + fetchBodies?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of comments to include in the result. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Continuation token if request is paged. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Earliest date of comment to fetch, a date-time with RFC 3339 formatting. */ + startDate?: string; + status?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Marks a comment as spam. */ + markAsSpam(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** The ID of the comment to mark as spam. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Removes the content of a comment. */ + removeContent(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** The ID of the comment to delete content from. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PageViewsResource { + /** Retrieve pageview stats for a Blog. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the blog to get. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + range?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PagesResource { + /** Delete a page by ID. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one blog page by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog containing the page. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page to get. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + view?: string; + }): Request; + /** Add a page. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to add the page to. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to create the page as a draft (default: false). */ + isDraft?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the pages for a blog, optionally including non-LIVE statuses. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch Pages from. */ + blogId: string; + /** Whether to retrieve the Page bodies. */ + fetchBodies?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of Pages to fetch. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Continuation token if the request is paged. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + status?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the returned result. Note that some fields require elevated access. */ + view?: string; + }): Request; + /** Update a page. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Whether a publish action should be performed when the page is updated (default: false). */ + publish?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether a revert action should be performed when the page is updated (default: false). */ + revert?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Publishes a draft page. */ + publish(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Revert a published or scheduled page to draft state. */ + revert(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update a page. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Page. */ + pageId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Whether a publish action should be performed when the page is updated (default: false). */ + publish?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether a revert action should be performed when the page is updated (default: false). */ + revert?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PostUserInfosResource { + /** + * Gets one post and user info pair, by post ID and user ID. The post user info contains per-user information about the post, such as access rights, + * specific to the user. + */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of comments to pull back on a post. */ + maxComments?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the post to get. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves a list of post and post user info pairs, possibly filtered. The post user info contains per-user information about the post, such as access + * rights, specific to the user. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch posts from. */ + blogId: string; + /** Latest post date to fetch, a date-time with RFC 3339 formatting. */ + endDate?: string; + /** Whether the body content of posts is included. Default is false. */ + fetchBodies?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Comma-separated list of labels to search for. */ + labels?: string; + /** Maximum number of posts to fetch. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Sort order applied to search results. Default is published. */ + orderBy?: string; + /** Continuation token if the request is paged. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Earliest post date to fetch, a date-time with RFC 3339 formatting. */ + startDate?: string; + status?: string; + /** ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the returned result. Note that some fields require elevated access. */ + view?: string; + }): Request; + } + interface PostsResource { + /** Delete a post by ID. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get a post by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch the post from. */ + blogId: string; + /** + * Whether the body content of the post is included (default: true). This should be set to false when the post bodies are not required, to help minimize + * traffic. + */ + fetchBody?: boolean; + /** Whether image URL metadata for each post is included (default: false). */ + fetchImages?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of comments to pull back on a post. */ + maxComments?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the post */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the returned result. Note that some fields require elevated access. */ + view?: string; + }): Request; + /** Retrieve a Post by Path. */ + getByPath(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch the post from. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of comments to pull back on a post. */ + maxComments?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Path of the Post to retrieve. */ + path: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the returned result. Note that some fields require elevated access. */ + view?: string; + }): Request; + /** Add a post. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to add the post to. */ + blogId: string; + /** Whether the body content of the post is included with the result (default: true). */ + fetchBody?: boolean; + /** Whether image URL metadata for each post is included in the returned result (default: false). */ + fetchImages?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to create the post as a draft (default: false). */ + isDraft?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of posts, possibly filtered. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch posts from. */ + blogId: string; + /** Latest post date to fetch, a date-time with RFC 3339 formatting. */ + endDate?: string; + /** + * Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize + * traffic. + */ + fetchBodies?: boolean; + /** Whether image URL metadata for each post is included. */ + fetchImages?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Comma-separated list of labels to search for. */ + labels?: string; + /** Maximum number of posts to fetch. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Sort search results */ + orderBy?: string; + /** Continuation token if the request is paged. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Earliest post date to fetch, a date-time with RFC 3339 formatting. */ + startDate?: string; + /** Statuses to include in the results. */ + status?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Access level with which to view the returned result. Note that some fields require escalated access. */ + view?: string; + }): Request; + /** Update a post. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Whether the body content of the post is included with the result (default: true). */ + fetchBody?: boolean; + /** Whether image URL metadata for each post is included in the returned result (default: false). */ + fetchImages?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of comments to retrieve with the returned post. */ + maxComments?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Whether a publish action should be performed when the post is updated (default: false). */ + publish?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether a revert action should be performed when the post is updated (default: false). */ + revert?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Publishes a draft post, optionally at the specific time of the given publishDate parameter. */ + publish(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Optional date and time to schedule the publishing of the Blog. If no publishDate parameter is given, the post is either published at the a previously + * saved schedule date (if present), or the current time. If a future date is given, the post will be scheduled to be published. + */ + publishDate?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Revert a published or scheduled post to draft state. */ + revert(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Search for a post. */ + search(request: { + /** Data format for the response. */ + alt?: string; + /** ID of the blog to fetch the post from. */ + blogId: string; + /** + * Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize + * traffic. + */ + fetchBodies?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Sort search results */ + orderBy?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Query terms to search this blog for matching posts. */ + q: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Update a post. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the Blog. */ + blogId: string; + /** Whether the body content of the post is included with the result (default: true). */ + fetchBody?: boolean; + /** Whether image URL metadata for each post is included in the returned result (default: false). */ + fetchImages?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of comments to retrieve with the returned post. */ + maxComments?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the Post. */ + postId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Whether a publish action should be performed when the post is updated (default: false). */ + publish?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether a revert action should be performed when the post is updated (default: false). */ + revert?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UsersResource { + /** Gets one user by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the user to get. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.blogger/readme.md b/types/gapi.client.blogger/readme.md new file mode 100644 index 0000000000..7356d1e034 --- /dev/null +++ b/types/gapi.client.blogger/readme.md @@ -0,0 +1,222 @@ +# TypeScript typings for Blogger API v3 +API for access to the data within Blogger. +For detailed description please check [documentation](https://developers.google.com/blogger/docs/3.0/getting_started). + +## Installing + +Install typings for Blogger API: +``` +npm install @types/gapi.client.blogger@v3 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('blogger', 'v3', () => { + // now we can use gapi.client.blogger + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage your Blogger account + 'https://www.googleapis.com/auth/blogger', + + // View your Blogger account + 'https://www.googleapis.com/auth/blogger.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Blogger API resources: + +```typescript + +/* +Gets one blog and user info pair by blogId and userId. +*/ +await gapi.client.blogUserInfos.get({ blogId: "blogId", userId: "userId", }); + +/* +Gets one blog by ID. +*/ +await gapi.client.blogs.get({ blogId: "blogId", }); + +/* +Retrieve a Blog by URL. +*/ +await gapi.client.blogs.getByUrl({ url: "url", }); + +/* +Retrieves a list of blogs, possibly filtered. +*/ +await gapi.client.blogs.listByUser({ userId: "userId", }); + +/* +Marks a comment as not spam. +*/ +await gapi.client.comments.approve({ blogId: "blogId", commentId: "commentId", postId: "postId", }); + +/* +Delete a comment by ID. +*/ +await gapi.client.comments.delete({ blogId: "blogId", commentId: "commentId", postId: "postId", }); + +/* +Gets one comment by ID. +*/ +await gapi.client.comments.get({ blogId: "blogId", commentId: "commentId", postId: "postId", }); + +/* +Retrieves the comments for a post, possibly filtered. +*/ +await gapi.client.comments.list({ blogId: "blogId", postId: "postId", }); + +/* +Retrieves the comments for a blog, across all posts, possibly filtered. +*/ +await gapi.client.comments.listByBlog({ blogId: "blogId", }); + +/* +Marks a comment as spam. +*/ +await gapi.client.comments.markAsSpam({ blogId: "blogId", commentId: "commentId", postId: "postId", }); + +/* +Removes the content of a comment. +*/ +await gapi.client.comments.removeContent({ blogId: "blogId", commentId: "commentId", postId: "postId", }); + +/* +Retrieve pageview stats for a Blog. +*/ +await gapi.client.pageViews.get({ blogId: "blogId", }); + +/* +Delete a page by ID. +*/ +await gapi.client.pages.delete({ blogId: "blogId", pageId: "pageId", }); + +/* +Gets one blog page by ID. +*/ +await gapi.client.pages.get({ blogId: "blogId", pageId: "pageId", }); + +/* +Add a page. +*/ +await gapi.client.pages.insert({ blogId: "blogId", }); + +/* +Retrieves the pages for a blog, optionally including non-LIVE statuses. +*/ +await gapi.client.pages.list({ blogId: "blogId", }); + +/* +Update a page. This method supports patch semantics. +*/ +await gapi.client.pages.patch({ blogId: "blogId", pageId: "pageId", }); + +/* +Publishes a draft page. +*/ +await gapi.client.pages.publish({ blogId: "blogId", pageId: "pageId", }); + +/* +Revert a published or scheduled page to draft state. +*/ +await gapi.client.pages.revert({ blogId: "blogId", pageId: "pageId", }); + +/* +Update a page. +*/ +await gapi.client.pages.update({ blogId: "blogId", pageId: "pageId", }); + +/* +Gets one post and user info pair, by post ID and user ID. The post user info contains per-user information about the post, such as access rights, specific to the user. +*/ +await gapi.client.postUserInfos.get({ blogId: "blogId", postId: "postId", userId: "userId", }); + +/* +Retrieves a list of post and post user info pairs, possibly filtered. The post user info contains per-user information about the post, such as access rights, specific to the user. +*/ +await gapi.client.postUserInfos.list({ blogId: "blogId", userId: "userId", }); + +/* +Delete a post by ID. +*/ +await gapi.client.posts.delete({ blogId: "blogId", postId: "postId", }); + +/* +Get a post by ID. +*/ +await gapi.client.posts.get({ blogId: "blogId", postId: "postId", }); + +/* +Retrieve a Post by Path. +*/ +await gapi.client.posts.getByPath({ blogId: "blogId", path: "path", }); + +/* +Add a post. +*/ +await gapi.client.posts.insert({ blogId: "blogId", }); + +/* +Retrieves a list of posts, possibly filtered. +*/ +await gapi.client.posts.list({ blogId: "blogId", }); + +/* +Update a post. This method supports patch semantics. +*/ +await gapi.client.posts.patch({ blogId: "blogId", postId: "postId", }); + +/* +Publishes a draft post, optionally at the specific time of the given publishDate parameter. +*/ +await gapi.client.posts.publish({ blogId: "blogId", postId: "postId", }); + +/* +Revert a published or scheduled post to draft state. +*/ +await gapi.client.posts.revert({ blogId: "blogId", postId: "postId", }); + +/* +Search for a post. +*/ +await gapi.client.posts.search({ blogId: "blogId", q: "q", }); + +/* +Update a post. +*/ +await gapi.client.posts.update({ blogId: "blogId", postId: "postId", }); + +/* +Gets one user by ID. +*/ +await gapi.client.users.get({ userId: "userId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.blogger/tsconfig.json b/types/gapi.client.blogger/tsconfig.json new file mode 100644 index 0000000000..1b5be0ad2b --- /dev/null +++ b/types/gapi.client.blogger/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.blogger-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.blogger/tslint.json b/types/gapi.client.blogger/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.blogger/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.books/gapi.client.books-tests.ts b/types/gapi.client.books/gapi.client.books-tests.ts new file mode 100644 index 0000000000..c7f57f61d7 --- /dev/null +++ b/types/gapi.client.books/gapi.client.books-tests.ts @@ -0,0 +1,193 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('books', 'v1', () => { + /** now we can use gapi.client.books */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage your books */ + 'https://www.googleapis.com/auth/books', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Retrieves metadata for a specific bookshelf for the specified user. */ + await gapi.client.bookshelves.get({ + shelf: "shelf", + source: "source", + userId: "userId", + }); + /** Retrieves a list of public bookshelves for the specified user. */ + await gapi.client.bookshelves.list({ + source: "source", + userId: "userId", + }); + await gapi.client.cloudloading.addBook({ + drive_document_id: "drive_document_id", + mime_type: "mime_type", + name: "name", + upload_client_token: "upload_client_token", + }); + /** Remove the book and its contents */ + await gapi.client.cloudloading.deleteBook({ + volumeId: "volumeId", + }); + await gapi.client.cloudloading.updateBook({ + }); + /** Returns a list of offline dictionary metadata available */ + await gapi.client.dictionary.listOfflineMetadata({ + cpksver: "cpksver", + }); + /** Gets the layer summary for a volume. */ + await gapi.client.layers.get({ + contentVersion: "contentVersion", + source: "source", + summaryId: "summaryId", + volumeId: "volumeId", + }); + /** List the layer summaries for a volume. */ + await gapi.client.layers.list({ + contentVersion: "contentVersion", + maxResults: 2, + pageToken: "pageToken", + source: "source", + volumeId: "volumeId", + }); + /** Gets the current settings for the user. */ + await gapi.client.myconfig.getUserSettings({ + }); + /** Release downloaded content access restriction. */ + await gapi.client.myconfig.releaseDownloadAccess({ + cpksver: "cpksver", + locale: "locale", + source: "source", + volumeIds: "volumeIds", + }); + /** Request concurrent and download access restrictions. */ + await gapi.client.myconfig.requestAccess({ + cpksver: "cpksver", + licenseTypes: "licenseTypes", + locale: "locale", + nonce: "nonce", + source: "source", + volumeId: "volumeId", + }); + /** Request downloaded content access for specified volumes on the My eBooks shelf. */ + await gapi.client.myconfig.syncVolumeLicenses({ + cpksver: "cpksver", + features: "features", + includeNonComicsSeries: true, + locale: "locale", + nonce: "nonce", + showPreorders: true, + source: "source", + volumeIds: "volumeIds", + }); + /** + * Sets the settings for the user. If a sub-object is specified, it will overwrite the existing sub-object stored in the server. Unspecified sub-objects + * will retain the existing value. + */ + await gapi.client.myconfig.updateUserSettings({ + }); + /** Returns notification details for a given notification id. */ + await gapi.client.notification.get({ + locale: "locale", + notification_id: "notification_id", + source: "source", + }); + /** List categories for onboarding experience. */ + await gapi.client.onboarding.listCategories({ + locale: "locale", + }); + /** List available volumes under categories for onboarding experience. */ + await gapi.client.onboarding.listCategoryVolumes({ + categoryId: "categoryId", + locale: "locale", + maxAllowedMaturityRating: "maxAllowedMaturityRating", + pageSize: 4, + pageToken: "pageToken", + }); + /** Returns a stream of personalized book clusters */ + await gapi.client.personalizedstream.get({ + locale: "locale", + maxAllowedMaturityRating: "maxAllowedMaturityRating", + source: "source", + }); + await gapi.client.promooffer.accept({ + androidId: "androidId", + device: "device", + manufacturer: "manufacturer", + model: "model", + offerId: "offerId", + product: "product", + serial: "serial", + volumeId: "volumeId", + }); + await gapi.client.promooffer.dismiss({ + androidId: "androidId", + device: "device", + manufacturer: "manufacturer", + model: "model", + offerId: "offerId", + product: "product", + serial: "serial", + }); + /** Returns a list of promo offers available to the user */ + await gapi.client.promooffer.get({ + androidId: "androidId", + device: "device", + manufacturer: "manufacturer", + model: "model", + product: "product", + serial: "serial", + }); + /** Returns Series metadata for the given series ids. */ + await gapi.client.series.get({ + series_id: "series_id", + }); + /** Gets volume information for a single volume. */ + await gapi.client.volumes.get({ + country: "country", + includeNonComicsSeries: true, + partner: "partner", + projection: "projection", + source: "source", + user_library_consistent_read: true, + volumeId: "volumeId", + }); + /** Performs a book search. */ + await gapi.client.volumes.list({ + download: "download", + filter: "filter", + langRestrict: "langRestrict", + libraryRestrict: "libraryRestrict", + maxAllowedMaturityRating: "maxAllowedMaturityRating", + maxResults: 6, + orderBy: "orderBy", + partner: "partner", + printType: "printType", + projection: "projection", + q: "q", + showPreorders: true, + source: "source", + startIndex: 14, + }); + } +}); diff --git a/types/gapi.client.books/index.d.ts b/types/gapi.client.books/index.d.ts new file mode 100644 index 0000000000..e0ca0a63af --- /dev/null +++ b/types/gapi.client.books/index.d.ts @@ -0,0 +1,2447 @@ +// Type definitions for Google Books API v1 1.0 +// Project: https://developers.google.com/books/docs/v1/getting_started +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/books/v1/rest + +/// + +declare namespace gapi.client { + /** Load Books API v1 */ + function load(name: "books", version: "v1"): PromiseLike; + function load(name: "books", version: "v1", callback: () => any): void; + + const bookshelves: books.BookshelvesResource; + + const cloudloading: books.CloudloadingResource; + + const dictionary: books.DictionaryResource; + + const layers: books.LayersResource; + + const myconfig: books.MyconfigResource; + + const mylibrary: books.MylibraryResource; + + const notification: books.NotificationResource; + + const onboarding: books.OnboardingResource; + + const personalizedstream: books.PersonalizedstreamResource; + + const promooffer: books.PromoofferResource; + + const series: books.SeriesResource; + + const volumes: books.VolumesResource; + + namespace books { + interface Annotation { + /** Anchor text after excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty. */ + afterSelectedText?: string; + /** Anchor text before excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty. */ + beforeSelectedText?: string; + /** Selection ranges sent from the client. */ + clientVersionRanges?: { + /** Range in CFI format for this annotation sent by client. */ + cfiRange?: BooksAnnotationsRange; + /** Content version the client sent in. */ + contentVersion?: string; + /** Range in GB image format for this annotation sent by client. */ + gbImageRange?: BooksAnnotationsRange; + /** Range in GB text format for this annotation sent by client. */ + gbTextRange?: BooksAnnotationsRange; + /** Range in image CFI format for this annotation sent by client. */ + imageCfiRange?: BooksAnnotationsRange; + }; + /** Timestamp for the created time of this annotation. */ + created?: string; + /** Selection ranges for the most recent content version. */ + currentVersionRanges?: { + /** Range in CFI format for this annotation for version above. */ + cfiRange?: BooksAnnotationsRange; + /** Content version applicable to ranges below. */ + contentVersion?: string; + /** Range in GB image format for this annotation for version above. */ + gbImageRange?: BooksAnnotationsRange; + /** Range in GB text format for this annotation for version above. */ + gbTextRange?: BooksAnnotationsRange; + /** Range in image CFI format for this annotation for version above. */ + imageCfiRange?: BooksAnnotationsRange; + }; + /** User-created data for this annotation. */ + data?: string; + /** Indicates that this annotation is deleted. */ + deleted?: boolean; + /** The highlight style for this annotation. */ + highlightStyle?: string; + /** Id of this annotation, in the form of a GUID. */ + id?: string; + /** Resource type. */ + kind?: string; + /** The layer this annotation is for. */ + layerId?: string; + layerSummary?: { + /** Maximum allowed characters on this layer, especially for the "copy" layer. */ + allowedCharacterCount?: number; + /** Type of limitation on this layer. "limited" or "unlimited" for the "copy" layer. */ + limitType?: string; + /** Remaining allowed characters on this layer, especially for the "copy" layer. */ + remainingCharacterCount?: number; + }; + /** Pages that this annotation spans. */ + pageIds?: string[]; + /** Excerpt from the volume. */ + selectedText?: string; + /** URL to this resource. */ + selfLink?: string; + /** Timestamp for the last time this annotation was modified. */ + updated?: string; + /** The volume that this annotation belongs to. */ + volumeId?: string; + } + interface Annotationdata { + /** The type of annotation this data is for. */ + annotationType?: string; + data?: any; + /** Base64 encoded data for this annotation data. */ + encoded_data?: string; + /** Unique id for this annotation data. */ + id?: string; + /** Resource Type */ + kind?: string; + /** The Layer id for this data. * */ + layerId?: string; + /** URL for this resource. * */ + selfLink?: string; + /** Timestamp for the last time this data was updated. (RFC 3339 UTC date-time format). */ + updated?: string; + /** The volume id for this data. * */ + volumeId?: string; + } + interface Annotations { + /** A list of annotations. */ + items?: Annotation[]; + /** Resource type. */ + kind?: string; + /** Token to pass in for pagination for the next page. This will not be present if this request does not have more results. */ + nextPageToken?: string; + /** Total number of annotations found. This may be greater than the number of notes returned in this response if results have been paginated. */ + totalItems?: number; + } + interface AnnotationsSummary { + kind?: string; + layers?: Array<{ + allowedCharacterCount?: number; + layerId?: string; + limitType?: string; + remainingCharacterCount?: number; + updated?: string; + }>; + } + interface Annotationsdata { + /** A list of Annotation Data. */ + items?: Annotationdata[]; + /** Resource type */ + kind?: string; + /** Token to pass in for pagination for the next page. This will not be present if this request does not have more results. */ + nextPageToken?: string; + /** The total number of volume annotations found. */ + totalItems?: number; + } + interface BooksAnnotationsRange { + /** The offset from the ending position. */ + endOffset?: string; + /** The ending position for the range. */ + endPosition?: string; + /** The offset from the starting position. */ + startOffset?: string; + /** The starting position for the range. */ + startPosition?: string; + } + interface BooksCloudloadingResource { + author?: string; + processingState?: string; + title?: string; + volumeId?: string; + } + interface BooksVolumesRecommendedRateResponse { + consistency_token?: string; + } + interface Bookshelf { + /** Whether this bookshelf is PUBLIC or PRIVATE. */ + access?: string; + /** Created time for this bookshelf (formatted UTC timestamp with millisecond resolution). */ + created?: string; + /** Description of this bookshelf. */ + description?: string; + /** Id of this bookshelf, only unique by user. */ + id?: number; + /** Resource type for bookshelf metadata. */ + kind?: string; + /** URL to this resource. */ + selfLink?: string; + /** Title of this bookshelf. */ + title?: string; + /** Last modified time of this bookshelf (formatted UTC timestamp with millisecond resolution). */ + updated?: string; + /** Number of volumes in this bookshelf. */ + volumeCount?: number; + /** Last time a volume was added or removed from this bookshelf (formatted UTC timestamp with millisecond resolution). */ + volumesLastUpdated?: string; + } + interface Bookshelves { + /** A list of bookshelves. */ + items?: Bookshelf[]; + /** Resource type. */ + kind?: string; + } + interface Category { + /** A list of onboarding categories. */ + items?: Array<{ + badgeUrl?: string; + categoryId?: string; + name?: string; + }>; + /** Resource type. */ + kind?: string; + } + interface ConcurrentAccessRestriction { + /** Whether access is granted for this (user, device, volume). */ + deviceAllowed?: boolean; + /** Resource type. */ + kind?: string; + /** The maximum number of concurrent access licenses for this volume. */ + maxConcurrentDevices?: number; + /** Error/warning message. */ + message?: string; + /** Client nonce for verification. Download access and client-validation only. */ + nonce?: string; + /** Error/warning reason code. */ + reasonCode?: string; + /** Whether this volume has any concurrent access restrictions. */ + restricted?: boolean; + /** Response signature. */ + signature?: string; + /** Client app identifier for verification. Download access and client-validation only. */ + source?: string; + /** Time in seconds for license auto-expiration. */ + timeWindowSeconds?: number; + /** Identifies the volume for which this entry applies. */ + volumeId?: string; + } + interface Dictlayerdata { + common?: { + /** The display title and localized canonical name to use when searching for this entity on Google search. */ + title?: string; + }; + dict?: { + /** The source, url and attribution for this dictionary data. */ + source?: { + attribution?: string; + url?: string; + }; + words?: Array<{ + derivatives?: Array<{ + source?: { + attribution?: string; + url?: string; + }; + text?: string; + }>; + examples?: Array<{ + source?: { + attribution?: string; + url?: string; + }; + text?: string; + }>; + senses?: Array<{ + conjugations?: Array<{ + type?: string; + value?: string; + }>; + definitions?: Array<{ + definition?: string; + examples?: Array<{ + source?: { + attribution?: string; + url?: string; + }; + text?: string; + }>; + }>; + partOfSpeech?: string; + pronunciation?: string; + pronunciationUrl?: string; + source?: { + attribution?: string; + url?: string; + }; + syllabification?: string; + synonyms?: Array<{ + source?: { + attribution?: string; + url?: string; + }; + text?: string; + }>; + }>; + /** The words with different meanings but not related words, e.g. "go" (game) and "go" (verb). */ + source?: { + attribution?: string; + url?: string; + }; + }>; + }; + kind?: string; + } + interface Discoveryclusters { + clusters?: Array<{ + banner_with_content_container?: { + fillColorArgb?: string; + imageUrl?: string; + maskColorArgb?: string; + moreButtonText?: string; + moreButtonUrl?: string; + textColorArgb?: string; + }; + subTitle?: string; + title?: string; + totalVolumes?: number; + uid?: string; + volumes?: Volume[]; + }>; + /** Resorce type. */ + kind?: string; + totalClusters?: number; + } + interface DownloadAccessRestriction { + /** If restricted, whether access is granted for this (user, device, volume). */ + deviceAllowed?: boolean; + /** If restricted, the number of content download licenses already acquired (including the requesting client, if licensed). */ + downloadsAcquired?: number; + /** If deviceAllowed, whether access was just acquired with this request. */ + justAcquired?: boolean; + /** Resource type. */ + kind?: string; + /** If restricted, the maximum number of content download licenses for this volume. */ + maxDownloadDevices?: number; + /** Error/warning message. */ + message?: string; + /** Client nonce for verification. Download access and client-validation only. */ + nonce?: string; + /** + * Error/warning reason code. Additional codes may be added in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 + * WARNING_USED_LAST_ACCESS + */ + reasonCode?: string; + /** Whether this volume has any download access restrictions. */ + restricted?: boolean; + /** Response signature. */ + signature?: string; + /** Client app identifier for verification. Download access and client-validation only. */ + source?: string; + /** Identifies the volume for which this entry applies. */ + volumeId?: string; + } + interface DownloadAccesses { + /** A list of download access responses. */ + downloadAccessList?: DownloadAccessRestriction[]; + /** Resource type. */ + kind?: string; + } + interface Geolayerdata { + common?: { + /** The language of the information url and description. */ + lang?: string; + /** The URL for the preview image information. */ + previewImageUrl?: string; + /** The description for this location. */ + snippet?: string; + /** The URL for information for this location. Ex: wikipedia link. */ + snippetUrl?: string; + /** The display title and localized canonical name to use when searching for this entity on Google search. */ + title?: string; + }; + geo?: { + /** The boundary of the location as a set of loops containing pairs of latitude, longitude coordinates. */ + boundary?: Array>; + /** The cache policy active for this data. EX: UNRESTRICTED, RESTRICTED, NEVER */ + cachePolicy?: string; + /** The country code of the location. */ + countryCode?: string; + /** The latitude of the location. */ + latitude?: number; + /** The longitude of the location. */ + longitude?: number; + /** The type of map that should be used for this location. EX: HYBRID, ROADMAP, SATELLITE, TERRAIN */ + mapType?: string; + /** The viewport for showing this location. This is a latitude, longitude rectangle. */ + viewport?: { + hi?: { + latitude?: number; + longitude?: number; + }; + lo?: { + latitude?: number; + longitude?: number; + }; + }; + /** + * The Zoom level to use for the map. Zoom levels between 0 (the lowest zoom level, in which the entire world can be seen on one map) to 21+ (down to + * individual buildings). See: https://developers.google.com/maps/documentation/staticmaps/#Zoomlevels + */ + zoom?: number; + }; + kind?: string; + } + interface Layersummaries { + /** A list of layer summary items. */ + items?: Layersummary[]; + /** Resource type. */ + kind?: string; + /** The total number of layer summaries found. */ + totalItems?: number; + } + interface Layersummary { + /** The number of annotations for this layer. */ + annotationCount?: number; + /** The list of annotation types contained for this layer. */ + annotationTypes?: string[]; + /** Link to get data for this annotation. */ + annotationsDataLink?: string; + /** The link to get the annotations for this layer. */ + annotationsLink?: string; + /** The content version this resource is for. */ + contentVersion?: string; + /** The number of data items for this layer. */ + dataCount?: number; + /** Unique id of this layer summary. */ + id?: string; + /** Resource Type */ + kind?: string; + /** The layer id for this summary. */ + layerId?: string; + /** URL to this resource. */ + selfLink?: string; + /** Timestamp for the last time an item in this layer was updated. (RFC 3339 UTC date-time format). */ + updated?: string; + /** + * The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* + * responses. The actual annotation data is versioned separately. + */ + volumeAnnotationsVersion?: string; + /** The volume id this resource is for. */ + volumeId?: string; + } + interface Metadata { + /** A list of offline dictionary metadata. */ + items?: Array<{ + download_url?: string; + encrypted_key?: string; + language?: string; + size?: string; + version?: string; + }>; + /** Resource type. */ + kind?: string; + } + interface Notification { + body?: string; + /** The list of crm experiment ids. */ + crmExperimentIds?: string[]; + doc_id?: string; + doc_type?: string; + dont_show_notification?: boolean; + iconUrl?: string; + /** Resource type. */ + kind?: string; + notificationGroup?: string; + notification_type?: string; + pcampaign_id?: string; + reason?: string; + show_notification_settings_action?: boolean; + targetUrl?: string; + title?: string; + } + interface Offers { + /** A list of offers. */ + items?: Array<{ + artUrl?: string; + gservicesKey?: string; + id?: string; + items?: Array<{ + author?: string; + canonicalVolumeLink?: string; + coverUrl?: string; + description?: string; + title?: string; + volumeId?: string; + }>; + }>; + /** Resource type. */ + kind?: string; + } + interface ReadingPosition { + /** Position in an EPUB as a CFI. */ + epubCfiPosition?: string; + /** Position in a volume for image-based content. */ + gbImagePosition?: string; + /** Position in a volume for text-based content. */ + gbTextPosition?: string; + /** Resource type for a reading position. */ + kind?: string; + /** Position in a PDF file. */ + pdfPosition?: string; + /** Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution). */ + updated?: string; + /** Volume id associated with this reading position. */ + volumeId?: string; + } + interface RequestAccess { + /** A concurrent access response. */ + concurrentAccess?: ConcurrentAccessRestriction; + /** A download access response. */ + downloadAccess?: DownloadAccessRestriction; + /** Resource type. */ + kind?: string; + } + interface Review { + /** Author of this review. */ + author?: { + /** Name of this person. */ + displayName?: string; + }; + /** Review text. */ + content?: string; + /** Date of this review. */ + date?: string; + /** URL for the full review text, for reviews gathered from the web. */ + fullTextUrl?: string; + /** Resource type for a review. */ + kind?: string; + /** Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED. */ + rating?: string; + /** Information regarding the source of this review, when the review is not from a Google Books user. */ + source?: { + /** Name of the source. */ + description?: string; + /** Extra text about the source of the review. */ + extraDescription?: string; + /** URL of the source of the review. */ + url?: string; + }; + /** Title for this review. */ + title?: string; + /** Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER. */ + type?: string; + /** Volume that this review is for. */ + volumeId?: string; + } + interface Series { + /** Resource type. */ + kind?: string; + series?: Array<{ + bannerImageUrl?: string; + imageUrl?: string; + seriesId?: string; + seriesType?: string; + title?: string; + }>; + } + interface Seriesmembership { + /** Resorce type. */ + kind?: string; + member?: Volume[]; + nextPageToken?: string; + } + interface Usersettings { + /** Resource type. */ + kind?: string; + /** User settings in sub-objects, each for different purposes. */ + notesExport?: { + folderName?: string; + isEnabled?: boolean; + }; + notification?: { + moreFromAuthors?: { + opted_state?: string; + }; + moreFromSeries?: { + opted_state?: string; + }; + rewardExpirations?: { + opted_state?: string; + }; + }; + } + interface Volume { + /** + * Any information about a volume related to reading or obtaining that volume text. This information can depend on country (books may be public domain in + * one country but not in another, e.g.). + */ + accessInfo?: { + /** + * Combines the access and viewability of this volume into a single status field for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE + * or NONE. (In LITE projection.) + */ + accessViewStatus?: string; + /** The two-letter ISO_3166-1 country code for which this access information is valid. (In LITE projection.) */ + country?: string; + /** Information about a volume's download license access restrictions. */ + downloadAccess?: DownloadAccessRestriction; + /** URL to the Google Drive viewer if this volume is uploaded by the user by selecting the file from Google Drive. */ + driveImportedContentLink?: string; + /** Whether this volume can be embedded in a viewport using the Embedded Viewer API. */ + embeddable?: boolean; + /** Information about epub content. (In LITE projection.) */ + epub?: { + /** URL to retrieve ACS token for epub download. (In LITE projection.) */ + acsTokenLink?: string; + /** URL to download epub. (In LITE projection.) */ + downloadLink?: string; + /** Is a flowing text epub available either as public domain or for purchase. (In LITE projection.) */ + isAvailable?: boolean; + }; + /** + * Whether this volume requires that the client explicitly request offline download license rather than have it done automatically when loading the + * content, if the client supports it. + */ + explicitOfflineLicenseManagement?: boolean; + /** Information about pdf content. (In LITE projection.) */ + pdf?: { + /** URL to retrieve ACS token for pdf download. (In LITE projection.) */ + acsTokenLink?: string; + /** URL to download pdf. (In LITE projection.) */ + downloadLink?: string; + /** Is a scanned image pdf available either as public domain or for purchase. (In LITE projection.) */ + isAvailable?: boolean; + }; + /** Whether or not this book is public domain in the country listed above. */ + publicDomain?: boolean; + /** Whether quote sharing is allowed for this volume. */ + quoteSharingAllowed?: boolean; + /** Whether text-to-speech is permitted for this volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. */ + textToSpeechPermission?: string; + /** For ordered but not yet processed orders, we give a URL that can be used to go to the appropriate Google Wallet page. */ + viewOrderUrl?: string; + /** + * The read access of a volume. Possible values are PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the country listed above. A value of + * PARTIAL means that the publisher has allowed some portion of the volume to be viewed publicly, without purchase. This can apply to eBooks as well as + * non-eBooks. Public domain books will always have a value of ALL_PAGES. + */ + viewability?: string; + /** URL to read this volume on the Google Books site. Link will not allow users to read non-viewable volumes. */ + webReaderLink?: string; + }; + /** Opaque identifier for a specific version of a volume resource. (In LITE projection) */ + etag?: string; + /** Unique identifier for a volume. (In LITE projection.) */ + id?: string; + /** Resource type for a volume. (In LITE projection.) */ + kind?: string; + /** What layers exist in this volume and high level information about them. */ + layerInfo?: { + /** A layer should appear here if and only if the layer exists for this book. */ + layers?: Array<{ + /** The layer id of this layer (e.g. "geo"). */ + layerId?: string; + /** + * The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* + * responses. The actual annotation data is versioned separately. + */ + volumeAnnotationsVersion?: string; + }>; + }; + /** Recommendation related information for this volume. */ + recommendedInfo?: { + /** A text explaining why this volume is recommended. */ + explanation?: string; + }; + /** + * Any information about a volume related to the eBookstore and/or purchaseability. This information can depend on the country where the request + * originates from (i.e. books may not be for sale in certain countries). + */ + saleInfo?: { + /** URL to purchase this volume on the Google Books site. (In LITE projection) */ + buyLink?: string; + /** The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.) */ + country?: string; + /** Whether or not this volume is an eBook (can be added to the My eBooks shelf). */ + isEbook?: boolean; + /** Suggested retail price. (In LITE projection.) */ + listPrice?: { + /** Amount in the currency listed below. (In LITE projection.) */ + amount?: number; + /** An ISO 4217, three-letter currency code. (In LITE projection.) */ + currencyCode?: string; + }; + /** Offers available for this volume (sales and rentals). */ + offers?: Array<{ + /** The finsky offer type (e.g., PURCHASE=0 RENTAL=3) */ + finskyOfferType?: number; + /** Indicates whether the offer is giftable. */ + giftable?: boolean; + /** Offer list (=undiscounted) price in Micros. */ + listPrice?: { + amountInMicros?: number; + currencyCode?: string; + }; + /** The rental duration (for rental offers only). */ + rentalDuration?: { + count?: number; + unit?: string; + }; + /** Offer retail (=discounted) price in Micros */ + retailPrice?: { + amountInMicros?: number; + currencyCode?: string; + }; + }>; + /** The date on which this book is available for sale. */ + onSaleDate?: string; + /** + * The actual selling price of the book. This is the same as the suggested retail or list price unless there are offers or discounts on this volume. (In + * LITE projection.) + */ + retailPrice?: { + /** Amount in the currency listed below. (In LITE projection.) */ + amount?: number; + /** An ISO 4217, three-letter currency code. (In LITE projection.) */ + currencyCode?: string; + }; + /** + * Whether or not this book is available for sale or offered for free in the Google eBookstore for the country listed above. Possible values are FOR_SALE, + * FOR_RENTAL_ONLY, FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER. + */ + saleability?: string; + }; + /** Search result information related to this volume. */ + searchInfo?: { + /** A text snippet containing the search query. */ + textSnippet?: string; + }; + /** URL to this resource. (In LITE projection.) */ + selfLink?: string; + /** User specific information related to this volume. (e.g. page this user last read or whether they purchased this book) */ + userInfo?: { + /** + * Timestamp when this volume was acquired by the user. (RFC 3339 UTC date-time format) Acquiring includes purchase, user upload, receiving family + * sharing, etc. + */ + acquiredTime?: string; + /** How this volume was acquired. */ + acquisitionType?: number; + /** Copy/Paste accounting information. */ + copy?: { + allowedCharacterCount?: number; + limitType?: string; + remainingCharacterCount?: number; + updated?: string; + }; + /** Whether this volume is purchased, sample, pd download etc. */ + entitlementType?: number; + /** Information on the ability to share with the family. */ + familySharing?: { + /** The role of the user in the family. */ + familyRole?: string; + /** + * Whether or not this volume can be shared with the family by the user. This includes sharing eligibility of both the volume and the user. If the value + * is true, the user can initiate a family sharing action. + */ + isSharingAllowed?: boolean; + /** Whether or not sharing this volume is temporarily disabled due to issues with the Family Wallet. */ + isSharingDisabledByFop?: boolean; + }; + /** Whether or not the user shared this volume with the family. */ + isFamilySharedFromUser?: boolean; + /** Whether or not the user received this volume through family sharing. */ + isFamilySharedToUser?: boolean; + /** Deprecated: Replaced by familySharing. */ + isFamilySharingAllowed?: boolean; + /** Deprecated: Replaced by familySharing. */ + isFamilySharingDisabledByFop?: boolean; + /** Whether or not this volume is currently in "my books." */ + isInMyBooks?: boolean; + /** Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.) */ + isPreordered?: boolean; + /** Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.) */ + isPurchased?: boolean; + /** Whether or not this volume was user uploaded. */ + isUploaded?: boolean; + /** The user's current reading position in the volume, if one is available. (In LITE projection.) */ + readingPosition?: ReadingPosition; + /** Period during this book is/was a valid rental. */ + rentalPeriod?: { + endUtcSec?: string; + startUtcSec?: string; + }; + /** Whether this book is an active or an expired rental. */ + rentalState?: string; + /** This user's review of this volume, if one exists. */ + review?: Review; + /** + * Timestamp when this volume was last modified by a user action, such as a reading position update, volume purchase or writing a review. (RFC 3339 UTC + * date-time format). + */ + updated?: string; + userUploadedVolumeInfo?: { + processingState?: string; + }; + }; + /** General volume information. */ + volumeInfo?: { + /** Whether anonymous logging should be allowed. */ + allowAnonLogging?: boolean; + /** The names of the authors and/or editors for this volume. (In LITE projection) */ + authors?: string[]; + /** The mean review rating for this volume. (min = 1.0, max = 5.0) */ + averageRating?: number; + /** Canonical URL for a volume. (In LITE projection.) */ + canonicalVolumeLink?: string; + /** A list of subject categories, such as "Fiction", "Suspense", etc. */ + categories?: string[]; + /** An identifier for the version of the volume content (text & images). (In LITE projection) */ + contentVersion?: string; + /** + * A synopsis of the volume. The text of the description is formatted in HTML and includes simple formatting elements, such as b, i, and br tags. (In LITE + * projection.) + */ + description?: string; + /** Physical dimensions of this volume. */ + dimensions?: { + /** Height or length of this volume (in cm). */ + height?: string; + /** Thickness of this volume (in cm). */ + thickness?: string; + /** Width of this volume (in cm). */ + width?: string; + }; + /** A list of image links for all the sizes that are available. (In LITE projection.) */ + imageLinks?: { + /** Image link for extra large size (width of ~1280 pixels). (In LITE projection) */ + extraLarge?: string; + /** Image link for large size (width of ~800 pixels). (In LITE projection) */ + large?: string; + /** Image link for medium size (width of ~575 pixels). (In LITE projection) */ + medium?: string; + /** Image link for small size (width of ~300 pixels). (In LITE projection) */ + small?: string; + /** Image link for small thumbnail size (width of ~80 pixels). (In LITE projection) */ + smallThumbnail?: string; + /** Image link for thumbnail size (width of ~128 pixels). (In LITE projection) */ + thumbnail?: string; + }; + /** Industry standard identifiers for this volume. */ + industryIdentifiers?: Array<{ + /** Industry specific volume identifier. */ + identifier?: string; + /** Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. */ + type?: string; + }>; + /** URL to view information about this volume on the Google Books site. (In LITE projection) */ + infoLink?: string; + /** Best language for this volume (based on content). It is the two-letter ISO 639-1 code such as 'fr', 'en', etc. */ + language?: string; + /** The main category to which this volume belongs. It will be the category from the categories list returned below that has the highest weight. */ + mainCategory?: string; + maturityRating?: string; + /** Total number of pages as per publisher metadata. */ + pageCount?: number; + /** A top-level summary of the panelization info in this volume. */ + panelizationSummary?: { + containsEpubBubbles?: boolean; + containsImageBubbles?: boolean; + epubBubbleVersion?: string; + imageBubbleVersion?: string; + }; + /** URL to preview this volume on the Google Books site. */ + previewLink?: string; + /** Type of publication of this volume. Possible values are BOOK or MAGAZINE. */ + printType?: string; + /** Total number of printed pages in generated pdf representation. */ + printedPageCount?: number; + /** Date of publication. (In LITE projection.) */ + publishedDate?: string; + /** Publisher of this volume. (In LITE projection.) */ + publisher?: string; + /** The number of review ratings for this volume. */ + ratingsCount?: number; + /** The reading modes available for this volume. */ + readingModes?: any; + /** Total number of sample pages as per publisher metadata. */ + samplePageCount?: number; + seriesInfo?: Volumeseriesinfo; + /** Volume subtitle. (In LITE projection.) */ + subtitle?: string; + /** Volume title. (In LITE projection.) */ + title?: string; + }; + } + interface Volume2 { + /** A list of volumes. */ + items?: Volume[]; + /** Resource type. */ + kind?: string; + nextPageToken?: string; + } + interface Volumeannotation { + /** The annotation data id for this volume annotation. */ + annotationDataId?: string; + /** Link to get data for this annotation. */ + annotationDataLink?: string; + /** The type of annotation this is. */ + annotationType?: string; + /** The content ranges to identify the selected text. */ + contentRanges?: { + /** Range in CFI format for this annotation for version above. */ + cfiRange?: BooksAnnotationsRange; + /** Content version applicable to ranges below. */ + contentVersion?: string; + /** Range in GB image format for this annotation for version above. */ + gbImageRange?: BooksAnnotationsRange; + /** Range in GB text format for this annotation for version above. */ + gbTextRange?: BooksAnnotationsRange; + }; + /** Data for this annotation. */ + data?: string; + /** Indicates that this annotation is deleted. */ + deleted?: boolean; + /** Unique id of this volume annotation. */ + id?: string; + /** Resource Type */ + kind?: string; + /** The Layer this annotation is for. */ + layerId?: string; + /** Pages the annotation spans. */ + pageIds?: string[]; + /** Excerpt from the volume. */ + selectedText?: string; + /** URL to this resource. */ + selfLink?: string; + /** Timestamp for the last time this anntoation was updated. (RFC 3339 UTC date-time format). */ + updated?: string; + /** The Volume this annotation is for. */ + volumeId?: string; + } + interface Volumeannotations { + /** A list of volume annotations. */ + items?: Volumeannotation[]; + /** Resource type */ + kind?: string; + /** Token to pass in for pagination for the next page. This will not be present if this request does not have more results. */ + nextPageToken?: string; + /** The total number of volume annotations found. */ + totalItems?: number; + /** + * The version string for all of the volume annotations in this layer (not just the ones in this response). Note: the version string doesn't apply to the + * annotation data, just the information in this response (e.g. the location of annotations in the book). + */ + version?: string; + } + interface Volumes { + /** A list of volumes. */ + items?: Volume[]; + /** Resource type. */ + kind?: string; + /** Total number of volumes found. This might be greater than the number of volumes returned in this response if results have been paginated. */ + totalItems?: number; + } + interface Volumeseriesinfo { + /** The display number string. This should be used only for display purposes and the actual sequence should be inferred from the below orderNumber. */ + bookDisplayNumber?: string; + /** Resource type. */ + kind?: string; + /** Short book title in the context of the series. */ + shortSeriesBookTitle?: string; + volumeSeries?: Array<{ + /** List of issues. Applicable only for Collection Edition and Omnibus. */ + issue?: Array<{ + issueDisplayNumber?: string; + issueOrderNumber?: number; + }>; + /** The book order number in the series. */ + orderNumber?: number; + /** The book type in the context of series. Examples - Single Issue, Collection Edition, etc. */ + seriesBookType?: string; + /** The series id. */ + seriesId?: string; + }>; + } + interface VolumesResource { + /** Retrieves volumes in a specific bookshelf for the specified user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of bookshelf to retrieve volumes. */ + shelf: string; + /** Set to true to show pre-ordered books. Defaults to false. */ + showPreorders?: boolean; + /** String to identify the originator of this request. */ + source?: string; + /** Index of the first element to return (starts at 0) */ + startIndex?: number; + /** ID of user for whom to retrieve bookshelf volumes. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface BookshelvesResource { + /** Retrieves metadata for a specific bookshelf for the specified user. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of bookshelf to retrieve. */ + shelf: string; + /** String to identify the originator of this request. */ + source?: string; + /** ID of user for whom to retrieve bookshelves. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of public bookshelves for the specified user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** ID of user for whom to retrieve bookshelves. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + volumes: VolumesResource; + } + interface CloudloadingResource { + addBook(request: { + /** Data format for the response. */ + alt?: string; + /** A drive document id. The upload_client_token must not be set. */ + drive_document_id?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The document MIME type. It can be set only if the drive_document_id is set. */ + mime_type?: string; + /** The document name. It can be set only if the drive_document_id is set. */ + name?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + upload_client_token?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Remove the book and its contents */ + deleteBook(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The id of the book to be removed. */ + volumeId: string; + }): Request; + updateBook(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DictionaryResource { + /** Returns a list of offline dictionary metadata available */ + listOfflineMetadata(request: { + /** Data format for the response. */ + alt?: string; + /** The device/version ID from which to request the data. */ + cpksver: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AnnotationDataResource { + /** Gets the annotation data. */ + get(request: { + /** For the dictionary layer. Whether or not to allow web definitions. */ + allowWebDefinitions?: boolean; + /** Data format for the response. */ + alt?: string; + /** The ID of the annotation data to retrieve. */ + annotationDataId: string; + /** The content version for the volume you are trying to retrieve. */ + contentVersion: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The requested pixel height for any images. If height is provided width must also be provided. */ + h?: number; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID for the layer to get the annotations. */ + layerId: string; + /** The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The requested scale for the image. */ + scale?: number; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume to retrieve annotations for. */ + volumeId: string; + /** The requested pixel width for any images. If width is provided height must also be provided. */ + w?: number; + }): Request; + /** Gets the annotation data for a volume and layer. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set. */ + annotationDataId?: string; + /** The content version for the requested volume. */ + contentVersion: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The requested pixel height for any images. If height is provided width must also be provided. */ + h?: number; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID for the layer to get the annotation data. */ + layerId: string; + /** The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. */ + locale?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The requested scale for the image. */ + scale?: number; + /** String to identify the originator of this request. */ + source?: string; + /** RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). */ + updatedMax?: string; + /** RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). */ + updatedMin?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume to retrieve annotation data for. */ + volumeId: string; + /** The requested pixel width for any images. If width is provided height must also be provided. */ + w?: number; + }): Request; + } + interface VolumeAnnotationsResource { + /** Gets the volume annotation. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the volume annotation to retrieve. */ + annotationId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID for the layer to get the annotations. */ + layerId: string; + /** The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume to retrieve annotations for. */ + volumeId: string; + }): Request; + /** Gets the volume annotations for a volume and layer. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The content version for the requested volume. */ + contentVersion: string; + /** The end offset to end retrieving data from. */ + endOffset?: string; + /** The end position to end retrieving data from. */ + endPosition?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID for the layer to get the annotations. */ + layerId: string; + /** The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. */ + locale?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. */ + showDeleted?: boolean; + /** String to identify the originator of this request. */ + source?: string; + /** The start offset to start retrieving data from. */ + startOffset?: string; + /** The start position to start retrieving data from. */ + startPosition?: string; + /** RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). */ + updatedMax?: string; + /** RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). */ + updatedMin?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The version of the volume annotations that you are requesting. */ + volumeAnnotationsVersion?: string; + /** The volume to retrieve annotations for. */ + volumeId: string; + }): Request; + } + interface LayersResource { + /** Gets the layer summary for a volume. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The content version for the requested volume. */ + contentVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** The ID for the layer to get the summary for. */ + summaryId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume to retrieve layers for. */ + volumeId: string; + }): Request; + /** List the layer summaries for a volume. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The content version for the requested volume. */ + contentVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume to retrieve layers for. */ + volumeId: string; + }): Request; + annotationData: AnnotationDataResource; + volumeAnnotations: VolumeAnnotationsResource; + } + interface MyconfigResource { + /** Gets the current settings for the user. */ + getUserSettings(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Release downloaded content access restriction. */ + releaseDownloadAccess(request: { + /** Data format for the response. */ + alt?: string; + /** The device/version ID from which to release the restriction. */ + cpksver: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume(s) to release restrictions for. */ + volumeIds: string; + }): Request; + /** Request concurrent and download access restrictions. */ + requestAccess(request: { + /** Data format for the response. */ + alt?: string; + /** The device/version ID from which to request the restrictions. */ + cpksver: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The type of access license to request. If not specified, the default is BOTH. */ + licenseTypes?: string; + /** ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. */ + locale?: string; + /** The client nonce value. */ + nonce: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume to request concurrent/download restrictions for. */ + volumeId: string; + }): Request; + /** Request downloaded content access for specified volumes on the My eBooks shelf. */ + syncVolumeLicenses(request: { + /** Data format for the response. */ + alt?: string; + /** The device/version ID from which to release the restriction. */ + cpksver: string; + /** List of features supported by the client, i.e., 'RENTALS' */ + features?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Set to true to include non-comics series. Defaults to false. */ + includeNonComicsSeries?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. */ + locale?: string; + /** The client nonce value. */ + nonce: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Set to true to show pre-ordered books. Defaults to false. */ + showPreorders?: boolean; + /** String to identify the originator of this request. */ + source: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume(s) to request download restrictions for. */ + volumeIds?: string; + }): Request; + /** + * Sets the settings for the user. If a sub-object is specified, it will overwrite the existing sub-object stored in the server. Unspecified sub-objects + * will retain the existing value. + */ + updateUserSettings(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AnnotationsResource { + /** Deletes an annotation. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID for the annotation to delete. */ + annotationId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new annotation. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** The ID for the annotation to insert. */ + annotationId?: string; + /** ISO-3166-1 code to override the IP-based location. */ + country?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Requests that only the summary of the specified layer be provided in the response. */ + showOnlySummaryInResponse?: boolean; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of annotations, possibly filtered. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The content version for the requested volume. */ + contentVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The layer ID to limit annotation by. */ + layerId?: string; + /** The layer ID(s) to limit annotation by. */ + layerIds?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. */ + showDeleted?: boolean; + /** String to identify the originator of this request. */ + source?: string; + /** RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). */ + updatedMax?: string; + /** RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). */ + updatedMin?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The volume to restrict annotations to. */ + volumeId?: string; + }): Request; + /** Gets the summary of specified layers. */ + summary(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Array of layer IDs to get the summary for. */ + layerIds: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Volume id to get the summary for. */ + volumeId: string; + }): Request; + /** Updates an existing annotation. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID for the annotation to update. */ + annotationId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface VolumesResource { + /** Gets volume information for volumes on a bookshelf. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** ISO-3166-1 code to override the IP-based location. */ + country?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Restrict information returned to a set of selected fields. */ + projection?: string; + /** Full-text search query string in this bookshelf. */ + q?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The bookshelf ID or name retrieve volumes for. */ + shelf: string; + /** Set to true to show pre-ordered books. Defaults to false. */ + showPreorders?: boolean; + /** String to identify the originator of this request. */ + source?: string; + /** Index of the first element to return (starts at 0) */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface BookshelvesResource { + /** Adds a volume to a bookshelf. */ + addVolume(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The reason for which the book is added to the library. */ + reason?: string; + /** ID of bookshelf to which to add a volume. */ + shelf: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID of volume to add. */ + volumeId: string; + }): Request; + /** Clears all volumes from a bookshelf. */ + clearVolumes(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of bookshelf from which to remove a volume. */ + shelf: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves metadata for a specific bookshelf belonging to the authenticated user. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of bookshelf to retrieve. */ + shelf: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of bookshelves belonging to the authenticated user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Moves a volume within a bookshelf. */ + moveVolume(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of bookshelf with the volume. */ + shelf: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID of volume to move. */ + volumeId: string; + /** Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.) */ + volumePosition: number; + }): Request; + /** Removes a volume from a bookshelf. */ + removeVolume(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The reason for which the book is removed from the library. */ + reason?: string; + /** ID of bookshelf from which to remove a volume. */ + shelf: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID of volume to remove. */ + volumeId: string; + }): Request; + volumes: VolumesResource; + } + interface ReadingpositionsResource { + /** Retrieves my reading position information for a volume. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Volume content version for which this reading position is requested. */ + contentVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID of volume for which to retrieve a reading position. */ + volumeId: string; + }): Request; + /** Sets my reading position information for a volume. */ + setPosition(request: { + /** Action that caused this reading position to be set. */ + action?: string; + /** Data format for the response. */ + alt?: string; + /** Volume content version for which this reading position applies. */ + contentVersion?: string; + /** Random persistent device cookie optional on set position. */ + deviceCookie?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Position string for the new volume reading position. */ + position: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** RFC 3339 UTC format timestamp associated with this reading position. */ + timestamp: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID of volume for which to update the reading position. */ + volumeId: string; + }): Request; + } + interface MylibraryResource { + annotations: AnnotationsResource; + bookshelves: BookshelvesResource; + readingpositions: ReadingpositionsResource; + } + interface NotificationResource { + /** Returns notification details for a given notification id. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating notification title and body. */ + locale?: string; + /** String to identify the notification. */ + notification_id: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface OnboardingResource { + /** List categories for onboarding experience. */ + listCategories(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List available volumes under categories for onboarding experience. */ + listCategoryVolumes(request: { + /** Data format for the response. */ + alt?: string; + /** List of category ids requested. */ + categoryId?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. */ + locale?: string; + /** The maximum allowed maturity rating of returned volumes. Books with a higher maturity rating are filtered out. */ + maxAllowedMaturityRating?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Number of maximum results per page to be included in the response. */ + pageSize?: number; + /** The value of the nextToken from the previous page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PersonalizedstreamResource { + /** Returns a stream of personalized book clusters */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. */ + locale?: string; + /** The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out. */ + maxAllowedMaturityRating?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PromoofferResource { + accept(request: { + /** Data format for the response. */ + alt?: string; + /** device android_id */ + androidId?: string; + /** device device */ + device?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** device manufacturer */ + manufacturer?: string; + /** device model */ + model?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + offerId?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** device product */ + product?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** device serial */ + serial?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Volume id to exercise the offer */ + volumeId?: string; + }): Request; + dismiss(request: { + /** Data format for the response. */ + alt?: string; + /** device android_id */ + androidId?: string; + /** device device */ + device?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** device manufacturer */ + manufacturer?: string; + /** device model */ + model?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Offer to dimiss */ + offerId?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** device product */ + product?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** device serial */ + serial?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns a list of promo offers available to the user */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** device android_id */ + androidId?: string; + /** device device */ + device?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** device manufacturer */ + manufacturer?: string; + /** device model */ + model?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** device product */ + product?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** device serial */ + serial?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MembershipResource { + /** Returns Series membership data given the series id. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Number of maximum results per page to be included in the response. */ + page_size?: number; + /** The value of the nextToken from the previous page. */ + page_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String that identifies the series */ + series_id: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SeriesResource { + /** Returns Series metadata for the given series ids. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String that identifies the series */ + series_id: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + membership: MembershipResource; + } + interface AssociatedResource { + /** Return a list of associated books. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Association type. */ + association?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. */ + locale?: string; + /** The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out. */ + maxAllowedMaturityRating?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID of the source volume. */ + volumeId: string; + }): Request; + } + interface MybooksResource { + /** Return a list of books in My Library. */ + list(request: { + /** How the book was acquired */ + acquireMethod?: string; + /** Data format for the response. */ + alt?: string; + /** ISO-3166-1 code to override the IP-based location. */ + country?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations. */ + locale?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod. */ + processingState?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** Index of the first result to return (starts at 0) */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RecommendedResource { + /** Return a list of recommended books for the current user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. */ + locale?: string; + /** The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out. */ + maxAllowedMaturityRating?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Rate a recommended book for the current user. */ + rate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. */ + locale?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Rating to be given to the volume. */ + rating: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** ID of the source volume. */ + volumeId: string; + }): Request; + } + interface UseruploadedResource { + /** Return a list of books uploaded by the current user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. */ + locale?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The processing state of the user uploaded volumes to be returned. */ + processingState?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** Index of the first result to return (starts at 0) */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The ids of the volumes to be returned. If not specified all that match the processingState are returned. */ + volumeId?: string; + }): Request; + } + interface VolumesResource { + /** Gets volume information for a single volume. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** ISO-3166-1 code to override the IP-based location. */ + country?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Set to true to include non-comics series. Defaults to false. */ + includeNonComicsSeries?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Brand results for partner ID. */ + partner?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Restrict information returned to a set of selected fields. */ + projection?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** String to identify the originator of this request. */ + source?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + user_library_consistent_read?: boolean; + /** ID of volume to retrieve. */ + volumeId: string; + }): Request; + /** Performs a book search. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Restrict to volumes by download availability. */ + download?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filter search results. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Restrict results to books with this language code. */ + langRestrict?: string; + /** Restrict search to this user's library. */ + libraryRestrict?: string; + /** The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out. */ + maxAllowedMaturityRating?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Sort search results. */ + orderBy?: string; + /** Restrict and brand results for partner ID. */ + partner?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Restrict to books or magazines. */ + printType?: string; + /** Restrict information returned to a set of selected fields. */ + projection?: string; + /** Full-text search query string. */ + q: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Set to true to show books available for preorder. Defaults to false. */ + showPreorders?: boolean; + /** String to identify the originator of this request. */ + source?: string; + /** Index of the first result to return (starts at 0) */ + startIndex?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + associated: AssociatedResource; + mybooks: MybooksResource; + recommended: RecommendedResource; + useruploaded: UseruploadedResource; + } + } +} diff --git a/types/gapi.client.books/readme.md b/types/gapi.client.books/readme.md new file mode 100644 index 0000000000..1e708d44d0 --- /dev/null +++ b/types/gapi.client.books/readme.md @@ -0,0 +1,169 @@ +# TypeScript typings for Books API v1 +Searches for books and manages your Google Books library. +For detailed description please check [documentation](https://developers.google.com/books/docs/v1/getting_started). + +## Installing + +Install typings for Books API: +``` +npm install @types/gapi.client.books@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('books', 'v1', () => { + // now we can use gapi.client.books + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage your books + 'https://www.googleapis.com/auth/books', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Books API resources: + +```typescript + +/* +Retrieves metadata for a specific bookshelf for the specified user. +*/ +await gapi.client.bookshelves.get({ shelf: "shelf", userId: "userId", }); + +/* +Retrieves a list of public bookshelves for the specified user. +*/ +await gapi.client.bookshelves.list({ userId: "userId", }); + +/* + +*/ +await gapi.client.cloudloading.addBook({ }); + +/* +Remove the book and its contents +*/ +await gapi.client.cloudloading.deleteBook({ volumeId: "volumeId", }); + +/* + +*/ +await gapi.client.cloudloading.updateBook({ }); + +/* +Returns a list of offline dictionary metadata available +*/ +await gapi.client.dictionary.listOfflineMetadata({ cpksver: "cpksver", }); + +/* +Gets the layer summary for a volume. +*/ +await gapi.client.layers.get({ summaryId: "summaryId", volumeId: "volumeId", }); + +/* +List the layer summaries for a volume. +*/ +await gapi.client.layers.list({ volumeId: "volumeId", }); + +/* +Gets the current settings for the user. +*/ +await gapi.client.myconfig.getUserSettings({ }); + +/* +Release downloaded content access restriction. +*/ +await gapi.client.myconfig.releaseDownloadAccess({ cpksver: "cpksver", volumeIds: "volumeIds", }); + +/* +Request concurrent and download access restrictions. +*/ +await gapi.client.myconfig.requestAccess({ cpksver: "cpksver", nonce: "nonce", source: "source", volumeId: "volumeId", }); + +/* +Request downloaded content access for specified volumes on the My eBooks shelf. +*/ +await gapi.client.myconfig.syncVolumeLicenses({ cpksver: "cpksver", nonce: "nonce", source: "source", }); + +/* +Sets the settings for the user. If a sub-object is specified, it will overwrite the existing sub-object stored in the server. Unspecified sub-objects will retain the existing value. +*/ +await gapi.client.myconfig.updateUserSettings({ }); + +/* +Returns notification details for a given notification id. +*/ +await gapi.client.notification.get({ notification_id: "notification_id", }); + +/* +List categories for onboarding experience. +*/ +await gapi.client.onboarding.listCategories({ }); + +/* +List available volumes under categories for onboarding experience. +*/ +await gapi.client.onboarding.listCategoryVolumes({ }); + +/* +Returns a stream of personalized book clusters +*/ +await gapi.client.personalizedstream.get({ }); + +/* + +*/ +await gapi.client.promooffer.accept({ }); + +/* + +*/ +await gapi.client.promooffer.dismiss({ }); + +/* +Returns a list of promo offers available to the user +*/ +await gapi.client.promooffer.get({ }); + +/* +Returns Series metadata for the given series ids. +*/ +await gapi.client.series.get({ series_id: "series_id", }); + +/* +Gets volume information for a single volume. +*/ +await gapi.client.volumes.get({ volumeId: "volumeId", }); + +/* +Performs a book search. +*/ +await gapi.client.volumes.list({ q: "q", }); +``` \ No newline at end of file diff --git a/types/gapi.client.books/tsconfig.json b/types/gapi.client.books/tsconfig.json new file mode 100644 index 0000000000..d011bdcf5c --- /dev/null +++ b/types/gapi.client.books/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.books-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.books/tslint.json b/types/gapi.client.books/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.books/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.calendar/gapi.client.calendar-tests.ts b/types/gapi.client.calendar/gapi.client.calendar-tests.ts new file mode 100644 index 0000000000..807816b26f --- /dev/null +++ b/types/gapi.client.calendar/gapi.client.calendar-tests.ts @@ -0,0 +1,275 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('calendar', 'v3', () => { + /** now we can use gapi.client.calendar */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage your calendars */ + 'https://www.googleapis.com/auth/calendar', + /** View your calendars */ + 'https://www.googleapis.com/auth/calendar.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Deletes an access control rule. */ + await gapi.client.acl.delete({ + calendarId: "calendarId", + ruleId: "ruleId", + }); + /** Returns an access control rule. */ + await gapi.client.acl.get({ + calendarId: "calendarId", + ruleId: "ruleId", + }); + /** Creates an access control rule. */ + await gapi.client.acl.insert({ + calendarId: "calendarId", + }); + /** Returns the rules in the access control list for the calendar. */ + await gapi.client.acl.list({ + calendarId: "calendarId", + maxResults: 2, + pageToken: "pageToken", + showDeleted: true, + syncToken: "syncToken", + }); + /** Updates an access control rule. This method supports patch semantics. */ + await gapi.client.acl.patch({ + calendarId: "calendarId", + ruleId: "ruleId", + }); + /** Updates an access control rule. */ + await gapi.client.acl.update({ + calendarId: "calendarId", + ruleId: "ruleId", + }); + /** Watch for changes to ACL resources. */ + await gapi.client.acl.watch({ + calendarId: "calendarId", + maxResults: 2, + pageToken: "pageToken", + showDeleted: true, + syncToken: "syncToken", + }); + /** Deletes an entry on the user's calendar list. */ + await gapi.client.calendarList.delete({ + calendarId: "calendarId", + }); + /** Returns an entry on the user's calendar list. */ + await gapi.client.calendarList.get({ + calendarId: "calendarId", + }); + /** Adds an entry to the user's calendar list. */ + await gapi.client.calendarList.insert({ + colorRgbFormat: true, + }); + /** Returns entries on the user's calendar list. */ + await gapi.client.calendarList.list({ + maxResults: 1, + minAccessRole: "minAccessRole", + pageToken: "pageToken", + showDeleted: true, + showHidden: true, + syncToken: "syncToken", + }); + /** Updates an entry on the user's calendar list. This method supports patch semantics. */ + await gapi.client.calendarList.patch({ + calendarId: "calendarId", + colorRgbFormat: true, + }); + /** Updates an entry on the user's calendar list. */ + await gapi.client.calendarList.update({ + calendarId: "calendarId", + colorRgbFormat: true, + }); + /** Watch for changes to CalendarList resources. */ + await gapi.client.calendarList.watch({ + maxResults: 1, + minAccessRole: "minAccessRole", + pageToken: "pageToken", + showDeleted: true, + showHidden: true, + syncToken: "syncToken", + }); + /** Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. */ + await gapi.client.calendars.clear({ + calendarId: "calendarId", + }); + /** Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. */ + await gapi.client.calendars.delete({ + calendarId: "calendarId", + }); + /** Returns metadata for a calendar. */ + await gapi.client.calendars.get({ + calendarId: "calendarId", + }); + /** Creates a secondary calendar. */ + await gapi.client.calendars.insert({ + }); + /** Updates metadata for a calendar. This method supports patch semantics. */ + await gapi.client.calendars.patch({ + calendarId: "calendarId", + }); + /** Updates metadata for a calendar. */ + await gapi.client.calendars.update({ + calendarId: "calendarId", + }); + /** Stop watching resources through this channel */ + await gapi.client.channels.stop({ + }); + /** Returns the color definitions for calendars and events. */ + await gapi.client.colors.get({ + }); + /** Deletes an event. */ + await gapi.client.events.delete({ + calendarId: "calendarId", + eventId: "eventId", + sendNotifications: true, + }); + /** Returns an event. */ + await gapi.client.events.get({ + alwaysIncludeEmail: true, + calendarId: "calendarId", + eventId: "eventId", + maxAttendees: 4, + timeZone: "timeZone", + }); + /** Imports an event. This operation is used to add a private copy of an existing event to a calendar. */ + await gapi.client.events.import({ + calendarId: "calendarId", + supportsAttachments: true, + }); + /** Creates an event. */ + await gapi.client.events.insert({ + calendarId: "calendarId", + maxAttendees: 2, + sendNotifications: true, + supportsAttachments: true, + }); + /** Returns instances of the specified recurring event. */ + await gapi.client.events.instances({ + alwaysIncludeEmail: true, + calendarId: "calendarId", + eventId: "eventId", + maxAttendees: 4, + maxResults: 5, + originalStart: "originalStart", + pageToken: "pageToken", + showDeleted: true, + timeMax: "timeMax", + timeMin: "timeMin", + timeZone: "timeZone", + }); + /** Returns events on the specified calendar. */ + await gapi.client.events.list({ + alwaysIncludeEmail: true, + calendarId: "calendarId", + iCalUID: "iCalUID", + maxAttendees: 4, + maxResults: 5, + orderBy: "orderBy", + pageToken: "pageToken", + privateExtendedProperty: "privateExtendedProperty", + q: "q", + sharedExtendedProperty: "sharedExtendedProperty", + showDeleted: true, + showHiddenInvitations: true, + singleEvents: true, + syncToken: "syncToken", + timeMax: "timeMax", + timeMin: "timeMin", + timeZone: "timeZone", + updatedMin: "updatedMin", + }); + /** Moves an event to another calendar, i.e. changes an event's organizer. */ + await gapi.client.events.move({ + calendarId: "calendarId", + destination: "destination", + eventId: "eventId", + sendNotifications: true, + }); + /** Updates an event. This method supports patch semantics. */ + await gapi.client.events.patch({ + alwaysIncludeEmail: true, + calendarId: "calendarId", + eventId: "eventId", + maxAttendees: 4, + sendNotifications: true, + supportsAttachments: true, + }); + /** Creates an event based on a simple text string. */ + await gapi.client.events.quickAdd({ + calendarId: "calendarId", + sendNotifications: true, + text: "text", + }); + /** Updates an event. */ + await gapi.client.events.update({ + alwaysIncludeEmail: true, + calendarId: "calendarId", + eventId: "eventId", + maxAttendees: 4, + sendNotifications: true, + supportsAttachments: true, + }); + /** Watch for changes to Events resources. */ + await gapi.client.events.watch({ + alwaysIncludeEmail: true, + calendarId: "calendarId", + iCalUID: "iCalUID", + maxAttendees: 4, + maxResults: 5, + orderBy: "orderBy", + pageToken: "pageToken", + privateExtendedProperty: "privateExtendedProperty", + q: "q", + sharedExtendedProperty: "sharedExtendedProperty", + showDeleted: true, + showHiddenInvitations: true, + singleEvents: true, + syncToken: "syncToken", + timeMax: "timeMax", + timeMin: "timeMin", + timeZone: "timeZone", + updatedMin: "updatedMin", + }); + /** Returns free/busy information for a set of calendars. */ + await gapi.client.freebusy.query({ + }); + /** Returns a single user setting. */ + await gapi.client.settings.get({ + setting: "setting", + }); + /** Returns all user settings for the authenticated user. */ + await gapi.client.settings.list({ + maxResults: 1, + pageToken: "pageToken", + syncToken: "syncToken", + }); + /** Watch for changes to Settings resources. */ + await gapi.client.settings.watch({ + maxResults: 1, + pageToken: "pageToken", + syncToken: "syncToken", + }); + } +}); diff --git a/types/gapi.client.calendar/index.d.ts b/types/gapi.client.calendar/index.d.ts new file mode 100644 index 0000000000..72196ee150 --- /dev/null +++ b/types/gapi.client.calendar/index.d.ts @@ -0,0 +1,1946 @@ +// Type definitions for Google Calendar API v3 3.0 +// Project: https://developers.google.com/google-apps/calendar/firstapp +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest + +/// + +declare namespace gapi.client { + /** Load Calendar API v3 */ + function load(name: "calendar", version: "v3"): PromiseLike; + function load(name: "calendar", version: "v3", callback: () => any): void; + + const acl: calendar.AclResource; + + const calendarList: calendar.CalendarListResource; + + const calendars: calendar.CalendarsResource; + + const channels: calendar.ChannelsResource; + + const colors: calendar.ColorsResource; + + const events: calendar.EventsResource; + + const freebusy: calendar.FreebusyResource; + + const settings: calendar.SettingsResource; + + namespace calendar { + interface Acl { + /** ETag of the collection. */ + etag?: string; + /** List of rules on the access control list. */ + items?: AclRule[]; + /** Type of the collection ("calendar#acl"). */ + kind?: string; + /** Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. */ + nextPageToken?: string; + /** + * Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are + * available, in which case nextPageToken is provided. + */ + nextSyncToken?: string; + } + interface AclRule { + /** ETag of the resource. */ + etag?: string; + /** Identifier of the ACL rule. */ + id?: string; + /** Type of the resource ("calendar#aclRule"). */ + kind?: string; + /** + * The role assigned to the scope. Possible values are: + * - "none" - Provides no access. + * - "freeBusyReader" - Provides read access to free/busy information. + * - "reader" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. + * - "writer" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. + * + * - "owner" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and + * manipulate ACLs. + */ + role?: string; + /** The scope of the rule. */ + scope?: { + /** + * The type of the scope. Possible values are: + * - "default" - The public scope. This is the default value. + * - "user" - Limits the scope to a single user. + * - "group" - Limits the scope to a group. + * - "domain" - Limits the scope to a domain. Note: The permissions granted to the "default", or public, scope apply to any user, authenticated or not. + */ + type?: string; + /** The email address of a user or group, or the name of a domain, depending on the scope type. Omitted for type "default". */ + value?: string; + }; + } + interface Calendar { + /** Description of the calendar. Optional. */ + description?: string; + /** ETag of the resource. */ + etag?: string; + /** Identifier of the calendar. To retrieve IDs call the calendarList.list() method. */ + id?: string; + /** Type of the resource ("calendar#calendar"). */ + kind?: string; + /** Geographic location of the calendar as free-form text. Optional. */ + location?: string; + /** Title of the calendar. */ + summary?: string; + /** The time zone of the calendar. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) Optional. */ + timeZone?: string; + } + interface CalendarList { + /** ETag of the collection. */ + etag?: string; + /** Calendars that are present on the user's calendar list. */ + items?: CalendarListEntry[]; + /** Type of the collection ("calendar#calendarList"). */ + kind?: string; + /** Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. */ + nextPageToken?: string; + /** + * Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are + * available, in which case nextPageToken is provided. + */ + nextSyncToken?: string; + } + interface CalendarListEntry { + /** + * The effective access role that the authenticated user has on the calendar. Read-only. Possible values are: + * - "freeBusyReader" - Provides read access to free/busy information. + * - "reader" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. + * - "writer" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. + * + * - "owner" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and + * manipulate ACLs. + */ + accessRole?: string; + /** + * The main color of the calendar in the hexadecimal format "#0088aa". This property supersedes the index-based colorId property. To set or change this + * property, you need to specify colorRgbFormat=true in the parameters of the insert, update and patch methods. Optional. + */ + backgroundColor?: string; + /** + * The color of the calendar. This is an ID referring to an entry in the calendar section of the colors definition (see the colors endpoint). This + * property is superseded by the backgroundColor and foregroundColor properties and can be ignored when using these properties. Optional. + */ + colorId?: string; + /** The default reminders that the authenticated user has for this calendar. */ + defaultReminders?: EventReminder[]; + /** Whether this calendar list entry has been deleted from the calendar list. Read-only. Optional. The default is False. */ + deleted?: boolean; + /** Description of the calendar. Optional. Read-only. */ + description?: string; + /** ETag of the resource. */ + etag?: string; + /** + * The foreground color of the calendar in the hexadecimal format "#ffffff". This property supersedes the index-based colorId property. To set or change + * this property, you need to specify colorRgbFormat=true in the parameters of the insert, update and patch methods. Optional. + */ + foregroundColor?: string; + /** Whether the calendar has been hidden from the list. Optional. The default is False. */ + hidden?: boolean; + /** Identifier of the calendar. */ + id?: string; + /** Type of the resource ("calendar#calendarListEntry"). */ + kind?: string; + /** Geographic location of the calendar as free-form text. Optional. Read-only. */ + location?: string; + /** The notifications that the authenticated user is receiving for this calendar. */ + notificationSettings?: { + /** The list of notifications set for this calendar. */ + notifications?: CalendarNotification[]; + }; + /** Whether the calendar is the primary calendar of the authenticated user. Read-only. Optional. The default is False. */ + primary?: boolean; + /** Whether the calendar content shows up in the calendar UI. Optional. The default is False. */ + selected?: boolean; + /** Title of the calendar. Read-only. */ + summary?: string; + /** The summary that the authenticated user has set for this calendar. Optional. */ + summaryOverride?: string; + /** The time zone of the calendar. Optional. Read-only. */ + timeZone?: string; + } + interface CalendarNotification { + /** + * The method used to deliver the notification. Possible values are: + * - "email" - Reminders are sent via email. + * - "sms" - Reminders are sent via SMS. This value is read-only and is ignored on inserts and updates. SMS reminders are only available for G Suite + * customers. + */ + method?: string; + /** + * The type of notification. Possible values are: + * - "eventCreation" - Notification sent when a new event is put on the calendar. + * - "eventChange" - Notification sent when an event is changed. + * - "eventCancellation" - Notification sent when an event is cancelled. + * - "eventResponse" - Notification sent when an event is changed. + * - "agenda" - An agenda with the events of the day (sent out in the morning). + */ + type?: string; + } + interface Channel { + /** The address where notifications are delivered for this channel. */ + address?: string; + /** Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. */ + expiration?: string; + /** A UUID or similar unique string that identifies this channel. */ + id?: string; + /** Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". */ + kind?: string; + /** Additional parameters controlling delivery channel behavior. Optional. */ + params?: Record; + /** A Boolean value to indicate whether payload is wanted. Optional. */ + payload?: boolean; + /** An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. */ + resourceId?: string; + /** A version-specific identifier for the watched resource. */ + resourceUri?: string; + /** An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. */ + token?: string; + /** The type of delivery mechanism used for this channel. */ + type?: string; + } + interface ColorDefinition { + /** The background color associated with this color definition. */ + background?: string; + /** The foreground color that can be used to write on top of a background with 'background' color. */ + foreground?: string; + } + interface Colors { + /** + * A global palette of calendar colors, mapping from the color ID to its definition. A calendarListEntry resource refers to one of these color IDs in its + * color field. Read-only. + */ + calendar?: Record; + /** + * A global palette of event colors, mapping from the color ID to its definition. An event resource may refer to one of these color IDs in its color + * field. Read-only. + */ + event?: Record; + /** Type of the resource ("calendar#colors"). */ + kind?: string; + /** Last modification time of the color palette (as a RFC3339 timestamp). Read-only. */ + updated?: string; + } + interface Error { + /** Domain, or broad category, of the error. */ + domain?: string; + /** + * Specific reason for the error. Some of the possible values are: + * - "groupTooBig" - The group of users requested is too large for a single query. + * - "tooManyCalendarsRequested" - The number of calendars requested is too large for a single query. + * - "notFound" - The requested resource was not found. + * - "internalError" - The API service has encountered an internal error. Additional error types may be added in the future, so clients should gracefully + * handle additional error statuses not included in this list. + */ + reason?: string; + } + interface Event { + /** Whether anyone can invite themselves to the event (currently works for Google+ events only). Optional. The default is False. */ + anyoneCanAddSelf?: boolean; + /** + * File attachments for the event. Currently only Google Drive attachments are supported. + * In order to modify attachments the supportsAttachments request parameter should be set to true. + * There can be at most 25 attachments per event, + */ + attachments?: EventAttachment[]; + /** The attendees of the event. See the Events with attendees guide for more information on scheduling events with other calendar users. */ + attendees?: EventAttendee[]; + /** + * Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the + * maxAttendee query parameter. When updating an event, this can be used to only update the participant's response. Optional. The default is False. + */ + attendeesOmitted?: boolean; + /** The color of the event. This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). Optional. */ + colorId?: string; + /** Creation time of the event (as a RFC3339 timestamp). Read-only. */ + created?: string; + /** The creator of the event. Read-only. */ + creator?: { + /** The creator's name, if available. */ + displayName?: string; + /** The creator's email address, if available. */ + email?: string; + /** The creator's Profile ID, if available. It corresponds to theid field in the People collection of the Google+ API */ + id?: string; + /** Whether the creator corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. */ + self?: boolean; + }; + /** Description of the event. Optional. */ + description?: string; + /** The (exclusive) end time of the event. For a recurring event, this is the end time of the first instance. */ + end?: EventDateTime; + /** + * Whether the end time is actually unspecified. An end time is still provided for compatibility reasons, even if this attribute is set to True. The + * default is False. + */ + endTimeUnspecified?: boolean; + /** ETag of the resource. */ + etag?: string; + /** Extended properties of the event. */ + extendedProperties?: { + /** Properties that are private to the copy of the event that appears on this calendar. */ + private?: Record; + /** Properties that are shared between copies of the event on other attendees' calendars. */ + shared?: Record; + }; + /** A gadget that extends this event. */ + gadget?: { + /** + * The gadget's display mode. Optional. Possible values are: + * - "icon" - The gadget displays next to the event's title in the calendar view. + * - "chip" - The gadget displays when the event is clicked. + */ + display?: string; + /** The gadget's height in pixels. The height must be an integer greater than 0. Optional. */ + height?: number; + /** The gadget's icon URL. The URL scheme must be HTTPS. */ + iconLink?: string; + /** The gadget's URL. The URL scheme must be HTTPS. */ + link?: string; + /** Preferences. */ + preferences?: Record; + /** The gadget's title. */ + title?: string; + /** The gadget's type. */ + type?: string; + /** The gadget's width in pixels. The width must be an integer greater than 0. Optional. */ + width?: number; + }; + /** Whether attendees other than the organizer can invite others to the event. Optional. The default is True. */ + guestsCanInviteOthers?: boolean; + /** Whether attendees other than the organizer can modify the event. Optional. The default is False. */ + guestsCanModify?: boolean; + /** Whether attendees other than the organizer can see who the event's attendees are. Optional. The default is True. */ + guestsCanSeeOtherGuests?: boolean; + /** An absolute link to the Google+ hangout associated with this event. Read-only. */ + hangoutLink?: string; + /** An absolute link to this event in the Google Calendar Web UI. Read-only. */ + htmlLink?: string; + /** + * Event unique identifier as defined in RFC5545. It is used to uniquely identify events accross calendaring systems and must be supplied when importing + * events via the import method. + * Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. One difference in their semantics is + * that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. + */ + iCalUID?: string; + /** + * Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. Provided IDs must follow these rules: + * - characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 + * - the length of the ID must be between 5 and 1024 characters + * - the ID must be unique per calendar Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at + * event creation time. To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. + * If you do not specify an ID, it will be automatically generated by the server. + * Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. One difference in their semantics is + * that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. + */ + id?: string; + /** Type of the resource ("calendar#event"). */ + kind?: string; + /** Geographic location of the event as free-form text. Optional. */ + location?: string; + /** + * Whether this is a locked event copy where no changes can be made to the main event fields "summary", "description", "location", "start", "end" or + * "recurrence". The default is False. Read-Only. + */ + locked?: boolean; + /** + * The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to + * True. To change the organizer, use the move operation. Read-only, except when importing an event. + */ + organizer?: { + /** The organizer's name, if available. */ + displayName?: string; + /** The organizer's email address, if available. It must be a valid email address as per RFC5322. */ + email?: string; + /** The organizer's Profile ID, if available. It corresponds to theid field in the People collection of the Google+ API */ + id?: string; + /** Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. */ + self?: boolean; + }; + /** + * For an instance of a recurring event, this is the time at which this event would start according to the recurrence data in the recurring event + * identified by recurringEventId. Immutable. + */ + originalStartTime?: EventDateTime; + /** Whether this is a private event copy where changes are not shared with other copies on other calendars. Optional. Immutable. The default is False. */ + privateCopy?: boolean; + /** + * List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed in this + * field; event start and end times are specified in the start and end fields. This field is omitted for single events or instances of recurring events. + */ + recurrence?: string[]; + /** For an instance of a recurring event, this is the id of the recurring event to which this instance belongs. Immutable. */ + recurringEventId?: string; + /** Information about the event's reminders for the authenticated user. */ + reminders?: { + /** + * If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for + * this event. The maximum number of override reminders is 5. + */ + overrides?: EventReminder[]; + /** Whether the default reminders of the calendar apply to the event. */ + useDefault?: boolean; + }; + /** Sequence number as per iCalendar. */ + sequence?: number; + /** + * Source from which the event was created. For example, a web page, an email message or any document identifiable by an URL with HTTP or HTTPS scheme. + * Can only be seen or modified by the creator of the event. + */ + source?: { + /** Title of the source; for example a title of a web page or an email subject. */ + title?: string; + /** URL of the source pointing to a resource. The URL scheme must be HTTP or HTTPS. */ + url?: string; + }; + /** The (inclusive) start time of the event. For a recurring event, this is the start time of the first instance. */ + start?: EventDateTime; + /** + * Status of the event. Optional. Possible values are: + * - "confirmed" - The event is confirmed. This is the default status. + * - "tentative" - The event is tentatively confirmed. + * - "cancelled" - The event is cancelled. + */ + status?: string; + /** Title of the event. */ + summary?: string; + /** + * Whether the event blocks time on the calendar. Optional. Possible values are: + * - "opaque" - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. + * - "transparent" - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. + */ + transparency?: string; + /** Last modification time of the event (as a RFC3339 timestamp). Read-only. */ + updated?: string; + /** + * Visibility of the event. Optional. Possible values are: + * - "default" - Uses the default visibility for events on the calendar. This is the default value. + * - "public" - The event is public and event details are visible to all readers of the calendar. + * - "private" - The event is private and only event attendees may view event details. + * - "confidential" - The event is private. This value is provided for compatibility reasons. + */ + visibility?: string; + } + interface EventAttachment { + /** + * ID of the attached file. Read-only. + * For Google Drive files, this is the ID of the corresponding Files resource entry in the Drive API. + */ + fileId?: string; + /** + * URL link to the attachment. + * For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. + */ + fileUrl?: string; + /** URL link to the attachment's icon. Read-only. */ + iconLink?: string; + /** Internet media type (MIME type) of the attachment. */ + mimeType?: string; + /** Attachment title. */ + title?: string; + } + interface EventAttendee { + /** Number of additional guests. Optional. The default is 0. */ + additionalGuests?: number; + /** The attendee's response comment. Optional. */ + comment?: string; + /** The attendee's name, if available. Optional. */ + displayName?: string; + /** The attendee's email address, if available. This field must be present when adding an attendee. It must be a valid email address as per RFC5322. */ + email?: string; + /** The attendee's Profile ID, if available. It corresponds to theid field in the People collection of the Google+ API */ + id?: string; + /** Whether this is an optional attendee. Optional. The default is False. */ + optional?: boolean; + /** Whether the attendee is the organizer of the event. Read-only. The default is False. */ + organizer?: boolean; + /** Whether the attendee is a resource. Read-only. The default is False. */ + resource?: boolean; + /** + * The attendee's response status. Possible values are: + * - "needsAction" - The attendee has not responded to the invitation. + * - "declined" - The attendee has declined the invitation. + * - "tentative" - The attendee has tentatively accepted the invitation. + * - "accepted" - The attendee has accepted the invitation. + */ + responseStatus?: string; + /** Whether this entry represents the calendar on which this copy of the event appears. Read-only. The default is False. */ + self?: boolean; + } + interface EventDateTime { + /** The date, in the format "yyyy-mm-dd", if this is an all-day event. */ + date?: string; + /** + * The time, as a combined date-time value (formatted according to RFC3339). A time zone offset is required unless a time zone is explicitly specified in + * timeZone. + */ + dateTime?: string; + /** + * The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) For recurring events this field is + * required and specifies the time zone in which the recurrence is expanded. For single events this field is optional and indicates a custom time zone for + * the event start/end. + */ + timeZone?: string; + } + interface EventReminder { + /** + * The method used by this reminder. Possible values are: + * - "email" - Reminders are sent via email. + * - "sms" - Reminders are sent via SMS. These are only available for G Suite customers. Requests to set SMS reminders for other account types are + * ignored. + * - "popup" - Reminders are sent via a UI popup. + */ + method?: string; + /** Number of minutes before the start of the event when the reminder should trigger. Valid values are between 0 and 40320 (4 weeks in minutes). */ + minutes?: number; + } + interface Events { + /** + * The user's access role for this calendar. Read-only. Possible values are: + * - "none" - The user has no access. + * - "freeBusyReader" - The user has read access to free/busy information. + * - "reader" - The user has read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. + * - "writer" - The user has read and write access to the calendar. Private events will appear to users with writer access, and event details will be + * visible. + * - "owner" - The user has ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and + * manipulate ACLs. + */ + accessRole?: string; + /** + * The default reminders on the calendar for the authenticated user. These reminders apply to all events on this calendar that do not explicitly override + * them (i.e. do not have reminders.useDefault set to True). + */ + defaultReminders?: EventReminder[]; + /** Description of the calendar. Read-only. */ + description?: string; + /** ETag of the collection. */ + etag?: string; + /** List of events on the calendar. */ + items?: Event[]; + /** Type of the collection ("calendar#events"). */ + kind?: string; + /** Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. */ + nextPageToken?: string; + /** + * Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are + * available, in which case nextPageToken is provided. + */ + nextSyncToken?: string; + /** Title of the calendar. Read-only. */ + summary?: string; + /** The time zone of the calendar. Read-only. */ + timeZone?: string; + /** Last modification time of the calendar (as a RFC3339 timestamp). Read-only. */ + updated?: string; + } + interface FreeBusyCalendar { + /** List of time ranges during which this calendar should be regarded as busy. */ + busy?: TimePeriod[]; + /** Optional error(s) (if computation for the calendar failed). */ + errors?: Error[]; + } + interface FreeBusyGroup { + /** List of calendars' identifiers within a group. */ + calendars?: string[]; + /** Optional error(s) (if computation for the group failed). */ + errors?: Error[]; + } + interface FreeBusyRequest { + /** Maximal number of calendars for which FreeBusy information is to be provided. Optional. */ + calendarExpansionMax?: number; + /** + * Maximal number of calendar identifiers to be provided for a single group. Optional. An error will be returned for a group with more members than this + * value. + */ + groupExpansionMax?: number; + /** List of calendars and/or groups to query. */ + items?: FreeBusyRequestItem[]; + /** The end of the interval for the query. */ + timeMax?: string; + /** The start of the interval for the query. */ + timeMin?: string; + /** Time zone used in the response. Optional. The default is UTC. */ + timeZone?: string; + } + interface FreeBusyRequestItem { + /** The identifier of a calendar or a group. */ + id?: string; + } + interface FreeBusyResponse { + /** List of free/busy information for calendars. */ + calendars?: Record; + /** Expansion of groups. */ + groups?: Record; + /** Type of the resource ("calendar#freeBusy"). */ + kind?: string; + /** The end of the interval. */ + timeMax?: string; + /** The start of the interval. */ + timeMin?: string; + } + interface Setting { + /** ETag of the resource. */ + etag?: string; + /** The id of the user setting. */ + id?: string; + /** Type of the resource ("calendar#setting"). */ + kind?: string; + /** Value of the user setting. The format of the value depends on the ID of the setting. It must always be a UTF-8 string of length up to 1024 characters. */ + value?: string; + } + interface Settings { + /** Etag of the collection. */ + etag?: string; + /** List of user settings. */ + items?: Setting[]; + /** Type of the collection ("calendar#settings"). */ + kind?: string; + /** Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. */ + nextPageToken?: string; + /** + * Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are + * available, in which case nextPageToken is provided. + */ + nextSyncToken?: string; + } + interface TimePeriod { + /** The (exclusive) end of the time period. */ + end?: string; + /** The (inclusive) start of the time period. */ + start?: string; + } + interface AclResource { + /** Deletes an access control rule. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ACL rule identifier. */ + ruleId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns an access control rule. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ACL rule identifier. */ + ruleId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates an access control rule. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the rules in the access control list for the calendar. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. + * Optional. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken + * is provided. Optional. The default is False. + */ + showDeleted?: boolean; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it + * is not allowed to set showDeleted to False. + * If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an access control rule. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ACL rule identifier. */ + ruleId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an access control rule. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ACL rule identifier. */ + ruleId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Watch for changes to ACL resources. */ + watch(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. + * Optional. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken + * is provided. Optional. The default is False. + */ + showDeleted?: boolean; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it + * is not allowed to set showDeleted to False. + * If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CalendarListResource { + /** Deletes an entry on the user's calendar list. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns an entry on the user's calendar list. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds an entry to the user's calendar list. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** + * Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId + * field will be set to the best matching option automatically. Optional. The default is False. + */ + colorRgbFormat?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns entries on the user's calendar list. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. + * Optional. + */ + maxResults?: number; + /** The minimum access role for the user in the returned entries. Optional. The default is no restriction. */ + minAccessRole?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to include deleted calendar list entries in the result. Optional. The default is False. */ + showDeleted?: boolean; + /** Whether to show hidden entries. Optional. The default is False. */ + showHidden?: boolean; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't + * be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted + * neither showHidden to False. + * To ensure client state consistency minAccessRole query parameter cannot be specified together with nextSyncToken. + * If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an entry on the user's calendar list. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** + * Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId + * field will be set to the best matching option automatically. Optional. The default is False. + */ + colorRgbFormat?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an entry on the user's calendar list. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** + * Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId + * field will be set to the best matching option automatically. Optional. The default is False. + */ + colorRgbFormat?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Watch for changes to CalendarList resources. */ + watch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. + * Optional. + */ + maxResults?: number; + /** The minimum access role for the user in the returned entries. Optional. The default is no restriction. */ + minAccessRole?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to include deleted calendar list entries in the result. Optional. The default is False. */ + showDeleted?: boolean; + /** Whether to show hidden entries. Optional. The default is False. */ + showHidden?: boolean; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't + * be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted + * neither showHidden to False. + * To ensure client state consistency minAccessRole query parameter cannot be specified together with nextSyncToken. + * If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CalendarsResource { + /** Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. */ + clear(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns metadata for a calendar. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a secondary calendar. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates metadata for a calendar. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates metadata for a calendar. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ChannelsResource { + /** Stop watching resources through this channel */ + stop(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ColorsResource { + /** Returns the color definitions for calendars and events. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface EventsResource { + /** Deletes an event. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Event identifier. */ + eventId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to send notifications about the deletion of the event. Optional. The default is False. */ + sendNotifications?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns an event. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** + * Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, + * non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an + * email address value in the mentioned places. Optional. The default is False. + */ + alwaysIncludeEmail?: boolean; + /** + * 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. + */ + calendarId: string; + /** Event identifier. */ + eventId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. + * Optional. + */ + maxAttendees?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Time zone used in the response. Optional. The default is the time zone of the calendar. */ + timeZone?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Imports an event. This operation is used to add a private copy of an existing event to a calendar. */ + import(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether API client performing operation supports event attachments. Optional. The default is False. */ + supportsAttachments?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates an event. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. + * Optional. + */ + maxAttendees?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to send notifications about the creation of the new event. Optional. The default is False. */ + sendNotifications?: boolean; + /** Whether API client performing operation supports event attachments. Optional. The default is False. */ + supportsAttachments?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns instances of the specified recurring event. */ + instances(request: { + /** Data format for the response. */ + alt?: string; + /** + * Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, + * non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an + * email address value in the mentioned places. Optional. The default is False. + */ + alwaysIncludeEmail?: boolean; + /** + * 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. + */ + calendarId: string; + /** Recurring event identifier. */ + eventId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. + * Optional. + */ + maxAttendees?: number; + /** Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The original start time of the instance in the result. Optional. */ + originalStart?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events will still be included if + * singleEvents is False. Optional. The default is False. + */ + showDeleted?: boolean; + /** + * Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with + * mandatory time zone offset. + */ + timeMax?: string; + /** + * Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with + * mandatory time zone offset. + */ + timeMin?: string; + /** Time zone used in the response. Optional. The default is the time zone of the calendar. */ + timeZone?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns events on the specified calendar. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** + * Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, + * non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an + * email address value in the mentioned places. Optional. The default is False. + */ + alwaysIncludeEmail?: boolean; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Specifies event ID in the iCalendar format to be included in the response. Optional. */ + iCalUID?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. + * Optional. + */ + maxAttendees?: number; + /** + * Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if + * there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is + * 250 events. The page size can never be larger than 2500 events. Optional. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The order of the events returned in the result. Optional. The default is an unspecified, stable order. */ + orderBy?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to + * return events that match all given constraints. + */ + privateExtendedProperty?: string; + /** Free text search terms to find events that match these terms in any field, except for extended properties. Optional. */ + q?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to + * return events that match all given constraints. + */ + sharedExtendedProperty?: string; + /** + * Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying + * recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single + * instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. + */ + showDeleted?: boolean; + /** Whether to include hidden invitations in the result. Optional. The default is False. */ + showHiddenInvitations?: boolean; + /** + * Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying + * recurring events themselves. Optional. The default is False. + */ + singleEvents?: boolean; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it + * is not allowed to set showDeleted to False. + * There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. + * + * These are: + * - iCalUID + * - orderBy + * - privateExtendedProperty + * - q + * - sharedExtendedProperty + * - timeMin + * - timeMax + * - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** + * Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with + * mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. If timeMin is set, + * timeMax must be greater than timeMin. + */ + timeMax?: string; + /** + * Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with + * mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. If timeMax is set, + * timeMin must be smaller than timeMax. + */ + timeMin?: string; + /** Time zone used in the response. Optional. The default is the time zone of the calendar. */ + timeZone?: string; + /** + * Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be + * included regardless of showDeleted. Optional. The default is not to filter by last modification time. + */ + updatedMin?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Moves an event to another calendar, i.e. changes an event's organizer. */ + move(request: { + /** Data format for the response. */ + alt?: string; + /** Calendar identifier of the source calendar where the event currently is on. */ + calendarId: string; + /** Calendar identifier of the target calendar where the event is to be moved to. */ + destination: string; + /** Event identifier. */ + eventId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to send notifications about the change of the event's organizer. Optional. The default is False. */ + sendNotifications?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an event. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** + * Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, + * non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an + * email address value in the mentioned places. Optional. The default is False. + */ + alwaysIncludeEmail?: boolean; + /** + * 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. + */ + calendarId: string; + /** Event identifier. */ + eventId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. + * Optional. + */ + maxAttendees?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. */ + sendNotifications?: boolean; + /** Whether API client performing operation supports event attachments. Optional. The default is False. */ + supportsAttachments?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates an event based on a simple text string. */ + quickAdd(request: { + /** Data format for the response. */ + alt?: string; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to send notifications about the creation of the event. Optional. The default is False. */ + sendNotifications?: boolean; + /** The text describing the event to be created. */ + text: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an event. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** + * Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, + * non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an + * email address value in the mentioned places. Optional. The default is False. + */ + alwaysIncludeEmail?: boolean; + /** + * 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. + */ + calendarId: string; + /** Event identifier. */ + eventId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. + * Optional. + */ + maxAttendees?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. */ + sendNotifications?: boolean; + /** Whether API client performing operation supports event attachments. Optional. The default is False. */ + supportsAttachments?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Watch for changes to Events resources. */ + watch(request: { + /** Data format for the response. */ + alt?: string; + /** + * Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, + * non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an + * email address value in the mentioned places. Optional. The default is False. + */ + alwaysIncludeEmail?: boolean; + /** + * 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. + */ + calendarId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Specifies event ID in the iCalendar format to be included in the response. Optional. */ + iCalUID?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. + * Optional. + */ + maxAttendees?: number; + /** + * Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if + * there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is + * 250 events. The page size can never be larger than 2500 events. Optional. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The order of the events returned in the result. Optional. The default is an unspecified, stable order. */ + orderBy?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to + * return events that match all given constraints. + */ + privateExtendedProperty?: string; + /** Free text search terms to find events that match these terms in any field, except for extended properties. Optional. */ + q?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to + * return events that match all given constraints. + */ + sharedExtendedProperty?: string; + /** + * Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying + * recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single + * instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. + */ + showDeleted?: boolean; + /** Whether to include hidden invitations in the result. Optional. The default is False. */ + showHiddenInvitations?: boolean; + /** + * Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying + * recurring events themselves. Optional. The default is False. + */ + singleEvents?: boolean; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it + * is not allowed to set showDeleted to False. + * There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. + * + * These are: + * - iCalUID + * - orderBy + * - privateExtendedProperty + * - q + * - sharedExtendedProperty + * - timeMin + * - timeMax + * - updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** + * Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with + * mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. If timeMin is set, + * timeMax must be greater than timeMin. + */ + timeMax?: string; + /** + * Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with + * mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but will be ignored. If timeMax is set, + * timeMin must be smaller than timeMax. + */ + timeMin?: string; + /** Time zone used in the response. Optional. The default is the time zone of the calendar. */ + timeZone?: string; + /** + * Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be + * included regardless of showDeleted. Optional. The default is not to filter by last modification time. + */ + updatedMin?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface FreebusyResource { + /** Returns free/busy information for a set of calendars. */ + query(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SettingsResource { + /** Returns a single user setting. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The id of the user setting. */ + setting: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns all user settings for the authenticated user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. + * Optional. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. + * If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Watch for changes to Settings resources. */ + watch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. + * Optional. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list + * request contain only entries that have changed since then. + * If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full + * synchronization without any syncToken. + * Learn more about incremental synchronization. + * Optional. The default is to return all entries. + */ + syncToken?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.calendar/readme.md b/types/gapi.client.calendar/readme.md new file mode 100644 index 0000000000..cc864bd556 --- /dev/null +++ b/types/gapi.client.calendar/readme.md @@ -0,0 +1,242 @@ +# TypeScript typings for Calendar API v3 +Manipulates events and other calendar data. +For detailed description please check [documentation](https://developers.google.com/google-apps/calendar/firstapp). + +## Installing + +Install typings for Calendar API: +``` +npm install @types/gapi.client.calendar@v3 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('calendar', 'v3', () => { + // now we can use gapi.client.calendar + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage your calendars + 'https://www.googleapis.com/auth/calendar', + + // View your calendars + 'https://www.googleapis.com/auth/calendar.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Calendar API resources: + +```typescript + +/* +Deletes an access control rule. +*/ +await gapi.client.acl.delete({ calendarId: "calendarId", ruleId: "ruleId", }); + +/* +Returns an access control rule. +*/ +await gapi.client.acl.get({ calendarId: "calendarId", ruleId: "ruleId", }); + +/* +Creates an access control rule. +*/ +await gapi.client.acl.insert({ calendarId: "calendarId", }); + +/* +Returns the rules in the access control list for the calendar. +*/ +await gapi.client.acl.list({ calendarId: "calendarId", }); + +/* +Updates an access control rule. This method supports patch semantics. +*/ +await gapi.client.acl.patch({ calendarId: "calendarId", ruleId: "ruleId", }); + +/* +Updates an access control rule. +*/ +await gapi.client.acl.update({ calendarId: "calendarId", ruleId: "ruleId", }); + +/* +Watch for changes to ACL resources. +*/ +await gapi.client.acl.watch({ calendarId: "calendarId", }); + +/* +Deletes an entry on the user's calendar list. +*/ +await gapi.client.calendarList.delete({ calendarId: "calendarId", }); + +/* +Returns an entry on the user's calendar list. +*/ +await gapi.client.calendarList.get({ calendarId: "calendarId", }); + +/* +Adds an entry to the user's calendar list. +*/ +await gapi.client.calendarList.insert({ }); + +/* +Returns entries on the user's calendar list. +*/ +await gapi.client.calendarList.list({ }); + +/* +Updates an entry on the user's calendar list. This method supports patch semantics. +*/ +await gapi.client.calendarList.patch({ calendarId: "calendarId", }); + +/* +Updates an entry on the user's calendar list. +*/ +await gapi.client.calendarList.update({ calendarId: "calendarId", }); + +/* +Watch for changes to CalendarList resources. +*/ +await gapi.client.calendarList.watch({ }); + +/* +Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. +*/ +await gapi.client.calendars.clear({ calendarId: "calendarId", }); + +/* +Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. +*/ +await gapi.client.calendars.delete({ calendarId: "calendarId", }); + +/* +Returns metadata for a calendar. +*/ +await gapi.client.calendars.get({ calendarId: "calendarId", }); + +/* +Creates a secondary calendar. +*/ +await gapi.client.calendars.insert({ }); + +/* +Updates metadata for a calendar. This method supports patch semantics. +*/ +await gapi.client.calendars.patch({ calendarId: "calendarId", }); + +/* +Updates metadata for a calendar. +*/ +await gapi.client.calendars.update({ calendarId: "calendarId", }); + +/* +Stop watching resources through this channel +*/ +await gapi.client.channels.stop({ }); + +/* +Returns the color definitions for calendars and events. +*/ +await gapi.client.colors.get({ }); + +/* +Deletes an event. +*/ +await gapi.client.events.delete({ calendarId: "calendarId", eventId: "eventId", }); + +/* +Returns an event. +*/ +await gapi.client.events.get({ calendarId: "calendarId", eventId: "eventId", }); + +/* +Imports an event. This operation is used to add a private copy of an existing event to a calendar. +*/ +await gapi.client.events.import({ calendarId: "calendarId", }); + +/* +Creates an event. +*/ +await gapi.client.events.insert({ calendarId: "calendarId", }); + +/* +Returns instances of the specified recurring event. +*/ +await gapi.client.events.instances({ calendarId: "calendarId", eventId: "eventId", }); + +/* +Returns events on the specified calendar. +*/ +await gapi.client.events.list({ calendarId: "calendarId", }); + +/* +Moves an event to another calendar, i.e. changes an event's organizer. +*/ +await gapi.client.events.move({ calendarId: "calendarId", destination: "destination", eventId: "eventId", }); + +/* +Updates an event. This method supports patch semantics. +*/ +await gapi.client.events.patch({ calendarId: "calendarId", eventId: "eventId", }); + +/* +Creates an event based on a simple text string. +*/ +await gapi.client.events.quickAdd({ calendarId: "calendarId", text: "text", }); + +/* +Updates an event. +*/ +await gapi.client.events.update({ calendarId: "calendarId", eventId: "eventId", }); + +/* +Watch for changes to Events resources. +*/ +await gapi.client.events.watch({ calendarId: "calendarId", }); + +/* +Returns free/busy information for a set of calendars. +*/ +await gapi.client.freebusy.query({ }); + +/* +Returns a single user setting. +*/ +await gapi.client.settings.get({ setting: "setting", }); + +/* +Returns all user settings for the authenticated user. +*/ +await gapi.client.settings.list({ }); + +/* +Watch for changes to Settings resources. +*/ +await gapi.client.settings.watch({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.calendar/tsconfig.json b/types/gapi.client.calendar/tsconfig.json new file mode 100644 index 0000000000..5d44c3d92a --- /dev/null +++ b/types/gapi.client.calendar/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.calendar-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.calendar/tslint.json b/types/gapi.client.calendar/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.calendar/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.civicinfo/gapi.client.civicinfo-tests.ts b/types/gapi.client.civicinfo/gapi.client.civicinfo-tests.ts new file mode 100644 index 0000000000..7a6270dfa5 --- /dev/null +++ b/types/gapi.client.civicinfo/gapi.client.civicinfo-tests.ts @@ -0,0 +1,44 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('civicinfo', 'v2', () => { + /** now we can use gapi.client.civicinfo */ + + run(); + }); + + async function run() { + /** Searches for political divisions by their natural name or OCD ID. */ + await gapi.client.divisions.search({ + query: "query", + }); + /** List of available elections to query. */ + await gapi.client.elections.electionQuery({ + }); + /** Looks up information relevant to a voter based on the voter's registered address. */ + await gapi.client.elections.voterInfoQuery({ + address: "address", + electionId: "electionId", + officialOnly: true, + returnAllAvailableData: true, + }); + /** Looks up political geography and representative information for a single address. */ + await gapi.client.representatives.representativeInfoByAddress({ + address: "address", + includeOffices: true, + levels: "levels", + roles: "roles", + }); + /** Looks up representative information for a single geographic division. */ + await gapi.client.representatives.representativeInfoByDivision({ + levels: "levels", + ocdId: "ocdId", + recursive: true, + roles: "roles", + }); + } +}); diff --git a/types/gapi.client.civicinfo/index.d.ts b/types/gapi.client.civicinfo/index.d.ts new file mode 100644 index 0000000000..efa9098f8e --- /dev/null +++ b/types/gapi.client.civicinfo/index.d.ts @@ -0,0 +1,599 @@ +// Type definitions for Google Google Civic Information API v2 2.0 +// Project: https://developers.google.com/civic-information +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/civicinfo/v2/rest + +/// + +declare namespace gapi.client { + /** Load Google Civic Information API v2 */ + function load(name: "civicinfo", version: "v2"): PromiseLike; + function load(name: "civicinfo", version: "v2", callback: () => any): void; + + const divisions: civicinfo.DivisionsResource; + + const elections: civicinfo.ElectionsResource; + + const representatives: civicinfo.RepresentativesResource; + + namespace civicinfo { + interface AdministrationRegion { + /** The election administration body for this area. */ + electionAdministrationBody?: AdministrativeBody; + /** + * An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested + * from the Request more link on the Quotas page. + */ + id?: string; + /** The city or county that provides election information for this voter. This object can have the same elements as state. */ + local_jurisdiction?: AdministrationRegion; + /** The name of the jurisdiction. */ + name?: string; + /** A list of sources for this area. If multiple sources are listed the data has been aggregated from those sources. */ + sources?: Source[]; + } + interface AdministrativeBody { + /** A URL provided by this administrative body for information on absentee voting. */ + absenteeVotingInfoUrl?: string; + addressLines?: string[]; + /** A URL provided by this administrative body to give contest information to the voter. */ + ballotInfoUrl?: string; + /** The mailing address of this administrative body. */ + correspondenceAddress?: SimpleAddressType; + /** A URL provided by this administrative body for looking up general election information. */ + electionInfoUrl?: string; + /** The election officials for this election administrative body. */ + electionOfficials?: ElectionOfficial[]; + /** A URL provided by this administrative body for confirming that the voter is registered to vote. */ + electionRegistrationConfirmationUrl?: string; + /** A URL provided by this administrative body for looking up how to register to vote. */ + electionRegistrationUrl?: string; + /** A URL provided by this administrative body describing election rules to the voter. */ + electionRulesUrl?: string; + /** A description of the hours of operation for this administrative body. */ + hoursOfOperation?: string; + /** The name of this election administrative body. */ + name?: string; + /** The physical address of this administrative body. */ + physicalAddress?: SimpleAddressType; + /** A description of the services this administrative body may provide. */ + voter_services?: string[]; + /** A URL provided by this administrative body for looking up where to vote. */ + votingLocationFinderUrl?: string; + } + interface Candidate { + /** The URL for the candidate's campaign web site. */ + candidateUrl?: string; + /** A list of known (social) media channels for this candidate. */ + channels?: Channel[]; + /** The email address for the candidate's campaign. */ + email?: string; + /** + * The candidate's name. If this is a joint ticket it will indicate the name of the candidate at the top of a ticket followed by a / and that name of + * candidate at the bottom of the ticket. e.g. "Mitt Romney / Paul Ryan" + */ + name?: string; + /** The order the candidate appears on the ballot for this contest. */ + orderOnBallot?: string; + /** The full name of the party the candidate is a member of. */ + party?: string; + /** The voice phone number for the candidate's campaign office. */ + phone?: string; + /** A URL for a photo of the candidate. */ + photoUrl?: string; + } + interface Channel { + /** The unique public identifier for the candidate's channel. */ + id?: string; + /** + * The type of channel. The following is a list of types of channels, but is not exhaustive. More channel types may be added at a later time. One of: + * GooglePlus, YouTube, Facebook, Twitter + */ + type?: string; + } + interface Contest { + /** A number specifying the position of this contest on the voter's ballot. */ + ballotPlacement?: string; + /** The candidate choices for this contest. */ + candidates?: Candidate[]; + /** Information about the electoral district that this contest is in. */ + district?: ElectoralDistrict; + /** A description of any additional eligibility requirements for voting in this contest. */ + electorateSpecifications?: string; + /** + * An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested + * from the Request more link on the Quotas page. + */ + id?: string; + /** + * The levels of government of the office for this contest. There may be more than one in cases where a jurisdiction effectively acts at two different + * levels of government; for example, the mayor of the District of Columbia acts at "locality" level, but also effectively at both "administrative-area-2" + * and "administrative-area-1". + */ + level?: string[]; + /** The number of candidates that will be elected to office in this contest. */ + numberElected?: string; + /** The number of candidates that a voter may vote for in this contest. */ + numberVotingFor?: string; + /** The name of the office for this contest. */ + office?: string; + /** If this is a partisan election, the name of the party it is for. */ + primaryParty?: string; + /** + * The set of ballot responses for the referendum. A ballot response represents a line on the ballot. Common examples might include "yes" or "no" for + * referenda. This field is only populated for contests of type 'Referendum'. + */ + referendumBallotResponses?: string[]; + /** + * Specifies a short summary of the referendum that is typically on the ballot below the title but above the text. This field is only populated for + * contests of type 'Referendum'. + */ + referendumBrief?: string; + /** + * A statement in opposition to the referendum. It does not necessarily appear on the ballot. This field is only populated for contests of type + * 'Referendum'. + */ + referendumConStatement?: string; + /** + * Specifies what effect abstaining (not voting) on the proposition will have (i.e. whether abstaining is considered a vote against it). This field is + * only populated for contests of type 'Referendum'. + */ + referendumEffectOfAbstain?: string; + /** The threshold of votes that the referendum needs in order to pass, e.g. "two-thirds". This field is only populated for contests of type 'Referendum'. */ + referendumPassageThreshold?: string; + /** A statement in favor of the referendum. It does not necessarily appear on the ballot. This field is only populated for contests of type 'Referendum'. */ + referendumProStatement?: string; + /** A brief description of the referendum. This field is only populated for contests of type 'Referendum'. */ + referendumSubtitle?: string; + /** The full text of the referendum. This field is only populated for contests of type 'Referendum'. */ + referendumText?: string; + /** The title of the referendum (e.g. 'Proposition 42'). This field is only populated for contests of type 'Referendum'. */ + referendumTitle?: string; + /** A link to the referendum. This field is only populated for contests of type 'Referendum'. */ + referendumUrl?: string; + /** The roles which this office fulfills. */ + roles?: string[]; + /** A list of sources for this contest. If multiple sources are listed, the data has been aggregated from those sources. */ + sources?: Source[]; + /** "Yes" or "No" depending on whether this a contest being held outside the normal election cycle. */ + special?: string; + /** + * The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with candidates. For referenda this will be 'Referendum'. For + * Retention contests this will typically be 'Retention'. + */ + type?: string; + } + interface ContextParams { + clientProfile?: string; + } + interface DivisionRepresentativeInfoRequest { + contextParams?: ContextParams; + } + interface DivisionSearchRequest { + contextParams?: ContextParams; + } + interface DivisionSearchResponse { + /** Identifies what kind of resource this is. Value: the fixed string "civicinfo#divisionSearchResponse". */ + kind?: string; + results?: DivisionSearchResult[]; + } + interface DivisionSearchResult { + /** + * Other Open Civic Data identifiers that refer to the same division -- for example, those that refer to other political divisions whose boundaries are + * defined to be coterminous with this one. For example, ocd-division/country:us/state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, + * since Wyoming has only one Congressional district. + */ + aliases?: string[]; + /** The name of the division. */ + name?: string; + /** The unique Open Civic Data identifier for this division. */ + ocdId?: string; + } + interface Election { + /** Day of the election in YYYY-MM-DD format. */ + electionDay?: string; + /** The unique ID of this election. */ + id?: string; + /** A displayable name for the election. */ + name?: string; + /** + * The political division of the election. Represented as an OCD Division ID. Voters within these political jurisdictions are covered by this election. + * This is typically a state such as ocd-division/country:us/state:ca or for the midterms or general election the entire US (i.e. + * ocd-division/country:us). + */ + ocdDivisionId?: string; + } + interface ElectionOfficial { + /** The email address of the election official. */ + emailAddress?: string; + /** The fax number of the election official. */ + faxNumber?: string; + /** The full name of the election official. */ + name?: string; + /** The office phone number of the election official. */ + officePhoneNumber?: string; + /** The title of the election official. */ + title?: string; + } + interface ElectionsQueryRequest { + contextParams?: ContextParams; + } + interface ElectionsQueryResponse { + /** A list of available elections */ + elections?: Election[]; + /** Identifies what kind of resource this is. Value: the fixed string "civicinfo#electionsQueryResponse". */ + kind?: string; + } + interface ElectoralDistrict { + /** An identifier for this district, relative to its scope. For example, the 34th State Senate district would have id "34" and a scope of stateUpper. */ + id?: string; + kgForeignKey?: string; + /** The name of the district. */ + name?: string; + /** + * The geographic scope of this district. If unspecified the district's geography is not known. One of: national, statewide, congressional, stateUpper, + * stateLower, countywide, judicial, schoolBoard, cityWide, township, countyCouncil, cityCouncil, ward, special + */ + scope?: string; + } + interface GeographicDivision { + /** + * Any other valid OCD IDs that refer to the same division. + * + * Because OCD IDs are meant to be human-readable and at least somewhat predictable, there are occasionally several identifiers for a single division. + * These identifiers are defined to be equivalent to one another, and one is always indicated as the primary identifier. The primary identifier will be + * returned in ocd_id above, and any other equivalent valid identifiers will be returned in this list. + * + * For example, if this division's OCD ID is ocd-division/country:us/district:dc, this will contain ocd-division/country:us/state:dc. + */ + alsoKnownAs?: string[]; + /** The name of the division. */ + name?: string; + /** + * List of indices in the offices array, one for each office elected from this division. Will only be present if includeOffices was true (or absent) in + * the request. + */ + officeIndices?: number[]; + } + interface Office { + /** The OCD ID of the division with which this office is associated. */ + divisionId?: string; + /** + * The levels of government of which this office is part. There may be more than one in cases where a jurisdiction effectively acts at two different + * levels of government; for example, the mayor of the District of Columbia acts at "locality" level, but also effectively at both "administrative-area-2" + * and "administrative-area-1". + */ + levels?: string[]; + /** The human-readable name of the office. */ + name?: string; + /** List of indices in the officials array of people who presently hold this office. */ + officialIndices?: number[]; + /** + * The roles which this office fulfills. Roles are not meant to be exhaustive, or to exactly specify the entire set of responsibilities of a given office, + * but are meant to be rough categories that are useful for general selection from or sorting of a list of offices. + */ + roles?: string[]; + /** A list of sources for this office. If multiple sources are listed, the data has been aggregated from those sources. */ + sources?: Source[]; + } + interface Official { + /** Addresses at which to contact the official. */ + address?: SimpleAddressType[]; + /** A list of known (social) media channels for this official. */ + channels?: Channel[]; + /** The direct email addresses for the official. */ + emails?: string[]; + /** The official's name. */ + name?: string; + /** The full name of the party the official belongs to. */ + party?: string; + /** The official's public contact phone numbers. */ + phones?: string[]; + /** A URL for a photo of the official. */ + photoUrl?: string; + /** The official's public website URLs. */ + urls?: string[]; + } + interface PollingLocation { + /** The address of the location. */ + address?: SimpleAddressType; + /** The last date that this early vote site or drop off location may be used. This field is not populated for polling locations. */ + endDate?: string; + /** + * An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested + * from the Request more link on the Quotas page. + */ + id?: string; + /** The name of the early vote site or drop off location. This field is not populated for polling locations. */ + name?: string; + /** Notes about this location (e.g. accessibility ramp or entrance to use). */ + notes?: string; + /** A description of when this location is open. */ + pollingHours?: string; + /** A list of sources for this location. If multiple sources are listed the data has been aggregated from those sources. */ + sources?: Source[]; + /** The first date that this early vote site or drop off location may be used. This field is not populated for polling locations. */ + startDate?: string; + /** The services provided by this early vote site or drop off location. This field is not populated for polling locations. */ + voterServices?: string; + } + interface PostalAddress { + addressLines?: string[]; + administrativeAreaName?: string; + countryName?: string; + countryNameCode?: string; + dependentLocalityName?: string; + dependentThoroughfareLeadingType?: string; + dependentThoroughfareName?: string; + dependentThoroughfarePostDirection?: string; + dependentThoroughfarePreDirection?: string; + dependentThoroughfareTrailingType?: string; + dependentThoroughfaresConnector?: string; + dependentThoroughfaresIndicator?: string; + dependentThoroughfaresType?: string; + firmName?: string; + isDisputed?: boolean; + languageCode?: string; + localityName?: string; + postBoxNumber?: string; + postalCodeNumber?: string; + postalCodeNumberExtension?: string; + premiseName?: string; + recipientName?: string; + sortingCode?: string; + subAdministrativeAreaName?: string; + subPremiseName?: string; + thoroughfareLeadingType?: string; + thoroughfareName?: string; + thoroughfareNumber?: string; + thoroughfarePostDirection?: string; + thoroughfarePreDirection?: string; + thoroughfareTrailingType?: string; + } + interface RepresentativeInfoData { + /** Political geographic divisions that contain the requested address. */ + divisions?: Record; + /** Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request. */ + offices?: Office[]; + /** Officials holding the offices listed above. Will only be present if includeOffices was true in the request. */ + officials?: Official[]; + } + interface RepresentativeInfoRequest { + contextParams?: ContextParams; + } + interface RepresentativeInfoResponse { + /** Political geographic divisions that contain the requested address. */ + divisions?: Record; + /** Identifies what kind of resource this is. Value: the fixed string "civicinfo#representativeInfoResponse". */ + kind?: string; + /** The normalized version of the requested address */ + normalizedInput?: SimpleAddressType; + /** Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request. */ + offices?: Office[]; + /** Officials holding the offices listed above. Will only be present if includeOffices was true in the request. */ + officials?: Official[]; + } + interface SimpleAddressType { + /** The city or town for the address. */ + city?: string; + /** The street name and number of this address. */ + line1?: string; + /** The second line the address, if needed. */ + line2?: string; + /** The third line of the address, if needed. */ + line3?: string; + /** The name of the location. */ + locationName?: string; + /** The US two letter state abbreviation of the address. */ + state?: string; + /** The US Postal Zip Code of the address. */ + zip?: string; + } + interface Source { + /** The name of the data source. */ + name?: string; + /** Whether this data comes from an official government source. */ + official?: boolean; + } + interface VoterInfoRequest { + contextParams?: ContextParams; + voterInfoSegmentResult?: VoterInfoSegmentResult; + } + interface VoterInfoResponse { + /** Contests that will appear on the voter's ballot. */ + contests?: Contest[]; + /** + * Locations where a voter is eligible to drop off a completed ballot. The voter must have received and completed a ballot prior to arriving at the + * location. The location may not have ballots available on the premises. These locations could be open on or before election day as indicated in the + * pollingHours field. + */ + dropOffLocations?: PollingLocation[]; + /** Locations where the voter is eligible to vote early, prior to election day. */ + earlyVoteSites?: PollingLocation[]; + /** The election that was queried. */ + election?: Election; + /** Identifies what kind of resource this is. Value: the fixed string "civicinfo#voterInfoResponse". */ + kind?: string; + /** Specifies whether voters in the precinct vote only by mailing their ballots (with the possible option of dropping off their ballots as well). */ + mailOnly?: boolean; + /** The normalized version of the requested address */ + normalizedInput?: SimpleAddressType; + /** + * If no election ID was specified in the query, and there was more than one election with data for the given voter, this will contain information about + * the other elections that could apply. + */ + otherElections?: Election[]; + /** Locations where the voter is eligible to vote on election day. */ + pollingLocations?: PollingLocation[]; + precinctId?: string; + /** Local Election Information for the state that the voter votes in. For the US, there will only be one element in this array. */ + state?: AdministrationRegion[]; + } + interface VoterInfoSegmentResult { + generatedMillis?: string; + postalAddress?: PostalAddress; + request?: VoterInfoRequest; + response?: VoterInfoResponse; + } + interface DivisionsResource { + /** Searches for political divisions by their natural name or OCD ID. */ + search(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required + * patterns. In addition to that, most query operators of the Apache Lucene library are supported. See + * http://lucene.apache.org/core/2_9_4/queryparsersyntax.html + */ + query?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ElectionsResource { + /** List of available elections to query. */ + electionQuery(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Looks up information relevant to a voter based on the voter's registered address. */ + voterInfoQuery(request: { + /** The registered address of the voter to look up. */ + address: string; + /** Data format for the response. */ + alt?: string; + /** The unique ID of the election to look up. A list of election IDs can be obtained at https://www.googleapis.com/civicinfo/{version}/elections */ + electionId?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** If set to true, only data from official state sources will be returned. */ + officialOnly?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * If set to true, the query will return the success codeand include any partial information when it is unable to determine a matching address or unable + * to determine the election for electionId=0 queries. + */ + returnAllAvailableData?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RepresentativesResource { + /** Looks up political geography and representative information for a single address. */ + representativeInfoByAddress(request: { + /** The address to look up. May only be specified if the field ocdId is not given in the URL. */ + address?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether to return information about offices and officials. If false, only the top-level district information will be returned. */ + includeOffices?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching + * office will not be returned. + */ + levels?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will + * not be returned. + */ + roles?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Looks up representative information for a single geographic division. */ + representativeInfoByDivision(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching + * office will not be returned. + */ + levels?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The Open Civic Data division identifier of the division to look up. */ + ocdId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * If true, information about all divisions contained in the division requested will be included as well. For example, if querying + * ocd-division/country:us/district:dc, this would also return all DC's wards and ANCs. + */ + recursive?: boolean; + /** + * A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will + * not be returned. + */ + roles?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.civicinfo/readme.md b/types/gapi.client.civicinfo/readme.md new file mode 100644 index 0000000000..a423c2345f --- /dev/null +++ b/types/gapi.client.civicinfo/readme.md @@ -0,0 +1,60 @@ +# TypeScript typings for Google Civic Information API v2 +Provides polling places, early vote locations, contest data, election officials, and government representatives for U.S. residential addresses. +For detailed description please check [documentation](https://developers.google.com/civic-information). + +## Installing + +Install typings for Google Civic Information API: +``` +npm install @types/gapi.client.civicinfo@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('civicinfo', 'v2', () => { + // now we can use gapi.client.civicinfo + // ... +}); +``` + + + +After that you can use Google Civic Information API resources: + +```typescript + +/* +Searches for political divisions by their natural name or OCD ID. +*/ +await gapi.client.divisions.search({ }); + +/* +List of available elections to query. +*/ +await gapi.client.elections.electionQuery({ }); + +/* +Looks up information relevant to a voter based on the voter's registered address. +*/ +await gapi.client.elections.voterInfoQuery({ address: "address", }); + +/* +Looks up political geography and representative information for a single address. +*/ +await gapi.client.representatives.representativeInfoByAddress({ }); + +/* +Looks up representative information for a single geographic division. +*/ +await gapi.client.representatives.representativeInfoByDivision({ ocdId: "ocdId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.civicinfo/tsconfig.json b/types/gapi.client.civicinfo/tsconfig.json new file mode 100644 index 0000000000..6c3ced88c9 --- /dev/null +++ b/types/gapi.client.civicinfo/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.civicinfo-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.civicinfo/tslint.json b/types/gapi.client.civicinfo/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.civicinfo/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.classroom/gapi.client.classroom-tests.ts b/types/gapi.client.classroom/gapi.client.classroom-tests.ts new file mode 100644 index 0000000000..08cbd4f585 --- /dev/null +++ b/types/gapi.client.classroom/gapi.client.classroom-tests.ts @@ -0,0 +1,286 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('classroom', 'v1', () => { + /** now we can use gapi.client.classroom */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage announcements in Google Classroom */ + 'https://www.googleapis.com/auth/classroom.announcements', + /** View announcements in Google Classroom */ + 'https://www.googleapis.com/auth/classroom.announcements.readonly', + /** Manage your Google Classroom classes */ + 'https://www.googleapis.com/auth/classroom.courses', + /** View your Google Classroom classes */ + 'https://www.googleapis.com/auth/classroom.courses.readonly', + /** Manage your course work and view your grades in Google Classroom */ + 'https://www.googleapis.com/auth/classroom.coursework.me', + /** View your course work and grades in Google Classroom */ + 'https://www.googleapis.com/auth/classroom.coursework.me.readonly', + /** Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer */ + 'https://www.googleapis.com/auth/classroom.coursework.students', + /** View course work and grades for students in the Google Classroom classes you teach or administer */ + 'https://www.googleapis.com/auth/classroom.coursework.students.readonly', + /** View your Google Classroom guardians */ + 'https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly', + /** View and manage guardians for students in your Google Classroom classes */ + 'https://www.googleapis.com/auth/classroom.guardianlinks.students', + /** View guardians for students in your Google Classroom classes */ + 'https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly', + /** View the email addresses of people in your classes */ + 'https://www.googleapis.com/auth/classroom.profile.emails', + /** View the profile photos of people in your classes */ + 'https://www.googleapis.com/auth/classroom.profile.photos', + /** Manage your Google Classroom class rosters */ + 'https://www.googleapis.com/auth/classroom.rosters', + /** View your Google Classroom class rosters */ + 'https://www.googleapis.com/auth/classroom.rosters.readonly', + /** View your course work and grades in Google Classroom */ + 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly', + /** View course work and grades for students in the Google Classroom classes you teach or administer */ + 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Creates a course. + * + * The user specified in `ownerId` is the owner of the created course + * and added as a teacher. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to create + * courses or for access errors. + * * `NOT_FOUND` if the primary teacher is not a valid user. + * * `FAILED_PRECONDITION` if the course owner's account is disabled or for + * the following request errors: + * * UserGroupsMembershipLimitReached + * * `ALREADY_EXISTS` if an alias was specified in the `id` and + * already exists. + */ + await gapi.client.courses.create({ + }); + /** + * Deletes a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + */ + await gapi.client.courses.delete({ + id: "id", + }); + /** + * Returns a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + */ + await gapi.client.courses.get({ + id: "id", + }); + /** + * Returns a list of courses that the requesting user is permitted to view, + * restricted to those that match the request. Returned courses are ordered by + * creation time, with the most recently created coming first. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` for access errors. + * * `INVALID_ARGUMENT` if the query argument is malformed. + * * `NOT_FOUND` if any users specified in the query arguments do not exist. + */ + await gapi.client.courses.list({ + courseStates: "courseStates", + pageSize: 2, + pageToken: "pageToken", + studentId: "studentId", + teacherId: "teacherId", + }); + /** + * Updates one or more fields in a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + * * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or + * if no update mask is supplied. + * * `FAILED_PRECONDITION` for the following request errors: + * * CourseNotModifiable + */ + await gapi.client.courses.patch({ + id: "id", + updateMask: "updateMask", + }); + /** + * Updates a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + * * `FAILED_PRECONDITION` for the following request errors: + * * CourseNotModifiable + */ + await gapi.client.courses.update({ + id: "id", + }); + /** + * Accepts an invitation, removing it and adding the invited user to the + * teachers or students (as appropriate) of the specified course. Only the + * invited user may accept an invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to accept the + * requested invitation or for access errors. + * * `FAILED_PRECONDITION` for the following request errors: + * * CourseMemberLimitReached + * * CourseNotModifiable + * * CourseTeacherLimitReached + * * UserGroupsMembershipLimitReached + * * `NOT_FOUND` if no invitation exists with the requested ID. + */ + await gapi.client.invitations.accept({ + id: "id", + }); + /** + * Creates an invitation. Only one invitation for a user and course may exist + * at a time. Delete and re-create an invitation to make changes. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to create + * invitations for this course or for access errors. + * * `NOT_FOUND` if the course or the user does not exist. + * * `FAILED_PRECONDITION` if the requested user's account is disabled or if + * the user already has this role or a role with greater permissions. + * * `ALREADY_EXISTS` if an invitation for the specified user and course + * already exists. + */ + await gapi.client.invitations.create({ + }); + /** + * Deletes an invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + * requested invitation or for access errors. + * * `NOT_FOUND` if no invitation exists with the requested ID. + */ + await gapi.client.invitations.delete({ + id: "id", + }); + /** + * Returns an invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to view the + * requested invitation or for access errors. + * * `NOT_FOUND` if no invitation exists with the requested ID. + */ + await gapi.client.invitations.get({ + id: "id", + }); + /** + * Returns a list of invitations that the requesting user is permitted to + * view, restricted to those that match the list request. + * + * *Note:* At least one of `user_id` or `course_id` must be supplied. Both + * fields can be supplied. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` for access errors. + */ + await gapi.client.invitations.list({ + courseId: "courseId", + pageSize: 2, + pageToken: "pageToken", + userId: "userId", + }); + /** + * Creates a `Registration`, causing Classroom to start sending notifications + * from the provided `feed` to the provided `destination`. + * + * Returns the created `Registration`. Currently, this will be the same as + * the argument, but with server-assigned fields such as `expiry_time` and + * `id` filled in. + * + * Note that any value specified for the `expiry_time` or `id` fields will be + * ignored. + * + * While Classroom may validate the `destination` and return errors on a best + * effort basis, it is the caller's responsibility to ensure that it exists + * and that Classroom has permission to publish to it. + * + * This method may return the following error codes: + * + * * `PERMISSION_DENIED` if: + * * the authenticated user does not have permission to receive + * notifications from the requested field; or + * * the credential provided does not include the appropriate scope for the + * requested feed. + * * another access error is encountered. + * * `INVALID_ARGUMENT` if: + * * no `destination` is specified, or the specified `destination` is not + * valid; or + * * no `feed` is specified, or the specified `feed` is not valid. + * * `NOT_FOUND` if: + * * the specified `feed` cannot be located, or the requesting user does not + * have permission to determine whether or not it exists; or + * * the specified `destination` cannot be located, or Classroom has not + * been granted permission to publish to it. + */ + await gapi.client.registrations.create({ + }); + /** + * Deletes a `Registration`, causing Classroom to stop sending notifications + * for that `Registration`. + */ + await gapi.client.registrations.delete({ + registrationId: "registrationId", + }); + /** + * Returns a user profile. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access + * this user profile, if no profile exists with the requested ID, or for + * access errors. + */ + await gapi.client.userProfiles.get({ + userId: "userId", + }); + } +}); diff --git a/types/gapi.client.classroom/index.d.ts b/types/gapi.client.classroom/index.d.ts new file mode 100644 index 0000000000..68e2679cad --- /dev/null +++ b/types/gapi.client.classroom/index.d.ts @@ -0,0 +1,4039 @@ +// Type definitions for Google Google Classroom API v1 1.0 +// Project: https://developers.google.com/classroom/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://classroom.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Classroom API v1 */ + function load(name: "classroom", version: "v1"): PromiseLike; + function load(name: "classroom", version: "v1", callback: () => any): void; + + const courses: classroom.CoursesResource; + + const invitations: classroom.InvitationsResource; + + const registrations: classroom.RegistrationsResource; + + const userProfiles: classroom.UserProfilesResource; + + namespace classroom { + interface Announcement { + /** + * Absolute link to this announcement in the Classroom web UI. + * This is only populated if `state` is `PUBLISHED`. + * + * Read-only. + */ + alternateLink?: string; + /** + * Assignee mode of the announcement. + * If unspecified, the default value is `ALL_STUDENTS`. + */ + assigneeMode?: string; + /** + * Identifier of the course. + * + * Read-only. + */ + courseId?: string; + /** + * Timestamp when this announcement was created. + * + * Read-only. + */ + creationTime?: string; + /** + * Identifier for the user that created the announcement. + * + * Read-only. + */ + creatorUserId?: string; + /** + * Classroom-assigned identifier of this announcement, unique per course. + * + * Read-only. + */ + id?: string; + /** + * Identifiers of students with access to the announcement. + * This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. + * If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this + * field will be able to see the announcement. + */ + individualStudentsOptions?: IndividualStudentsOptions; + /** + * Additional materials. + * + * Announcements must have no more than 20 material items. + */ + materials?: Material[]; + /** Optional timestamp when this announcement is scheduled to be published. */ + scheduledTime?: string; + /** + * Status of this announcement. + * If unspecified, the default state is `DRAFT`. + */ + state?: string; + /** + * Description of this announcement. + * The text must be a valid UTF-8 string containing no more + * than 30,000 characters. + */ + text?: string; + /** + * Timestamp of the most recent change to this announcement. + * + * Read-only. + */ + updateTime?: string; + } + interface Assignment { + /** + * Drive folder where attachments from student submissions are placed. + * This is only populated for course teachers and administrators. + */ + studentWorkFolder?: DriveFolder; + } + interface AssignmentSubmission { + /** + * Attachments added by the student. + * Drive files that correspond to materials with a share mode of + * STUDENT_COPY may not exist yet if the student has not accessed the + * assignment in Classroom. + * + * Some attachment metadata is only populated if the requesting user has + * permission to access it. Identifier and alternate_link fields are always + * available, but others (e.g. title) may not be. + */ + attachments?: Attachment[]; + } + interface Attachment { + /** Google Drive file attachment. */ + driveFile?: DriveFile; + /** Google Forms attachment. */ + form?: Form; + /** Link attachment. */ + link?: Link; + /** Youtube video attachment. */ + youTubeVideo?: YouTubeVideo; + } + interface CloudPubsubTopic { + /** + * The `name` field of a Cloud Pub/Sub + * [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic). + */ + topicName?: string; + } + interface Course { + /** + * Absolute link to this course in the Classroom web UI. + * + * Read-only. + */ + alternateLink?: string; + /** + * The Calendar ID for a calendar that all course members can see, to which + * Classroom adds events for course work and announcements in the course. + * + * Read-only. + */ + calendarId?: string; + /** + * The email address of a Google group containing all members of the course. + * This group does not accept email and can only be used for permissions. + * + * Read-only. + */ + courseGroupEmail?: string; + /** + * Sets of materials that appear on the "about" page of this course. + * + * Read-only. + */ + courseMaterialSets?: CourseMaterialSet[]; + /** + * State of the course. + * If unspecified, the default state is `PROVISIONED`. + */ + courseState?: string; + /** + * Creation time of the course. + * Specifying this field in a course update mask results in an error. + * + * Read-only. + */ + creationTime?: string; + /** + * Optional description. + * For example, "We'll be learning about the structure of living + * creatures from a combination of textbooks, guest lectures, and lab work. + * Expect to be excited!" + * If set, this field must be a valid UTF-8 string and no longer than 30,000 + * characters. + */ + description?: string; + /** + * Optional heading for the description. + * For example, "Welcome to 10th Grade Biology." + * If set, this field must be a valid UTF-8 string and no longer than 3600 + * characters. + */ + descriptionHeading?: string; + /** + * Enrollment code to use when joining this course. + * Specifying this field in a course update mask results in an error. + * + * Read-only. + */ + enrollmentCode?: string; + /** + * Whether or not guardian notifications are enabled for this course. + * + * Read-only. + */ + guardiansEnabled?: boolean; + /** + * Identifier for this course assigned by Classroom. + * + * When + * creating a course, + * you may optionally set this identifier to an + * alias string in the + * request to create a corresponding alias. The `id` is still assigned by + * Classroom and cannot be updated after the course is created. + * + * Specifying this field in a course update mask results in an error. + */ + id?: string; + /** + * Name of the course. + * For example, "10th Grade Biology". + * The name is required. It must be between 1 and 750 characters and a valid + * UTF-8 string. + */ + name?: string; + /** + * The identifier of the owner of a course. + * + * When specified as a parameter of a + * create course request, this + * field is required. + * The identifier can be one of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + * + * This must be set in a create request. Admins can also specify this field + * in a patch course request to + * transfer ownership. In other contexts, it is read-only. + */ + ownerId?: string; + /** + * Optional room location. + * For example, "301". + * If set, this field must be a valid UTF-8 string and no longer than 650 + * characters. + */ + room?: string; + /** + * Section of the course. + * For example, "Period 2". + * If set, this field must be a valid UTF-8 string and no longer than 2800 + * characters. + */ + section?: string; + /** + * Information about a Drive Folder that is shared with all teachers of the + * course. + * + * This field will only be set for teachers of the course and domain administrators. + * + * Read-only. + */ + teacherFolder?: DriveFolder; + /** + * The email address of a Google group containing all teachers of the course. + * This group does not accept email and can only be used for permissions. + * + * Read-only. + */ + teacherGroupEmail?: string; + /** + * Time of the most recent update to this course. + * Specifying this field in a course update mask results in an error. + * + * Read-only. + */ + updateTime?: string; + } + interface CourseAlias { + /** + * Alias string. The format of the string indicates the desired alias scoping. + * + * * `d:` indicates a domain-scoped alias. + * Example: `d:math_101` + * * `p:` indicates a project-scoped alias. + * Example: `p:abc123` + * + * This field has a maximum length of 256 characters. + */ + alias?: string; + } + interface CourseMaterial { + /** Google Drive file attachment. */ + driveFile?: DriveFile; + /** Google Forms attachment. */ + form?: Form; + /** Link atatchment. */ + link?: Link; + /** Youtube video attachment. */ + youTubeVideo?: YouTubeVideo; + } + interface CourseMaterialSet { + /** Materials attached to this set. */ + materials?: CourseMaterial[]; + /** Title for this set. */ + title?: string; + } + interface CourseRosterChangesInfo { + /** The `course_id` of the course to subscribe to roster changes for. */ + courseId?: string; + } + interface CourseWork { + /** + * Absolute link to this course work in the Classroom web UI. + * This is only populated if `state` is `PUBLISHED`. + * + * Read-only. + */ + alternateLink?: string; + /** + * Assignee mode of the coursework. + * If unspecified, the default value is `ALL_STUDENTS`. + */ + assigneeMode?: string; + /** + * Assignment details. + * This is populated only when `work_type` is `ASSIGNMENT`. + * + * Read-only. + */ + assignment?: Assignment; + /** + * Whether this course work item is associated with the Developer Console + * project making the request. + * + * See google.classroom.Work.CreateCourseWork for more + * details. + * + * Read-only. + */ + associatedWithDeveloper?: boolean; + /** + * Identifier of the course. + * + * Read-only. + */ + courseId?: string; + /** + * Timestamp when this course work was created. + * + * Read-only. + */ + creationTime?: string; + /** + * Identifier for the user that created the coursework. + * + * Read-only. + */ + creatorUserId?: string; + /** + * Optional description of this course work. + * If set, the description must be a valid UTF-8 string containing no more + * than 30,000 characters. + */ + description?: string; + /** + * Optional date, in UTC, that submissions for this this course work are due. + * This must be specified if `due_time` is specified. + */ + dueDate?: Date; + /** + * Optional time of day, in UTC, that submissions for this this course work + * are due. + * This must be specified if `due_date` is specified. + */ + dueTime?: TimeOfDay; + /** + * Classroom-assigned identifier of this course work, unique per course. + * + * Read-only. + */ + id?: string; + /** + * Identifiers of students with access to the coursework. + * This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. + * If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students + * specified in this field will be assigned the coursework. + */ + individualStudentsOptions?: IndividualStudentsOptions; + /** + * Additional materials. + * + * CourseWork must have no more than 20 material items. + */ + materials?: Material[]; + /** + * Maximum grade for this course work. + * If zero or unspecified, this assignment is considered ungraded. + * This must be a non-negative integer value. + */ + maxPoints?: number; + /** + * Multiple choice question details. + * For read operations, this field is populated only when `work_type` is + * `MULTIPLE_CHOICE_QUESTION`. + * For write operations, this field must be specified when creating course + * work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be + * set otherwise. + */ + multipleChoiceQuestion?: MultipleChoiceQuestion; + /** Optional timestamp when this course work is scheduled to be published. */ + scheduledTime?: string; + /** + * Status of this course work. + * If unspecified, the default state is `DRAFT`. + */ + state?: string; + /** + * Setting to determine when students are allowed to modify submissions. + * If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. + */ + submissionModificationMode?: string; + /** + * Title of this course work. + * The title must be a valid UTF-8 string containing between 1 and 3000 + * characters. + */ + title?: string; + /** + * Timestamp of the most recent change to this course work. + * + * Read-only. + */ + updateTime?: string; + /** + * Type of this course work. + * + * The type is set when the course work is created and cannot be changed. + */ + workType?: string; + } + interface 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. */ + month?: number; + /** + * Year of date. Must be from 1 to 9999, or 0 if specifying a date without + * a year. + */ + year?: number; + } + interface DriveFile { + /** + * URL that can be used to access the Drive item. + * + * Read-only. + */ + alternateLink?: string; + /** Drive API resource ID. */ + id?: string; + /** + * URL of a thumbnail image of the Drive item. + * + * Read-only. + */ + thumbnailUrl?: string; + /** + * Title of the Drive item. + * + * Read-only. + */ + title?: string; + } + interface DriveFolder { + /** + * URL that can be used to access the Drive folder. + * + * Read-only. + */ + alternateLink?: string; + /** Drive API resource ID. */ + id?: string; + /** + * Title of the Drive folder. + * + * Read-only. + */ + title?: string; + } + interface Feed { + /** + * Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. + * This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`. + */ + courseRosterChangesInfo?: CourseRosterChangesInfo; + /** The type of feed. */ + feedType?: string; + } + interface Form { + /** URL of the form. */ + formUrl?: string; + /** + * URL of the form responses document. + * Only set if respsonses have been recorded and only when the + * requesting user is an editor of the form. + * + * Read-only. + */ + responseUrl?: string; + /** + * URL of a thumbnail image of the Form. + * + * Read-only. + */ + thumbnailUrl?: string; + /** + * Title of the Form. + * + * Read-only. + */ + title?: string; + } + interface GlobalPermission { + /** Permission value. */ + permission?: string; + } + interface GradeHistory { + /** The teacher who made the grade change. */ + actorUserId?: string; + /** The type of grade change at this time in the submission grade history. */ + gradeChangeType?: string; + /** When the grade of the submission was changed. */ + gradeTimestamp?: string; + /** + * The denominator of the grade at this time in the submission grade + * history. + */ + maxPoints?: number; + /** The numerator of the grade at this time in the submission grade history. */ + pointsEarned?: number; + } + interface Guardian { + /** Identifier for the guardian. */ + guardianId?: string; + /** User profile for the guardian. */ + guardianProfile?: UserProfile; + /** + * The email address to which the initial guardian invitation was sent. + * This field is only visible to domain administrators. + */ + invitedEmailAddress?: string; + /** Identifier for the student to whom the guardian relationship applies. */ + studentId?: string; + } + interface GuardianInvitation { + /** + * The time that this invitation was created. + * + * Read-only. + */ + creationTime?: string; + /** + * Unique identifier for this invitation. + * + * Read-only. + */ + invitationId?: string; + /** + * Email address that the invitation was sent to. + * This field is only visible to domain administrators. + */ + invitedEmailAddress?: string; + /** The state that this invitation is in. */ + state?: string; + /** ID of the student (in standard format) */ + studentId?: string; + } + interface IndividualStudentsOptions { + /** + * Identifiers for the students that have access to the + * coursework/announcement. + */ + studentIds?: string[]; + } + interface Invitation { + /** Identifier of the course to invite the user to. */ + courseId?: string; + /** + * Identifier assigned by Classroom. + * + * Read-only. + */ + id?: string; + /** + * Role to invite the user to have. + * Must not be `COURSE_ROLE_UNSPECIFIED`. + */ + role?: string; + /** + * Identifier of the invited user. + * + * When specified as a parameter of a request, this identifier can be set to + * one of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId?: string; + } + interface Link { + /** + * URL of a thumbnail image of the target URL. + * + * Read-only. + */ + thumbnailUrl?: string; + /** + * Title of the target of the URL. + * + * Read-only. + */ + title?: string; + /** + * URL to link to. + * This must be a valid UTF-8 string containing between 1 and 2024 characters. + */ + url?: string; + } + interface ListAnnouncementsResponse { + /** Announcement items that match the request. */ + announcements?: Announcement[]; + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + } + interface ListCourseAliasesResponse { + /** The course aliases. */ + aliases?: CourseAlias[]; + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + } + interface ListCourseWorkResponse { + /** Course work items that match the request. */ + courseWork?: CourseWork[]; + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + } + interface ListCoursesResponse { + /** Courses that match the list request. */ + courses?: Course[]; + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + } + interface ListGuardianInvitationsResponse { + /** Guardian invitations that matched the list request. */ + guardianInvitations?: GuardianInvitation[]; + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + } + interface ListGuardiansResponse { + /** + * Guardians on this page of results that met the criteria specified in + * the request. + */ + guardians?: Guardian[]; + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + } + interface ListInvitationsResponse { + /** Invitations that match the list request. */ + invitations?: Invitation[]; + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + } + interface ListStudentSubmissionsResponse { + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + /** Student work that matches the request. */ + studentSubmissions?: StudentSubmission[]; + } + interface ListStudentsResponse { + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + /** Students who match the list request. */ + students?: Student[]; + } + interface ListTeachersResponse { + /** + * Token identifying the next page of results to return. If empty, no further + * results are available. + */ + nextPageToken?: string; + /** Teachers who match the list request. */ + teachers?: Teacher[]; + } + interface Material { + /** Google Drive file material. */ + driveFile?: SharedDriveFile; + /** Google Forms material. */ + form?: Form; + /** + * Link material. On creation, will be upgraded to a more appropriate type + * if possible, and this will be reflected in the response. + */ + link?: Link; + /** YouTube video material. */ + youtubeVideo?: YouTubeVideo; + } + interface ModifyAnnouncementAssigneesRequest { + /** + * Mode of the announcement describing whether it will be accessible by all + * students or specified individual students. + */ + assigneeMode?: string; + /** + * Set which students can view or cannot view the announcement. + * Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. + */ + modifyIndividualStudentsOptions?: ModifyIndividualStudentsOptions; + } + interface ModifyAttachmentsRequest { + /** + * Attachments to add. + * A student submission may not have more than 20 attachments. + * + * Form attachments are not supported. + */ + addAttachments?: Attachment[]; + } + interface ModifyCourseWorkAssigneesRequest { + /** + * Mode of the coursework describing whether it will be assigned to all + * students or specified individual students. + */ + assigneeMode?: string; + /** + * Set which students are assigned or not assigned to the coursework. + * Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. + */ + modifyIndividualStudentsOptions?: ModifyIndividualStudentsOptions; + } + interface ModifyIndividualStudentsOptions { + /** + * Ids of students to be added as having access to this + * coursework/announcement. + */ + addStudentIds?: string[]; + /** + * Ids of students to be removed from having access to this + * coursework/announcement. + */ + removeStudentIds?: string[]; + } + interface MultipleChoiceQuestion { + /** Possible choices. */ + choices?: string[]; + } + interface MultipleChoiceSubmission { + /** Student's select choice. */ + answer?: string; + } + interface Name { + /** + * The user's last name. + * + * Read-only. + */ + familyName?: string; + /** + * The user's full name formed by concatenating the first and last name + * values. + * + * Read-only. + */ + fullName?: string; + /** + * The user's first name. + * + * Read-only. + */ + givenName?: string; + } + interface Registration { + /** The Cloud Pub/Sub topic that notifications are to be sent to. */ + cloudPubsubTopic?: CloudPubsubTopic; + /** + * The time until which the `Registration` is effective. + * + * This is a read-only field assigned by the server. + */ + expiryTime?: string; + /** + * Specification for the class of notifications that Classroom should deliver + * to the `destination`. + */ + feed?: Feed; + /** + * A server-generated unique identifier for this `Registration`. + * + * Read-only. + */ + registrationId?: string; + } + interface SharedDriveFile { + /** Drive file details. */ + driveFile?: DriveFile; + /** Mechanism by which students access the Drive item. */ + shareMode?: string; + } + interface ShortAnswerSubmission { + /** Student response to a short-answer question. */ + answer?: string; + } + interface StateHistory { + /** The teacher or student who made the change */ + actorUserId?: string; + /** The workflow pipeline stage. */ + state?: string; + /** When the submission entered this state. */ + stateTimestamp?: string; + } + interface Student { + /** + * Identifier of the course. + * + * Read-only. + */ + courseId?: string; + /** + * Global user information for the student. + * + * Read-only. + */ + profile?: UserProfile; + /** + * Information about a Drive Folder for this student's work in this course. + * Only visible to the student and domain administrators. + * + * Read-only. + */ + studentWorkFolder?: DriveFolder; + /** + * Identifier of the user. + * + * When specified as a parameter of a request, this identifier can be one of + * the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId?: string; + } + interface StudentSubmission { + /** + * Absolute link to the submission in the Classroom web UI. + * + * Read-only. + */ + alternateLink?: string; + /** + * Optional grade. If unset, no grade was set. + * This value must be non-negative. Decimal (i.e. non-integer) values are + * allowed, but will be rounded to two decimal places. + * + * This may be modified only by course teachers. + */ + assignedGrade?: number; + /** + * Submission content when course_work_type is ASSIGNMENT. + * + * Students can modify this content using + * google.classroom.Work.ModifyAttachments. + */ + assignmentSubmission?: AssignmentSubmission; + /** + * Whether this student submission is associated with the Developer Console + * project making the request. + * + * See google.classroom.Work.CreateCourseWork for more + * details. + * + * Read-only. + */ + associatedWithDeveloper?: boolean; + /** + * Identifier of the course. + * + * Read-only. + */ + courseId?: string; + /** + * Identifier for the course work this corresponds to. + * + * Read-only. + */ + courseWorkId?: string; + /** + * Type of course work this submission is for. + * + * Read-only. + */ + courseWorkType?: string; + /** + * Creation time of this submission. + * This may be unset if the student has not accessed this item. + * + * Read-only. + */ + creationTime?: string; + /** + * Optional pending grade. If unset, no grade was set. + * This value must be non-negative. Decimal (i.e. non-integer) values are + * allowed, but will be rounded to two decimal places. + * + * This is only visible to and modifiable by course teachers. + */ + draftGrade?: number; + /** + * Classroom-assigned Identifier for the student submission. + * This is unique among submissions for the relevant course work. + * + * Read-only. + */ + id?: string; + /** + * Whether this submission is late. + * + * Read-only. + */ + late?: boolean; + /** Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. */ + multipleChoiceSubmission?: MultipleChoiceSubmission; + /** Submission content when course_work_type is SHORT_ANSWER_QUESTION. */ + shortAnswerSubmission?: ShortAnswerSubmission; + /** + * State of this submission. + * + * Read-only. + */ + state?: string; + /** + * The history of the submission (includes state and grade histories). + * + * Read-only. + */ + submissionHistory?: SubmissionHistory[]; + /** + * Last update time of this submission. + * This may be unset if the student has not accessed this item. + * + * Read-only. + */ + updateTime?: string; + /** + * Identifier for the student that owns this submission. + * + * Read-only. + */ + userId?: string; + } + interface SubmissionHistory { + /** The grade history information of the submission, if present. */ + gradeHistory?: GradeHistory; + /** The state history information of the submission, if present. */ + stateHistory?: StateHistory; + } + interface Teacher { + /** + * Identifier of the course. + * + * Read-only. + */ + courseId?: string; + /** + * Global user information for the teacher. + * + * Read-only. + */ + profile?: UserProfile; + /** + * Identifier of the user. + * + * When specified as a parameter of a request, this identifier can be one of + * the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId?: string; + } + interface TimeOfDay { + /** + * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + * to allow the value "24:00:00" for scenarios like business closing time. + */ + hours?: number; + /** Minutes of hour of day. Must be from 0 to 59. */ + minutes?: number; + /** Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. */ + nanos?: number; + /** + * Seconds of minutes of the time. Must normally be from 0 to 59. An API may + * allow the value 60 if it allows leap-seconds. + */ + seconds?: number; + } + interface UserProfile { + /** + * Email address of the user. + * + * Read-only. + */ + emailAddress?: string; + /** + * Identifier of the user. + * + * Read-only. + */ + id?: string; + /** + * Name of the user. + * + * Read-only. + */ + name?: Name; + /** + * Global permissions of the user. + * + * Read-only. + */ + permissions?: GlobalPermission[]; + /** + * URL of user's profile photo. + * + * Read-only. + */ + photoUrl?: string; + /** + * Represents whether a G Suite for Education user's domain administrator has + * explicitly verified them as being a teacher. If the user is not a member of + * a G Suite for Education domain, than this field will always be false. + * + * Read-only + */ + verifiedTeacher?: boolean; + } + interface YouTubeVideo { + /** + * URL that can be used to view the YouTube video. + * + * Read-only. + */ + alternateLink?: string; + /** YouTube API resource ID. */ + id?: string; + /** + * URL of a thumbnail image of the YouTube video. + * + * Read-only. + */ + thumbnailUrl?: string; + /** + * Title of the YouTube video. + * + * Read-only. + */ + title?: string; + } + interface AliasesResource { + /** + * Creates an alias for a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to create the + * alias or for access errors. + * * `NOT_FOUND` if the course does not exist. + * * `ALREADY_EXISTS` if the alias already exists. + * * `FAILED_PRECONDITION` if the alias requested does not make sense for the + * requesting user or course (for example, if a user not in a domain + * attempts to access a domain-scoped alias). + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course to alias. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes an alias of a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to remove the + * alias or for access errors. + * * `NOT_FOUND` if the alias does not exist. + * * `FAILED_PRECONDITION` if the alias requested does not make sense for the + * requesting user or course (for example, if a user not in a domain + * attempts to delete a domain-scoped alias). + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * Alias to delete. + * This may not be the Classroom-assigned identifier. + */ + alias: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course whose alias should be deleted. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Returns a list of aliases for a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * course or for access errors. + * * `NOT_FOUND` if the course does not exist. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero or unspecified indicates that the + * server may assign a maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, + * indicating that the subsequent page of results should be returned. + * + * The list request + * must be otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface AnnouncementsResource { + /** + * Creates an announcement. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course, create announcements in the requested course, share a + * Drive attachment, or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course does not exist. + * * `FAILED_PRECONDITION` for the following request error: + * * AttachmentNotVisible + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes an announcement. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding announcement item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting developer project did not create + * the corresponding announcement, if the requesting user is not permitted + * to delete the requested course or for access errors. + * * `FAILED_PRECONDITION` if the requested announcement has already been + * deleted. + * * `NOT_FOUND` if no course exists with the requested ID. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Identifier of the announcement to delete. + * This identifier is a Classroom-assigned identifier. + */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Returns an announcement. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or announcement, or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course or announcement does not exist. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the announcement. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a list of announcements that the requester is permitted to view. + * + * Course students may only view `PUBLISHED` announcements. Course teachers + * and domain administrators may view all announcements. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access + * the requested course or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course does not exist. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** + * Restriction on the `state` of announcements returned. + * If this argument is left unspecified, the default value is `PUBLISHED`. + */ + announcementStates?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Optional sort ordering for results. A comma-separated list of fields with + * an optional sort direction keyword. Supported field is `updateTime`. + * Supported direction keywords are `asc` and `desc`. + * If not specified, `updateTime desc` is the default behavior. + * Examples: `updateTime asc`, `updateTime` + */ + orderBy?: string; + /** + * Maximum number of items to return. Zero or unspecified indicates that the + * server may assign a maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, + * indicating that the subsequent page of results should be returned. + * + * The list request + * must be otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Modifies assignee mode and options of an announcement. + * + * Only a teacher of the course that contains the announcement may + * call this method. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course or course work does not exist. + */ + modifyAssignees(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the announcement. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates one or more fields of an announcement. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting developer project did not create + * the corresponding announcement or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `FAILED_PRECONDITION` if the requested announcement has already been + * deleted. + * * `NOT_FOUND` if the requested course or announcement does not exist + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the announcement. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Mask that identifies which fields on the announcement to update. + * This field is required to do an update. The update fails if invalid + * fields are specified. If a field supports empty values, it can be cleared + * by specifying it in the update mask and not in the Announcement object. If + * a field that does not support empty values is included in the update mask + * and not set in the Announcement object, an `INVALID_ARGUMENT` error will be + * returned. + * + * The following fields may be specified by teachers: + * + * * `text` + * * `state` + * * `scheduled_time` + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface StudentSubmissionsResource { + /** + * Returns a student submission. + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course, course work, or student submission or for + * access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course, course work, or student submission + * does not exist. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Identifier of the course work. */ + courseWorkId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the student submission. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a list of student submissions that the requester is permitted to + * view, factoring in the OAuth scopes of the request. + * `-` may be specified as the `course_work_id` to include student + * submissions for multiple course work items. + * + * Course students may only view their own work. Course teachers + * and domain administrators may view all student submissions. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work, or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course does not exist. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** + * Identifier of the student work to request. + * This may be set to the string literal `"-"` to request student work for + * all course work in the specified course. + */ + courseWorkId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Requested lateness value. If specified, returned student submissions are + * restricted by the requested value. + * If unspecified, submissions are returned regardless of `late` value. + */ + late?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero or unspecified indicates that the + * server may assign a maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, + * indicating that the subsequent page of results should be returned. + * + * The list request + * must be otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Requested submission states. If specified, returned student submissions + * match one of the specified submission states. + */ + states?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Optional argument to restrict returned student work to those owned by the + * student with the specified identifier. The identifier can be one of the + * following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId?: string; + }): Request; + /** + * Modifies attachments of student submission. + * + * Attachments may only be added to student submissions belonging to course + * work objects with a `workType` of `ASSIGNMENT`. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding course work item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work, if the user is not permitted to modify + * attachments on the requested student submission, or for + * access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course, course work, or student submission + * does not exist. + */ + modifyAttachments(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Identifier of the course work. */ + courseWorkId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the student submission. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates one or more fields of a student submission. + * + * See google.classroom.v1.StudentSubmission for details + * of which fields may be updated and who may change them. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding course work item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting developer project did not create + * the corresponding course work, if the user is not permitted to make the + * requested modification to the student submission, or for + * access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course, course work, or student submission + * does not exist. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Identifier of the course work. */ + courseWorkId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the student submission. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Mask that identifies which fields on the student submission to update. + * This field is required to do an update. The update fails if invalid + * fields are specified. + * + * The following fields may be specified by teachers: + * + * * `draft_grade` + * * `assigned_grade` + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Reclaims a student submission on behalf of the student that owns it. + * + * Reclaiming a student submission transfers ownership of attached Drive + * files to the student and update the submission state. + * + * Only the student that owns the requested student submission may call this + * method, and only for a student submission that has been turned in. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding course work item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work, unsubmit the requested student submission, + * or for access errors. + * * `FAILED_PRECONDITION` if the student submission has not been turned in. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course, course work, or student submission + * does not exist. + */ + reclaim(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Identifier of the course work. */ + courseWorkId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the student submission. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Returns a student submission. + * + * Returning a student submission transfers ownership of attached Drive + * files to the student and may also update the submission state. + * Unlike the Classroom application, returning a student submission does not + * set assignedGrade to the draftGrade value. + * + * Only a teacher of the course that contains the requested student submission + * may call this method. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding course work item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work, return the requested student submission, + * or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course, course work, or student submission + * does not exist. + */ + return(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Identifier of the course work. */ + courseWorkId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the student submission. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Turns in a student submission. + * + * Turning in a student submission transfers ownership of attached Drive + * files to the teacher and may also update the submission state. + * + * This may only be called by the student that owns the specified student + * submission. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding course work item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work, turn in the requested student submission, + * or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course, course work, or student submission + * does not exist. + */ + turnIn(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Identifier of the course work. */ + courseWorkId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the student submission. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface CourseWorkResource { + /** + * Creates course work. + * + * The resulting course work (and corresponding student submissions) are + * associated with the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * make the request. Classroom API requests to modify course work and student + * submissions must be made with an OAuth client ID from the associated + * Developer Console project. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course, create course work in the requested course, share a + * Drive attachment, or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course does not exist. + * * `FAILED_PRECONDITION` for the following request error: + * * AttachmentNotVisible + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a course work. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding course work item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting developer project did not create + * the corresponding course work, if the requesting user is not permitted + * to delete the requested course or for access errors. + * * `FAILED_PRECONDITION` if the requested course work has already been + * deleted. + * * `NOT_FOUND` if no course exists with the requested ID. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Identifier of the course work to delete. + * This identifier is a Classroom-assigned identifier. + */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Returns course work. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work, or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course or course work does not exist. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the course work. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a list of course work that the requester is permitted to view. + * + * Course students may only view `PUBLISHED` course work. Course teachers + * and domain administrators may view all course work. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access + * the requested course or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course does not exist. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** + * Restriction on the work status to return. Only courseWork that matches + * is returned. If unspecified, items with a work status of `PUBLISHED` + * is returned. + */ + courseWorkStates?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Optional sort ordering for results. A comma-separated list of fields with + * an optional sort direction keyword. Supported fields are `updateTime` + * and `dueDate`. Supported direction keywords are `asc` and `desc`. + * If not specified, `updateTime desc` is the default behavior. + * Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` + */ + orderBy?: string; + /** + * Maximum number of items to return. Zero or unspecified indicates that the + * server may assign a maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, + * indicating that the subsequent page of results should be returned. + * + * The list request + * must be otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Modifies assignee mode and options of a coursework. + * + * Only a teacher of the course that contains the coursework may + * call this method. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or course work or for access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `NOT_FOUND` if the requested course or course work does not exist. + */ + modifyAssignees(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the coursework. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates one or more fields of a course work. + * + * See google.classroom.v1.CourseWork for details + * of which fields may be updated and who may change them. + * + * This request must be made by the Developer Console project of the + * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + * create the corresponding course work item. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting developer project did not create + * the corresponding course work, if the user is not permitted to make the + * requested modification to the student submission, or for + * access errors. + * * `INVALID_ARGUMENT` if the request is malformed. + * * `FAILED_PRECONDITION` if the requested course work has already been + * deleted. + * * `NOT_FOUND` if the requested course, course work, or student submission + * does not exist. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the course work. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Mask that identifies which fields on the course work to update. + * This field is required to do an update. The update fails if invalid + * fields are specified. If a field supports empty values, it can be cleared + * by specifying it in the update mask and not in the CourseWork object. If a + * field that does not support empty values is included in the update mask and + * not set in the CourseWork object, an `INVALID_ARGUMENT` error will be + * returned. + * + * The following fields may be specified by teachers: + * + * * `title` + * * `description` + * * `state` + * * `due_date` + * * `due_time` + * * `max_points` + * * `scheduled_time` + * * `submission_modification_mode` + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + studentSubmissions: StudentSubmissionsResource; + } + interface StudentsResource { + /** + * Adds a user as a student of a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to create + * students in this course or for access errors. + * * `NOT_FOUND` if the requested course ID does not exist. + * * `FAILED_PRECONDITION` if the requested user's account is disabled, + * for the following request errors: + * * CourseMemberLimitReached + * * CourseNotModifiable + * * UserGroupsMembershipLimitReached + * * `ALREADY_EXISTS` if the user is already a student or teacher in the + * course. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course to create the student in. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** + * Enrollment code of the course to create the student in. + * This code is required if userId + * corresponds to the requesting user; it may be omitted if the requesting + * user has administrative permissions to create students for any user. + */ + enrollmentCode?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a student of a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to delete + * students of this course or for access errors. + * * `NOT_FOUND` if no student of this course has the requested ID or if the + * course does not exist. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Identifier of the student to delete. The identifier can be one of the + * following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId: string; + }): Request<{}>; + /** + * Returns a student of a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to view + * students of this course or for access errors. + * * `NOT_FOUND` if no student of this course has the requested ID or if the + * course does not exist. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Identifier of the student to return. The identifier can be one of the + * following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId: string; + }): Request; + /** + * Returns a list of students of this course that the requester + * is permitted to view. + * + * This method returns the following error codes: + * + * * `NOT_FOUND` if the course does not exist. + * * `PERMISSION_DENIED` for access errors. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero means no maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, indicating that + * the subsequent page of results should be returned. + * + * The list request must be + * otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface TeachersResource { + /** + * Creates a teacher of a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to create + * teachers in this course or for access errors. + * * `NOT_FOUND` if the requested course ID does not exist. + * * `FAILED_PRECONDITION` if the requested user's account is disabled, + * for the following request errors: + * * CourseMemberLimitReached + * * CourseNotModifiable + * * CourseTeacherLimitReached + * * UserGroupsMembershipLimitReached + * * `ALREADY_EXISTS` if the user is already a teacher or student in the + * course. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a teacher of a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to delete + * teachers of this course or for access errors. + * * `NOT_FOUND` if no teacher of this course has the requested ID or if the + * course does not exist. + * * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher + * of this course. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Identifier of the teacher to delete. The identifier can be one of the + * following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId: string; + }): Request<{}>; + /** + * Returns a teacher of a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to view + * teachers of this course or for access errors. + * * `NOT_FOUND` if no teacher of this course has the requested ID or if the + * course does not exist. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Identifier of the teacher to return. The identifier can be one of the + * following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId: string; + }): Request; + /** + * Returns a list of teachers of this course that the requester + * is permitted to view. + * + * This method returns the following error codes: + * + * * `NOT_FOUND` if the course does not exist. + * * `PERMISSION_DENIED` for access errors. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Identifier of the course. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + courseId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero means no maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, indicating that + * the subsequent page of results should be returned. + * + * The list request must be + * otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface CoursesResource { + /** + * Creates a course. + * + * The user specified in `ownerId` is the owner of the created course + * and added as a teacher. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to create + * courses or for access errors. + * * `NOT_FOUND` if the primary teacher is not a valid user. + * * `FAILED_PRECONDITION` if the course owner's account is disabled or for + * the following request errors: + * * UserGroupsMembershipLimitReached + * * `ALREADY_EXISTS` if an alias was specified in the `id` and + * already exists. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Identifier of the course to delete. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Returns a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Identifier of the course to return. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a list of courses that the requesting user is permitted to view, + * restricted to those that match the request. Returned courses are ordered by + * creation time, with the most recently created coming first. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` for access errors. + * * `INVALID_ARGUMENT` if the query argument is malformed. + * * `NOT_FOUND` if any users specified in the query arguments do not exist. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Restricts returned courses to those in one of the specified states + * The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. + */ + courseStates?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero or unspecified indicates that the + * server may assign a maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, + * indicating that the subsequent page of results should be returned. + * + * The list request must be + * otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Restricts returned courses to those having a student with the specified + * identifier. The identifier can be one of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + studentId?: string; + /** + * Restricts returned courses to those having a teacher with the specified + * identifier. The identifier can be one of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + teacherId?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates one or more fields in a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + * * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or + * if no update mask is supplied. + * * `FAILED_PRECONDITION` for the following request errors: + * * CourseNotModifiable + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Identifier of the course to update. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Mask that identifies which fields on the course to update. + * This field is required to do an update. The update will fail if invalid + * fields are specified. The following fields are valid: + * + * * `name` + * * `section` + * * `descriptionHeading` + * * `description` + * * `room` + * * `courseState` + * * `ownerId` + * + * Note: patches to ownerId are treated as being effective immediately, but in + * practice it may take some time for the ownership transfer of all affected + * resources to complete. + * + * When set in a query parameter, this field should be specified as + * + * `updateMask=,,...` + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates a course. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + * requested course or for access errors. + * * `NOT_FOUND` if no course exists with the requested ID. + * * `FAILED_PRECONDITION` for the following request errors: + * * CourseNotModifiable + */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Identifier of the course to update. + * This identifier can be either the Classroom-assigned identifier or an + * alias. + */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + aliases: AliasesResource; + announcements: AnnouncementsResource; + courseWork: CourseWorkResource; + students: StudentsResource; + teachers: TeachersResource; + } + interface InvitationsResource { + /** + * Accepts an invitation, removing it and adding the invited user to the + * teachers or students (as appropriate) of the specified course. Only the + * invited user may accept an invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to accept the + * requested invitation or for access errors. + * * `FAILED_PRECONDITION` for the following request errors: + * * CourseMemberLimitReached + * * CourseNotModifiable + * * CourseTeacherLimitReached + * * UserGroupsMembershipLimitReached + * * `NOT_FOUND` if no invitation exists with the requested ID. + */ + accept(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the invitation to accept. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Creates an invitation. Only one invitation for a user and course may exist + * at a time. Delete and re-create an invitation to make changes. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to create + * invitations for this course or for access errors. + * * `NOT_FOUND` if the course or the user does not exist. + * * `FAILED_PRECONDITION` if the requested user's account is disabled or if + * the user already has this role or a role with greater permissions. + * * `ALREADY_EXISTS` if an invitation for the specified user and course + * already exists. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes an invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + * requested invitation or for access errors. + * * `NOT_FOUND` if no invitation exists with the requested ID. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the invitation to delete. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Returns an invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to view the + * requested invitation or for access errors. + * * `NOT_FOUND` if no invitation exists with the requested ID. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifier of the invitation to return. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a list of invitations that the requesting user is permitted to + * view, restricted to those that match the list request. + * + * *Note:* At least one of `user_id` or `course_id` must be supplied. Both + * fields can be supplied. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` for access errors. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Restricts returned invitations to those for a course with the specified + * identifier. + */ + courseId?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero means no maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, indicating + * that the subsequent page of results should be returned. + * + * The list request must be + * otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Restricts returned invitations to those for a specific user. The identifier + * can be one of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId?: string; + }): Request; + } + interface RegistrationsResource { + /** + * Creates a `Registration`, causing Classroom to start sending notifications + * from the provided `feed` to the provided `destination`. + * + * Returns the created `Registration`. Currently, this will be the same as + * the argument, but with server-assigned fields such as `expiry_time` and + * `id` filled in. + * + * Note that any value specified for the `expiry_time` or `id` fields will be + * ignored. + * + * While Classroom may validate the `destination` and return errors on a best + * effort basis, it is the caller's responsibility to ensure that it exists + * and that Classroom has permission to publish to it. + * + * This method may return the following error codes: + * + * * `PERMISSION_DENIED` if: + * * the authenticated user does not have permission to receive + * notifications from the requested field; or + * * the credential provided does not include the appropriate scope for the + * requested feed. + * * another access error is encountered. + * * `INVALID_ARGUMENT` if: + * * no `destination` is specified, or the specified `destination` is not + * valid; or + * * no `feed` is specified, or the specified `feed` is not valid. + * * `NOT_FOUND` if: + * * the specified `feed` cannot be located, or the requesting user does not + * have permission to determine whether or not it exists; or + * * the specified `destination` cannot be located, or Classroom has not + * been granted permission to publish to it. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a `Registration`, causing Classroom to stop sending notifications + * for that `Registration`. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The `registration_id` of the `Registration` to be deleted. */ + registrationId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface GuardianInvitationsResource { + /** + * Creates a guardian invitation, and sends an email to the guardian asking + * them to confirm that they are the student's guardian. + * + * Once the guardian accepts the invitation, their `state` will change to + * `COMPLETED` and they will start receiving guardian notifications. A + * `Guardian` resource will also be created to represent the active guardian. + * + * The request object must have the `student_id` and + * `invited_email_address` fields set. Failing to set these fields, or + * setting any other fields in the request, will result in an error. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the current user does not have permission to + * manage guardians, if the guardian in question has already rejected + * too many requests for that student, if guardians are not enabled for the + * domain in question, or for other access errors. + * * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian + * link limit. + * * `INVALID_ARGUMENT` if the guardian email address is not valid (for + * example, if it is too long), or if the format of the student ID provided + * cannot be recognized (it is not an email address, nor a `user_id` from + * this API). This error will also be returned if read-only fields are set, + * or if the `state` field is set to to a value other than `PENDING`. + * * `NOT_FOUND` if the student ID provided is a valid student ID, but + * Classroom has no record of that student. + * * `ALREADY_EXISTS` if there is already a pending guardian invitation for + * the student and `invited_email_address` provided, or if the provided + * `invited_email_address` matches the Google account of an existing + * `Guardian` for this user. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** ID of the student (in standard format) */ + studentId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a specific guardian invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to view + * guardian invitations for the student identified by the `student_id`, if + * guardians are not enabled for the domain in question, or for other + * access errors. + * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + * be recognized (it is not an email address, nor a `student_id` from the + * API, nor the literal string `me`). + * * `NOT_FOUND` if Classroom cannot find any record of the given student or + * `invitation_id`. May also be returned if the student exists, but the + * requesting user does not have access to see that student. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The `id` field of the `GuardianInvitation` being requested. */ + invitationId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The ID of the student whose guardian invitation is being requested. */ + studentId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a list of guardian invitations that the requesting user is + * permitted to view, filtered by the parameters provided. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + * user is not permitted to view guardian invitations for that student, if + * `"-"` is specified as the `student_id` and the user is not a domain + * administrator, if guardians are not enabled for the domain in question, + * or for other access errors. + * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + * be recognized (it is not an email address, nor a `student_id` from the + * API, nor the literal string `me`). May also be returned if an invalid + * `page_token` or `state` is provided. + * * `NOT_FOUND` if a `student_id` is specified, and its format can be + * recognized, but Classroom has no record of that student. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * If specified, only results with the specified `invited_email_address` + * will be returned. + */ + invitedEmailAddress?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero or unspecified indicates that the + * server may assign a maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, + * indicating that the subsequent page of results should be returned. + * + * The list request + * must be otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * If specified, only results with the specified `state` values will be + * returned. Otherwise, results with a `state` of `PENDING` will be returned. + */ + states?: string; + /** + * The ID of the student whose guardian invitations are to be returned. + * The identifier can be one of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + * * the string literal `"-"`, indicating that results should be returned for + * all students that the requesting user is permitted to view guardian + * invitations. + */ + studentId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Modifies a guardian invitation. + * + * Currently, the only valid modification is to change the `state` from + * `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the current user does not have permission to + * manage guardians, if guardians are not enabled for the domain in question + * or for other access errors. + * * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. + * * `INVALID_ARGUMENT` if the format of the student ID provided + * cannot be recognized (it is not an email address, nor a `user_id` from + * this API), or if the passed `GuardianInvitation` has a `state` other than + * `COMPLETE`, or if it modifies fields other than `state`. + * * `NOT_FOUND` if the student ID provided is a valid student ID, but + * Classroom has no record of that student, or if the `id` field does not + * refer to a guardian invitation known to Classroom. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The `id` field of the `GuardianInvitation` to be modified. */ + invitationId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The ID of the student whose guardian invitation is to be modified. */ + studentId: string; + /** + * Mask that identifies which fields on the course to update. + * This field is required to do an update. The update will fail if invalid + * fields are specified. The following fields are valid: + * + * * `state` + * + * When set in a query parameter, this field should be specified as + * + * `updateMask=,,...` + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface GuardiansResource { + /** + * Deletes a guardian. + * + * The guardian will no longer receive guardian notifications and the guardian + * will no longer be accessible via the API. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if no user that matches the provided `student_id` + * is visible to the requesting user, if the requesting user is not + * permitted to manage guardians for the student identified by the + * `student_id`, if guardians are not enabled for the domain in question, + * or for other access errors. + * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + * be recognized (it is not an email address, nor a `student_id` from the + * API). + * * `NOT_FOUND` if the requesting user is permitted to modify guardians for + * the requested `student_id`, but no `Guardian` record exists for that + * student with the provided `guardian_id`. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The `id` field from a `Guardian`. */ + guardianId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * The student whose guardian is to be deleted. One of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + studentId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Returns a specific guardian. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if no user that matches the provided `student_id` + * is visible to the requesting user, if the requesting user is not + * permitted to view guardian information for the student identified by the + * `student_id`, if guardians are not enabled for the domain in question, + * or for other access errors. + * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + * be recognized (it is not an email address, nor a `student_id` from the + * API, nor the literal string `me`). + * * `NOT_FOUND` if the requesting user is permitted to view guardians for + * the requested `student_id`, but no `Guardian` record exists for that + * student that matches the provided `guardian_id`. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The `id` field from a `Guardian`. */ + guardianId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * The student whose guardian is being requested. One of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + studentId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns a list of guardians that the requesting user is permitted to + * view, restricted to those that match the request. + * + * To list guardians for any student that the requesting user may view + * guardians for, use the literal character `-` for the student ID. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + * user is not permitted to view guardian information for that student, if + * `"-"` is specified as the `student_id` and the user is not a domain + * administrator, if guardians are not enabled for the domain in question, + * if the `invited_email_address` filter is set by a user who is not a + * domain administrator, or for other access errors. + * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + * be recognized (it is not an email address, nor a `student_id` from the + * API, nor the literal string `me`). May also be returned if an invalid + * `page_token` is provided. + * * `NOT_FOUND` if a `student_id` is specified, and its format can be + * recognized, but Classroom has no record of that student. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Filter results by the email address that the original invitation was sent + * to, resulting in this guardian link. + * This filter can only be used by domain administrators. + */ + invitedEmailAddress?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of items to return. Zero or unspecified indicates that the + * server may assign a maximum. + * + * The server may return fewer than the specified number of results. + */ + pageSize?: number; + /** + * nextPageToken + * value returned from a previous + * list call, + * indicating that the subsequent page of results should be returned. + * + * The list request + * must be otherwise identical to the one that resulted in this token. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Filter results by the student who the guardian is linked to. + * The identifier can be one of the following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + * * the string literal `"-"`, indicating that results should be returned for + * all students that the requesting user has access to view. + */ + studentId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface UserProfilesResource { + /** + * Returns a user profile. + * + * This method returns the following error codes: + * + * * `PERMISSION_DENIED` if the requesting user is not permitted to access + * this user profile, if no profile exists with the requested ID, or for + * access errors. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Identifier of the profile to return. The identifier can be one of the + * following: + * + * * the numeric identifier for the user + * * the email address of the user + * * the string literal `"me"`, indicating the requesting user + */ + userId: string; + }): Request; + guardianInvitations: GuardianInvitationsResource; + guardians: GuardiansResource; + } + } +} diff --git a/types/gapi.client.classroom/readme.md b/types/gapi.client.classroom/readme.md new file mode 100644 index 0000000000..329be31c73 --- /dev/null +++ b/types/gapi.client.classroom/readme.md @@ -0,0 +1,305 @@ +# TypeScript typings for Google Classroom API v1 +Manages classes, rosters, and invitations in Google Classroom. +For detailed description please check [documentation](https://developers.google.com/classroom/). + +## Installing + +Install typings for Google Classroom API: +``` +npm install @types/gapi.client.classroom@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('classroom', 'v1', () => { + // now we can use gapi.client.classroom + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage announcements in Google Classroom + 'https://www.googleapis.com/auth/classroom.announcements', + + // View announcements in Google Classroom + 'https://www.googleapis.com/auth/classroom.announcements.readonly', + + // Manage your Google Classroom classes + 'https://www.googleapis.com/auth/classroom.courses', + + // View your Google Classroom classes + 'https://www.googleapis.com/auth/classroom.courses.readonly', + + // Manage your course work and view your grades in Google Classroom + 'https://www.googleapis.com/auth/classroom.coursework.me', + + // View your course work and grades in Google Classroom + 'https://www.googleapis.com/auth/classroom.coursework.me.readonly', + + // Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer + 'https://www.googleapis.com/auth/classroom.coursework.students', + + // View course work and grades for students in the Google Classroom classes you teach or administer + 'https://www.googleapis.com/auth/classroom.coursework.students.readonly', + + // View your Google Classroom guardians + 'https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly', + + // View and manage guardians for students in your Google Classroom classes + 'https://www.googleapis.com/auth/classroom.guardianlinks.students', + + // View guardians for students in your Google Classroom classes + 'https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly', + + // View the email addresses of people in your classes + 'https://www.googleapis.com/auth/classroom.profile.emails', + + // View the profile photos of people in your classes + 'https://www.googleapis.com/auth/classroom.profile.photos', + + // Manage your Google Classroom class rosters + 'https://www.googleapis.com/auth/classroom.rosters', + + // View your Google Classroom class rosters + 'https://www.googleapis.com/auth/classroom.rosters.readonly', + + // View your course work and grades in Google Classroom + 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly', + + // View course work and grades for students in the Google Classroom classes you teach or administer + 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Classroom API resources: + +```typescript + +/* +Creates a course. + +The user specified in `ownerId` is the owner of the created course +and added as a teacher. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to create +courses or for access errors. +* `NOT_FOUND` if the primary teacher is not a valid user. +* `FAILED_PRECONDITION` if the course owner's account is disabled or for +the following request errors: + * UserGroupsMembershipLimitReached +* `ALREADY_EXISTS` if an alias was specified in the `id` and +already exists. +*/ +await gapi.client.courses.create({ }); + +/* +Deletes a course. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to delete the +requested course or for access errors. +* `NOT_FOUND` if no course exists with the requested ID. +*/ +await gapi.client.courses.delete({ id: "id", }); + +/* +Returns a course. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to access the +requested course or for access errors. +* `NOT_FOUND` if no course exists with the requested ID. +*/ +await gapi.client.courses.get({ id: "id", }); + +/* +Returns a list of courses that the requesting user is permitted to view, +restricted to those that match the request. Returned courses are ordered by +creation time, with the most recently created coming first. + +This method returns the following error codes: + +* `PERMISSION_DENIED` for access errors. +* `INVALID_ARGUMENT` if the query argument is malformed. +* `NOT_FOUND` if any users specified in the query arguments do not exist. +*/ +await gapi.client.courses.list({ }); + +/* +Updates one or more fields in a course. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to modify the +requested course or for access errors. +* `NOT_FOUND` if no course exists with the requested ID. +* `INVALID_ARGUMENT` if invalid fields are specified in the update mask or +if no update mask is supplied. +* `FAILED_PRECONDITION` for the following request errors: + * CourseNotModifiable +*/ +await gapi.client.courses.patch({ id: "id", }); + +/* +Updates a course. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to modify the +requested course or for access errors. +* `NOT_FOUND` if no course exists with the requested ID. +* `FAILED_PRECONDITION` for the following request errors: + * CourseNotModifiable +*/ +await gapi.client.courses.update({ id: "id", }); + +/* +Accepts an invitation, removing it and adding the invited user to the +teachers or students (as appropriate) of the specified course. Only the +invited user may accept an invitation. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to accept the +requested invitation or for access errors. +* `FAILED_PRECONDITION` for the following request errors: + * CourseMemberLimitReached + * CourseNotModifiable + * CourseTeacherLimitReached + * UserGroupsMembershipLimitReached +* `NOT_FOUND` if no invitation exists with the requested ID. +*/ +await gapi.client.invitations.accept({ id: "id", }); + +/* +Creates an invitation. Only one invitation for a user and course may exist +at a time. Delete and re-create an invitation to make changes. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to create +invitations for this course or for access errors. +* `NOT_FOUND` if the course or the user does not exist. +* `FAILED_PRECONDITION` if the requested user's account is disabled or if +the user already has this role or a role with greater permissions. +* `ALREADY_EXISTS` if an invitation for the specified user and course +already exists. +*/ +await gapi.client.invitations.create({ }); + +/* +Deletes an invitation. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to delete the +requested invitation or for access errors. +* `NOT_FOUND` if no invitation exists with the requested ID. +*/ +await gapi.client.invitations.delete({ id: "id", }); + +/* +Returns an invitation. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to view the +requested invitation or for access errors. +* `NOT_FOUND` if no invitation exists with the requested ID. +*/ +await gapi.client.invitations.get({ id: "id", }); + +/* +Returns a list of invitations that the requesting user is permitted to +view, restricted to those that match the list request. + +*Note:* At least one of `user_id` or `course_id` must be supplied. Both +fields can be supplied. + +This method returns the following error codes: + +* `PERMISSION_DENIED` for access errors. +*/ +await gapi.client.invitations.list({ }); + +/* +Creates a `Registration`, causing Classroom to start sending notifications +from the provided `feed` to the provided `destination`. + +Returns the created `Registration`. Currently, this will be the same as +the argument, but with server-assigned fields such as `expiry_time` and +`id` filled in. + +Note that any value specified for the `expiry_time` or `id` fields will be +ignored. + +While Classroom may validate the `destination` and return errors on a best +effort basis, it is the caller's responsibility to ensure that it exists +and that Classroom has permission to publish to it. + +This method may return the following error codes: + +* `PERMISSION_DENIED` if: + * the authenticated user does not have permission to receive + notifications from the requested field; or + * the credential provided does not include the appropriate scope for the + requested feed. + * another access error is encountered. +* `INVALID_ARGUMENT` if: + * no `destination` is specified, or the specified `destination` is not + valid; or + * no `feed` is specified, or the specified `feed` is not valid. +* `NOT_FOUND` if: + * the specified `feed` cannot be located, or the requesting user does not + have permission to determine whether or not it exists; or + * the specified `destination` cannot be located, or Classroom has not + been granted permission to publish to it. +*/ +await gapi.client.registrations.create({ }); + +/* +Deletes a `Registration`, causing Classroom to stop sending notifications +for that `Registration`. +*/ +await gapi.client.registrations.delete({ registrationId: "registrationId", }); + +/* +Returns a user profile. + +This method returns the following error codes: + +* `PERMISSION_DENIED` if the requesting user is not permitted to access +this user profile, if no profile exists with the requested ID, or for +access errors. +*/ +await gapi.client.userProfiles.get({ userId: "userId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.classroom/tsconfig.json b/types/gapi.client.classroom/tsconfig.json new file mode 100644 index 0000000000..4e1a97323a --- /dev/null +++ b/types/gapi.client.classroom/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.classroom-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.classroom/tslint.json b/types/gapi.client.classroom/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.classroom/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudbilling/gapi.client.cloudbilling-tests.ts b/types/gapi.client.cloudbilling/gapi.client.cloudbilling-tests.ts new file mode 100644 index 0000000000..2b846c0c89 --- /dev/null +++ b/types/gapi.client.cloudbilling/gapi.client.cloudbilling-tests.ts @@ -0,0 +1,98 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudbilling', 'v1', () => { + /** now we can use gapi.client.cloudbilling */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Gets information about a billing account. The current authenticated user + * must be an [owner of the billing + * account](https://support.google.com/cloud/answer/4430947). + */ + await gapi.client.billingAccounts.get({ + name: "name", + }); + /** + * Lists the billing accounts that the current authenticated user + * [owns](https://support.google.com/cloud/answer/4430947). + */ + await gapi.client.billingAccounts.list({ + pageSize: 1, + pageToken: "pageToken", + }); + /** + * Gets the billing information for a project. The current authenticated user + * must have [permission to view the + * project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + * ). + */ + await gapi.client.projects.getBillingInfo({ + name: "name", + }); + /** + * Sets or updates the billing account associated with a project. You specify + * the new billing account by setting the `billing_account_name` in the + * `ProjectBillingInfo` resource to the resource name of a billing account. + * Associating a project with an open billing account enables billing on the + * project and allows charges for resource usage. If the project already had a + * billing account, this method changes the billing account used for resource + * usage charges. + * + * *Note:* Incurred charges that have not yet been reported in the transaction + * history of the Google Cloud Console may be billed to the new billing + * account, even if the charge occurred before the new billing account was + * assigned to the project. + * + * The current authenticated user must have ownership privileges for both the + * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + * ) and the [billing + * account](https://support.google.com/cloud/answer/4430947). + * + * You can disable billing on the project by setting the + * `billing_account_name` field to empty. This action disassociates the + * current billing account from the project. Any billable activity of your + * in-use services will stop, and your application could stop functioning as + * expected. Any unbilled charges to date will be billed to the previously + * associated account. The current authenticated user must be either an owner + * of the project or an owner of the billing account for the project. + * + * Note that associating a project with a *closed* billing account will have + * much the same effect as disabling billing on the project: any paid + * resources used by the project will be shut down. Thus, unless you wish to + * disable billing, you should always call this method with the name of an + * *open* billing account. + */ + await gapi.client.projects.updateBillingInfo({ + name: "name", + }); + /** Lists all public cloud services. */ + await gapi.client.services.list({ + pageSize: 1, + pageToken: "pageToken", + }); + } +}); diff --git a/types/gapi.client.cloudbilling/index.d.ts b/types/gapi.client.cloudbilling/index.d.ts new file mode 100644 index 0000000000..cd09fa5e15 --- /dev/null +++ b/types/gapi.client.cloudbilling/index.d.ts @@ -0,0 +1,640 @@ +// Type definitions for Google Google Cloud Billing API v1 1.0 +// Project: https://cloud.google.com/billing/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudbilling.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Billing API v1 */ + function load(name: "cloudbilling", version: "v1"): PromiseLike; + function load(name: "cloudbilling", version: "v1", callback: () => any): void; + + const billingAccounts: cloudbilling.BillingAccountsResource; + + const projects: cloudbilling.ProjectsResource; + + const services: cloudbilling.ServicesResource; + + namespace cloudbilling { + interface AggregationInfo { + /** + * The number of intervals to aggregate over. + * Example: If aggregation_level is "DAILY" and aggregation_count is 14, + * aggregation will be over 14 days. + */ + aggregationCount?: number; + aggregationInterval?: string; + aggregationLevel?: string; + } + interface BillingAccount { + /** + * The display name given to the billing account, such as `My Billing + * Account`. This name is displayed in the Google Cloud Console. + */ + displayName?: string; + /** + * The resource name of the billing account. The resource name has the form + * `billingAccounts/{billing_account_id}`. For example, + * `billingAccounts/012345-567890-ABCDEF` would be the resource name for + * billing account `012345-567890-ABCDEF`. + */ + name?: string; + /** + * True if the billing account is open, and will therefore be charged for any + * usage on associated projects. False if the billing account is closed, and + * therefore projects associated with it will be unable to use paid services. + */ + open?: boolean; + } + interface Category { + /** + * The type of product the SKU refers to. + * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + */ + resourceFamily?: string; + /** + * A group classification for related SKUs. + * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + */ + resourceGroup?: string; + /** The display name of the service this SKU belongs to. */ + serviceDisplayName?: string; + /** + * Represents how the SKU is consumed. + * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + */ + usageType?: string; + } + interface ListBillingAccountsResponse { + /** A list of billing accounts. */ + billingAccounts?: BillingAccount[]; + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListBillingAccounts` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + */ + nextPageToken?: string; + } + interface ListProjectBillingInfoResponse { + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListProjectBillingInfo` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + */ + nextPageToken?: string; + /** + * A list of `ProjectBillingInfo` resources representing the projects + * associated with the billing account. + */ + projectBillingInfo?: ProjectBillingInfo[]; + } + interface ListServicesResponse { + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListServices` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + */ + nextPageToken?: string; + /** A list of services. */ + services?: Service[]; + } + interface ListSkusResponse { + /** + * A token to retrieve the next page of results. To retrieve the next page, + * call `ListSkus` again with the `page_token` field set to this + * value. This field is empty if there are no more results to retrieve. + */ + nextPageToken?: string; + /** The list of public SKUs of the given service. */ + skus?: Sku[]; + } + interface 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; + } + interface PricingExpression { + /** + * The base unit for the SKU which is the unit used in usage exports. + * Example: "By" + */ + baseUnit?: string; + /** + * Conversion factor for converting from price per usage_unit to price per + * base_unit, and start_usage_amount to start_usage_amount in base_unit. + * unit_price / base_unit_conversion_factor = price per base_unit. + * start_usage_amount * base_unit_conversion_factor = start_usage_amount in + * base_unit. + */ + baseUnitConversionFactor?: number; + /** + * The base unit in human readable form. + * Example: "byte". + */ + baseUnitDescription?: string; + /** + * The recommended quantity of units for displaying pricing info. When + * displaying pricing info it is recommended to display: + * (unit_price * display_quantity) per display_quantity usage_unit. + * This field does not affect the pricing formula and is for display purposes + * only. + * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + * the display_quantity is "1000" then the recommended way of displaying the + * pricing info is "0.10 USD per 1000 GB" + */ + displayQuantity?: number; + /** + * The list of tiered rates for this pricing. The total cost is computed by + * applying each of the tiered rates on usage. This repeated list is sorted + * by ascending order of start_usage_amount. + */ + tieredRates?: TierRate[]; + /** + * The short hand for unit of usage this pricing is specified in. + * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". + */ + usageUnit?: string; + /** + * The unit of usage in human readable form. + * Example: "gibi byte". + */ + usageUnitDescription?: string; + } + interface PricingInfo { + /** + * Aggregation Info. This can be left unspecified if the pricing expression + * doesn't require aggregation. + */ + aggregationInfo?: AggregationInfo; + /** + * Conversion rate for currency conversion, from USD to the currency specified + * in the request. If the currency is not specified this defaults to 1.0. + * Example: USD * currency_conversion_rate = JPY + */ + currencyConversionRate?: number; + /** The timestamp from which this pricing was effective. */ + effectiveTime?: string; + /** Expresses the pricing formula. See `PricingExpression` for an example. */ + pricingExpression?: PricingExpression; + /** + * An optional human readable summary of the pricing information, has a + * maximum length of 256 characters. + */ + summary?: string; + } + interface ProjectBillingInfo { + /** + * The resource name of the billing account associated with the project, if + * any. For example, `billingAccounts/012345-567890-ABCDEF`. + */ + billingAccountName?: string; + /** + * True if the project is associated with an open billing account, to which + * usage on the project is charged. False if the project is associated with a + * closed billing account, or no billing account at all, and therefore cannot + * use paid services. This field is read-only. + */ + billingEnabled?: boolean; + /** + * The resource name for the `ProjectBillingInfo`; has the form + * `projects/{project_id}/billingInfo`. For example, the resource name for the + * billing information for project `tokyo-rain-123` would be + * `projects/tokyo-rain-123/billingInfo`. This field is read-only. + */ + name?: string; + /** + * The ID of the project that this `ProjectBillingInfo` represents, such as + * `tokyo-rain-123`. This is a convenience field so that you don't need to + * parse the `name` field to obtain a project ID. This field is read-only. + */ + projectId?: string; + } + interface Service { + /** A human readable display name for this service. */ + displayName?: string; + /** + * The resource name for the service. + * Example: "services/DA34-426B-A397" + */ + name?: string; + /** + * The identifier for the service. + * Example: "DA34-426B-A397" + */ + serviceId?: string; + } + interface Sku { + /** The category hierarchy of this SKU, purely for organizational purpose. */ + category?: Category; + /** + * A human readable description of the SKU, has a maximum length of 256 + * characters. + */ + description?: string; + /** + * The resource name for the SKU. + * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE" + */ + name?: string; + /** A timeline of pricing info for this SKU in chronological order. */ + pricingInfo?: PricingInfo[]; + /** + * Identifies the service provider. + * This is 'Google' for first party services in Google Cloud Platform. + */ + serviceProviderName?: string; + /** + * List of service regions this SKU is offered at. + * Example: "asia-east1" + * Service regions can be found at https://cloud.google.com/about/locations/ + */ + serviceRegions?: string[]; + /** + * The identifier for the SKU. + * Example: "AA95-CD31-42FE" + */ + skuId?: string; + } + interface TierRate { + /** + * Usage is priced at this rate only after this amount. + * Example: start_usage_amount of 10 indicates that the usage will be priced + * at the unit_price after the first 10 usage_units. + */ + startUsageAmount?: number; + /** + * The price per unit of usage. + * Example: unit_price of amount $10 indicates that each unit will cost $10. + */ + unitPrice?: Money; + } + interface ProjectsResource { + /** + * Lists the projects associated with a billing account. The current + * authenticated user must be an [owner of the billing + * account](https://support.google.com/cloud/answer/4430947). + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the billing account associated with the projects that + * you want to list. For example, `billingAccounts/012345-567890-ABCDEF`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + */ + pageSize?: number; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous `ListProjectBillingInfo` + * call. If unspecified, the first page of results is returned. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface BillingAccountsResource { + /** + * Gets information about a billing account. The current authenticated user + * must be an [owner of the billing + * account](https://support.google.com/cloud/answer/4430947). + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the billing account to retrieve. For example, + * `billingAccounts/012345-567890-ABCDEF`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists the billing accounts that the current authenticated user + * [owns](https://support.google.com/cloud/answer/4430947). + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. The maximum page size is 100; this is also the + * default. + */ + pageSize?: number; + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListBillingAccounts` + * call. If unspecified, the first page of results is returned. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + projects: ProjectsResource; + } + interface ProjectsResource { + /** + * Gets the billing information for a project. The current authenticated user + * must have [permission to view the + * project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + * ). + */ + getBillingInfo(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the project for which billing information is + * retrieved. For example, `projects/tokyo-rain-123`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Sets or updates the billing account associated with a project. You specify + * the new billing account by setting the `billing_account_name` in the + * `ProjectBillingInfo` resource to the resource name of a billing account. + * Associating a project with an open billing account enables billing on the + * project and allows charges for resource usage. If the project already had a + * billing account, this method changes the billing account used for resource + * usage charges. + * + * *Note:* Incurred charges that have not yet been reported in the transaction + * history of the Google Cloud Console may be billed to the new billing + * account, even if the charge occurred before the new billing account was + * assigned to the project. + * + * The current authenticated user must have ownership privileges for both the + * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + * ) and the [billing + * account](https://support.google.com/cloud/answer/4430947). + * + * You can disable billing on the project by setting the + * `billing_account_name` field to empty. This action disassociates the + * current billing account from the project. Any billable activity of your + * in-use services will stop, and your application could stop functioning as + * expected. Any unbilled charges to date will be billed to the previously + * associated account. The current authenticated user must be either an owner + * of the project or an owner of the billing account for the project. + * + * Note that associating a project with a *closed* billing account will have + * much the same effect as disabling billing on the project: any paid + * resources used by the project will be shut down. Thus, unless you wish to + * disable billing, you should always call this method with the name of an + * *open* billing account. + */ + updateBillingInfo(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the project associated with the billing information + * that you want to update. For example, `projects/tokyo-rain-123`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface SkusResource { + /** Lists all publicly available SKUs for a given cloud service. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The ISO 4217 currency code for the pricing info in the response proto. + * Will use the conversion rate as of start_time. + * Optional. If not specified USD will be used. + */ + currencyCode?: string; + /** + * Optional exclusive end time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * Maximum allowable time range is 1 month (31 days). Time range as a whole + * is optional. If not specified, the latest pricing will be returned (up to + * 12 hours old at most). + */ + endTime?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Requested page size. Defaults to 5000. */ + pageSize?: number; + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListSkus` + * call. If unspecified, the first page of results is returned. + */ + pageToken?: string; + /** + * The name of the service. + * Example: "services/DA34-426B-A397" + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Optional inclusive start time of the time range for which the pricing + * versions will be returned. Timestamps in the future are not allowed. + * Maximum allowable time range is 1 month (31 days). Time range as a whole + * is optional. If not specified, the latest pricing will be returned (up to + * 12 hours old at most). + */ + startTime?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ServicesResource { + /** Lists all public cloud services. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Requested page size. Defaults to 5000. */ + pageSize?: number; + /** + * A token identifying a page of results to return. This should be a + * `next_page_token` value returned from a previous `ListServices` + * call. If unspecified, the first page of results is returned. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + skus: SkusResource; + } + } +} diff --git a/types/gapi.client.cloudbilling/readme.md b/types/gapi.client.cloudbilling/readme.md new file mode 100644 index 0000000000..4c58940e5b --- /dev/null +++ b/types/gapi.client.cloudbilling/readme.md @@ -0,0 +1,116 @@ +# TypeScript typings for Google Cloud Billing API v1 +Allows developers to manage billing for their Google Cloud Platform projects + programmatically. +For detailed description please check [documentation](https://cloud.google.com/billing/). + +## Installing + +Install typings for Google Cloud Billing API: +``` +npm install @types/gapi.client.cloudbilling@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudbilling', 'v1', () => { + // now we can use gapi.client.cloudbilling + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Billing API resources: + +```typescript + +/* +Gets information about a billing account. The current authenticated user +must be an [owner of the billing +account](https://support.google.com/cloud/answer/4430947). +*/ +await gapi.client.billingAccounts.get({ name: "name", }); + +/* +Lists the billing accounts that the current authenticated user +[owns](https://support.google.com/cloud/answer/4430947). +*/ +await gapi.client.billingAccounts.list({ }); + +/* +Gets the billing information for a project. The current authenticated user +must have [permission to view the +project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo +). +*/ +await gapi.client.projects.getBillingInfo({ name: "name", }); + +/* +Sets or updates the billing account associated with a project. You specify +the new billing account by setting the `billing_account_name` in the +`ProjectBillingInfo` resource to the resource name of a billing account. +Associating a project with an open billing account enables billing on the +project and allows charges for resource usage. If the project already had a +billing account, this method changes the billing account used for resource +usage charges. + +*Note:* Incurred charges that have not yet been reported in the transaction +history of the Google Cloud Console may be billed to the new billing +account, even if the charge occurred before the new billing account was +assigned to the project. + +The current authenticated user must have ownership privileges for both the +[project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo +) and the [billing +account](https://support.google.com/cloud/answer/4430947). + +You can disable billing on the project by setting the +`billing_account_name` field to empty. This action disassociates the +current billing account from the project. Any billable activity of your +in-use services will stop, and your application could stop functioning as +expected. Any unbilled charges to date will be billed to the previously +associated account. The current authenticated user must be either an owner +of the project or an owner of the billing account for the project. + +Note that associating a project with a *closed* billing account will have +much the same effect as disabling billing on the project: any paid +resources used by the project will be shut down. Thus, unless you wish to +disable billing, you should always call this method with the name of an +*open* billing account. +*/ +await gapi.client.projects.updateBillingInfo({ name: "name", }); + +/* +Lists all public cloud services. +*/ +await gapi.client.services.list({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.cloudbilling/tsconfig.json b/types/gapi.client.cloudbilling/tsconfig.json new file mode 100644 index 0000000000..66cfdbefe4 --- /dev/null +++ b/types/gapi.client.cloudbilling/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudbilling-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudbilling/tslint.json b/types/gapi.client.cloudbilling/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudbilling/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudbuild/gapi.client.cloudbuild-tests.ts b/types/gapi.client.cloudbuild/gapi.client.cloudbuild-tests.ts new file mode 100644 index 0000000000..a7b428a695 --- /dev/null +++ b/types/gapi.client.cloudbuild/gapi.client.cloudbuild-tests.ts @@ -0,0 +1,73 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudbuild', 'v1', () => { + /** now we can use gapi.client.cloudbuild */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * Operations.GetOperation or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an Operation.error value with a google.rpc.Status.code of 1, + * corresponding to `Code.CANCELLED`. + */ + await gapi.client.operations.cancel({ + name: "name", + }); + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + await gapi.client.operations.get({ + name: "name", + }); + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * NOTE: the `name` binding allows API services to override the binding + * to use different resource name schemes, such as `users/*/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/*}/operations"` to their service configuration. + * For backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding + * is the parent resource, without the operations collection id. + */ + await gapi.client.operations.list({ + filter: "filter", + name: "name", + pageSize: 3, + pageToken: "pageToken", + }); + } +}); diff --git a/types/gapi.client.cloudbuild/index.d.ts b/types/gapi.client.cloudbuild/index.d.ts new file mode 100644 index 0000000000..ca50422cfb --- /dev/null +++ b/types/gapi.client.cloudbuild/index.d.ts @@ -0,0 +1,899 @@ +// Type definitions for Google Google Cloud Container Builder API v1 1.0 +// Project: https://cloud.google.com/container-builder/docs/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudbuild.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Container Builder API v1 */ + function load(name: "cloudbuild", version: "v1"): PromiseLike; + function load(name: "cloudbuild", version: "v1", callback: () => any): void; + + const operations: cloudbuild.OperationsResource; + + const projects: cloudbuild.ProjectsResource; + + namespace cloudbuild { + interface Build { + /** + * The ID of the BuildTrigger that triggered this build, if it was + * triggered automatically. + * @OutputOnly + */ + buildTriggerId?: string; + /** + * Time at which the request to create the build was received. + * @OutputOnly + */ + createTime?: string; + /** + * Time at which execution of the build was finished. + * + * The difference between finish_time and start_time is the duration of the + * build's execution. + * @OutputOnly + */ + finishTime?: string; + /** + * Unique identifier of the build. + * @OutputOnly + */ + id?: string; + /** + * A list of images to be pushed upon the successful completion of all build + * steps. + * + * The images will be pushed using the builder service account's credentials. + * + * The digests of the pushed images will be stored in the Build resource's + * results field. + * + * If any of the images fail to be pushed, the build is marked FAILURE. + */ + images?: string[]; + /** + * URL to logs for this build in Google Cloud Logging. + * @OutputOnly + */ + logUrl?: string; + /** + * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + */ + logsBucket?: string; + /** Special options for this build. */ + options?: BuildOptions; + /** + * ID of the project. + * @OutputOnly. + */ + projectId?: string; + /** + * Results of the build. + * @OutputOnly + */ + results?: Results; + /** Secrets to decrypt using Cloud KMS. */ + secrets?: Secret[]; + /** Describes where to find the source files to build. */ + source?: Source; + /** + * A permanent fixed identifier for source. + * @OutputOnly + */ + sourceProvenance?: SourceProvenance; + /** + * Time at which execution of the build was started. + * @OutputOnly + */ + startTime?: string; + /** + * Status of the build. + * @OutputOnly + */ + status?: string; + /** + * Customer-readable message about the current status. + * @OutputOnly + */ + statusDetail?: string; + /** Describes the operations to be performed on the workspace. */ + steps?: BuildStep[]; + /** Substitutions data for Build resource. */ + substitutions?: Record; + /** Tags for annotation of a Build. These are not docker tags. */ + tags?: string[]; + /** + * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be TIMEOUT. + * + * Default time is ten minutes. + */ + timeout?: string; + } + interface BuildOperationMetadata { + /** The build that the operation is tracking. */ + build?: Build; + } + interface BuildOptions { + /** Requested verifiability options. */ + requestedVerifyOption?: string; + /** Requested hash for SourceProvenance. */ + sourceProvenanceHash?: string[]; + /** SubstitutionOption to allow unmatch substitutions. */ + substitutionOption?: string; + } + interface BuildStep { + /** + * A list of arguments that will be presented to the step when it is started. + * + * If the image used to run the step's container has an entrypoint, these args + * will be used as arguments to that entrypoint. If the image does not define + * an entrypoint, the first element in args will be used as the entrypoint, + * and the remainder will be used as arguments. + */ + args?: string[]; + /** + * Working directory (relative to project source root) to use when running + * this operation's container. + */ + dir?: string; + /** + * Optional entrypoint to be used instead of the build step image's default + * If unset, the image's default will be used. + */ + entrypoint?: string; + /** + * A list of environment variable definitions to be used when running a step. + * + * The elements are of the form "KEY=VALUE" for the environment variable "KEY" + * being given the value "VALUE". + */ + env?: string[]; + /** + * Optional unique identifier for this build step, used in wait_for to + * reference this build step as a dependency. + */ + id?: string; + /** + * The name of the container image that will run this particular build step. + * + * If the image is already available in the host's Docker daemon's cache, it + * will be run directly. If not, the host will attempt to pull the image + * first, using the builder service account's credentials if necessary. + * + * The Docker daemon's cache will already have the latest versions of all of + * the officially supported build steps + * ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). + * The Docker daemon will also have cached many of the layers for some popular + * images, like "ubuntu", "debian", but they will be refreshed at the time you + * attempt to use them. + * + * If you built an image in a previous build step, it will be stored in the + * host's Docker daemon's cache and is available to use as the name for a + * later build step. + */ + name?: string; + /** + * A list of environment variables which are encrypted using a Cloud KMS + * crypto key. These values must be specified in the build's secrets. + */ + secretEnv?: string[]; + /** + * List of volumes to mount into the build step. + * + * Each volume will be created as an empty volume prior to execution of the + * build step. Upon completion of the build, volumes and their contents will + * be discarded. + * + * Using a named volume in only one step is not valid as it is indicative + * of a mis-configured build request. + */ + volumes?: Volume[]; + /** + * The ID(s) of the step(s) that this build step depends on. + * This build step will not start until all the build steps in wait_for + * have completed successfully. If wait_for is empty, this build step will + * start when all previous build steps in the Build.Steps list have completed + * successfully. + */ + waitFor?: string[]; + } + interface BuildTrigger { + /** Contents of the build template. */ + build?: Build; + /** + * Time when the trigger was created. + * + * @OutputOnly + */ + createTime?: string; + /** Human-readable description of this trigger. */ + description?: string; + /** If true, the trigger will never result in a build. */ + disabled?: boolean; + /** + * Path, from the source root, to a file whose contents is used for the + * template. + */ + filename?: string; + /** + * Unique identifier of the trigger. + * + * @OutputOnly + */ + id?: string; + /** Substitutions data for Build resource. */ + substitutions?: Record; + /** + * Template describing the types of source changes to trigger a build. + * + * Branch and tag names in trigger templates are interpreted as regular + * expressions. Any branch or tag change that matches that regular expression + * will trigger a build. + */ + triggerTemplate?: RepoSource; + } + interface BuiltImage { + /** Docker Registry 2.0 digest. */ + digest?: string; + /** + * Name used to push the container image to Google Container Registry, as + * presented to `docker push`. + */ + name?: string; + } + interface FileHashes { + /** Collection of file hashes. */ + fileHash?: Hash[]; + } + interface Hash { + /** The type of hash that was performed. */ + type?: string; + /** The hash value. */ + value?: string; + } + interface ListBuildTriggersResponse { + /** BuildTriggers for the project, sorted by create_time descending. */ + triggers?: BuildTrigger[]; + } + interface ListBuildsResponse { + /** Builds will be sorted by create_time, descending. */ + builds?: Build[]; + /** Token to receive the next page of results. */ + nextPageToken?: string; + } + interface ListOperationsResponse { + /** The standard List next-page token. */ + nextPageToken?: string; + /** A list of operations that matches the specified filter in the request. */ + operations?: Operation[]; + } + interface Operation { + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + */ + response?: Record; + } + interface RepoSource { + /** Name of the branch to build. */ + branchName?: string; + /** Explicit commit SHA to build. */ + commitSha?: string; + /** + * ID of the project that owns the repo. If omitted, the project ID requesting + * the build is assumed. + */ + projectId?: string; + /** Name of the repo. If omitted, the name "default" is assumed. */ + repoName?: string; + /** Name of the tag to build. */ + tagName?: string; + } + interface Results { + /** List of build step digests, in order corresponding to build step indices. */ + buildStepImages?: string[]; + /** Images that were built as a part of the build. */ + images?: BuiltImage[]; + } + interface Secret { + /** Cloud KMS key name to use to decrypt these envs. */ + kmsKeyName?: string; + /** + * Map of environment variable name to its encrypted value. + * + * Secret environment variables must be unique across all of a build's + * secrets, and must be used by at least one build step. Values can be at most + * 1 KB in size. There can be at most ten secret values across all of a + * build's secrets. + */ + secretEnv?: Record; + } + interface Source { + /** If provided, get source from this location in a Cloud Repo. */ + repoSource?: RepoSource; + /** If provided, get the source from this location in Google Cloud Storage. */ + storageSource?: StorageSource; + } + interface SourceProvenance { + /** + * Hash(es) of the build source, which can be used to verify that the original + * source integrity was maintained in the build. Note that FileHashes will + * only be populated if BuildOptions has requested a SourceProvenanceHash. + * + * The keys to this map are file paths used as build source and the values + * contain the hash values for those files. + * + * If the build source came in a single package such as a gzipped tarfile + * (.tar.gz), the FileHash will be for the single path to that file. + * @OutputOnly + */ + fileHashes?: Record; + /** + * A copy of the build's source.repo_source, if exists, with any + * revisions resolved. + */ + resolvedRepoSource?: RepoSource; + /** + * A copy of the build's source.storage_source, if exists, with any + * generations resolved. + */ + resolvedStorageSource?: StorageSource; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface StorageSource { + /** + * Google Cloud Storage bucket containing source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string; + /** + * Google Cloud Storage generation for the object. If the generation is + * omitted, the latest generation will be used. + */ + generation?: string; + /** + * Google Cloud Storage object containing source. + * + * This object must be a gzipped archive file (.tar.gz) containing source to + * build. + */ + object?: string; + } + interface Volume { + /** + * Name of the volume to mount. + * + * Volume names must be unique per build step and must be valid names for + * Docker volumes. Each named volume must be used by at least two build steps. + */ + name?: string; + /** + * Path at which to mount the volume. + * + * Paths must be absolute and cannot conflict with other volume paths on the + * same build step or with certain reserved volume paths. + */ + path?: string; + } + interface OperationsResource { + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * Operations.GetOperation or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an Operation.error value with a google.rpc.Status.code of 1, + * corresponding to `Code.CANCELLED`. + */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be cancelled. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * NOTE: the `name` binding allows API services to override the binding + * to use different resource name schemes, such as `users/*/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/*}/operations"` to their service configuration. + * For backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding + * is the parent resource, without the operations collection id. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation's parent resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface BuildsResource { + /** Cancels a requested build in progress. */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** ID of the build. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Starts a build with the specified configuration. + * + * The long-running Operation returned by this method will include the ID of + * the build, which can be passed to GetBuild to determine its status (e.g., + * success or failure). + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns information about a previously requested build. + * + * The Build that is returned includes its status (e.g., success or failure, + * or in-progress), and timing information. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** ID of the build. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists previously requested builds. + * + * Previously requested builds may still be in-progress, or may have finished + * successfully or unsuccessfully. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The raw filter text to constrain the results. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Number of results to return in the list. */ + pageSize?: number; + /** Token to provide to skip to a particular spot in the list. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface TriggersResource { + /** + * Creates a new BuildTrigger. + * + * This API is experimental. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project for which to configure automatic builds. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes an BuildTrigger by its project ID and trigger ID. + * + * This API is experimental. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project that owns the trigger. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** ID of the BuildTrigger to delete. */ + triggerId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets information about a BuildTrigger. + * + * This API is experimental. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project that owns the trigger. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** ID of the BuildTrigger to get. */ + triggerId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists existing BuildTrigger. + * + * This API is experimental. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project for which to list BuildTriggers. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates an BuildTrigger by its project ID and trigger ID. + * + * This API is experimental. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** ID of the project that owns the trigger. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** ID of the BuildTrigger to update. */ + triggerId: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ProjectsResource { + builds: BuildsResource; + triggers: TriggersResource; + } + } +} diff --git a/types/gapi.client.cloudbuild/readme.md b/types/gapi.client.cloudbuild/readme.md new file mode 100644 index 0000000000..a7371764be --- /dev/null +++ b/types/gapi.client.cloudbuild/readme.md @@ -0,0 +1,89 @@ +# TypeScript typings for Google Cloud Container Builder API v1 +Builds container images in the cloud. +For detailed description please check [documentation](https://cloud.google.com/container-builder/docs/). + +## Installing + +Install typings for Google Cloud Container Builder API: +``` +npm install @types/gapi.client.cloudbuild@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudbuild', 'v1', () => { + // now we can use gapi.client.cloudbuild + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Container Builder API resources: + +```typescript + +/* +Starts asynchronous cancellation on a long-running operation. The server +makes a best effort to cancel the operation, but success is not +guaranteed. If the server doesn't support this method, it returns +`google.rpc.Code.UNIMPLEMENTED`. Clients can use +Operations.GetOperation or +other methods to check whether the cancellation succeeded or whether the +operation completed despite cancellation. On successful cancellation, +the operation is not deleted; instead, it becomes an operation with +an Operation.error value with a google.rpc.Status.code of 1, +corresponding to `Code.CANCELLED`. +*/ +await gapi.client.operations.cancel({ name: "name", }); + +/* +Gets the latest state of a long-running operation. Clients can use this +method to poll the operation result at intervals as recommended by the API +service. +*/ +await gapi.client.operations.get({ name: "name", }); + +/* +Lists operations that match the specified filter in the request. If the +server doesn't support this method, it returns `UNIMPLEMENTED`. + +NOTE: the `name` binding allows API services to override the binding +to use different resource name schemes, such as `users/*/operations`. To +override the binding, API services can add a binding such as +`"/v1/{name=users/*}/operations"` to their service configuration. +For backwards compatibility, the default name includes the operations +collection id, however overriding users must ensure the name binding +is the parent resource, without the operations collection id. +*/ +await gapi.client.operations.list({ name: "name", }); +``` \ No newline at end of file diff --git a/types/gapi.client.cloudbuild/tsconfig.json b/types/gapi.client.cloudbuild/tsconfig.json new file mode 100644 index 0000000000..22d8d6d390 --- /dev/null +++ b/types/gapi.client.cloudbuild/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudbuild-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudbuild/tslint.json b/types/gapi.client.cloudbuild/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudbuild/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.clouddebugger/gapi.client.clouddebugger-tests.ts b/types/gapi.client.clouddebugger/gapi.client.clouddebugger-tests.ts new file mode 100644 index 0000000000..983c975c44 --- /dev/null +++ b/types/gapi.client.clouddebugger/gapi.client.clouddebugger-tests.ts @@ -0,0 +1,34 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('clouddebugger', 'v2', () => { + /** now we can use gapi.client.clouddebugger */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** Manage cloud debugger */ + 'https://www.googleapis.com/auth/cloud_debugger', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.clouddebugger/index.d.ts b/types/gapi.client.clouddebugger/index.d.ts new file mode 100644 index 0000000000..0fdb5167ce --- /dev/null +++ b/types/gapi.client.clouddebugger/index.d.ts @@ -0,0 +1,817 @@ +// Type definitions for Google Stackdriver Debugger API v2 2.0 +// Project: http://cloud.google.com/debugger +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://clouddebugger.googleapis.com/$discovery/rest?version=v2 + +/// + +declare namespace gapi.client { + /** Load Stackdriver Debugger API v2 */ + function load(name: "clouddebugger", version: "v2"): PromiseLike; + function load(name: "clouddebugger", version: "v2", callback: () => any): void; + + const controller: clouddebugger.ControllerResource; + + namespace clouddebugger { + interface AliasContext { + /** The alias kind. */ + kind?: string; + /** The alias name. */ + name?: string; + } + interface Breakpoint { + /** + * Action that the agent should perform when the code at the + * breakpoint location is hit. + */ + action?: string; + /** + * Condition that triggers the breakpoint. + * The condition is a compound boolean expression composed using expressions + * in a programming language at the source location. + */ + condition?: string; + /** Time this breakpoint was created by the server in seconds resolution. */ + createTime?: string; + /** + * Values of evaluated expressions at breakpoint time. + * The evaluated expressions appear in exactly the same order they + * are listed in the `expressions` field. + * The `name` field holds the original expression text, the `value` or + * `members` field holds the result of the evaluated expression. + * If the expression cannot be evaluated, the `status` inside the `Variable` + * will indicate an error and contain the error text. + */ + evaluatedExpressions?: Variable[]; + /** + * List of read-only expressions to evaluate at the breakpoint location. + * The expressions are composed using expressions in the programming language + * at the source location. If the breakpoint action is `LOG`, the evaluated + * expressions are included in log statements. + */ + expressions?: string[]; + /** + * Time this breakpoint was finalized as seen by the server in seconds + * resolution. + */ + finalTime?: string; + /** Breakpoint identifier, unique in the scope of the debuggee. */ + id?: string; + /** + * When true, indicates that this is a final result and the + * breakpoint state will not change from here on. + */ + isFinalState?: boolean; + /** + * A set of custom breakpoint properties, populated by the agent, to be + * displayed to the user. + */ + labels?: Record; + /** Breakpoint source location. */ + location?: SourceLocation; + /** Indicates the severity of the log. Only relevant when action is `LOG`. */ + logLevel?: string; + /** + * Only relevant when action is `LOG`. Defines the message to log when + * the breakpoint hits. The message may include parameter placeholders `$0`, + * `$1`, etc. These placeholders are replaced with the evaluated value + * of the appropriate expression. Expressions not referenced in + * `log_message_format` are not logged. + * + * Example: `Message received, id = $0, count = $1` with + * `expressions` = `[ message.id, message.count ]`. + */ + logMessageFormat?: string; + /** The stack at breakpoint time. */ + stackFrames?: StackFrame[]; + /** + * Breakpoint status. + * + * The status includes an error flag and a human readable message. + * This field is usually unset. The message can be either + * informational or an error message. Regardless, clients should always + * display the text message back to the user. + * + * Error status indicates complete failure of the breakpoint. + * + * Example (non-final state): `Still loading symbols...` + * + * Examples (final state): + * + * * `Invalid line number` referring to location + * * `Field f not found in class C` referring to condition + */ + status?: StatusMessage; + /** E-mail address of the user that created this breakpoint */ + userEmail?: string; + /** + * The `variable_table` exists to aid with computation, memory and network + * traffic optimization. It enables storing a variable once and reference + * it from multiple variables, including variables stored in the + * `variable_table` itself. + * For example, the same `this` object, which may appear at many levels of + * the stack, can have all of its data stored once in this table. The + * stack frame variables then would hold only a reference to it. + * + * The variable `var_table_index` field is an index into this repeated field. + * The stored objects are nameless and get their name from the referencing + * variable. The effective variable is a merge of the referencing variable + * and the referenced variable. + */ + variableTable?: Variable[]; + } + interface CloudRepoSourceContext { + /** An alias, which may be a branch or tag. */ + aliasContext?: AliasContext; + /** The name of an alias (branch, tag, etc.). */ + aliasName?: string; + /** The ID of the repo. */ + repoId?: RepoId; + /** A revision ID. */ + revisionId?: string; + } + interface CloudWorkspaceId { + /** + * The unique name of the workspace within the repo. This is the name + * chosen by the client in the Source API's CreateWorkspace method. + */ + name?: string; + /** The ID of the repo containing the workspace. */ + repoId?: RepoId; + } + interface CloudWorkspaceSourceContext { + /** + * The ID of the snapshot. + * An empty snapshot_id refers to the most recent snapshot. + */ + snapshotId?: string; + /** The ID of the workspace. */ + workspaceId?: CloudWorkspaceId; + } + interface Debuggee { + /** + * Version ID of the agent. + * Schema: `domain/language-platform/vmajor.minor` (for example + * `google.com/java-gcp/v1.1`). + */ + agentVersion?: string; + /** + * Human readable description of the debuggee. + * Including a human-readable project name, environment name and version + * information is recommended. + */ + description?: string; + /** + * References to the locations and revisions of the source code used in the + * deployed application. + * + * NOTE: this field is experimental and can be ignored. + */ + extSourceContexts?: ExtendedSourceContext[]; + /** Unique identifier for the debuggee generated by the controller service. */ + id?: string; + /** + * If set to `true`, indicates that the agent should disable itself and + * detach from the debuggee. + */ + isDisabled?: boolean; + /** + * If set to `true`, indicates that Controller service does not detect any + * activity from the debuggee agents and the application is possibly stopped. + */ + isInactive?: boolean; + /** + * A set of custom debuggee properties, populated by the agent, to be + * displayed to the user. + */ + labels?: Record; + /** + * Project the debuggee is associated with. + * Use project number or id when registering a Google Cloud Platform project. + */ + project?: string; + /** + * References to the locations and revisions of the source code used in the + * deployed application. + */ + sourceContexts?: SourceContext[]; + /** + * Human readable message to be displayed to the user about this debuggee. + * Absence of this field indicates no status. The message can be either + * informational or an error status. + */ + status?: StatusMessage; + /** + * Uniquifier to further distiguish the application. + * It is possible that different applications might have identical values in + * the debuggee message, thus, incorrectly identified as a single application + * by the Controller service. This field adds salt to further distiguish the + * application. Agents should consider seeding this field with value that + * identifies the code, binary, configuration and environment. + */ + uniquifier?: string; + } + interface ExtendedSourceContext { + /** Any source context. */ + context?: SourceContext; + /** Labels with user defined metadata. */ + labels?: Record; + } + interface FormatMessage { + /** + * Format template for the message. The `format` uses placeholders `$0`, + * `$1`, etc. to reference parameters. `$$` can be used to denote the `$` + * character. + * + * Examples: + * + * * `Failed to load '$0' which helps debug $1 the first time it + * is loaded. Again, $0 is very important.` + * * `Please pay $$10 to use $0 instead of $1.` + */ + format?: string; + /** Optional parameters to be embedded into the message. */ + parameters?: string[]; + } + interface GerritSourceContext { + /** An alias, which may be a branch or tag. */ + aliasContext?: AliasContext; + /** The name of an alias (branch, tag, etc.). */ + aliasName?: string; + /** + * The full project name within the host. Projects may be nested, so + * "project/subproject" is a valid project name. + * The "repo name" is hostURI/project. + */ + gerritProject?: string; + /** The URI of a running Gerrit instance. */ + hostUri?: string; + /** A revision (commit) ID. */ + revisionId?: string; + } + interface GetBreakpointResponse { + /** + * Complete breakpoint state. + * The fields `id` and `location` are guaranteed to be set. + */ + breakpoint?: Breakpoint; + } + interface GitSourceContext { + /** + * Git commit hash. + * required. + */ + revisionId?: string; + /** Git repository URL. */ + url?: string; + } + interface ListActiveBreakpointsResponse { + /** + * List of all active breakpoints. + * The fields `id` and `location` are guaranteed to be set on each breakpoint. + */ + breakpoints?: Breakpoint[]; + /** + * A token that can be used in the next method call to block until + * the list of breakpoints changes. + */ + nextWaitToken?: string; + /** + * If set to `true`, indicates that there is no change to the + * list of active breakpoints and the server-selected timeout has expired. + * The `breakpoints` field would be empty and should be ignored. + */ + waitExpired?: boolean; + } + interface ListBreakpointsResponse { + /** + * List of breakpoints matching the request. + * The fields `id` and `location` are guaranteed to be set on each breakpoint. + * The fields: `stack_frames`, `evaluated_expressions` and `variable_table` + * are cleared on each breakpoint regardless of its status. + */ + breakpoints?: Breakpoint[]; + /** + * A wait token that can be used in the next call to `list` (REST) or + * `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. + */ + nextWaitToken?: string; + } + interface ListDebuggeesResponse { + /** + * List of debuggees accessible to the calling user. + * The fields `debuggee.id` and `description` are guaranteed to be set. + * The `description` field is a human readable field provided by agents and + * can be displayed to users. + */ + debuggees?: Debuggee[]; + } + interface ProjectRepoId { + /** The ID of the project. */ + projectId?: string; + /** The name of the repo. Leave empty for the default repo. */ + repoName?: string; + } + interface RegisterDebuggeeRequest { + /** + * Debuggee information to register. + * The fields `project`, `uniquifier`, `description` and `agent_version` + * of the debuggee must be set. + */ + debuggee?: Debuggee; + } + interface RegisterDebuggeeResponse { + /** + * Debuggee resource. + * The field `id` is guranteed to be set (in addition to the echoed fields). + * If the field `is_disabled` is set to `true`, the agent should disable + * itself by removing all breakpoints and detaching from the application. + * It should however continue to poll `RegisterDebuggee` until reenabled. + */ + debuggee?: Debuggee; + } + interface RepoId { + /** A combination of a project ID and a repo name. */ + projectRepoId?: ProjectRepoId; + /** A server-assigned, globally unique identifier. */ + uid?: string; + } + interface SetBreakpointResponse { + /** + * Breakpoint resource. + * The field `id` is guaranteed to be set (in addition to the echoed fileds). + */ + breakpoint?: Breakpoint; + } + interface SourceContext { + /** A SourceContext referring to a revision in a cloud repo. */ + cloudRepo?: CloudRepoSourceContext; + /** A SourceContext referring to a snapshot in a cloud workspace. */ + cloudWorkspace?: CloudWorkspaceSourceContext; + /** A SourceContext referring to a Gerrit project. */ + gerrit?: GerritSourceContext; + /** A SourceContext referring to any third party Git repo (e.g. GitHub). */ + git?: GitSourceContext; + } + interface SourceLocation { + /** Line inside the file. The first line in the file has the value `1`. */ + line?: number; + /** Path to the source file within the source context of the target binary. */ + path?: string; + } + interface StackFrame { + /** + * Set of arguments passed to this function. + * Note that this might not be populated for all stack frames. + */ + arguments?: Variable[]; + /** Demangled function name at the call site. */ + function?: string; + /** + * Set of local variables at the stack frame location. + * Note that this might not be populated for all stack frames. + */ + locals?: Variable[]; + /** Source location of the call site. */ + location?: SourceLocation; + } + interface StatusMessage { + /** Status message text. */ + description?: FormatMessage; + /** Distinguishes errors from informational messages. */ + isError?: boolean; + /** Reference to which the message applies. */ + refersTo?: string; + } + interface UpdateActiveBreakpointRequest { + /** + * Updated breakpoint information. + * The field `id` must be set. + * The agent must echo all Breakpoint specification fields in the update. + */ + breakpoint?: Breakpoint; + } + interface Variable { + /** Members contained or pointed to by the variable. */ + members?: Variable[]; + /** Name of the variable, if any. */ + name?: string; + /** + * Status associated with the variable. This field will usually stay + * unset. A status of a single variable only applies to that variable or + * expression. The rest of breakpoint data still remains valid. Variables + * might be reported in error state even when breakpoint is not in final + * state. + * + * The message may refer to variable name with `refers_to` set to + * `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. + * In either case variable value and members will be unset. + * + * Example of error message applied to name: `Invalid expression syntax`. + * + * Example of information message applied to value: `Not captured`. + * + * Examples of error message applied to value: + * + * * `Malformed string`, + * * `Field f not found in class C` + * * `Null pointer dereference` + */ + status?: StatusMessage; + /** + * Variable type (e.g. `MyClass`). If the variable is split with + * `var_table_index`, `type` goes next to `value`. The interpretation of + * a type is agent specific. It is recommended to include the dynamic type + * rather than a static type of an object. + */ + type?: string; + /** Simple value of the variable. */ + value?: string; + /** + * Reference to a variable in the shared variable table. More than + * one variable can reference the same variable in the table. The + * `var_table_index` field is an index into `variable_table` in Breakpoint. + */ + varTableIndex?: number; + } + interface BreakpointsResource { + /** + * Returns the list of all active breakpoints for the debuggee. + * + * The breakpoint specification (`location`, `condition`, and `expressions` + * fields) is semantically immutable, although the field values may + * change. For example, an agent may update the location line number + * to reflect the actual line where the breakpoint was set, but this + * doesn't change the breakpoint semantics. + * + * This means that an agent does not need to check if a breakpoint has changed + * when it encounters the same breakpoint on a successive call. + * Moreover, an agent should remember the breakpoints that are completed + * until the controller removes them from the active list to avoid + * setting those breakpoints again. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Identifies the debuggee. */ + debuggeeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * If set to `true` (recommended), returns `google.rpc.Code.OK` status and + * sets the `wait_expired` response field to `true` when the server-selected + * timeout has expired. + * + * If set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status + * when the server-selected timeout has expired. + */ + successOnTimeout?: boolean; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * A token that, if specified, blocks the method call until the list + * of active breakpoints has changed, or a server-selected timeout has + * expired. The value should be set from the `next_wait_token` field in + * the last response. The initial value should be set to `"init"`. + */ + waitToken?: string; + }): Request; + /** + * Updates the breakpoint state or mutable fields. + * The entire Breakpoint message must be sent back to the controller service. + * + * Updates to active breakpoint fields are only allowed if the new value + * does not change the breakpoint specification. Updates to the `location`, + * `condition` and `expressions` fields should not alter the breakpoint + * semantics. These may only make changes such as canonicalizing a value + * or snapping the location to the correct line of code. + */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Identifies the debuggee being debugged. */ + debuggeeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Breakpoint identifier, unique in the scope of the debuggee. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface DebuggeesResource { + /** + * Registers the debuggee with the controller service. + * + * All agents attached to the same application must call this method with + * exactly the same request content to get back the same stable `debuggee_id`. + * Agents should call this method again whenever `google.rpc.Code.NOT_FOUND` + * is returned from any controller method. + * + * This protocol allows the controller service to disable debuggees, recover + * from data loss, or change the `debuggee_id` format. Agents must handle + * `debuggee_id` value changing upon re-registration. + */ + register(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + breakpoints: BreakpointsResource; + } + interface ControllerResource { + debuggees: DebuggeesResource; + } + interface BreakpointsResource { + /** Deletes the breakpoint from the debuggee. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** ID of the breakpoint to delete. */ + breakpointId: string; + /** JSONP */ + callback?: string; + /** + * The client version making the call. + * Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). + */ + clientVersion?: string; + /** ID of the debuggee whose breakpoint to delete. */ + debuggeeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets breakpoint information. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** ID of the breakpoint to get. */ + breakpointId: string; + /** JSONP */ + callback?: string; + /** + * The client version making the call. + * Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). + */ + clientVersion?: string; + /** ID of the debuggee whose breakpoint to get. */ + debuggeeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all breakpoints for the debuggee. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Only breakpoints with the specified action will pass the filter. */ + "action.value"?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The client version making the call. + * Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). + */ + clientVersion?: string; + /** ID of the debuggee whose breakpoints to list. */ + debuggeeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * When set to `true`, the response includes the list of breakpoints set by + * any user. Otherwise, it includes only breakpoints set by the caller. + */ + includeAllUsers?: boolean; + /** + * When set to `true`, the response includes active and inactive + * breakpoints. Otherwise, it includes only active breakpoints. + */ + includeInactive?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * This field is deprecated. The following fields are always stripped out of + * the result: `stack_frames`, `evaluated_expressions` and `variable_table`. + */ + stripResults?: boolean; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * A wait token that, if specified, blocks the call until the breakpoints + * list has changed, or a server selected timeout has expired. The value + * should be set from the last response. The error code + * `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which + * should be called again with the same `wait_token`. + */ + waitToken?: string; + }): Request; + /** Sets the breakpoint to the debuggee. */ + set(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The client version making the call. + * Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). + */ + clientVersion?: string; + /** ID of the debuggee where the breakpoint is to be set. */ + debuggeeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DebuggeesResource { + /** Lists all the debuggees that the user has access to. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The client version making the call. + * Schema: `domain/type/version` (e.g., `google.com/intellij/v1`). + */ + clientVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * When set to `true`, the result includes all debuggees. Otherwise, the + * result includes only debuggees that are active. + */ + includeInactive?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project number of a Google Cloud project whose debuggees to list. */ + project?: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + breakpoints: BreakpointsResource; + } + interface DebuggerResource { + debuggees: DebuggeesResource; + } + } +} diff --git a/types/gapi.client.clouddebugger/readme.md b/types/gapi.client.clouddebugger/readme.md new file mode 100644 index 0000000000..1b61d87192 --- /dev/null +++ b/types/gapi.client.clouddebugger/readme.md @@ -0,0 +1,58 @@ +# TypeScript typings for Stackdriver Debugger API v2 +Examines the call stack and variables of a running application without stopping or slowing it down. + +For detailed description please check [documentation](http://cloud.google.com/debugger). + +## Installing + +Install typings for Stackdriver Debugger API: +``` +npm install @types/gapi.client.clouddebugger@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('clouddebugger', 'v2', () => { + // now we can use gapi.client.clouddebugger + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // Manage cloud debugger + 'https://www.googleapis.com/auth/cloud_debugger', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Stackdriver Debugger API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.clouddebugger/tsconfig.json b/types/gapi.client.clouddebugger/tsconfig.json new file mode 100644 index 0000000000..de9d4c94bc --- /dev/null +++ b/types/gapi.client.clouddebugger/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.clouddebugger-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.clouddebugger/tslint.json b/types/gapi.client.clouddebugger/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.clouddebugger/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.clouderrorreporting/gapi.client.clouderrorreporting-tests.ts b/types/gapi.client.clouderrorreporting/gapi.client.clouderrorreporting-tests.ts new file mode 100644 index 0000000000..7123a90021 --- /dev/null +++ b/types/gapi.client.clouderrorreporting/gapi.client.clouderrorreporting-tests.ts @@ -0,0 +1,36 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('clouderrorreporting', 'v1beta1', () => { + /** now we can use gapi.client.clouderrorreporting */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Deletes all error events of a given project. */ + await gapi.client.projects.deleteEvents({ + projectName: "projectName", + }); + } +}); diff --git a/types/gapi.client.clouderrorreporting/index.d.ts b/types/gapi.client.clouderrorreporting/index.d.ts new file mode 100644 index 0000000000..a19854416f --- /dev/null +++ b/types/gapi.client.clouderrorreporting/index.d.ts @@ -0,0 +1,614 @@ +// Type definitions for Google Stackdriver Error Reporting API v1beta1 1.0 +// Project: https://cloud.google.com/error-reporting/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://clouderrorreporting.googleapis.com/$discovery/rest?version=v1beta1 + +/// + +declare namespace gapi.client { + /** Load Stackdriver Error Reporting API v1beta1 */ + function load(name: "clouderrorreporting", version: "v1beta1"): PromiseLike; + function load(name: "clouderrorreporting", version: "v1beta1", callback: () => any): void; + + const projects: clouderrorreporting.ProjectsResource; + + namespace clouderrorreporting { + interface ErrorContext { + /** + * The HTTP request which was processed when the error was + * triggered. + */ + httpRequest?: HttpRequestContext; + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + */ + reportLocation?: SourceLocation; + /** + * Source code that was used to build the executable which has + * caused the given error message. + */ + sourceReferences?: SourceReference[]; + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + */ + user?: string; + } + interface ErrorEvent { + /** Data about the context in which the error occurred. */ + context?: ErrorContext; + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + */ + eventTime?: string; + /** The stack trace that was reported or logged by the service. */ + message?: string; + /** The `ServiceContext` for which this error was reported. */ + serviceContext?: ServiceContext; + } + interface ErrorGroup { + /** + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + */ + groupId?: string; + /** + * The group resource name. + * Example: projects/my-project-123/groups/my-groupid + */ + name?: string; + /** Associated tracking issues. */ + trackingIssues?: TrackingIssue[]; + } + interface ErrorGroupStats { + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + */ + affectedServices?: ServiceContext[]; + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + */ + affectedUsersCount?: string; + /** + * Approximate total number of events in the given group that match + * the filter criteria. + */ + count?: string; + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + */ + firstSeenTime?: string; + /** Group data that is independent of the filter criteria. */ + group?: ErrorGroup; + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + */ + lastSeenTime?: string; + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + */ + numAffectedServices?: number; + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + */ + representative?: ErrorEvent; + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + */ + timedCounts?: TimedCount[]; + } + interface HttpRequestContext { + /** The type of HTTP request, such as `GET`, `POST`, etc. */ + method?: string; + /** The referrer information that is provided with the request. */ + referrer?: string; + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + */ + remoteIp?: string; + /** The HTTP response status code for the request. */ + responseStatusCode?: number; + /** The URL of the request. */ + url?: string; + /** The user agent information that is provided with the request. */ + userAgent?: string; + } + interface ListEventsResponse { + /** The error events which match the given request. */ + errorEvents?: ErrorEvent[]; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + */ + nextPageToken?: string; + /** The timestamp specifies the start time to which the request was restricted. */ + timeRangeBegin?: string; + } + interface ListGroupStatsResponse { + /** The error group stats which match the given request. */ + errorGroupStats?: ErrorGroupStats[]; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + */ + nextPageToken?: string; + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + */ + timeRangeBegin?: string; + } + interface ReportedErrorEvent { + /** [Optional] A description of the context in which the error occurred. */ + context?: ErrorContext; + /** + * [Optional] Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + */ + eventTime?: string; + /** + * [Required] The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) + * as returned by V8. + * * **Ruby**: Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + */ + message?: string; + /** [Required] The service context in which this error has occurred. */ + serviceContext?: ServiceContext; + } + interface ServiceContext { + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + */ + resourceType?: string; + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + */ + service?: string; + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + */ + version?: string; + } + interface SourceLocation { + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + */ + filePath?: string; + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + */ + functionName?: string; + /** 1-based. 0 indicates that the line number is unknown. */ + lineNumber?: number; + } + interface SourceReference { + /** + * Optional. A URI string identifying the repository. + * Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" + */ + repository?: string; + /** + * The canonical and persistent identifier of the deployed revision. + * Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" + */ + revisionId?: string; + } + interface TimedCount { + /** Approximate number of occurrences in the given time period. */ + count?: string; + /** End of the time period to which `count` refers (excluded). */ + endTime?: string; + /** Start of the time period to which `count` refers (included). */ + startTime?: string; + } + interface TrackingIssue { + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: https://github.com/user/project/issues/4 + */ + url?: string; + } + interface EventsResource { + /** Lists the specified events. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** [Required] The group for which events shall be returned. */ + groupId?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** [Optional] The maximum number of results to return per response. */ + pageSize?: number; + /** [Optional] A `next_page_token` provided by a previous response. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * [Required] The resource name of the Google Cloud Platform project. Written + * as `projects/` plus the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + */ + projectName: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * [Optional] The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + */ + "serviceFilter.resourceType"?: string; + /** + * [Optional] The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + */ + "serviceFilter.service"?: string; + /** + * [Optional] The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + */ + "serviceFilter.version"?: string; + /** Restricts the query to the specified time range. */ + "timeRange.period"?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Report an individual error event. + * + * This endpoint accepts either an OAuth token, + * or an + * API key + * for authentication. To use an API key, append it to the URL as the value of + * a `key` parameter. For example: + *
POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456
+ */ + report(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * [Required] The resource name of the Google Cloud Platform project. Written + * as `projects/` plus the + * [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + */ + projectName: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface GroupStatsResource { + /** Lists the specified groups. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** + * [Optional] The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + */ + alignment?: string; + /** + * [Optional] Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + */ + alignmentTime?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** [Optional] List all ErrorGroupStats with these IDs. */ + groupId?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * [Optional] The sort order in which the results are returned. + * Default is `COUNT_DESC`. + */ + order?: string; + /** + * [Optional] The maximum number of results to return per response. + * Default is 20. + */ + pageSize?: number; + /** + * [Optional] A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * [Required] The resource name of the Google Cloud Platform project. Written + * as projects/ plus the + * Google Cloud + * Platform project ID. + * + * Example: projects/my-project-123. + */ + projectName: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * [Optional] The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + */ + "serviceFilter.resourceType"?: string; + /** + * [Optional] The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + */ + "serviceFilter.service"?: string; + /** + * [Optional] The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + */ + "serviceFilter.version"?: string; + /** Restricts the query to the specified time range. */ + "timeRange.period"?: string; + /** + * [Optional] The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + */ + timedCountDuration?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface GroupsResource { + /** Get the specified group. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * [Required] The group resource name. Written as + * projects/projectID/groups/group_name. + * Call + * + * groupStats.list to return a list of groups belonging to + * this project. + * + * Example: projects/my-project-123/groups/my-group + */ + groupName: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Replace the data for the specified group. + * Fails if the group does not exist. + */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The group resource name. + * Example: projects/my-project-123/groups/my-groupid + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ProjectsResource { + /** Deletes all error events of a given project. */ + deleteEvents(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * [Required] The resource name of the Google Cloud Platform project. Written + * as `projects/` plus the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + */ + projectName: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + events: EventsResource; + groupStats: GroupStatsResource; + groups: GroupsResource; + } + } +} diff --git a/types/gapi.client.clouderrorreporting/readme.md b/types/gapi.client.clouderrorreporting/readme.md new file mode 100644 index 0000000000..aacd09c395 --- /dev/null +++ b/types/gapi.client.clouderrorreporting/readme.md @@ -0,0 +1,60 @@ +# TypeScript typings for Stackdriver Error Reporting API v1beta1 +Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors. + +For detailed description please check [documentation](https://cloud.google.com/error-reporting/). + +## Installing + +Install typings for Stackdriver Error Reporting API: +``` +npm install @types/gapi.client.clouderrorreporting@v1beta1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('clouderrorreporting', 'v1beta1', () => { + // now we can use gapi.client.clouderrorreporting + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Stackdriver Error Reporting API resources: + +```typescript + +/* +Deletes all error events of a given project. +*/ +await gapi.client.projects.deleteEvents({ projectName: "projectName", }); +``` \ No newline at end of file diff --git a/types/gapi.client.clouderrorreporting/tsconfig.json b/types/gapi.client.clouderrorreporting/tsconfig.json new file mode 100644 index 0000000000..cc1296f8ee --- /dev/null +++ b/types/gapi.client.clouderrorreporting/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.clouderrorreporting-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.clouderrorreporting/tslint.json b/types/gapi.client.clouderrorreporting/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.clouderrorreporting/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudfunctions/gapi.client.cloudfunctions-tests.ts b/types/gapi.client.cloudfunctions/gapi.client.cloudfunctions-tests.ts new file mode 100644 index 0000000000..fe11f8e612 --- /dev/null +++ b/types/gapi.client.cloudfunctions/gapi.client.cloudfunctions-tests.ts @@ -0,0 +1,58 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudfunctions', 'v1', () => { + /** now we can use gapi.client.cloudfunctions */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + await gapi.client.operations.get({ + name: "name", + }); + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * NOTE: the `name` binding allows API services to override the binding + * to use different resource name schemes, such as `users/*/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/*}/operations"` to their service configuration. + * For backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding + * is the parent resource, without the operations collection id. + */ + await gapi.client.operations.list({ + filter: "filter", + name: "name", + pageSize: 3, + pageToken: "pageToken", + }); + } +}); diff --git a/types/gapi.client.cloudfunctions/index.d.ts b/types/gapi.client.cloudfunctions/index.d.ts new file mode 100644 index 0000000000..f3cd5cc4a2 --- /dev/null +++ b/types/gapi.client.cloudfunctions/index.d.ts @@ -0,0 +1,249 @@ +// Type definitions for Google Google Cloud Functions API v1 1.0 +// Project: https://cloud.google.com/functions +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudfunctions.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Functions API v1 */ + function load(name: "cloudfunctions", version: "v1"): PromiseLike; + function load(name: "cloudfunctions", version: "v1", callback: () => any): void; + + const operations: cloudfunctions.OperationsResource; + + const projects: cloudfunctions.ProjectsResource; + + namespace cloudfunctions { + interface ListLocationsResponse { + /** A list of locations that matches the specified filter in the request. */ + locations?: Location[]; + /** The standard List next-page token. */ + nextPageToken?: string; + } + interface ListOperationsResponse { + /** The standard List next-page token. */ + nextPageToken?: string; + /** A list of operations that matches the specified filter in the request. */ + operations?: Operation[]; + } + interface Location { + /** + * Cross-service attributes for the location. For example + * + * {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: Record; + /** The canonical id for this location. For example: `"us-east1"`. */ + locationId?: string; + /** + * Service-specific metadata. For example the available capacity at the given + * location. + */ + metadata?: Record; + /** + * Resource name for the location, which may vary between implementations. + * For example: `"projects/example-project/locations/us-east1"` + */ + name?: string; + } + interface Operation { + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + */ + response?: Record; + } + interface OperationMetadataV1Beta2 { + /** The original request that started the operation. */ + request?: Record; + /** + * Target of the operation - for example + * projects/project-1/locations/region-1/functions/function-1 + */ + target?: string; + /** Type of operation. */ + type?: string; + /** + * Version id of the function created or updated by an API call. + * This field is only pupulated for Create and Update operations. + */ + versionId?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface OperationsResource { + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * NOTE: the `name` binding allows API services to override the binding + * to use different resource name schemes, such as `users/*/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/*}/operations"` to their service configuration. + * For backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding + * is the parent resource, without the operations collection id. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation's parent resource. */ + name?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface LocationsResource { + /** Lists information about the supported locations for this service. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource that owns the locations collection, if applicable. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ProjectsResource { + locations: LocationsResource; + } + } +} diff --git a/types/gapi.client.cloudfunctions/readme.md b/types/gapi.client.cloudfunctions/readme.md new file mode 100644 index 0000000000..2d9c14ec33 --- /dev/null +++ b/types/gapi.client.cloudfunctions/readme.md @@ -0,0 +1,75 @@ +# TypeScript typings for Google Cloud Functions API v1 +API for managing lightweight user-provided functions executed in response to events. +For detailed description please check [documentation](https://cloud.google.com/functions). + +## Installing + +Install typings for Google Cloud Functions API: +``` +npm install @types/gapi.client.cloudfunctions@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudfunctions', 'v1', () => { + // now we can use gapi.client.cloudfunctions + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Functions API resources: + +```typescript + +/* +Gets the latest state of a long-running operation. Clients can use this +method to poll the operation result at intervals as recommended by the API +service. +*/ +await gapi.client.operations.get({ name: "name", }); + +/* +Lists operations that match the specified filter in the request. If the +server doesn't support this method, it returns `UNIMPLEMENTED`. + +NOTE: the `name` binding allows API services to override the binding +to use different resource name schemes, such as `users/*/operations`. To +override the binding, API services can add a binding such as +`"/v1/{name=users/*}/operations"` to their service configuration. +For backwards compatibility, the default name includes the operations +collection id, however overriding users must ensure the name binding +is the parent resource, without the operations collection id. +*/ +await gapi.client.operations.list({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.cloudfunctions/tsconfig.json b/types/gapi.client.cloudfunctions/tsconfig.json new file mode 100644 index 0000000000..720b272f2e --- /dev/null +++ b/types/gapi.client.cloudfunctions/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudfunctions-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudfunctions/tslint.json b/types/gapi.client.cloudfunctions/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudfunctions/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudiot/gapi.client.cloudiot-tests.ts b/types/gapi.client.cloudiot/gapi.client.cloudiot-tests.ts new file mode 100644 index 0000000000..f9e8f3f18b --- /dev/null +++ b/types/gapi.client.cloudiot/gapi.client.cloudiot-tests.ts @@ -0,0 +1,34 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudiot', 'v1', () => { + /** now we can use gapi.client.cloudiot */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** Register and manage devices in the Google Cloud IoT service */ + 'https://www.googleapis.com/auth/cloudiot', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.cloudiot/index.d.ts b/types/gapi.client.cloudiot/index.d.ts new file mode 100644 index 0000000000..eeb0647503 --- /dev/null +++ b/types/gapi.client.cloudiot/index.d.ts @@ -0,0 +1,1161 @@ +// Type definitions for Google Google Cloud IoT API v1 1.0 +// Project: https://cloud.google.com/iot +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudiot.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud IoT API v1 */ + function load(name: "cloudiot", version: "v1"): PromiseLike; + function load(name: "cloudiot", version: "v1", callback: () => any): void; + + const projects: cloudiot.ProjectsResource; + + namespace cloudiot { + interface AuditConfig { + /** + * The configuration for logging of each type of permission. + * Next ID: 4 + */ + auditLogConfigs?: AuditLogConfig[]; + exemptedMembers?: string[]; + /** + * Specifies a service that will be enabled for audit logging. + * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + * `allServices` is a special value that covers all services. + */ + service?: string; + } + interface AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. + * Follows the same format of Binding.members. + */ + exemptedMembers?: string[]; + /** The log type that this config enables. */ + logType?: string; + } + interface Binding { + /** + * The condition that is associated with this binding. + * NOTE: an unsatisfied condition will not allow user access via current + * binding. Different bindings, including their conditions, are examined + * independently. + * This field is GOOGLE_INTERNAL. + */ + condition?: Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: + * + * * `allUsers`: A special identifier that represents anyone who is + * on the internet; with or without a Google account. + * + * * `allAuthenticatedUsers`: A special identifier that represents anyone + * who is authenticated with a Google account or a service account. + * + * * `user:{emailid}`: An email address that represents a specific Google + * account. For example, `alice@gmail.com` or `joe@example.com`. + * + * + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. + * + * * `group:{emailid}`: An email address that represents a Google group. + * For example, `admins@example.com`. + * + * + * * `domain:{domain}`: A Google Apps domain name that represents all the + * users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. + * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Required + */ + role?: string; + } + interface Device { + /** + * If a device is blocked, connections or requests from this device will fail. + * Can be used to temporarily prevent the device from connecting if, for + * example, the sensor is generating bad data and needs maintenance. + */ + blocked?: boolean; + /** + * The most recent device configuration, which is eventually sent from + * Cloud IoT Core to the device. If not present on creation, the + * configuration will be initialized with an empty payload and version value + * of `1`. To update this field after creation, use the + * `DeviceManager.ModifyCloudToDeviceConfig` method. + */ + config?: DeviceConfig; + /** + * The credentials used to authenticate this device. To allow credential + * rotation without interruption, multiple device credentials can be bound to + * this device. No more than 3 credentials can be bound to a single device at + * a time. When new credentials are added to a device, they are verified + * against the registry credentials. For details, see the description of the + * `DeviceRegistry.credentials` field. + */ + credentials?: DeviceCredential[]; + /** + * The user-defined device identifier. The device ID must be unique + * within a device registry. + */ + id?: string; + /** + * [Output only] The last time a cloud-to-device config version acknowledgment + * was received from the device. This field is only for configurations + * sent through MQTT. + */ + lastConfigAckTime?: string; + /** + * [Output only] The last time a cloud-to-device config version was sent to + * the device. + */ + lastConfigSendTime?: string; + /** + * [Output only] The error message of the most recent error, such as a failure + * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this + * field. If no errors have occurred, this field has an empty message + * and the status code 0 == OK. Otherwise, this field is expected to have a + * status code other than OK. + */ + lastErrorStatus?: Status; + /** + * [Output only] The time the most recent error occurred, such as a failure to + * publish to Cloud Pub/Sub. This field is the timestamp of + * 'last_error_status'. + */ + lastErrorTime?: string; + /** + * [Output only] The last time a telemetry event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + */ + lastEventTime?: string; + /** + * [Output only] The last time a heartbeat was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. This field is only for devices connecting through MQTT. + */ + lastHeartbeatTime?: string; + /** + * [Output only] The last time a state event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + */ + lastStateTime?: string; + /** + * The metadata key-value pairs assigned to the device. This metadata is not + * interpreted or indexed by Cloud IoT Core. It can be used to add contextual + * information for the device. + * + * Keys must conform to the regular expression [a-zA-Z0-9-_]+ and be less than + * 128 bytes in length. + * + * Values are free-form strings. Each value must be less than or equal to 32 + * KB in size. + * + * The total size of all keys and values must be less than 256 KB, and the + * maximum number of key-value pairs is 500. + */ + metadata?: Record; + /** + * The resource path name. For example, + * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + * When `name` is populated as a response from the service, it always ends + * in the device numeric ID. + */ + name?: string; + /** + * [Output only] A server-defined unique numeric ID for the device. This is a + * more compact way to identify devices, and it is globally unique. + */ + numId?: string; + /** + * [Output only] The state most recently received from the device. If no state + * has been reported, this field is not present. + */ + state?: DeviceState; + } + interface DeviceConfig { + /** The device configuration data. */ + binaryData?: string; + /** + * [Output only] The time at which this configuration version was updated in + * Cloud IoT Core. This timestamp is set by the server. + */ + cloudUpdateTime?: string; + /** + * [Output only] The time at which Cloud IoT Core received the + * acknowledgment from the device, indicating that the device has received + * this configuration version. If this field is not present, the device has + * not yet acknowledged that it received this version. Note that when + * the config was sent to the device, many config versions may have been + * available in Cloud IoT Core while the device was disconnected, and on + * connection, only the latest version is sent to the device. Some + * versions may never be sent to the device, and therefore are never + * acknowledged. This timestamp is set by Cloud IoT Core. + */ + deviceAckTime?: string; + /** + * [Output only] The version of this update. The version number is assigned by + * the server, and is always greater than 0 after device creation. The + * version must be 0 on the `CreateDevice` request if a `config` is + * specified; the response of `CreateDevice` will always have a value of 1. + */ + version?: string; + } + interface DeviceCredential { + /** + * [Optional] The time at which this credential becomes invalid. This + * credential will be ignored for new client authentication requests after + * this timestamp; however, it will not be automatically deleted. + */ + expirationTime?: string; + /** + * A public key used to verify the signature of JSON Web Tokens (JWTs). + * When adding a new device credential, either via device creation or via + * modifications, this public key credential may be required to be signed by + * one of the registry level certificates. More specifically, if the + * registry contains at least one certificate, any new device credential + * must be signed by one of the registry certificates. As a result, + * when the registry contains certificates, only X.509 certificates are + * accepted as device credentials. However, if the registry does + * not contain a certificate, self-signed certificates and public keys will + * be accepted. New device credentials must be different from every + * registry-level certificate. + */ + publicKey?: PublicKeyCredential; + } + interface DeviceRegistry { + /** + * The credentials used to verify the device credentials. No more than 10 + * credentials can be bound to a single registry at a time. The verification + * process occurs at the time of device creation or update. If this field is + * empty, no verification is performed. Otherwise, the credentials of a newly + * created device or added credentials of an updated device should be signed + * with one of these registry credentials. + * + * Note, however, that existing devices will never be affected by + * modifications to this list of credentials: after a device has been + * successfully created in a registry, it should be able to connect even if + * its registry credentials are revoked, deleted, or modified. + */ + credentials?: RegistryCredential[]; + /** + * The configuration for notification of telemetry events received from the + * device. All telemetry events that were successfully published by the + * device and acknowledged by Cloud IoT Core are guaranteed to be + * delivered to Cloud Pub/Sub. Only the first configuration is used. + */ + eventNotificationConfigs?: EventNotificationConfig[]; + /** The DeviceService (HTTP) configuration for this device registry. */ + httpConfig?: HttpConfig; + /** The identifier of this device registry. For example, `myRegistry`. */ + id?: string; + /** The MQTT configuration for this device registry. */ + mqttConfig?: MqttConfig; + /** + * The resource path name. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + name?: string; + /** + * The configuration for notification of new states received from the device. + * State updates are guaranteed to be stored in the state history, but + * notifications to Cloud Pub/Sub are not guaranteed. For example, if + * permissions are misconfigured or the specified topic doesn't exist, no + * notification will be published but the state will still be stored in Cloud + * IoT Core. + */ + stateNotificationConfig?: StateNotificationConfig; + } + interface DeviceState { + /** The device state data. */ + binaryData?: string; + /** + * [Output only] The time at which this state version was updated in Cloud + * IoT Core. + */ + updateTime?: string; + } + interface EventNotificationConfig { + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + */ + pubsubTopicName?: string; + } + interface Expr { + /** + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + */ + description?: string; + /** + * Textual representation of an expression in + * Common Expression Language syntax. + * + * The application context of the containing message determines which + * well-known feature set of CEL is supported. + */ + expression?: string; + /** + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + */ + location?: string; + /** + * An optional title for the expression, i.e. a short string describing + * its purpose. This can be used e.g. in UIs which allow to enter the + * expression. + */ + title?: string; + } + interface HttpConfig { + /** + * If enabled, allows devices to use DeviceService via the HTTP protocol. + * Otherwise, any requests to DeviceService will fail for this registry. + */ + httpEnabledState?: string; + } + interface ListDeviceConfigVersionsResponse { + /** + * The device configuration for the last few versions. Versions are listed + * in decreasing order, starting from the most recent one. + */ + deviceConfigs?: DeviceConfig[]; + } + interface ListDeviceRegistriesResponse { + /** The registries that matched the query. */ + deviceRegistries?: DeviceRegistry[]; + /** + * If not empty, indicates that there may be more registries that match the + * request; this value should be passed in a new + * `ListDeviceRegistriesRequest`. + */ + nextPageToken?: string; + } + interface ListDeviceStatesResponse { + /** + * The last few device states. States are listed in descending order of server + * update time, starting from the most recent one. + */ + deviceStates?: DeviceState[]; + } + interface ListDevicesResponse { + /** The devices that match the request. */ + devices?: Device[]; + /** + * If not empty, indicates that there may be more devices that match the + * request; this value should be passed in a new `ListDevicesRequest`. + */ + nextPageToken?: string; + } + interface ModifyCloudToDeviceConfigRequest { + /** The configuration data for the device. */ + binaryData?: string; + /** + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + */ + versionToUpdate?: string; + } + interface MqttConfig { + /** + * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + * connections to this registry will fail. + */ + mqttEnabledState?: string; + } + interface Policy { + /** Specifies cloud audit logging configuration for this policy. */ + auditConfigs?: AuditConfig[]; + /** + * Associates a list of `members` to a `role`. + * `bindings` with no members will result in an error. + */ + bindings?: Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the policy. + * + * If no `etag` is provided in the call to `setIamPolicy`, then the existing + * policy is overwritten blindly. + */ + etag?: string; + iamOwned?: boolean; + /** Version of the `Policy`. The default version is 0. */ + version?: number; + } + interface PublicKeyCertificate { + /** The certificate data. */ + certificate?: string; + /** The certificate format. */ + format?: string; + /** [Output only] The certificate details. Used only for X.509 certificates. */ + x509Details?: X509CertificateDetails; + } + interface PublicKeyCredential { + /** The format of the key. */ + format?: string; + /** The key data. */ + key?: string; + } + interface RegistryCredential { + /** A public key certificate used to verify the device credentials. */ + publicKeyCertificate?: PublicKeyCertificate; + } + interface SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + policy?: Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * paths: "bindings, etag" + * This field is only used by Cloud IAM. + */ + updateMask?: string; + } + interface StateNotificationConfig { + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + */ + pubsubTopicName?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[]; + } + interface TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + interface X509CertificateDetails { + /** The time the certificate becomes invalid. */ + expiryTime?: string; + /** The entity that signed the certificate. */ + issuer?: string; + /** The type of public key in the certificate. */ + publicKeyType?: string; + /** The algorithm used to sign the certificate. */ + signatureAlgorithm?: string; + /** The time the certificate becomes valid. */ + startTime?: string; + /** The entity the certificate and public key belong to. */ + subject?: string; + } + interface ConfigVersionsResource { + /** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + name: string; + /** + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + */ + numVersions?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface StatesResource { + /** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + name: string; + /** + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + */ + numStates?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DevicesResource { + /** Creates a device in a device registry. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes a device. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets details about a device. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** List devices in a device registry. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * 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. + */ + deviceIds?: string; + /** + * A list of device numerical ids. If empty, it will ignore this field. This + * field cannot hold more than 10,000 entries. + */ + deviceNumIds?: string; + /** + * 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. + */ + fieldMask?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * 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. + */ + pageSize?: number; + /** + * 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. + */ + pageToken?: string; + /** + * The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + */ + modifyCloudToDeviceConfig(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates a device. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource path name. For example, + * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + * When `name` is populated as a response from the service, it always ends + * in the device numeric ID. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `enabled_state`, and `metadata` + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + configVersions: ConfigVersionsResource; + states: StatesResource; + } + interface RegistriesResource { + /** Creates a device registry that contains devices. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes a device registry configuration. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets a device registry configuration. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + */ + getIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists device registries. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The maximum number of registries 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. + */ + pageSize?: number; + /** + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call, and + * that the system should return the next page of data. + */ + pageToken?: string; + /** + * The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates a device registry configuration. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource path name. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `mqtt_config`, and + * `state_notification_config`. + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + */ + setIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + */ + testIamPermissions(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + devices: DevicesResource; + } + interface LocationsResource { + registries: RegistriesResource; + } + interface ProjectsResource { + locations: LocationsResource; + } + } +} diff --git a/types/gapi.client.cloudiot/readme.md b/types/gapi.client.cloudiot/readme.md new file mode 100644 index 0000000000..290068ffb7 --- /dev/null +++ b/types/gapi.client.cloudiot/readme.md @@ -0,0 +1,58 @@ +# TypeScript typings for Google Cloud IoT API v1 +Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform. + +For detailed description please check [documentation](https://cloud.google.com/iot). + +## Installing + +Install typings for Google Cloud IoT API: +``` +npm install @types/gapi.client.cloudiot@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudiot', 'v1', () => { + // now we can use gapi.client.cloudiot + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // Register and manage devices in the Google Cloud IoT service + 'https://www.googleapis.com/auth/cloudiot', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud IoT API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.cloudiot/tsconfig.json b/types/gapi.client.cloudiot/tsconfig.json new file mode 100644 index 0000000000..03ed93c76d --- /dev/null +++ b/types/gapi.client.cloudiot/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudiot-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudiot/tslint.json b/types/gapi.client.cloudiot/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudiot/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudkms/gapi.client.cloudkms-tests.ts b/types/gapi.client.cloudkms/gapi.client.cloudkms-tests.ts new file mode 100644 index 0000000000..07eeeeb5d7 --- /dev/null +++ b/types/gapi.client.cloudkms/gapi.client.cloudkms-tests.ts @@ -0,0 +1,32 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudkms', 'v1', () => { + /** now we can use gapi.client.cloudkms */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.cloudkms/index.d.ts b/types/gapi.client.cloudkms/index.d.ts new file mode 100644 index 0000000000..82f44805fd --- /dev/null +++ b/types/gapi.client.cloudkms/index.d.ts @@ -0,0 +1,1285 @@ +// Type definitions for Google Google Cloud Key Management Service (KMS) API v1 1.0 +// Project: https://cloud.google.com/kms/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudkms.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Key Management Service (KMS) API v1 */ + function load(name: "cloudkms", version: "v1"): PromiseLike; + function load(name: "cloudkms", version: "v1", callback: () => any): void; + + const projects: cloudkms.ProjectsResource; + + namespace cloudkms { + interface AuditConfig { + /** + * The configuration for logging of each type of permission. + * Next ID: 4 + */ + auditLogConfigs?: AuditLogConfig[]; + exemptedMembers?: string[]; + /** + * Specifies a service that will be enabled for audit logging. + * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + * `allServices` is a special value that covers all services. + */ + service?: string; + } + interface AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. + * Follows the same format of Binding.members. + */ + exemptedMembers?: string[]; + /** The log type that this config enables. */ + logType?: string; + } + interface Binding { + /** + * The condition that is associated with this binding. + * NOTE: an unsatisfied condition will not allow user access via current + * binding. Different bindings, including their conditions, are examined + * independently. + * This field is GOOGLE_INTERNAL. + */ + condition?: Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: + * + * * `allUsers`: A special identifier that represents anyone who is + * on the internet; with or without a Google account. + * + * * `allAuthenticatedUsers`: A special identifier that represents anyone + * who is authenticated with a Google account or a service account. + * + * * `user:{emailid}`: An email address that represents a specific Google + * account. For example, `alice@gmail.com` or `joe@example.com`. + * + * + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. + * + * * `group:{emailid}`: An email address that represents a Google group. + * For example, `admins@example.com`. + * + * + * * `domain:{domain}`: A Google Apps domain name that represents all the + * users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. + * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Required + */ + role?: string; + } + interface CryptoKey { + /** Output only. The time at which this CryptoKey was created. */ + createTime?: string; + /** Labels with user defined metadata. */ + labels?: Record; + /** + * Output only. The resource name for this CryptoKey in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + */ + name?: string; + /** + * At next_rotation_time, the Key Management Service will automatically: + * + * 1. Create a new version of this CryptoKey. + * 2. Mark the new version as primary. + * + * Key rotations performed manually via + * CreateCryptoKeyVersion and + * UpdateCryptoKeyPrimaryVersion + * do not affect next_rotation_time. + */ + nextRotationTime?: string; + /** + * Output only. A copy of the "primary" CryptoKeyVersion that will be used + * by Encrypt when this CryptoKey is given + * in EncryptRequest.name. + * + * The CryptoKey's primary version can be updated via + * UpdateCryptoKeyPrimaryVersion. + */ + primary?: CryptoKeyVersion; + /** + * The immutable purpose of this CryptoKey. Currently, the only acceptable + * purpose is ENCRYPT_DECRYPT. + */ + purpose?: string; + /** + * next_rotation_time will be advanced by this period when the service + * automatically rotates a key. Must be at least one day. + * + * If rotation_period is set, next_rotation_time must also be set. + */ + rotationPeriod?: string; + } + interface CryptoKeyVersion { + /** Output only. The time at which this CryptoKeyVersion was created. */ + createTime?: string; + /** + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if state is + * DESTROYED. + */ + destroyEventTime?: string; + /** + * Output only. The time this CryptoKeyVersion's key material is scheduled + * for destruction. Only present if state is + * DESTROY_SCHEDULED. + */ + destroyTime?: string; + /** + * Output only. The resource name for this CryptoKeyVersion in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + */ + name?: string; + /** The current state of the CryptoKeyVersion. */ + state?: string; + } + interface DecryptRequest { + /** + * Optional data that must match the data originally supplied in + * EncryptRequest.additional_authenticated_data. + */ + additionalAuthenticatedData?: string; + /** + * Required. The encrypted data originally returned in + * EncryptResponse.ciphertext. + */ + ciphertext?: string; + } + interface DecryptResponse { + /** The decrypted data originally supplied in EncryptRequest.plaintext. */ + plaintext?: string; + } + interface EncryptRequest { + /** + * Optional data that, if specified, must also be provided during decryption + * through DecryptRequest.additional_authenticated_data. Must be no + * larger than 64KiB. + */ + additionalAuthenticatedData?: string; + /** Required. The data to encrypt. Must be no larger than 64KiB. */ + plaintext?: string; + } + interface EncryptResponse { + /** The encrypted data. */ + ciphertext?: string; + /** The resource name of the CryptoKeyVersion used in encryption. */ + name?: string; + } + interface Expr { + /** + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + */ + description?: string; + /** + * Textual representation of an expression in + * Common Expression Language syntax. + * + * The application context of the containing message determines which + * well-known feature set of CEL is supported. + */ + expression?: string; + /** + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + */ + location?: string; + /** + * An optional title for the expression, i.e. a short string describing + * its purpose. This can be used e.g. in UIs which allow to enter the + * expression. + */ + title?: string; + } + interface KeyRing { + /** Output only. The time at which this KeyRing was created. */ + createTime?: string; + /** + * Output only. The resource name for the KeyRing in the format + * `projects/*/locations/*/keyRings/*`. + */ + name?: string; + } + interface ListCryptoKeyVersionsResponse { + /** The list of CryptoKeyVersions. */ + cryptoKeyVersions?: CryptoKeyVersion[]; + /** + * A token to retrieve next page of results. Pass this value in + * ListCryptoKeyVersionsRequest.page_token to retrieve the next page of + * results. + */ + nextPageToken?: string; + /** + * The total number of CryptoKeyVersions that matched the + * query. + */ + totalSize?: number; + } + interface ListCryptoKeysResponse { + /** The list of CryptoKeys. */ + cryptoKeys?: CryptoKey[]; + /** + * A token to retrieve next page of results. Pass this value in + * ListCryptoKeysRequest.page_token to retrieve the next page of results. + */ + nextPageToken?: string; + /** The total number of CryptoKeys that matched the query. */ + totalSize?: number; + } + interface ListKeyRingsResponse { + /** The list of KeyRings. */ + keyRings?: KeyRing[]; + /** + * A token to retrieve next page of results. Pass this value in + * ListKeyRingsRequest.page_token to retrieve the next page of results. + */ + nextPageToken?: string; + /** The total number of KeyRings that matched the query. */ + totalSize?: number; + } + interface ListLocationsResponse { + /** A list of locations that matches the specified filter in the request. */ + locations?: Location[]; + /** The standard List next-page token. */ + nextPageToken?: string; + } + interface Location { + /** + * Cross-service attributes for the location. For example + * + * {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: Record; + /** The canonical id for this location. For example: `"us-east1"`. */ + locationId?: string; + /** + * Service-specific metadata. For example the available capacity at the given + * location. + */ + metadata?: Record; + /** + * Resource name for the location, which may vary between implementations. + * For example: `"projects/example-project/locations/us-east1"` + */ + name?: string; + } + interface Policy { + /** Specifies cloud audit logging configuration for this policy. */ + auditConfigs?: AuditConfig[]; + /** + * Associates a list of `members` to a `role`. + * `bindings` with no members will result in an error. + */ + bindings?: Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the policy. + * + * If no `etag` is provided in the call to `setIamPolicy`, then the existing + * policy is overwritten blindly. + */ + etag?: string; + iamOwned?: boolean; + /** Version of the `Policy`. The default version is 0. */ + version?: number; + } + interface SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + policy?: Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * paths: "bindings, etag" + * This field is only used by Cloud IAM. + */ + updateMask?: string; + } + interface TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[]; + } + interface TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + interface UpdateCryptoKeyPrimaryVersionRequest { + /** The id of the child CryptoKeyVersion to use as primary. */ + cryptoKeyVersionId?: string; + } + interface CryptoKeyVersionsResource { + /** + * Create a new CryptoKeyVersion in a CryptoKey. + * + * The server will assign the next sequential id. If unset, + * state will be set to + * ENABLED. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Required. The name of the CryptoKey associated with + * the CryptoKeyVersions. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Schedule a CryptoKeyVersion for destruction. + * + * Upon calling this method, CryptoKeyVersion.state will be set to + * DESTROY_SCHEDULED + * and destroy_time will be set to a time 24 + * hours in the future, at which point the state + * will be changed to + * DESTROYED, and the key + * material will be irrevocably destroyed. + * + * Before the destroy_time is reached, + * RestoreCryptoKeyVersion may be called to reverse the process. + */ + destroy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource name of the CryptoKeyVersion to destroy. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Returns metadata for a given CryptoKeyVersion. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the CryptoKeyVersion to get. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists CryptoKeyVersions. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Optional limit on the number of CryptoKeyVersions to + * include in the response. Further CryptoKeyVersions can + * subsequently be obtained by including the + * ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * Optional pagination token, returned earlier via + * ListCryptoKeyVersionsResponse.next_page_token. + */ + pageToken?: string; + /** + * Required. The resource name of the CryptoKey to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Update a CryptoKeyVersion's metadata. + * + * state may be changed between + * ENABLED and + * DISABLED using this + * method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to + * move between other states. + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Output only. The resource name for this CryptoKeyVersion in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required list of fields to be updated in this request. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Restore a CryptoKeyVersion in the + * DESTROY_SCHEDULED, + * state. + * + * Upon restoration of the CryptoKeyVersion, state + * will be set to DISABLED, + * and destroy_time will be cleared. + */ + restore(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource name of the CryptoKeyVersion to restore. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface CryptoKeysResource { + /** + * Create a new CryptoKey within a KeyRing. + * + * CryptoKey.purpose is required. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + */ + cryptoKeyId?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Required. The name of the KeyRing associated with the + * CryptoKeys. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Decrypts data that was protected by Encrypt. */ + decrypt(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. The resource name of the CryptoKey to use for decryption. + * The server will choose the appropriate version. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Encrypts data, so that it can only be recovered by a call to Decrypt. */ + encrypt(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. The resource name of the CryptoKey or CryptoKeyVersion + * to use for encryption. + * + * If a CryptoKey is specified, the server will use its + * primary version. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns metadata for a given CryptoKey, as well as its + * primary CryptoKeyVersion. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the CryptoKey to get. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + */ + getIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists CryptoKeys. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Optional limit on the number of CryptoKeys to include in the + * response. Further CryptoKeys can subsequently be obtained by + * including the ListCryptoKeysResponse.next_page_token in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * Optional pagination token, returned earlier via + * ListCryptoKeysResponse.next_page_token. + */ + pageToken?: string; + /** + * Required. The resource name of the KeyRing to list, in the format + * `projects/*/locations/*/keyRings/*`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Update a CryptoKey. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Output only. The resource name for this CryptoKey in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required list of fields to be updated in this request. */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + */ + setIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + */ + testIamPermissions(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Update the version of a CryptoKey that will be used in Encrypt */ + updatePrimaryVersion(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource name of the CryptoKey to update. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + cryptoKeyVersions: CryptoKeyVersionsResource; + } + interface KeyRingsResource { + /** Create a new KeyRing in a given Project and Location. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + */ + keyRingId?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Required. The resource name of the location associated with the + * KeyRings, in the format `projects/*/locations/*`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Returns metadata for a given KeyRing. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the KeyRing to get. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + */ + getIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists KeyRings. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Optional limit on the number of KeyRings to include in the + * response. Further KeyRings can subsequently be obtained by + * including the ListKeyRingsResponse.next_page_token in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * Optional pagination token, returned earlier via + * ListKeyRingsResponse.next_page_token. + */ + pageToken?: string; + /** + * Required. The resource name of the location associated with the + * KeyRings, in the format `projects/*/locations/*`. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + */ + setIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns permissions that a caller has on the specified resource. + * If the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + */ + testIamPermissions(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + cryptoKeys: CryptoKeysResource; + } + interface LocationsResource { + /** Get information about a location. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Resource name for the location. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists information about the supported locations for this service. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource that owns the locations collection, if applicable. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + keyRings: KeyRingsResource; + } + interface ProjectsResource { + locations: LocationsResource; + } + } +} diff --git a/types/gapi.client.cloudkms/readme.md b/types/gapi.client.cloudkms/readme.md new file mode 100644 index 0000000000..23c623c02d --- /dev/null +++ b/types/gapi.client.cloudkms/readme.md @@ -0,0 +1,54 @@ +# TypeScript typings for Google Cloud Key Management Service (KMS) API v1 +Manages encryption for your cloud services the same way you do on-premises. You can generate, use, rotate, and destroy AES256 encryption keys. +For detailed description please check [documentation](https://cloud.google.com/kms/). + +## Installing + +Install typings for Google Cloud Key Management Service (KMS) API: +``` +npm install @types/gapi.client.cloudkms@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudkms', 'v1', () => { + // now we can use gapi.client.cloudkms + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Key Management Service (KMS) API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.cloudkms/tsconfig.json b/types/gapi.client.cloudkms/tsconfig.json new file mode 100644 index 0000000000..ff982b97d1 --- /dev/null +++ b/types/gapi.client.cloudkms/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudkms-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudkms/tslint.json b/types/gapi.client.cloudkms/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudkms/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudmonitoring/gapi.client.cloudmonitoring-tests.ts b/types/gapi.client.cloudmonitoring/gapi.client.cloudmonitoring-tests.ts new file mode 100644 index 0000000000..c14ba534aa --- /dev/null +++ b/types/gapi.client.cloudmonitoring/gapi.client.cloudmonitoring-tests.ts @@ -0,0 +1,97 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudmonitoring', 'v2beta2', () => { + /** now we can use gapi.client.cloudmonitoring */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View and write monitoring data for all of your Google and third-party Cloud and API projects */ + 'https://www.googleapis.com/auth/monitoring', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Create a new metric. */ + await gapi.client.metricDescriptors.create({ + project: "project", + }); + /** Delete an existing metric. */ + await gapi.client.metricDescriptors.delete({ + metric: "metric", + project: "project", + }); + /** + * List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be + * paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value + * of the nextPageToken. + */ + await gapi.client.metricDescriptors.list({ + count: 1, + pageToken: "pageToken", + project: "project", + query: "query", + }); + /** + * List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are + * paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value + * of the nextPageToken. + */ + await gapi.client.timeseries.list({ + aggregator: "aggregator", + count: 2, + labels: "labels", + metric: "metric", + oldest: "oldest", + pageToken: "pageToken", + project: "project", + timespan: "timespan", + window: "window", + youngest: "youngest", + }); + /** + * Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not + * allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing + * youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially + * in the order of their end time. + */ + await gapi.client.timeseries.write({ + project: "project", + }); + /** + * List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are + * paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value + * of the nextPageToken. + */ + await gapi.client.timeseriesDescriptors.list({ + aggregator: "aggregator", + count: 2, + labels: "labels", + metric: "metric", + oldest: "oldest", + pageToken: "pageToken", + project: "project", + timespan: "timespan", + window: "window", + youngest: "youngest", + }); + } +}); diff --git a/types/gapi.client.cloudmonitoring/index.d.ts b/types/gapi.client.cloudmonitoring/index.d.ts new file mode 100644 index 0000000000..6febf1d4e8 --- /dev/null +++ b/types/gapi.client.cloudmonitoring/index.d.ts @@ -0,0 +1,476 @@ +// Type definitions for Google Cloud Monitoring API v2beta2 2.0 +// Project: https://cloud.google.com/monitoring/v2beta2/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/cloudmonitoring/v2beta2/rest + +/// + +declare namespace gapi.client { + /** Load Cloud Monitoring API v2beta2 */ + function load(name: "cloudmonitoring", version: "v2beta2"): PromiseLike; + function load(name: "cloudmonitoring", version: "v2beta2", callback: () => any): void; + + const metricDescriptors: cloudmonitoring.MetricDescriptorsResource; + + const timeseries: cloudmonitoring.TimeseriesResource; + + const timeseriesDescriptors: cloudmonitoring.TimeseriesDescriptorsResource; + + namespace cloudmonitoring { + interface DeleteMetricDescriptorResponse { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#deleteMetricDescriptorResponse". */ + kind?: string; + } + interface ListMetricDescriptorsRequest { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listMetricDescriptorsRequest". */ + kind?: string; + } + interface ListMetricDescriptorsResponse { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listMetricDescriptorsResponse". */ + kind?: string; + /** The returned metric descriptors. */ + metrics?: MetricDescriptor[]; + /** + * Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, pass this + * value to the pageToken query parameter. + */ + nextPageToken?: string; + } + interface ListTimeseriesDescriptorsRequest { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesDescriptorsRequest". */ + kind?: string; + } + interface ListTimeseriesDescriptorsResponse { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesDescriptorsResponse". */ + kind?: string; + /** + * Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set this + * value to the pageToken query parameter. + */ + nextPageToken?: string; + /** The oldest timestamp of the interval of this query, as an RFC 3339 string. */ + oldest?: string; + /** The returned time series descriptors. */ + timeseries?: TimeseriesDescriptor[]; + /** The youngest timestamp of the interval of this query, as an RFC 3339 string. */ + youngest?: string; + } + interface ListTimeseriesRequest { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesRequest". */ + kind?: string; + } + interface ListTimeseriesResponse { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesResponse". */ + kind?: string; + /** + * Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set the + * pageToken query parameter to this value. All of the points of a time series will be returned before returning any point of the subsequent time series. + */ + nextPageToken?: string; + /** The oldest timestamp of the interval of this query as an RFC 3339 string. */ + oldest?: string; + /** The returned time series. */ + timeseries?: Timeseries[]; + /** The youngest timestamp of the interval of this query as an RFC 3339 string. */ + youngest?: string; + } + interface MetricDescriptor { + /** Description of this metric. */ + description?: string; + /** Labels defined for this metric. */ + labels?: MetricDescriptorLabelDescriptor[]; + /** The name of this metric. */ + name?: string; + /** The project ID to which the metric belongs. */ + project?: string; + /** Type description for this metric. */ + typeDescriptor?: MetricDescriptorTypeDescriptor; + } + interface MetricDescriptorLabelDescriptor { + /** Label description. */ + description?: string; + /** Label key. */ + key?: string; + } + interface MetricDescriptorTypeDescriptor { + /** The method of collecting data for the metric. See Metric types. */ + metricType?: string; + /** The data type of of individual points in the metric's time series. See Metric value types. */ + valueType?: string; + } + interface Point { + /** The value of this data point. Either "true" or "false". */ + boolValue?: boolean; + /** + * The value of this data point as a distribution. A distribution value can contain a list of buckets and/or an underflowBucket and an overflowBucket. The + * values of these points can be used to create a histogram. + */ + distributionValue?: PointDistribution; + /** The value of this data point as a double-precision floating-point number. */ + doubleValue?: number; + /** + * The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this + * interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be + * non-empty. Both start and end are RFC 3339 strings. + */ + end?: string; + /** The value of this data point as a 64-bit integer. */ + int64Value?: string; + /** + * The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this + * interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be + * non-empty. Both start and end are RFC 3339 strings. + */ + start?: string; + /** The value of this data point in string format. */ + stringValue?: string; + } + interface PointDistribution { + /** The finite buckets. */ + buckets?: PointDistributionBucket[]; + /** The overflow bucket. */ + overflowBucket?: PointDistributionOverflowBucket; + /** The underflow bucket. */ + underflowBucket?: PointDistributionUnderflowBucket; + } + interface PointDistributionBucket { + /** The number of events whose values are in the interval defined by this bucket. */ + count?: string; + /** The lower bound of the value interval of this bucket (inclusive). */ + lowerBound?: number; + /** The upper bound of the value interval of this bucket (exclusive). */ + upperBound?: number; + } + interface PointDistributionOverflowBucket { + /** The number of events whose values are in the interval defined by this bucket. */ + count?: string; + /** The lower bound of the value interval of this bucket (inclusive). */ + lowerBound?: number; + } + interface PointDistributionUnderflowBucket { + /** The number of events whose values are in the interval defined by this bucket. */ + count?: string; + /** The upper bound of the value interval of this bucket (exclusive). */ + upperBound?: number; + } + interface Timeseries { + /** The data points of this time series. The points are listed in order of their end timestamp, from younger to older. */ + points?: Point[]; + /** The descriptor of this time series. */ + timeseriesDesc?: TimeseriesDescriptor; + } + interface TimeseriesDescriptor { + /** The label's name. */ + labels?: Record; + /** The name of the metric. */ + metric?: string; + /** The Developers Console project number to which this time series belongs. */ + project?: string; + } + interface TimeseriesDescriptorLabel { + /** The label's name. */ + key?: string; + /** The label's value. */ + value?: string; + } + interface TimeseriesPoint { + /** The data point in this time series snapshot. */ + point?: Point; + /** The descriptor of this time series. */ + timeseriesDesc?: TimeseriesDescriptor; + } + interface WriteTimeseriesRequest { + /** The label's name. */ + commonLabels?: Record; + /** + * Provide time series specific labels and the data points for each time series. The labels in timeseries and the common_labels should form a complete + * list of labels that required by the metric. + */ + timeseries?: TimeseriesPoint[]; + } + interface WriteTimeseriesResponse { + /** Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#writeTimeseriesResponse". */ + kind?: string; + } + interface MetricDescriptorsResource { + /** Create a new metric. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project id. The value can be the numeric project ID or string-based project name. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Delete an existing metric. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the metric. */ + metric: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID to which the metric belongs. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be + * paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value + * of the nextPageToken. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100. */ + count?: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of + * results. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project id. The value can be the numeric project ID or string-based project name. */ + project: string; + /** + * The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords + * must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics + * are returned. + */ + query?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TimeseriesResource { + /** + * List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are + * paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value + * of the nextPageToken. + */ + list(request: { + /** + * The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics + * with a value type of INT64 or DOUBLE. + */ + aggregator?: string; + /** Data format for the response. */ + alt?: string; + /** Maximum number of data points per page, which is used for pagination of results. */ + count?: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * A collection of labels for the matching time series, which are represented as: + * - key==value: key equals the value + * - key=~value: key regex matches the value + * - key!=value: key does not equal the value + * - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could + * specify: + * label=cloud.googleapis.com%2Flocation=~us-central1.* + */ + labels?: string; + /** Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. */ + metric: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time + * interval will be (youngest - 4 hours, youngest] + */ + oldest?: string; + /** + * The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of + * results. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest + * parameters should not be used together. Units: + * - s: second + * - m: minute + * - h: hour + * - d: day + * - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead. + * + * If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]. + */ + timespan?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for + * non-cumulative metric types. Units: + * - m: minute + * - h: hour + * - d: day + * - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead. + */ + window?: string; + /** End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. */ + youngest: string; + }): Request; + /** + * Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not + * allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing + * youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially + * in the order of their end time. + */ + write(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID. The value can be the numeric project ID or string-based project name. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TimeseriesDescriptorsResource { + /** + * List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are + * paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value + * of the nextPageToken. + */ + list(request: { + /** + * The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics + * with a value type of INT64 or DOUBLE. + */ + aggregator?: string; + /** Data format for the response. */ + alt?: string; + /** Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100. */ + count?: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * A collection of labels for the matching time series, which are represented as: + * - key==value: key equals the value + * - key=~value: key regex matches the value + * - key!=value: key does not equal the value + * - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could + * specify: + * label=cloud.googleapis.com%2Flocation=~us-central1.* + */ + labels?: string; + /** Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. */ + metric: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time + * interval will be (youngest - 4 hours, youngest] + */ + oldest?: string; + /** + * The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of + * results. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest + * parameters should not be used together. Units: + * - s: second + * - m: minute + * - h: hour + * - d: day + * - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead. + * + * If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]. + */ + timespan?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** + * The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for + * non-cumulative metric types. Units: + * - m: minute + * - h: hour + * - d: day + * - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead. + */ + window?: string; + /** End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. */ + youngest: string; + }): Request; + } + } +} diff --git a/types/gapi.client.cloudmonitoring/readme.md b/types/gapi.client.cloudmonitoring/readme.md new file mode 100644 index 0000000000..44ce6fbfc0 --- /dev/null +++ b/types/gapi.client.cloudmonitoring/readme.md @@ -0,0 +1,87 @@ +# TypeScript typings for Cloud Monitoring API v2beta2 +Accesses Google Cloud Monitoring data. +For detailed description please check [documentation](https://cloud.google.com/monitoring/v2beta2/). + +## Installing + +Install typings for Cloud Monitoring API: +``` +npm install @types/gapi.client.cloudmonitoring@v2beta2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudmonitoring', 'v2beta2', () => { + // now we can use gapi.client.cloudmonitoring + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View and write monitoring data for all of your Google and third-party Cloud and API projects + 'https://www.googleapis.com/auth/monitoring', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Cloud Monitoring API resources: + +```typescript + +/* +Create a new metric. +*/ +await gapi.client.metricDescriptors.create({ project: "project", }); + +/* +Delete an existing metric. +*/ +await gapi.client.metricDescriptors.delete({ metric: "metric", project: "project", }); + +/* +List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. +*/ +await gapi.client.metricDescriptors.list({ project: "project", }); + +/* +List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. +*/ +await gapi.client.timeseries.list({ metric: "metric", project: "project", youngest: "youngest", }); + +/* +Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time. +*/ +await gapi.client.timeseries.write({ project: "project", }); + +/* +List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. +*/ +await gapi.client.timeseriesDescriptors.list({ metric: "metric", project: "project", youngest: "youngest", }); +``` \ No newline at end of file diff --git a/types/gapi.client.cloudmonitoring/tsconfig.json b/types/gapi.client.cloudmonitoring/tsconfig.json new file mode 100644 index 0000000000..e007418ca9 --- /dev/null +++ b/types/gapi.client.cloudmonitoring/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudmonitoring-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudmonitoring/tslint.json b/types/gapi.client.cloudmonitoring/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudmonitoring/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudresourcemanager/gapi.client.cloudresourcemanager-tests.ts b/types/gapi.client.cloudresourcemanager/gapi.client.cloudresourcemanager-tests.ts new file mode 100644 index 0000000000..4bb0eafbfc --- /dev/null +++ b/types/gapi.client.cloudresourcemanager/gapi.client.cloudresourcemanager-tests.ts @@ -0,0 +1,404 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudresourcemanager', 'v1', () => { + /** now we can use gapi.client.cloudresourcemanager */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Clears a `Policy` from a resource. */ + await gapi.client.folders.clearOrgPolicy({ + resource: "resource", + }); + /** + * Gets the effective `Policy` on a resource. This is the result of merging + * `Policies` in the resource hierarchy. The returned `Policy` will not have + * an `etag`set because it is a computed `Policy` across multiple resources. + */ + await gapi.client.folders.getEffectiveOrgPolicy({ + resource: "resource", + }); + /** + * Gets a `Policy` on a resource. + * + * If no `Policy` is set on the resource, a `Policy` is returned with default + * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + * `etag` value can be used with `SetOrgPolicy()` to create or update a + * `Policy` during read-modify-write. + */ + await gapi.client.folders.getOrgPolicy({ + resource: "resource", + }); + /** Lists `Constraints` that could be applied on the specified resource. */ + await gapi.client.folders.listAvailableOrgPolicyConstraints({ + resource: "resource", + }); + /** Lists all the `Policies` set for a particular resource. */ + await gapi.client.folders.listOrgPolicies({ + resource: "resource", + }); + /** + * Updates the specified `Policy` on the resource. Creates a new `Policy` for + * that `Constraint` on the resource if one does not exist. + * + * Not supplying an `etag` on the request `Policy` results in an unconditional + * write of the `Policy`. + */ + await gapi.client.folders.setOrgPolicy({ + resource: "resource", + }); + /** + * Create a Lien which applies to the resource denoted by the `parent` field. + * + * Callers of this method will require permission on the `parent` resource. + * For example, applying to `projects/1234` requires permission + * `resourcemanager.projects.updateLiens`. + * + * NOTE: Some resources may limit the number of Liens which may be applied. + */ + await gapi.client.liens.create({ + }); + /** + * Delete a Lien by `name`. + * + * Callers of this method will require permission on the `parent` resource. + * For example, a Lien with a `parent` of `projects/1234` requires permission + * `resourcemanager.projects.updateLiens`. + */ + await gapi.client.liens.delete({ + name: "name", + }); + /** + * List all Liens applied to the `parent` resource. + * + * Callers of this method will require permission on the `parent` resource. + * For example, a Lien with a `parent` of `projects/1234` requires permission + * `resourcemanager.projects.get`. + */ + await gapi.client.liens.list({ + pageSize: 1, + pageToken: "pageToken", + parent: "parent", + }); + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + await gapi.client.operations.get({ + name: "name", + }); + /** Clears a `Policy` from a resource. */ + await gapi.client.organizations.clearOrgPolicy({ + resource: "resource", + }); + /** Fetches an Organization resource identified by the specified resource name. */ + await gapi.client.organizations.get({ + name: "name", + }); + /** + * Gets the effective `Policy` on a resource. This is the result of merging + * `Policies` in the resource hierarchy. The returned `Policy` will not have + * an `etag`set because it is a computed `Policy` across multiple resources. + */ + await gapi.client.organizations.getEffectiveOrgPolicy({ + resource: "resource", + }); + /** + * Gets the access control policy for an Organization resource. May be empty + * if no such policy or resource exists. The `resource` field should be the + * organization's resource name, e.g. "organizations/123". + * + * Authorization requires the Google IAM permission + * `resourcemanager.organizations.getIamPolicy` on the specified organization + */ + await gapi.client.organizations.getIamPolicy({ + resource: "resource", + }); + /** + * Gets a `Policy` on a resource. + * + * If no `Policy` is set on the resource, a `Policy` is returned with default + * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + * `etag` value can be used with `SetOrgPolicy()` to create or update a + * `Policy` during read-modify-write. + */ + await gapi.client.organizations.getOrgPolicy({ + resource: "resource", + }); + /** Lists `Constraints` that could be applied on the specified resource. */ + await gapi.client.organizations.listAvailableOrgPolicyConstraints({ + resource: "resource", + }); + /** Lists all the `Policies` set for a particular resource. */ + await gapi.client.organizations.listOrgPolicies({ + resource: "resource", + }); + /** + * Searches Organization resources that are visible to the user and satisfy + * the specified filter. This method returns Organizations in an unspecified + * order. New Organizations do not necessarily appear at the end of the + * results. + * + * Search will only return organizations on which the user has the permission + * `resourcemanager.organizations.get` + */ + await gapi.client.organizations.search({ + }); + /** + * Sets the access control policy on an Organization resource. Replaces any + * existing policy. The `resource` field should be the organization's resource + * name, e.g. "organizations/123". + * + * Authorization requires the Google IAM permission + * `resourcemanager.organizations.setIamPolicy` on the specified organization + */ + await gapi.client.organizations.setIamPolicy({ + resource: "resource", + }); + /** + * Updates the specified `Policy` on the resource. Creates a new `Policy` for + * that `Constraint` on the resource if one does not exist. + * + * Not supplying an `etag` on the request `Policy` results in an unconditional + * write of the `Policy`. + */ + await gapi.client.organizations.setOrgPolicy({ + resource: "resource", + }); + /** + * Returns permissions that a caller has on the specified Organization. + * The `resource` field should be the organization's resource name, + * e.g. "organizations/123". + * + * There are no permissions required for making this API call. + */ + await gapi.client.organizations.testIamPermissions({ + resource: "resource", + }); + /** Clears a `Policy` from a resource. */ + await gapi.client.projects.clearOrgPolicy({ + resource: "resource", + }); + /** + * Request that a new Project be created. The result is an Operation which + * can be used to track the creation process. It is automatically deleted + * after a few hours, so there is no need to call DeleteOperation. + * + * Our SLO permits Project creation to take up to 30 seconds at the 90th + * percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile + * latency. 95th percentile latency is around 11 seconds. We recommend + * polling at the 5th second with an exponential backoff. + * + * Authorization requires the Google IAM permission + * `resourcemanager.projects.create` on the specified parent for the new + * project. + */ + await gapi.client.projects.create({ + }); + /** + * Marks the Project identified by the specified + * `project_id` (for example, `my-project-123`) for deletion. + * This method will only affect the Project if the following criteria are met: + * + * + The Project does not have a billing account associated with it. + * + The Project has a lifecycle state of + * ACTIVE. + * + * This method changes the Project's lifecycle state from + * ACTIVE + * to DELETE_REQUESTED. + * The deletion starts at an unspecified time, + * at which point the Project is no longer accessible. + * + * Until the deletion completes, you can check the lifecycle state + * checked by retrieving the Project with GetProject, + * and the Project remains visible to ListProjects. + * However, you cannot update the project. + * + * After the deletion completes, the Project is not retrievable by + * the GetProject and + * ListProjects methods. + * + * The caller must have modify permissions for this Project. + */ + await gapi.client.projects.delete({ + projectId: "projectId", + }); + /** + * Retrieves the Project identified by the specified + * `project_id` (for example, `my-project-123`). + * + * The caller must have read permissions for this Project. + */ + await gapi.client.projects.get({ + projectId: "projectId", + }); + /** + * Gets a list of ancestors in the resource hierarchy for the Project + * identified by the specified `project_id` (for example, `my-project-123`). + * + * The caller must have read permissions for this Project. + */ + await gapi.client.projects.getAncestry({ + projectId: "projectId", + }); + /** + * Gets the effective `Policy` on a resource. This is the result of merging + * `Policies` in the resource hierarchy. The returned `Policy` will not have + * an `etag`set because it is a computed `Policy` across multiple resources. + */ + await gapi.client.projects.getEffectiveOrgPolicy({ + resource: "resource", + }); + /** + * Returns the IAM access control policy for the specified Project. + * Permission is denied if the policy or the resource does not exist. + * + * Authorization requires the Google IAM permission + * `resourcemanager.projects.getIamPolicy` on the project + */ + await gapi.client.projects.getIamPolicy({ + resource: "resource", + }); + /** + * Gets a `Policy` on a resource. + * + * If no `Policy` is set on the resource, a `Policy` is returned with default + * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + * `etag` value can be used with `SetOrgPolicy()` to create or update a + * `Policy` during read-modify-write. + */ + await gapi.client.projects.getOrgPolicy({ + resource: "resource", + }); + /** + * Lists Projects that are visible to the user and satisfy the + * specified filter. This method returns Projects in an unspecified order. + * New Projects do not necessarily appear at the end of the list. + */ + await gapi.client.projects.list({ + filter: "filter", + pageSize: 2, + pageToken: "pageToken", + }); + /** Lists `Constraints` that could be applied on the specified resource. */ + await gapi.client.projects.listAvailableOrgPolicyConstraints({ + resource: "resource", + }); + /** Lists all the `Policies` set for a particular resource. */ + await gapi.client.projects.listOrgPolicies({ + resource: "resource", + }); + /** + * Sets the IAM access control policy for the specified Project. Replaces + * any existing policy. + * + * The following constraints apply when using `setIamPolicy()`: + * + * + Project does not support `allUsers` and `allAuthenticatedUsers` as + * `members` in a `Binding` of a `Policy`. + * + * + The owner role can be granted only to `user` and `serviceAccount`. + * + * + Service accounts can be made owners of a project directly + * without any restrictions. However, to be added as an owner, a user must be + * invited via Cloud Platform console and must accept the invitation. + * + * + A user cannot be granted the owner role using `setIamPolicy()`. The user + * must be granted the owner role using the Cloud Platform Console and must + * explicitly accept the invitation. + * + * + Invitations to grant the owner role cannot be sent using + * `setIamPolicy()`; + * they must be sent only using the Cloud Platform Console. + * + * + Membership changes that leave the project without any owners that have + * accepted the Terms of Service (ToS) will be rejected. + * + * + If the project is not part of an organization, there must be at least + * one owner who has accepted the Terms of Service (ToS) agreement in the + * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner + * from the policy will fail. This restriction also applies to legacy + * projects that no longer have owners who have accepted the ToS. Edits to + * IAM policies will be rejected until the lack of a ToS-accepting owner is + * rectified. + * + * + Calling this method requires enabling the App Engine Admin API. + * + * Note: Removing service accounts from policies or changing their roles + * can render services completely inoperable. It is important to understand + * how the service account is being used before removing or updating its + * roles. + * + * Authorization requires the Google IAM permission + * `resourcemanager.projects.setIamPolicy` on the project + */ + await gapi.client.projects.setIamPolicy({ + resource: "resource", + }); + /** + * Updates the specified `Policy` on the resource. Creates a new `Policy` for + * that `Constraint` on the resource if one does not exist. + * + * Not supplying an `etag` on the request `Policy` results in an unconditional + * write of the `Policy`. + */ + await gapi.client.projects.setOrgPolicy({ + resource: "resource", + }); + /** + * Returns permissions that a caller has on the specified Project. + * + * There are no permissions required for making this API call. + */ + await gapi.client.projects.testIamPermissions({ + resource: "resource", + }); + /** + * Restores the Project identified by the specified + * `project_id` (for example, `my-project-123`). + * You can only use this method for a Project that has a lifecycle state of + * DELETE_REQUESTED. + * After deletion starts, the Project cannot be restored. + * + * The caller must have modify permissions for this Project. + */ + await gapi.client.projects.undelete({ + projectId: "projectId", + }); + /** + * Updates the attributes of the Project identified by the specified + * `project_id` (for example, `my-project-123`). + * + * The caller must have modify permissions for this Project. + */ + await gapi.client.projects.update({ + projectId: "projectId", + }); + } +}); diff --git a/types/gapi.client.cloudresourcemanager/index.d.ts b/types/gapi.client.cloudresourcemanager/index.d.ts new file mode 100644 index 0000000000..a2c8500ac6 --- /dev/null +++ b/types/gapi.client.cloudresourcemanager/index.d.ts @@ -0,0 +1,2234 @@ +// Type definitions for Google Google Cloud Resource Manager API v1 1.0 +// Project: https://cloud.google.com/resource-manager +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Resource Manager API v1 */ + function load(name: "cloudresourcemanager", version: "v1"): PromiseLike; + function load(name: "cloudresourcemanager", version: "v1", callback: () => any): void; + + const folders: cloudresourcemanager.FoldersResource; + + const liens: cloudresourcemanager.LiensResource; + + const operations: cloudresourcemanager.OperationsResource; + + const organizations: cloudresourcemanager.OrganizationsResource; + + const projects: cloudresourcemanager.ProjectsResource; + + namespace cloudresourcemanager { + interface Ancestor { + /** Resource id of the ancestor. */ + resourceId?: ResourceId; + } + interface AuditConfig { + /** + * The configuration for logging of each type of permission. + * Next ID: 4 + */ + auditLogConfigs?: AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. + * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + * `allServices` is a special value that covers all services. + */ + service?: string; + } + interface AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. + * Follows the same format of Binding.members. + */ + exemptedMembers?: string[]; + /** The log type that this config enables. */ + logType?: string; + } + interface Binding { + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: + * + * * `allUsers`: A special identifier that represents anyone who is + * on the internet; with or without a Google account. + * + * * `allAuthenticatedUsers`: A special identifier that represents anyone + * who is authenticated with a Google account or a service account. + * + * * `user:{emailid}`: An email address that represents a specific Google + * account. For example, `alice@gmail.com` or `joe@example.com`. + * + * + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. + * + * * `group:{emailid}`: An email address that represents a Google group. + * For example, `admins@example.com`. + * + * + * * `domain:{domain}`: A Google Apps domain name that represents all the + * users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. + * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Required + */ + role?: string; + } + interface BooleanPolicy { + /** + * If `true`, then the `Policy` is enforced. If `false`, then any + * configuration is acceptable. + * + * Suppose you have a `Constraint` `constraints/compute.disableSerialPortAccess` + * with `constraint_default` set to `ALLOW`. A `Policy` for that + * `Constraint` exhibits the following behavior: + * - If the `Policy` at this resource has enforced set to `false`, serial + * port connection attempts will be allowed. + * - If the `Policy` at this resource has enforced set to `true`, serial + * port connection attempts will be refused. + * - If the `Policy` at this resource is `RestoreDefault`, serial port + * connection attempts will be allowed. + * - If no `Policy` is set at this resource or anywhere higher in the + * resource hierarchy, serial port connection attempts will be allowed. + * - If no `Policy` is set at this resource, but one exists higher in the + * resource hierarchy, the behavior is as if the`Policy` were set at + * this resource. + * + * The following examples demonstrate the different possible layerings: + * + * Example 1 (nearest `Constraint` wins): + * `organizations/foo` has a `Policy` with: + * {enforced: false} + * `projects/bar` has no `Policy` set. + * The constraint at `projects/bar` and `organizations/foo` will not be + * enforced. + * + * Example 2 (enforcement gets replaced): + * `organizations/foo` has a `Policy` with: + * {enforced: false} + * `projects/bar` has a `Policy` with: + * {enforced: true} + * The constraint at `organizations/foo` is not enforced. + * The constraint at `projects/bar` is enforced. + * + * Example 3 (RestoreDefault): + * `organizations/foo` has a `Policy` with: + * {enforced: true} + * `projects/bar` has a `Policy` with: + * {RestoreDefault: {}} + * The constraint at `organizations/foo` is enforced. + * The constraint at `projects/bar` is not enforced, because + * `constraint_default` for the `Constraint` is `ALLOW`. + */ + enforced?: boolean; + } + interface ClearOrgPolicyRequest { + /** Name of the `Constraint` of the `Policy` to clear. */ + constraint?: string; + /** + * The current version, for concurrency control. Not sending an `etag` + * will cause the `Policy` to be cleared blindly. + */ + etag?: string; + } + interface Constraint { + /** Defines this constraint as being a BooleanConstraint. */ + booleanConstraint?: any; + /** The evaluation behavior of this constraint in the absense of 'Policy'. */ + constraintDefault?: string; + /** + * Detailed description of what this `Constraint` controls as well as how and + * where it is enforced. + * + * Mutable. + */ + description?: string; + /** + * The human readable name. + * + * Mutable. + */ + displayName?: string; + /** Defines this constraint as being a ListConstraint. */ + listConstraint?: ListConstraint; + /** + * Immutable value, required to globally be unique. For example, + * `constraints/serviceuser.services` + */ + name?: string; + /** Version of the `Constraint`. Default version is 0; */ + version?: number; + } + interface FolderOperation { + /** + * The resource name of the folder or organization we are either creating + * the folder under or moving the folder to. + */ + destinationParent?: string; + /** The display name of the folder. */ + displayName?: string; + /** The type of this operation. */ + operationType?: string; + /** + * The resource name of the folder's parent. + * Only applicable when the operation_type is MOVE. + */ + sourceParent?: string; + } + interface FolderOperationError { + /** The type of operation error experienced. */ + errorMessageId?: string; + } + interface GetAncestryResponse { + /** + * Ancestors are ordered from bottom to top of the resource hierarchy. The + * first ancestor is the project itself, followed by the project's parent, + * etc. + */ + ancestor?: Ancestor[]; + } + interface GetEffectiveOrgPolicyRequest { + /** The name of the `Constraint` to compute the effective `Policy`. */ + constraint?: string; + } + interface GetOrgPolicyRequest { + /** Name of the `Constraint` to get the `Policy`. */ + constraint?: string; + } + interface Lien { + /** The creation time of this Lien. */ + createTime?: string; + /** + * A system-generated unique identifier for this Lien. + * + * Example: `liens/1234abcd` + */ + name?: string; + /** + * A stable, user-visible/meaningful string identifying the origin of the + * Lien, intended to be inspected programmatically. Maximum length of 200 + * characters. + * + * Example: 'compute.googleapis.com' + */ + origin?: string; + /** + * A reference to the resource this Lien is attached to. The server will + * validate the parent against those for which Liens are supported. + * + * Example: `projects/1234` + */ + parent?: string; + /** + * Concise user-visible strings indicating why an action cannot be performed + * on a resource. Maximum lenth of 200 characters. + * + * Example: 'Holds production API key' + */ + reason?: string; + /** + * The types of operations which should be blocked as a result of this Lien. + * Each value should correspond to an IAM permission. The server will + * validate the permissions against those for which Liens are supported. + * + * An empty list is meaningless and will be rejected. + * + * Example: ['resourcemanager.projects.delete'] + */ + restrictions?: string[]; + } + interface ListAvailableOrgPolicyConstraintsRequest { + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + } + interface ListAvailableOrgPolicyConstraintsResponse { + /** The collection of constraints that are settable on the request resource. */ + constraints?: Constraint[]; + /** Page token used to retrieve the next page. This is currently not used. */ + nextPageToken?: string; + } + interface ListConstraint { + /** + * Optional. The Google Cloud Console will try to default to a configuration + * that matches the value specified in this `Constraint`. + */ + suggestedValue?: string; + } + interface ListLiensResponse { + /** A list of Liens. */ + liens?: Lien[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + */ + nextPageToken?: string; + } + interface ListOrgPoliciesRequest { + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + } + interface ListOrgPoliciesResponse { + /** + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + */ + nextPageToken?: string; + /** + * The `Policies` that are set on the resource. It will be empty if no + * `Policies` are set. + */ + policies?: OrgPolicy[]; + } + interface ListPolicy { + /** The policy all_values state. */ + allValues?: string; + /** + * List of values allowed at this resource. Can only be set if no values + * are set for `denied_values` and `all_values` is set to + * `ALL_VALUES_UNSPECIFIED`. + */ + allowedValues?: string[]; + /** + * List of values denied at this resource. Can only be set if no values are + * set for `allowed_values` and `all_values` is set to + * `ALL_VALUES_UNSPECIFIED`. + */ + deniedValues?: string[]; + /** + * Determines the inheritance behavior for this `Policy`. + * + * By default, a `ListPolicy` set at a resource supercedes any `Policy` set + * anywhere up the resource hierarchy. However, if `inherit_from_parent` is + * set to `true`, then the values from the effective `Policy` of the parent + * resource are inherited, meaning the values set in this `Policy` are + * added to the values inherited up the hierarchy. + * + * Setting `Policy` hierarchies that inherit both allowed values and denied + * values isn't recommended in most circumstances to keep the configuration + * simple and understandable. However, it is possible to set a `Policy` with + * `allowed_values` set that inherits a `Policy` with `denied_values` set. + * In this case, the values that are allowed must be in `allowed_values` and + * not present in `denied_values`. + * + * For example, suppose you have a `Constraint` + * `constraints/serviceuser.services`, which has a `constraint_type` of + * `list_constraint`, and with `constraint_default` set to `ALLOW`. + * Suppose that at the Organization level, a `Policy` is applied that + * restricts the allowed API activations to {`E1`, `E2`}. Then, if a + * `Policy` is applied to a project below the Organization that has + * `inherit_from_parent` set to `false` and field all_values set to DENY, + * then an attempt to activate any API will be denied. + * + * The following examples demonstrate different possible layerings: + * + * Example 1 (no inherited values): + * `organizations/foo` has a `Policy` with values: + * {allowed_values: “E1” allowed_values:”E2”} + * ``projects/bar`` has `inherit_from_parent` `false` and values: + * {allowed_values: "E3" allowed_values: "E4"} + * The accepted values at `organizations/foo` are `E1`, `E2`. + * The accepted values at `projects/bar` are `E3`, and `E4`. + * + * Example 2 (inherited values): + * `organizations/foo` has a `Policy` with values: + * {allowed_values: “E1” allowed_values:”E2”} + * `projects/bar` has a `Policy` with values: + * {value: “E3” value: ”E4” inherit_from_parent: true} + * The accepted values at `organizations/foo` are `E1`, `E2`. + * The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. + * + * Example 3 (inheriting both allowed and denied values): + * `organizations/foo` has a `Policy` with values: + * {allowed_values: "E1" allowed_values: "E2"} + * `projects/bar` has a `Policy` with: + * {denied_values: "E1"} + * The accepted values at `organizations/foo` are `E1`, `E2`. + * The value accepted at `projects/bar` is `E2`. + * + * Example 4 (RestoreDefault): + * `organizations/foo` has a `Policy` with values: + * {allowed_values: “E1” allowed_values:”E2”} + * `projects/bar` has a `Policy` with values: + * {RestoreDefault: {}} + * The accepted values at `organizations/foo` are `E1`, `E2`. + * The accepted values at `projects/bar` are either all or none depending on + * the value of `constraint_default` (if `ALLOW`, all; if + * `DENY`, none). + * + * Example 5 (no policy inherits parent policy): + * `organizations/foo` has no `Policy` set. + * `projects/bar` has no `Policy` set. + * The accepted values at both levels are either all or none depending on + * the value of `constraint_default` (if `ALLOW`, all; if + * `DENY`, none). + * + * Example 6 (ListConstraint allowing all): + * `organizations/foo` has a `Policy` with values: + * {allowed_values: “E1” allowed_values: ”E2”} + * `projects/bar` has a `Policy` with: + * {all: ALLOW} + * The accepted values at `organizations/foo` are `E1`, E2`. + * Any value is accepted at `projects/bar`. + * + * Example 7 (ListConstraint allowing none): + * `organizations/foo` has a `Policy` with values: + * {allowed_values: “E1” allowed_values: ”E2”} + * `projects/bar` has a `Policy` with: + * {all: DENY} + * The accepted values at `organizations/foo` are `E1`, E2`. + * No value is accepted at `projects/bar`. + */ + inheritFromParent?: boolean; + /** + * Optional. The Google Cloud Console will try to default to a configuration + * that matches the value specified in this `Policy`. If `suggested_value` + * is not set, it will inherit the value specified higher in the hierarchy, + * unless `inherit_from_parent` is `false`. + */ + suggestedValue?: string; + } + interface ListProjectsResponse { + /** + * Pagination token. + * + * If the result set is too large to fit in a single response, this token + * is returned. It encodes the position of the current result cursor. + * Feeding this value into a new list request with the `page_token` parameter + * gives the next page of the results. + * + * When `next_page_token` is not filled in, there is no next page and + * the list returned is the last page in the result set. + * + * Pagination tokens have a limited lifetime. + */ + nextPageToken?: string; + /** + * The list of Projects that matched the list filter. This list can + * be paginated. + */ + projects?: Project[]; + } + interface Operation { + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + */ + response?: Record; + } + interface OrgPolicy { + /** For boolean `Constraints`, whether to enforce the `Constraint` or not. */ + booleanPolicy?: BooleanPolicy; + /** + * The name of the `Constraint` the `Policy` is configuring, for example, + * `constraints/serviceuser.services`. + * + * Immutable after creation. + */ + constraint?: string; + /** + * An opaque tag indicating the current version of the `Policy`, used for + * concurrency control. + * + * When the `Policy` is returned from either a `GetPolicy` or a + * `ListOrgPolicy` request, this `etag` indicates the version of the current + * `Policy` to use when executing a read-modify-write loop. + * + * When the `Policy` is returned from a `GetEffectivePolicy` request, the + * `etag` will be unset. + * + * When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + * that was returned from a `GetOrgPolicy` request as part of a + * read-modify-write loop for concurrency control. Not setting the `etag`in a + * `SetOrgPolicy` request will result in an unconditional write of the + * `Policy`. + */ + etag?: string; + /** List of values either allowed or disallowed. */ + listPolicy?: ListPolicy; + /** + * Restores the default behavior of the constraint; independent of + * `Constraint` type. + */ + restoreDefault?: any; + /** + * The time stamp the `Policy` was previously updated. This is set by the + * server, not specified by the caller, and represents the last time a call to + * `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + * be ignored. + */ + updateTime?: string; + /** Version of the `Policy`. Default version is 0; */ + version?: number; + } + interface Organization { + /** + * Timestamp when the Organization was created. Assigned by the server. + * @OutputOnly + */ + creationTime?: string; + /** + * A friendly string to be used to refer to the Organization in the UI. + * Assigned by the server, set to the primary domain of the G Suite + * customer that owns the organization. + * @OutputOnly + */ + displayName?: string; + /** + * The organization's current lifecycle state. Assigned by the server. + * @OutputOnly + */ + lifecycleState?: string; + /** + * Output Only. The resource name of the organization. This is the + * organization's relative path in the API. Its format is + * "organizations/[organization_id]". For example, "organizations/1234". + */ + name?: string; + /** + * The owner of this Organization. The owner should be specified on + * creation. Once set, it cannot be changed. + * This field is required. + */ + owner?: OrganizationOwner; + } + interface OrganizationOwner { + /** The Google for Work customer id used in the Directory API. */ + directoryCustomerId?: string; + } + interface Policy { + /** Specifies cloud audit logging configuration for this policy. */ + auditConfigs?: AuditConfig[]; + /** + * Associates a list of `members` to a `role`. + * `bindings` with no members will result in an error. + */ + bindings?: Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the policy. + * + * If no `etag` is provided in the call to `setIamPolicy`, then the existing + * policy is overwritten blindly. + */ + etag?: string; + /** Version of the `Policy`. The default version is 0. */ + version?: number; + } + interface Project { + /** + * Creation time. + * + * Read-only. + */ + createTime?: string; + /** + * The labels associated with this Project. + * + * Label keys must be between 1 and 63 characters long and must conform + * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + * + * Label values must be between 0 and 63 characters long and must conform + * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + * + * No more than 256 labels can be associated with a given resource. + * + * Clients should store labels in a representation such as JSON that does not + * depend on specific characters being disallowed. + * + * Example: "environment" : "dev" + * Read-write. + */ + labels?: Record; + /** + * The Project lifecycle state. + * + * Read-only. + */ + lifecycleState?: string; + /** + * The user-assigned display name of the Project. + * It must be 4 to 30 characters. + * Allowed characters are: lowercase and uppercase letters, numbers, + * hyphen, single-quote, double-quote, space, and exclamation point. + * + * Example: My Project + * Read-write. + */ + name?: string; + /** + * An optional reference to a parent Resource. + * + * The only supported parent type is "organization". Once set, the parent + * cannot be modified. The `parent` can be set on creation or using the + * `UpdateProject` method; the end user must have the + * `resourcemanager.projects.create` permission on the parent. + * + * Read-write. + */ + parent?: ResourceId; + /** + * The unique, user-assigned ID of the Project. + * It must be 6 to 30 lowercase letters, digits, or hyphens. + * It must start with a letter. + * Trailing hyphens are prohibited. + * + * Example: tokyo-rain-123 + * Read-only after creation. + */ + projectId?: string; + /** + * The number uniquely identifying the project. + * + * Example: 415104041262 + * Read-only. + */ + projectNumber?: string; + } + interface ProjectCreationStatus { + /** Creation time of the project creation workflow. */ + createTime?: string; + /** + * True if the project can be retrieved using GetProject. No other operations + * on the project are guaranteed to work until the project creation is + * complete. + */ + gettable?: boolean; + /** True if the project creation process is complete. */ + ready?: boolean; + } + interface ResourceId { + /** + * Required field for the type-specific id. This should correspond to the id + * used in the type-specific API's. + */ + id?: string; + /** + * Required field representing the resource type this id is for. + * At present, the valid types are: "organization" + */ + type?: string; + } + interface SearchOrganizationsRequest { + /** + * An optional query string used to filter the Organizations to return in + * the response. Filter rules are case-insensitive. + * + * + * Organizations may be filtered by `owner.directoryCustomerId` or by + * `domain`, where the domain is a Google for Work domain, for example: + * + * |Filter|Description| + * |------|-----------| + * |owner.directorycustomerid:123456789|Organizations with + * `owner.directory_customer_id` equal to `123456789`.| + * |domain:google.com|Organizations corresponding to the domain `google.com`.| + * + * This field is optional. + */ + filter?: string; + /** + * The maximum number of Organizations to return in the response. + * This field is optional. + */ + pageSize?: number; + /** + * A pagination token returned from a previous call to `SearchOrganizations` + * that indicates from where listing should continue. + * This field is optional. + */ + pageToken?: string; + } + interface SearchOrganizationsResponse { + /** + * A pagination token to be used to retrieve the next page of results. If the + * result is too large to fit within the page size specified in the request, + * this field will be set with a token that can be used to fetch the next page + * of results. If this field is empty, it indicates that this response + * contains the last page of results. + */ + nextPageToken?: string; + /** + * The list of Organizations that matched the search query, possibly + * paginated. + */ + organizations?: Organization[]; + } + interface SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + policy?: Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * paths: "bindings, etag" + * This field is only used by Cloud IAM. + */ + updateMask?: string; + } + interface SetOrgPolicyRequest { + /** `Policy` to set on the resource. */ + policy?: OrgPolicy; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[]; + } + interface TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + interface FoldersResource { + /** Clears a `Policy` from a resource. */ + clearOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource for the `Policy` to clear. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets the effective `Policy` on a resource. This is the result of merging + * `Policies` in the resource hierarchy. The returned `Policy` will not have + * an `etag`set because it is a computed `Policy` across multiple resources. + */ + getEffectiveOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The name of the resource to start computing the effective `Policy`. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets a `Policy` on a resource. + * + * If no `Policy` is set on the resource, a `Policy` is returned with default + * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + * `etag` value can be used with `SetOrgPolicy()` to create or update a + * `Policy` during read-modify-write. + */ + getOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource the `Policy` is set on. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists `Constraints` that could be applied on the specified resource. */ + listAvailableOrgPolicyConstraints(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource to list `Constraints` for. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all the `Policies` set for a particular resource. */ + listOrgPolicies(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource to list Policies for. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates the specified `Policy` on the resource. Creates a new `Policy` for + * that `Constraint` on the resource if one does not exist. + * + * Not supplying an `etag` on the request `Policy` results in an unconditional + * write of the `Policy`. + */ + setOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Resource name of the resource to attach the `Policy`. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface LiensResource { + /** + * Create a Lien which applies to the resource denoted by the `parent` field. + * + * Callers of this method will require permission on the `parent` resource. + * For example, applying to `projects/1234` requires permission + * `resourcemanager.projects.updateLiens`. + * + * NOTE: Some resources may limit the number of Liens which may be applied. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Delete a Lien by `name`. + * + * Callers of this method will require permission on the `parent` resource. + * For example, a Lien with a `parent` of `projects/1234` requires permission + * `resourcemanager.projects.updateLiens`. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name/identifier of the Lien to delete. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * List all Liens applied to the `parent` resource. + * + * Callers of this method will require permission on the `parent` resource. + * For example, a Lien with a `parent` of `projects/1234` requires permission + * `resourcemanager.projects.get`. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of items to return. This is a suggestion for the server. */ + pageSize?: number; + /** The `next_page_token` value returned from a previous List request, if any. */ + pageToken?: string; + /** + * The name of the resource to list all attached Liens. + * For example, `projects/1234`. + */ + parent?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface OperationsResource { + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface OrganizationsResource { + /** Clears a `Policy` from a resource. */ + clearOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource for the `Policy` to clear. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Fetches an Organization resource identified by the specified resource name. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource name of the Organization to fetch, e.g. "organizations/1234". */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets the effective `Policy` on a resource. This is the result of merging + * `Policies` in the resource hierarchy. The returned `Policy` will not have + * an `etag`set because it is a computed `Policy` across multiple resources. + */ + getEffectiveOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The name of the resource to start computing the effective `Policy`. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets the access control policy for an Organization resource. May be empty + * if no such policy or resource exists. The `resource` field should be the + * organization's resource name, e.g. "organizations/123". + * + * Authorization requires the Google IAM permission + * `resourcemanager.organizations.getIamPolicy` on the specified organization + */ + getIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets a `Policy` on a resource. + * + * If no `Policy` is set on the resource, a `Policy` is returned with default + * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + * `etag` value can be used with `SetOrgPolicy()` to create or update a + * `Policy` during read-modify-write. + */ + getOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource the `Policy` is set on. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists `Constraints` that could be applied on the specified resource. */ + listAvailableOrgPolicyConstraints(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource to list `Constraints` for. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all the `Policies` set for a particular resource. */ + listOrgPolicies(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource to list Policies for. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Searches Organization resources that are visible to the user and satisfy + * the specified filter. This method returns Organizations in an unspecified + * order. New Organizations do not necessarily appear at the end of the + * results. + * + * Search will only return organizations on which the user has the permission + * `resourcemanager.organizations.get` + */ + search(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Sets the access control policy on an Organization resource. Replaces any + * existing policy. The `resource` field should be the organization's resource + * name, e.g. "organizations/123". + * + * Authorization requires the Google IAM permission + * `resourcemanager.organizations.setIamPolicy` on the specified organization + */ + setIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates the specified `Policy` on the resource. Creates a new `Policy` for + * that `Constraint` on the resource if one does not exist. + * + * Not supplying an `etag` on the request `Policy` results in an unconditional + * write of the `Policy`. + */ + setOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Resource name of the resource to attach the `Policy`. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns permissions that a caller has on the specified Organization. + * The `resource` field should be the organization's resource name, + * e.g. "organizations/123". + * + * There are no permissions required for making this API call. + */ + testIamPermissions(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ProjectsResource { + /** Clears a `Policy` from a resource. */ + clearOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource for the `Policy` to clear. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Request that a new Project be created. The result is an Operation which + * can be used to track the creation process. It is automatically deleted + * after a few hours, so there is no need to call DeleteOperation. + * + * Our SLO permits Project creation to take up to 30 seconds at the 90th + * percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile + * latency. 95th percentile latency is around 11 seconds. We recommend + * polling at the 5th second with an exponential backoff. + * + * Authorization requires the Google IAM permission + * `resourcemanager.projects.create` on the specified parent for the new + * project. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Marks the Project identified by the specified + * `project_id` (for example, `my-project-123`) for deletion. + * This method will only affect the Project if the following criteria are met: + * + * + The Project does not have a billing account associated with it. + * + The Project has a lifecycle state of + * ACTIVE. + * + * This method changes the Project's lifecycle state from + * ACTIVE + * to DELETE_REQUESTED. + * The deletion starts at an unspecified time, + * at which point the Project is no longer accessible. + * + * Until the deletion completes, you can check the lifecycle state + * checked by retrieving the Project with GetProject, + * and the Project remains visible to ListProjects. + * However, you cannot update the project. + * + * After the deletion completes, the Project is not retrievable by + * the GetProject and + * ListProjects methods. + * + * The caller must have modify permissions for this Project. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Project ID (for example, `foo-bar-123`). + * + * Required. + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Retrieves the Project identified by the specified + * `project_id` (for example, `my-project-123`). + * + * The caller must have read permissions for this Project. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Project ID (for example, `my-project-123`). + * + * Required. + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets a list of ancestors in the resource hierarchy for the Project + * identified by the specified `project_id` (for example, `my-project-123`). + * + * The caller must have read permissions for this Project. + */ + getAncestry(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Project ID (for example, `my-project-123`). + * + * Required. + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets the effective `Policy` on a resource. This is the result of merging + * `Policies` in the resource hierarchy. The returned `Policy` will not have + * an `etag`set because it is a computed `Policy` across multiple resources. + */ + getEffectiveOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** The name of the resource to start computing the effective `Policy`. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns the IAM access control policy for the specified Project. + * Permission is denied if the policy or the resource does not exist. + * + * Authorization requires the Google IAM permission + * `resourcemanager.projects.getIamPolicy` on the project + */ + getIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets a `Policy` on a resource. + * + * If no `Policy` is set on the resource, a `Policy` is returned with default + * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + * `etag` value can be used with `SetOrgPolicy()` to create or update a + * `Policy` during read-modify-write. + */ + getOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource the `Policy` is set on. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists Projects that are visible to the user and satisfy the + * specified filter. This method returns Projects in an unspecified order. + * New Projects do not necessarily appear at the end of the list. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * + `name` + * + `id` + * + labels.key where *key* is the name of a label + * + * Some examples of using labels as filters: + * + * |Filter|Description| + * |------|-----------| + * |name:how*|The project's name starts with "how".| + * |name:Howl|The project's name is `Howl` or `howl`.| + * |name:HOWL|Equivalent to above.| + * |NAME:howl|Equivalent to above.| + * |labels.color:*|The project has the label `color`.| + * |labels.color:red|The project's label `color` has the value `red`.| + * |labels.color:red labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`. + * + * If you specify a filter that has both `parent.type` and `parent.id`, then + * the `resourcemanager.projects.list` permission is checked on the parent. + * If the user has this permission, all projects under the parent will be + * returned after remaining filters have been applied. If the user lacks this + * permission, then all projects for which the user has the + * `resourcemanager.projects.get` permission will be returned after remaining + * filters have been applied. If no filter is specified, the call will return + * projects for which the user has `resourcemanager.projects.get` permissions. + * + * Optional. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The maximum number of Projects to return in the response. + * The server can return fewer Projects than requested. + * If unspecified, server picks an appropriate default. + * + * Optional. + */ + pageSize?: number; + /** + * A pagination token returned from a previous call to ListProjects + * that indicates from where listing should continue. + * + * Optional. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists `Constraints` that could be applied on the specified resource. */ + listAvailableOrgPolicyConstraints(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource to list `Constraints` for. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all the `Policies` set for a particular resource. */ + listOrgPolicies(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Name of the resource to list Policies for. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Sets the IAM access control policy for the specified Project. Replaces + * any existing policy. + * + * The following constraints apply when using `setIamPolicy()`: + * + * + Project does not support `allUsers` and `allAuthenticatedUsers` as + * `members` in a `Binding` of a `Policy`. + * + * + The owner role can be granted only to `user` and `serviceAccount`. + * + * + Service accounts can be made owners of a project directly + * without any restrictions. However, to be added as an owner, a user must be + * invited via Cloud Platform console and must accept the invitation. + * + * + A user cannot be granted the owner role using `setIamPolicy()`. The user + * must be granted the owner role using the Cloud Platform Console and must + * explicitly accept the invitation. + * + * + Invitations to grant the owner role cannot be sent using + * `setIamPolicy()`; + * they must be sent only using the Cloud Platform Console. + * + * + Membership changes that leave the project without any owners that have + * accepted the Terms of Service (ToS) will be rejected. + * + * + If the project is not part of an organization, there must be at least + * one owner who has accepted the Terms of Service (ToS) agreement in the + * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner + * from the policy will fail. This restriction also applies to legacy + * projects that no longer have owners who have accepted the ToS. Edits to + * IAM policies will be rejected until the lack of a ToS-accepting owner is + * rectified. + * + * + Calling this method requires enabling the App Engine Admin API. + * + * Note: Removing service accounts from policies or changing their roles + * can render services completely inoperable. It is important to understand + * how the service account is being used before removing or updating its + * roles. + * + * Authorization requires the Google IAM permission + * `resourcemanager.projects.setIamPolicy` on the project + */ + setIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates the specified `Policy` on the resource. Creates a new `Policy` for + * that `Constraint` on the resource if one does not exist. + * + * Not supplying an `etag` on the request `Policy` results in an unconditional + * write of the `Policy`. + */ + setOrgPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Resource name of the resource to attach the `Policy`. */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns permissions that a caller has on the specified Project. + * + * There are no permissions required for making this API call. + */ + testIamPermissions(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Restores the Project identified by the specified + * `project_id` (for example, `my-project-123`). + * You can only use this method for a Project that has a lifecycle state of + * DELETE_REQUESTED. + * After deletion starts, the Project cannot be restored. + * + * The caller must have modify permissions for this Project. + */ + undelete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The project ID (for example, `foo-bar-123`). + * + * Required. + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Updates the attributes of the Project identified by the specified + * `project_id` (for example, `my-project-123`). + * + * The caller must have modify permissions for this Project. + */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The project ID (for example, `my-project-123`). + * + * Required. + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.cloudresourcemanager/readme.md b/types/gapi.client.cloudresourcemanager/readme.md new file mode 100644 index 0000000000..c034eb5ae9 --- /dev/null +++ b/types/gapi.client.cloudresourcemanager/readme.md @@ -0,0 +1,409 @@ +# TypeScript typings for Google Cloud Resource Manager API v1 +The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata. +For detailed description please check [documentation](https://cloud.google.com/resource-manager). + +## Installing + +Install typings for Google Cloud Resource Manager API: +``` +npm install @types/gapi.client.cloudresourcemanager@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudresourcemanager', 'v1', () => { + // now we can use gapi.client.cloudresourcemanager + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Resource Manager API resources: + +```typescript + +/* +Clears a `Policy` from a resource. +*/ +await gapi.client.folders.clearOrgPolicy({ resource: "resource", }); + +/* +Gets the effective `Policy` on a resource. This is the result of merging +`Policies` in the resource hierarchy. The returned `Policy` will not have +an `etag`set because it is a computed `Policy` across multiple resources. +*/ +await gapi.client.folders.getEffectiveOrgPolicy({ resource: "resource", }); + +/* +Gets a `Policy` on a resource. + +If no `Policy` is set on the resource, a `Policy` is returned with default +values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The +`etag` value can be used with `SetOrgPolicy()` to create or update a +`Policy` during read-modify-write. +*/ +await gapi.client.folders.getOrgPolicy({ resource: "resource", }); + +/* +Lists `Constraints` that could be applied on the specified resource. +*/ +await gapi.client.folders.listAvailableOrgPolicyConstraints({ resource: "resource", }); + +/* +Lists all the `Policies` set for a particular resource. +*/ +await gapi.client.folders.listOrgPolicies({ resource: "resource", }); + +/* +Updates the specified `Policy` on the resource. Creates a new `Policy` for +that `Constraint` on the resource if one does not exist. + +Not supplying an `etag` on the request `Policy` results in an unconditional +write of the `Policy`. +*/ +await gapi.client.folders.setOrgPolicy({ resource: "resource", }); + +/* +Create a Lien which applies to the resource denoted by the `parent` field. + +Callers of this method will require permission on the `parent` resource. +For example, applying to `projects/1234` requires permission +`resourcemanager.projects.updateLiens`. + +NOTE: Some resources may limit the number of Liens which may be applied. +*/ +await gapi.client.liens.create({ }); + +/* +Delete a Lien by `name`. + +Callers of this method will require permission on the `parent` resource. +For example, a Lien with a `parent` of `projects/1234` requires permission +`resourcemanager.projects.updateLiens`. +*/ +await gapi.client.liens.delete({ name: "name", }); + +/* +List all Liens applied to the `parent` resource. + +Callers of this method will require permission on the `parent` resource. +For example, a Lien with a `parent` of `projects/1234` requires permission +`resourcemanager.projects.get`. +*/ +await gapi.client.liens.list({ }); + +/* +Gets the latest state of a long-running operation. Clients can use this +method to poll the operation result at intervals as recommended by the API +service. +*/ +await gapi.client.operations.get({ name: "name", }); + +/* +Clears a `Policy` from a resource. +*/ +await gapi.client.organizations.clearOrgPolicy({ resource: "resource", }); + +/* +Fetches an Organization resource identified by the specified resource name. +*/ +await gapi.client.organizations.get({ name: "name", }); + +/* +Gets the effective `Policy` on a resource. This is the result of merging +`Policies` in the resource hierarchy. The returned `Policy` will not have +an `etag`set because it is a computed `Policy` across multiple resources. +*/ +await gapi.client.organizations.getEffectiveOrgPolicy({ resource: "resource", }); + +/* +Gets the access control policy for an Organization resource. May be empty +if no such policy or resource exists. The `resource` field should be the +organization's resource name, e.g. "organizations/123". + +Authorization requires the Google IAM permission +`resourcemanager.organizations.getIamPolicy` on the specified organization +*/ +await gapi.client.organizations.getIamPolicy({ resource: "resource", }); + +/* +Gets a `Policy` on a resource. + +If no `Policy` is set on the resource, a `Policy` is returned with default +values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The +`etag` value can be used with `SetOrgPolicy()` to create or update a +`Policy` during read-modify-write. +*/ +await gapi.client.organizations.getOrgPolicy({ resource: "resource", }); + +/* +Lists `Constraints` that could be applied on the specified resource. +*/ +await gapi.client.organizations.listAvailableOrgPolicyConstraints({ resource: "resource", }); + +/* +Lists all the `Policies` set for a particular resource. +*/ +await gapi.client.organizations.listOrgPolicies({ resource: "resource", }); + +/* +Searches Organization resources that are visible to the user and satisfy +the specified filter. This method returns Organizations in an unspecified +order. New Organizations do not necessarily appear at the end of the +results. + +Search will only return organizations on which the user has the permission +`resourcemanager.organizations.get` +*/ +await gapi.client.organizations.search({ }); + +/* +Sets the access control policy on an Organization resource. Replaces any +existing policy. The `resource` field should be the organization's resource +name, e.g. "organizations/123". + +Authorization requires the Google IAM permission +`resourcemanager.organizations.setIamPolicy` on the specified organization +*/ +await gapi.client.organizations.setIamPolicy({ resource: "resource", }); + +/* +Updates the specified `Policy` on the resource. Creates a new `Policy` for +that `Constraint` on the resource if one does not exist. + +Not supplying an `etag` on the request `Policy` results in an unconditional +write of the `Policy`. +*/ +await gapi.client.organizations.setOrgPolicy({ resource: "resource", }); + +/* +Returns permissions that a caller has on the specified Organization. +The `resource` field should be the organization's resource name, +e.g. "organizations/123". + +There are no permissions required for making this API call. +*/ +await gapi.client.organizations.testIamPermissions({ resource: "resource", }); + +/* +Clears a `Policy` from a resource. +*/ +await gapi.client.projects.clearOrgPolicy({ resource: "resource", }); + +/* +Request that a new Project be created. The result is an Operation which +can be used to track the creation process. It is automatically deleted +after a few hours, so there is no need to call DeleteOperation. + +Our SLO permits Project creation to take up to 30 seconds at the 90th +percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile +latency. 95th percentile latency is around 11 seconds. We recommend +polling at the 5th second with an exponential backoff. + +Authorization requires the Google IAM permission +`resourcemanager.projects.create` on the specified parent for the new +project. +*/ +await gapi.client.projects.create({ }); + +/* +Marks the Project identified by the specified +`project_id` (for example, `my-project-123`) for deletion. +This method will only affect the Project if the following criteria are met: + ++ The Project does not have a billing account associated with it. ++ The Project has a lifecycle state of +ACTIVE. + +This method changes the Project's lifecycle state from +ACTIVE +to DELETE_REQUESTED. +The deletion starts at an unspecified time, +at which point the Project is no longer accessible. + +Until the deletion completes, you can check the lifecycle state +checked by retrieving the Project with GetProject, +and the Project remains visible to ListProjects. +However, you cannot update the project. + +After the deletion completes, the Project is not retrievable by +the GetProject and +ListProjects methods. + +The caller must have modify permissions for this Project. +*/ +await gapi.client.projects.delete({ projectId: "projectId", }); + +/* +Retrieves the Project identified by the specified +`project_id` (for example, `my-project-123`). + +The caller must have read permissions for this Project. +*/ +await gapi.client.projects.get({ projectId: "projectId", }); + +/* +Gets a list of ancestors in the resource hierarchy for the Project +identified by the specified `project_id` (for example, `my-project-123`). + +The caller must have read permissions for this Project. +*/ +await gapi.client.projects.getAncestry({ projectId: "projectId", }); + +/* +Gets the effective `Policy` on a resource. This is the result of merging +`Policies` in the resource hierarchy. The returned `Policy` will not have +an `etag`set because it is a computed `Policy` across multiple resources. +*/ +await gapi.client.projects.getEffectiveOrgPolicy({ resource: "resource", }); + +/* +Returns the IAM access control policy for the specified Project. +Permission is denied if the policy or the resource does not exist. + +Authorization requires the Google IAM permission +`resourcemanager.projects.getIamPolicy` on the project +*/ +await gapi.client.projects.getIamPolicy({ resource: "resource", }); + +/* +Gets a `Policy` on a resource. + +If no `Policy` is set on the resource, a `Policy` is returned with default +values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The +`etag` value can be used with `SetOrgPolicy()` to create or update a +`Policy` during read-modify-write. +*/ +await gapi.client.projects.getOrgPolicy({ resource: "resource", }); + +/* +Lists Projects that are visible to the user and satisfy the +specified filter. This method returns Projects in an unspecified order. +New Projects do not necessarily appear at the end of the list. +*/ +await gapi.client.projects.list({ }); + +/* +Lists `Constraints` that could be applied on the specified resource. +*/ +await gapi.client.projects.listAvailableOrgPolicyConstraints({ resource: "resource", }); + +/* +Lists all the `Policies` set for a particular resource. +*/ +await gapi.client.projects.listOrgPolicies({ resource: "resource", }); + +/* +Sets the IAM access control policy for the specified Project. Replaces +any existing policy. + +The following constraints apply when using `setIamPolicy()`: + ++ Project does not support `allUsers` and `allAuthenticatedUsers` as +`members` in a `Binding` of a `Policy`. + ++ The owner role can be granted only to `user` and `serviceAccount`. + ++ Service accounts can be made owners of a project directly +without any restrictions. However, to be added as an owner, a user must be +invited via Cloud Platform console and must accept the invitation. + ++ A user cannot be granted the owner role using `setIamPolicy()`. The user +must be granted the owner role using the Cloud Platform Console and must +explicitly accept the invitation. + ++ Invitations to grant the owner role cannot be sent using +`setIamPolicy()`; +they must be sent only using the Cloud Platform Console. + ++ Membership changes that leave the project without any owners that have +accepted the Terms of Service (ToS) will be rejected. + ++ If the project is not part of an organization, there must be at least +one owner who has accepted the Terms of Service (ToS) agreement in the +policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner +from the policy will fail. This restriction also applies to legacy +projects that no longer have owners who have accepted the ToS. Edits to +IAM policies will be rejected until the lack of a ToS-accepting owner is +rectified. + ++ Calling this method requires enabling the App Engine Admin API. + +Note: Removing service accounts from policies or changing their roles +can render services completely inoperable. It is important to understand +how the service account is being used before removing or updating its +roles. + +Authorization requires the Google IAM permission +`resourcemanager.projects.setIamPolicy` on the project +*/ +await gapi.client.projects.setIamPolicy({ resource: "resource", }); + +/* +Updates the specified `Policy` on the resource. Creates a new `Policy` for +that `Constraint` on the resource if one does not exist. + +Not supplying an `etag` on the request `Policy` results in an unconditional +write of the `Policy`. +*/ +await gapi.client.projects.setOrgPolicy({ resource: "resource", }); + +/* +Returns permissions that a caller has on the specified Project. + +There are no permissions required for making this API call. +*/ +await gapi.client.projects.testIamPermissions({ resource: "resource", }); + +/* +Restores the Project identified by the specified +`project_id` (for example, `my-project-123`). +You can only use this method for a Project that has a lifecycle state of +DELETE_REQUESTED. +After deletion starts, the Project cannot be restored. + +The caller must have modify permissions for this Project. +*/ +await gapi.client.projects.undelete({ projectId: "projectId", }); + +/* +Updates the attributes of the Project identified by the specified +`project_id` (for example, `my-project-123`). + +The caller must have modify permissions for this Project. +*/ +await gapi.client.projects.update({ projectId: "projectId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.cloudresourcemanager/tsconfig.json b/types/gapi.client.cloudresourcemanager/tsconfig.json new file mode 100644 index 0000000000..c82cbc16f6 --- /dev/null +++ b/types/gapi.client.cloudresourcemanager/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudresourcemanager-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudresourcemanager/tslint.json b/types/gapi.client.cloudresourcemanager/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudresourcemanager/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudtasks/gapi.client.cloudtasks-tests.ts b/types/gapi.client.cloudtasks/gapi.client.cloudtasks-tests.ts new file mode 100644 index 0000000000..dc2da0ba4c --- /dev/null +++ b/types/gapi.client.cloudtasks/gapi.client.cloudtasks-tests.ts @@ -0,0 +1,32 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudtasks', 'v2beta2', () => { + /** now we can use gapi.client.cloudtasks */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.cloudtasks/index.d.ts b/types/gapi.client.cloudtasks/index.d.ts new file mode 100644 index 0000000000..3e1d3f3c08 --- /dev/null +++ b/types/gapi.client.cloudtasks/index.d.ts @@ -0,0 +1,2100 @@ +// Type definitions for Google Cloud Tasks API v2beta2 2.0 +// Project: https://cloud.google.com/cloud-tasks/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudtasks.googleapis.com/$discovery/rest?version=v2beta2 + +/// + +declare namespace gapi.client { + /** Load Cloud Tasks API v2beta2 */ + function load(name: "cloudtasks", version: "v2beta2"): PromiseLike; + function load(name: "cloudtasks", version: "v2beta2", callback: () => any): void; + + const projects: cloudtasks.ProjectsResource; + + namespace cloudtasks { + interface AcknowledgeTaskRequest { + /** + * Required. + * + * The task's current schedule time, available in the Task.schedule_time + * returned in PullTasksResponse.tasks or + * CloudTasks.RenewLease. This restriction is to check that + * the caller is acknowledging the correct task. + */ + scheduleTime?: string; + } + interface AppEngineHttpRequest { + /** + * Task-level setting for App Engine routing. + * + * If set, AppEngineHttpTarget.app_engine_routing_override is used for + * all tasks in the queue, no matter what the setting is for the + * task-level app_engine_routing. + */ + appEngineRouting?: AppEngineRouting; + /** + * HTTP request headers. + * + * This map contains the header field names and values. + * Headers can be set when the + * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + * Repeated headers are not supported but a header value can contain commas. + * + * Cloud Tasks sets some headers to default values: + * + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * + * If the task has an AppEngineHttpRequest.payload, Cloud Tasks sets the + * following headers: + * + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explictly + * setting `Content-Type` to a particular media type when the + * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * + * The headers below cannot be set or overridden: + * + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * + * In addition, some App Engine headers, which contain + * task-specific information, are also be sent to the task handler; see + * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + */ + headers?: Record; + /** + * The HTTP method to use for the request. The default is POST. + * + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt will fail + * with error code 405 (Method Not Allowed). See + * the Request-Line is not allowed for the resource identified by the + * Request-URI". See + * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the documentation for the request handlers in the language your app is + * written in e.g. + * [python RequestHandler](/appengine/docs/python/tools/webapp/requesthandlerclass). + */ + httpMethod?: string; + /** + * Payload. + * + * The payload will be sent as the HTTP message body. A message + * body, and thus a payload, is allowed only if the HTTP method is + * POST or PUT. It is an error to set a data payload on a task with + * an incompatible HttpMethod. + */ + payload?: string; + /** + * The relative URL. + * + * The relative URL must begin with "/" and must be a valid HTTP relative URL. + * It can contain a path and query string arguments. + * If the relative URL is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + */ + relativeUrl?: string; + } + interface AppEngineHttpTarget { + /** + * Overrides for the + * task-level app_engine_routing. + * + * If set, AppEngineHttpTarget.app_engine_routing_override is used for + * all tasks in the queue, no matter what the setting is for the + * task-level app_engine_routing. + */ + appEngineRoutingOverride?: AppEngineRouting; + } + interface AppEngineQueueConfig { + /** Deprecated. Use AppEngineTarget.app_engine_routing_override. */ + appEngineRoutingOverride?: AppEngineRouting; + } + interface AppEngineRouting { + /** + * Output only. + * + * The host that the task is sent to. For more information, see + * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed). + * + * The host is constructed as: + * + * + * * `host = [application_domain_name]`
+ * `| [service] + '.' + [application_domain_name]`
+ * `| [version] + '.' + [application_domain_name]`
+ * `| [version_dot_service]+ '.' + [application_domain_name]`
+ * `| [instance] + '.' + [application_domain_name]`
+ * `| [instance_dot_service] + '.' + [application_domain_name]`
+ * `| [instance_dot_version] + '.' + [application_domain_name]`
+ * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + * + * * `application_domain_name` = The domain name of the app, for + * example .appspot.com, which is associated with the + * queue's project ID. Some tasks which were created using the App Engine + * SDK use a custom domain name. + * + * * `service =` AppEngineRouting.service + * + * * `version =` AppEngineRouting.version + * + * * `version_dot_service =` + * AppEngineRouting.version `+ '.' +` AppEngineRouting.service + * + * * `instance =` AppEngineRouting.instance + * + * * `instance_dot_service =` + * AppEngineRouting.instance `+ '.' +` AppEngineRouting.service + * + * * `instance_dot_version =` + * AppEngineRouting.instance `+ '.' +` AppEngineRouting.version + * + * * `instance_dot_version_dot_service =` + * AppEngineRouting.instance `+ '.' +` + * AppEngineRouting.version `+ '.' +` AppEngineRouting.service + * + * If AppEngineRouting.service is empty, then the task will be sent + * to the service which is the default service when the task is attempted. + * + * If AppEngineRouting.version is empty, then the task will be sent + * to the version which is the default version when the task is attempted. + * + * If AppEngineRouting.instance is empty, then the task will be sent + * to an instance which is available when the task is attempted. + * + * When AppEngineRouting.service is "default", + * AppEngineRouting.version is "default", and + * AppEngineRouting.instance is empty, AppEngineRouting.host is + * shortened to just the `application_domain_name`. + * + * If AppEngineRouting.service, AppEngineRouting.version, or + * AppEngineRouting.instance is invalid, then the task will be sent + * to the default version of the default service when the task is attempted. + */ + host?: string; + /** + * App instance. + * + * By default, the task is sent to an instance which is available when + * the task is attempted. + * + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed). + */ + instance?: string; + /** + * App service. + * + * By default, the task is sent to the service which is the default + * service when the task is attempted ("default"). + * + * For some queues or tasks which were created using the App Engine Task Queue + * API, AppEngineRouting.host is not parsable into + * AppEngineRouting.service, AppEngineRouting.version, and + * AppEngineRouting.instance. For example, some tasks which were created + * using the App Engine SDK use a custom domain name; custom domains are not + * parsed by Cloud Tasks. If AppEngineRouting.host is not parsable, then + * AppEngineRouting.service, AppEngineRouting.version, and + * AppEngineRouting.instance are the empty string. + */ + service?: string; + /** + * App version. + * + * By default, the task is sent to the version which is the default + * version when the task is attempted ("default"). + * + * For some queues or tasks which were created using the App Engine Task Queue + * API, AppEngineRouting.host is not parsable into + * AppEngineRouting.service, AppEngineRouting.version, and + * AppEngineRouting.instance. For example, some tasks which were created + * using the App Engine SDK use a custom domain name; custom domains are not + * parsed by Cloud Tasks. If AppEngineRouting.host is not parsable, then + * AppEngineRouting.service, AppEngineRouting.version, and + * AppEngineRouting.instance are the empty string. + */ + version?: string; + } + interface AppEngineTaskTarget { + /** Deprecated. Use AppEngineHttpRequest.app_engine_routing. */ + appEngineRouting?: AppEngineRouting; + /** Deprecated. Use AppEngineHttpRequest.headers. */ + headers?: Record; + /** Deprecated. Use AppEngineHttpRequest.http_method. */ + httpMethod?: string; + /** Deprecated. Use AppEngineHttpRequest.payload. */ + payload?: string; + /** Deprecated. Use AppEngineHttpRequest.relative_url. */ + relativeUrl?: string; + } + interface AttemptStatus { + /** + * Output only. + * + * The time that this attempt was dispatched. + * + * `dispatch_time` will be truncated to the nearest microsecond. + */ + dispatchTime?: string; + /** + * Output only. + * + * The response from the target for this attempt. + * + * If the task has not been attempted or the task is currently running + * then the response status is google.rpc.Code.UNKNOWN. + */ + responseStatus?: Status; + /** + * Output only. + * + * The time that this attempt response was received. + * + * `response_time` will be truncated to the nearest microsecond. + */ + responseTime?: string; + /** + * Output only. + * + * The time that this attempt was scheduled. + * + * `schedule_time` will be truncated to the nearest microsecond. + */ + scheduleTime?: string; + } + interface Binding { + /** + * Specifies the identities requesting access for a Cloud Platform resource. + * `members` can have the following values: + * + * * `allUsers`: A special identifier that represents anyone who is + * on the internet; with or without a Google account. + * + * * `allAuthenticatedUsers`: A special identifier that represents anyone + * who is authenticated with a Google account or a service account. + * + * * `user:{emailid}`: An email address that represents a specific Google + * account. For example, `alice@gmail.com` or `joe@example.com`. + * + * + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. + * + * * `group:{emailid}`: An email address that represents a Google group. + * For example, `admins@example.com`. + * + * + * * `domain:{domain}`: A Google Apps domain name that represents all the + * users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. + * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Required + */ + role?: string; + } + interface CancelLeaseRequest { + /** + * The response_view specifies which subset of the Task will be + * returned. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView` + * [Google IAM](/iam/) permission on the + * Task.name resource. + */ + responseView?: string; + /** + * Required. + * + * The task's current schedule time, available in the Task.schedule_time + * returned in PullTasksResponse.tasks or + * CloudTasks.RenewLease. This restriction is to check that + * the caller is canceling the correct task. + */ + scheduleTime?: string; + } + interface CreateTaskRequest { + /** + * The response_view specifies which subset of the Task will be + * returned. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView` + * [Google IAM](/iam/) permission on the + * Task.name resource. + */ + responseView?: string; + /** + * Required. + * + * The task to add. + * + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a name for the task in + * Task.name. If a name is not specified then the system will + * generate a random unique task id, which will be returned in the + * response's Task.name. + * + * If Task.schedule_time is not set or is in the past then Cloud + * Tasks will set it to the current time. + * + * Task De-duplication: + * + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or completed recently then the call will fail + * with google.rpc.Code.ALREADY_EXISTS. If the task's queue was + * created using Cloud Tasks, then another task with the same name + * can't be created for ~1hour after the original task was deleted + * or completed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9days after the original task was deleted or completed. + * + * Because there is an extra lookup cost to identify duplicate task + * names, these CloudTasks.CreateTask calls have significantly + * increased latency. Using hashed strings for the task id or for + * the prefix of the task id is recommended. Choosing task ids that + * are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + */ + task?: Task; + } + interface ListLocationsResponse { + /** A list of locations that matches the specified filter in the request. */ + locations?: Location[]; + /** The standard List next-page token. */ + nextPageToken?: string; + } + interface ListQueuesResponse { + /** + * A token to retrieve next page of results. + * + * To return the next page of results, call + * CloudTasks.ListQueues with this value as the + * ListQueuesRequest.page_token. + * + * If the next_page_token is empty, there are no more results. + * + * The page token is valid for only 2 hours. + */ + nextPageToken?: string; + /** The list of queues. */ + queues?: Queue[]; + } + interface ListTasksResponse { + /** + * A token to retrieve next page of results. + * + * To return the next page of results, call + * CloudTasks.ListTasks with this value as the + * ListTasksRequest.page_token. + * + * If the next_page_token is empty, there are no more results. + */ + nextPageToken?: string; + /** The list of tasks. */ + tasks?: Task[]; + } + interface Location { + /** + * Cross-service attributes for the location. For example + * + * {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: Record; + /** The canonical id for this location. For example: `"us-east1"`. */ + locationId?: string; + /** + * Service-specific metadata. For example the available capacity at the given + * location. + */ + metadata?: Record; + /** + * Resource name for the location, which may vary between implementations. + * For example: `"projects/example-project/locations/us-east1"` + */ + name?: string; + } + interface Policy { + /** + * Associates a list of `members` to a `role`. + * `bindings` with no members will result in an error. + */ + bindings?: Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a policy from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform policy updates in order to avoid race + * conditions: An `etag` is returned in the response to `getIamPolicy`, and + * systems are expected to put that etag in the request to `setIamPolicy` to + * ensure that their change will be applied to the same version of the policy. + * + * If no `etag` is provided in the call to `setIamPolicy`, then the existing + * policy is overwritten blindly. + */ + etag?: string; + /** Version of the `Policy`. The default version is 0. */ + version?: number; + } + interface PullMessage { + /** A data payload consumed by the task worker to execute the task. */ + payload?: string; + /** + * A meta-data tag for this task. + * + * This value is used by CloudTasks.PullTasks calls when + * PullTasksRequest.filter is `tag=`. + * + * The tag must be less than 500 bytes. + */ + tag?: string; + } + interface PullTaskTarget { + /** Deprecated. Use PullMessage.payload. */ + payload?: string; + /** Deprecated. Use PullMessage.tag. */ + tag?: string; + } + interface PullTasksRequest { + /** + * `filter` can be used to specify a subset of tasks to lease. + * + * When `filter` is set to `tag=` then the + * PullTasksResponse will contain only tasks whose + * PullMessage.tag is equal to ``. `` must be less than + * 500 bytes. + * + * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + * the same tag as the task with the oldest schedule_time will be returned. + * + * Grammar Syntax: + * + * * `filter = "tag=" tag | "tag_function=" function` + * + * * `tag = string | bytes` + * + * * `function = "oldest_tag()"` + * + * The `oldest_tag()` function returns tasks which have the same tag as the + * oldest task (ordered by schedule time). + */ + filter?: string; + /** + * The duration of the lease. + * + * Each task returned in the PullTasksResponse will have its + * Task.schedule_time set to the current time plus the + * `lease_duration`. A task that has been returned in a + * PullTasksResponse is leased -- that task will not be + * returned in a different PullTasksResponse before the + * Task.schedule_time. + * + * After the lease holder has successfully finished the work + * associated with the task, the lease holder must call + * CloudTasks.AcknowledgeTask. If the task is not acknowledged + * via CloudTasks.AcknowledgeTask before the + * Task.schedule_time then it will be returned in a later + * PullTasksResponse so that another lease holder can process + * it. + * + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + */ + leaseDuration?: string; + /** + * The maximum number of tasks to lease. The maximum that can be + * requested is 1000. + */ + maxTasks?: number; + /** + * The response_view specifies which subset of the Task will be + * returned. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView` + * [Google IAM](/iam/) permission on the + * Task.name resource. + */ + responseView?: string; + } + interface PullTasksResponse { + /** The leased tasks. */ + tasks?: Task[]; + } + interface Queue { + /** + * App Engine HTTP target. + * + * An App Engine queue is a queue that has an AppEngineHttpTarget. + */ + appEngineHttpTarget?: AppEngineHttpTarget; + /** Deprecated. Use Queue.app_engine_http_target. */ + appEngineQueueConfig?: AppEngineQueueConfig; + /** + * The queue name. + * + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * * `PROJECT_ID` can contain uppercase and lowercase letters, + * numbers, hyphens, colons, and periods; that is, it must match + * the regular expression: `[a-zA-Z\\d-:\\.]+`. + * * `QUEUE_ID` can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\\d-]+`. The maximum length is 100 + * characters. + * + * Caller-specified and required in CreateQueueRequest, after which + * it becomes output only. + */ + name?: string; + /** Deprecated. Use Queue.pull_target. */ + pullQueueConfig?: any; + /** + * Pull target. + * + * A pull queue is a queue that has a PullTarget. + */ + pullTarget?: any; + /** + * Output only. + * + * The last time this queue was purged. All tasks that were + * created before this time were purged. + * + * A queue can be purged using CloudTasks.PurgeQueue, the + * [App Engine Task Queue SDK, or the Cloud + * Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * + * Purge time will be truncated to the nearest microsecond. Purge + * time will be zero if the queue has never been purged. + */ + purgeTime?: string; + /** + * Output only. + * + * The state of the queue. + * + * `queue_state` can only be changed by called + * CloudTasks.PauseQueue, CloudTasks.ResumeQueue, or uploading + * [queue.yaml](/appengine/docs/python/config/queueref). + * CloudTasks.UpdateQueue cannot be used to change `queue_state`. + */ + queueState?: string; + /** + * Rate limits for task dispatches. + * + * Queue.rate_limits and Queue.retry_config are related because they + * both control task attempts however they control how tasks are attempted in + * different ways: + * + * * Queue.rate_limits controls the total rate of dispatches from a queue + * (i.e. all traffic dispatched from the queue, regardless of whether the + * dispatch is from a first attempt or a retry). + * * Queue.retry_config controls what happens to particular a task after + * its first attempt fails. That is, Queue.retry_config controls task + * retries (the second attempt, third attempt, etc). + */ + rateLimits?: RateLimits; + /** + * Settings that determine the retry behavior. + * + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + */ + retryConfig?: RetryConfig; + } + interface RateLimits { + /** + * Output only. + * + * The max burst size limits how fast the queue is processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * + * * For App Engine queues, if + * RateLimits.max_tasks_dispatched_per_second is 1, this + * field is 10; otherwise this field is + * RateLimits.max_tasks_dispatched_per_second / 5. + * * For pull queues, this field is output only and always 10,000. + * + * Note: For App Engine queues that were created through + * `queue.yaml/xml`, `max_burst_size` might not have the same + * settings as specified above; CloudTasks.UpdateQueue can be + * used to set `max_burst_size` only to the values specified above. + * + * This field has the same meaning as + * [bucket_size in queue.yaml](/appengine/docs/standard/python/config/queueref#bucket_size). + */ + maxBurstSize?: number; + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * + * The maximum allowed value is 5,000. + * + * * For App Engine queues, this field is 10 by default. + * * For pull queues, this field is output only and always -1, which + * indicates no limit. + * + * This field has the same meaning as + * [max_concurrent_requests in queue.yaml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + */ + maxConcurrentTasks?: number; + /** + * The maximum rate at which tasks are dispatched from this + * queue. + * + * The maximum allowed value is 500. + * + * * For App Engine queues, this field is 1 by default. + * * For pull queues, this field is output only and always 10,000. + * + * This field has the same meaning as + * [rate in queue.yaml](/appengine/docs/standard/python/config/queueref#rate). + */ + maxTasksDispatchedPerSecond?: number; + } + interface RenewLeaseRequest { + /** + * Required. + * + * The desired new lease duration, starting from now. + * + * + * The maximum lease duration is 1 week. + * `new_lease_duration` will be truncated to the nearest second. + */ + newLeaseDuration?: string; + /** + * The response_view specifies which subset of the Task will be + * returned. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView` + * [Google IAM](/iam/) permission on the + * Task.name resource. + */ + responseView?: string; + /** + * Required. + * + * The task's current schedule time, available in the Task.schedule_time + * returned in PullTasksResponse.tasks or + * CloudTasks.RenewLease. This restriction is to check that + * the caller is renewing the correct task. + */ + scheduleTime?: string; + } + interface RetryConfig { + /** + * The maximum number of attempts for a task. + * + * Cloud Tasks will attempt the task `max_attempts` times (that + * is, if the first attempt fails, then there will be + * `max_attempts - 1` retries). Must be > 0. + */ + maxAttempts?: number; + /** + * The maximum amount of time to wait before retrying a task after + * it fails. The default is 1 hour. + * + * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + * this field is 1 hour by default. + * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this field + * is output only and always 0. + * + * `max_backoff` will be truncated to the nearest second. + * + * This field has the same meaning as + * [max_backoff_seconds in queue.yaml](/appengine/docs/standard/python/config/queueref#retry_parameters). + */ + maxBackoff?: string; + /** + * The time between retries increases exponentially `max_doublings` times. + * `max_doublings` is maximum number of times that the interval between failed + * task retries will be doubled before the interval increases linearly. + * After max_doublings intervals, the retry interval will be + * 2^(max_doublings - 1) * RetryConfig.min_backoff. + * + * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + * this field is 16 by default. + * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this field + * is output only and always 0. + * + * This field has the same meaning as + * [max_doublings in queue.yaml](/appengine/docs/standard/python/config/queueref#retry_parameters). + */ + maxDoublings?: number; + /** + * If positive, `max_retry_duration` specifies the time limit for retrying a + * failed task, measured from when the task was first attempted. Once + * `max_retry_duration` time has passed *and* the task has been attempted + * RetryConfig.max_attempts times, no further attempts will be made and + * the task will be deleted. + * + * If zero, then the task age is unlimited. + * + * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + * this field is 0 seconds by default. + * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + * field is output only and always 0. + * + * `max_retry_duration` will be truncated to the nearest second. + * + * This field has the same meaning as + * [task_age_limit in queue.yaml](/appengine/docs/standard/python/config/queueref#retry_parameters). + */ + maxRetryDuration?: string; + /** + * The minimum amount of time to wait before retrying a task after + * it fails. + * + * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + * this field is 0.1 seconds by default. + * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + * field is output only and always 0. + * + * `min_backoff` will be truncated to the nearest second. + * + * This field has the same meaning as + * [min_backoff_seconds in queue.yaml](/appengine/docs/standard/python/config/queueref#retry_parameters). + */ + minBackoff?: string; + /** If true, then the number of attempts is unlimited. */ + unlimitedAttempts?: boolean; + } + interface RunTaskRequest { + /** + * The response_view specifies which subset of the Task will be + * returned. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView` + * [Google IAM](/iam/) permission on the + * Task.name resource. + */ + responseView?: string; + } + interface SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + policy?: Policy; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface Task { + /** + * App Engine HTTP request that is sent to the task's target. Can be set + * only if Queue.app_engine_http_target is set. + * + * An App Engine task is a task that has AppEngineHttpRequest set. + */ + appEngineHttpRequest?: AppEngineHttpRequest; + /** Deprecated. Use Task.app_engine_http_request. */ + appEngineTaskTarget?: AppEngineTaskTarget; + /** + * Output only. + * + * The time that the task was created. + * + * `create_time` will be truncated to the nearest second. + */ + createTime?: string; + /** + * The task name. + * + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * * `PROJECT_ID` can contain uppercase and lowercase letters, + * numbers, hyphens, colons, and periods; that is, it must match + * the regular expression: `[a-zA-Z\\d-:\\.]+`. + * * `QUEUE_ID` can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\\d-]+`. The maximum length is 100 + * characters. + * * `TASK_ID` contain uppercase and lowercase letters, numbers, + * underscores, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\\d_-]+`. The maximum length is 500 + * characters. + * + * Optionally caller-specified in CreateTaskRequest. + */ + name?: string; + /** + * Pull message contains data that should be used by the caller of + * CloudTasks.PullTasks to process the task. Can be set only if + * Queue.pull_target is set. + * + * A pull task is a task that has PullMessage set. + */ + pullMessage?: PullMessage; + /** Deprecated. Use Task.pull_message. */ + pullTaskTarget?: PullTaskTarget; + /** + * The time when the task is scheduled to be attempted. + * + * For pull queues, this is the time when the task is available to + * be leased; if a task is currently leased, this is the time when + * the current lease expires, that is, the time that the task was + * leased plus the PullTasksRequest.lease_duration. + * + * For App Engine queues, this is when the task will be attempted or retried. + * + * `schedule_time` will be truncated to the nearest microsecond. + */ + scheduleTime?: string; + /** + * Output only. + * + * Task status. + */ + taskStatus?: TaskStatus; + /** + * Output only. + * + * The view specifies which subset of the Task has been + * returned. + */ + view?: string; + } + interface TaskStatus { + /** + * Output only. + * + * The number of attempts dispatched. This count includes tasks which have + * been dispatched but haven't received a response. + */ + attemptDispatchCount?: string; + /** + * Output only. + * + * The number of attempts which have received a response. + * + * This field is not calculated for + * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + */ + attemptResponseCount?: string; + /** + * Output only. + * + * The status of the task's first attempt. + * + * Only AttemptStatus.dispatch_time will be set. + * The other AttemptStatus information is not retained by Cloud Tasks. + * + * This field is not calculated for + * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + */ + firstAttemptStatus?: AttemptStatus; + /** + * Output only. + * + * The status of the task's last attempt. + * + * This field is not calculated for + * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + */ + lastAttemptStatus?: AttemptStatus; + } + interface TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[]; + } + interface TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is + * allowed. + */ + permissions?: string[]; + } + interface TasksResource { + /** + * Acknowledges a pull task. + * + * The lease holder, that is, the entity that received this task in + * a PullTasksResponse, must call this method to indicate that + * the work associated with the task has finished. + * + * The lease holder must acknowledge a task within the + * PullTasksRequest.lease_duration or the lease will expire and + * the task will become ready to be returned in a different + * PullTasksResponse. After the task is acknowledged, it will + * not be returned by a later CloudTasks.PullTasks, + * CloudTasks.GetTask, or CloudTasks.ListTasks. + */ + acknowledge(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Cancel a pull task's lease. + * + * The lease holder can use this method to cancel a task's lease + * by setting Task.schedule_time to now. This will make the task + * available to be leased to the next caller of CloudTasks.PullTasks. + */ + cancelLease(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Creates a task and adds it to a queue. + * + * To add multiple tasks at the same time, use + * [HTTP batching](/storage/docs/json_api/v1/how-tos/batch) + * or the batching documentation for your client library, for example + * https://developers.google.com/api-client-library/python/guide/batch. + * + * Tasks cannot be updated after creation; there is no UpdateTask command. + * + * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + * the maximum task size is 100KB. + * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + * the maximum task size is 1MB. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Required. + * + * The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * The queue must already exist. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a task. + * + * A task can be deleted if it is scheduled or dispatched. A task + * cannot be deleted if it has completed successfully or permanently + * failed. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets a task. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * The response_view specifies which subset of the Task will be + * returned. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView` + * [Google IAM](/iam/) permission on the + * Task.name resource. + */ + responseView?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists the tasks in a queue. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default due to performance + * considerations; ListTasksRequest.response_view controls the + * subset of information which is returned. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sort order used for the query. The fields supported for sorting + * are Task.schedule_time and PullMessage.tag. All results will be + * returned in ascending order. The default ordering is by + * Task.schedule_time. + */ + orderBy?: string; + /** + * Requested page size. Fewer tasks than requested might be returned. + * + * The maximum page size is 1000. If unspecified, the page size will + * be the maximum. Fewer tasks than requested might be returned, + * even if more tasks exist; use + * ListTasksResponse.next_page_token to determine if more tasks + * exist. + */ + pageSize?: number; + /** + * A token identifying the page of results to return. + * + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * ListTasksResponse.next_page_token returned from the previous + * call to CloudTasks.ListTasks method. + * + * The page token is valid for only 2 hours. + */ + pageToken?: string; + /** + * Required. + * + * The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * The response_view specifies which subset of the Task will be + * returned. + * + * By default response_view is Task.View.BASIC; not all + * information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for Task.View.FULL requires `cloudtasks.tasks.fullView` + * [Google IAM](/iam/) permission on the + * Task.name resource. + */ + responseView?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Pulls tasks from a pull queue and acquires a lease on them for a + * specified PullTasksRequest.lease_duration. + * + * This method is invoked by the lease holder to obtain the + * lease. The lease holder must acknowledge the task via + * CloudTasks.AcknowledgeTask after they have performed the work + * associated with the task. + * + * The payload is intended to store data that the lease holder needs + * to perform the work associated with the task. To return the + * payloads in the PullTasksResponse, set + * PullTasksRequest.response_view to Task.View.FULL. + * + * A maximum of 10 qps of CloudTasks.PullTasks requests are allowed per + * queue. google.rpc.Code.RESOURCE_EXHAUSTED is returned when this limit + * is exceeded. google.rpc.Code.RESOURCE_EXHAUSTED is also returned when + * RateLimits.max_tasks_dispatched_per_second is exceeded. + */ + pull(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Renew the current lease of a pull task. + * + * The lease holder can use this method to extend the lease by a new + * duration, starting from now. The new task lease will be + * returned in Task.schedule_time. + */ + renewLease(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Forces a task to run now. + * + * This command is meant to be used for manual debugging. For + * example, CloudTasks.RunTask can be used to retry a failed + * task after a fix has been made or to manually force a task to be + * dispatched now. + * + * When this method is called, Cloud Tasks will dispatch the task to its + * target, even if the queue is Queue.QueueState.PAUSED. + * + * The dispatched task is returned. That is, the task that is returned + * contains the Task.task_status after the task is dispatched but + * before the task is received by its target. + * + * If Cloud Tasks receives a successful response from the task's + * handler, then the task will be deleted; otherwise the task's + * Task.schedule_time will be reset to the time that + * CloudTasks.RunTask was called plus the retry delay specified + * in the queue and task's RetryConfig. + * + * CloudTasks.RunTask returns google.rpc.Code.NOT_FOUND when + * it is called on a task that has already succeeded or permanently + * failed. google.rpc.Code.FAILED_PRECONDITION is returned when + * CloudTasks.RunTask is called on task that is dispatched or + * already running. + */ + run(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface QueuesResource { + /** + * Creates a queue. + * + * WARNING: This method is only available to whitelisted + * users. Using this method carries some risk. Read + * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + * carefully and then sign up for + * [whitelist access to this method](https://goo.gl/Fe5mUy). + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Required. + * + * The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * google.cloud.location.Locations.ListLocations. + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Deletes a queue. + * + * This command will delete the queue even if it has tasks in it. + * + * Note: If you delete a queue, a queue with the same name can't be created + * for 7 days. + * + * WARNING: This method is only available to whitelisted + * users. Using this method carries some risk. Read + * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + * carefully and then sign up for + * [whitelist access to this method](https://goo.gl/Fe5mUy). + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets a queue. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Gets the access control policy for a Queue. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * Authorization requires the following [Google IAM](/iam) permission on the + * specified resource parent: + * + * * `cloudtasks.queues.getIamPolicy` + */ + getIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists queues. + * + * Queues are returned in lexicographical order. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * `filter` can be used to specify a subset of queues. Any Queue + * field can be used as a filter and several operators as supported. + * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as + * described in + * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters). + * + * Sample filter "app_engine_http_target: *". + * + * Note that using filters might cause fewer queues than the + * requested_page size to be returned. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Requested page size. + * + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use + * ListQueuesResponse.next_page_token to determine if more + * queues exist. + */ + pageSize?: number; + /** + * A token identifying the page of results to return. + * + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * ListQueuesResponse.next_page_token returned from the previous + * call to CloudTasks.ListQueues method. It is an error to + * switch the value of ListQueuesRequest.filter while iterating + * through pages. + */ + pageToken?: string; + /** + * Required. + * + * The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Updates a queue. + * + * This method creates the queue if it does not exist and updates + * the queue if it does exist. + * + * WARNING: This method is only available to whitelisted + * users. Using this method carries some risk. Read + * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + * carefully and then sign up for + * [whitelist access to this method](https://goo.gl/Fe5mUy). + */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The queue name. + * + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * * `PROJECT_ID` can contain uppercase and lowercase letters, + * numbers, hyphens, colons, and periods; that is, it must match + * the regular expression: `[a-zA-Z\\d-:\\.]+`. + * * `QUEUE_ID` can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\\d-]+`. The maximum length is 100 + * characters. + * + * Caller-specified and required in CreateQueueRequest, after which + * it becomes output only. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * A mask used to specify which fields of the queue are being updated. + * + * If empty, then all fields will be updated. + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Pauses the queue. + * + * If a queue is paused then the system will stop executing the + * tasks in the queue until it is resumed via + * CloudTasks.ResumeQueue. Tasks can still be added when the + * queue is paused. The state of the queue is stored in + * Queue.queue_state; if paused it will be set to + * Queue.QueueState.PAUSED. + * + * WARNING: This method is only available to whitelisted + * users. Using this method carries some risk. Read + * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + * carefully and then sign up for + * [whitelist access to this method](https://goo.gl/Fe5mUy). + */ + pause(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Purges a queue by deleting all of its tasks. + * + * All tasks created before this method is called are permanently deleted. + * + * Purge operations can take up to one minute to take effect. Tasks + * might be dispatched before the purge takes effect. A purge is irreversible. + */ + purge(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Resume a queue. + * + * This method resumes a queue after it has been + * Queue.QueueState.PAUSED or Queue.QueueState.DISABLED. The state of + * a queue is stored in Queue.queue_state; after calling this method it + * will be set to Queue.QueueState.RUNNING. + * + * WARNING: This method is only available to whitelisted + * users. Using this method carries some risk. Read + * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + * carefully and then sign up for + * [whitelist access to this method](https://goo.gl/Fe5mUy). + * + * WARNING: Resuming many high-QPS queues at the same time can + * lead to target overloading. If you are resuming high-QPS + * queues, follow the 500/50/5 pattern described in + * [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + */ + resume(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. + * + * The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Sets the access control policy for a Queue. Replaces any existing + * policy. + * + * Authorization requires the following [Google IAM](/iam) permission on the + * specified resource parent: + * + * * `cloudtasks.queues.setIamPolicy` + */ + setIamPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Returns permissions that a caller has on a Queue. + * If the resource does not exist, this will return an empty set of + * permissions, not a google.rpc.Code.NOT_FOUND error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + */ + testIamPermissions(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + tasks: TasksResource; + } + interface LocationsResource { + /** Get information about a location. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Resource name for the location. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists information about the supported locations for this service. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The resource that owns the locations collection, if applicable. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + queues: QueuesResource; + } + interface ProjectsResource { + locations: LocationsResource; + } + } +} diff --git a/types/gapi.client.cloudtasks/readme.md b/types/gapi.client.cloudtasks/readme.md new file mode 100644 index 0000000000..59a3b660e3 --- /dev/null +++ b/types/gapi.client.cloudtasks/readme.md @@ -0,0 +1,54 @@ +# TypeScript typings for Cloud Tasks API v2beta2 +Manages the execution of large numbers of distributed requests. Cloud Tasks is in Alpha. +For detailed description please check [documentation](https://cloud.google.com/cloud-tasks/). + +## Installing + +Install typings for Cloud Tasks API: +``` +npm install @types/gapi.client.cloudtasks@v2beta2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudtasks', 'v2beta2', () => { + // now we can use gapi.client.cloudtasks + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Cloud Tasks API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.cloudtasks/tsconfig.json b/types/gapi.client.cloudtasks/tsconfig.json new file mode 100644 index 0000000000..d4240ab7d4 --- /dev/null +++ b/types/gapi.client.cloudtasks/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudtasks-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudtasks/tslint.json b/types/gapi.client.cloudtasks/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudtasks/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.cloudtrace/gapi.client.cloudtrace-tests.ts b/types/gapi.client.cloudtrace/gapi.client.cloudtrace-tests.ts new file mode 100644 index 0000000000..96bc98ea32 --- /dev/null +++ b/types/gapi.client.cloudtrace/gapi.client.cloudtrace-tests.ts @@ -0,0 +1,34 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('cloudtrace', 'v2', () => { + /** now we can use gapi.client.cloudtrace */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** Write Trace data for a project or application */ + 'https://www.googleapis.com/auth/trace.append', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.cloudtrace/index.d.ts b/types/gapi.client.cloudtrace/index.d.ts new file mode 100644 index 0000000000..ba868581d1 --- /dev/null +++ b/types/gapi.client.cloudtrace/index.d.ts @@ -0,0 +1,378 @@ +// Type definitions for Google Stackdriver Trace API v2 2.0 +// Project: https://cloud.google.com/trace +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://cloudtrace.googleapis.com/$discovery/rest?version=v2 + +/// + +declare namespace gapi.client { + /** Load Stackdriver Trace API v2 */ + function load(name: "cloudtrace", version: "v2"): PromiseLike; + function load(name: "cloudtrace", version: "v2", callback: () => any): void; + + const projects: cloudtrace.ProjectsResource; + + namespace cloudtrace { + interface Annotation { + /** + * A set of attributes on the annotation. There is a limit of 4 attributes + * per Annotation. + */ + attributes?: Attributes; + /** + * A user-supplied message describing the event. The maximum length for + * the description is 256 bytes. + */ + description?: TruncatableString; + } + interface AttributeValue { + /** A Boolean value represented by `true` or `false`. */ + boolValue?: boolean; + /** A 64-bit signed integer. */ + intValue?: string; + /** A string up to 256 bytes long. */ + stringValue?: TruncatableString; + } + interface Attributes { + /** + * The set of attributes. Each attribute's key can be up to 128 bytes + * long. The value can be a string up to 256 bytes, an integer, or the + * Boolean values `true` and `false`. For example: + * + * "/instance_id": "my-instance" + * "/http/user_agent": "" + * "/http/request_bytes": 300 + * "abc.com/myattribute": true + */ + attributeMap?: Record; + /** + * The number of attributes that were discarded. Attributes can be discarded + * because their keys are too long or because there are too many attributes. + * If this value is 0 then all attributes are valid. + */ + droppedAttributesCount?: number; + } + interface BatchWriteSpansRequest { + /** A collection of spans. */ + spans?: Span[]; + } + interface Link { + /** + * A set of attributes on the link. There is a limit of 32 attributes per + * link. + */ + attributes?: Attributes; + /** `SPAN_ID` identifies a span within a trace. */ + spanId?: string; + /** `TRACE_ID` identifies a trace within a project. */ + traceId?: string; + /** The relationship of the current span relative to the linked span. */ + type?: string; + } + interface Links { + /** + * The number of dropped links after the maximum size was enforced. If + * this value is 0, then no links were dropped. + */ + droppedLinksCount?: number; + /** A collection of links. */ + link?: Link[]; + } + interface Module { + /** + * A unique identifier for the module, usually a hash of its + * contents (up to 128 bytes). + */ + buildId?: TruncatableString; + /** + * For example: main binary, kernel modules, and dynamic libraries + * such as libc.so, sharedlib.so (up to 256 bytes). + */ + module?: TruncatableString; + } + interface NetworkEvent { + /** The number of compressed bytes sent or received. */ + compressedMessageSize?: string; + /** An identifier for the message, which must be unique in this span. */ + messageId?: string; + /** + * For sent messages, this is the time at which the first bit was sent. + * For received messages, this is the time at which the last bit was + * received. + */ + time?: string; + /** + * Type of NetworkEvent. Indicates whether the RPC message was sent or + * received. + */ + type?: string; + /** The number of uncompressed bytes sent or received. */ + uncompressedMessageSize?: string; + } + interface Span { + /** + * A set of attributes on the span. There is a limit of 32 attributes per + * span. + */ + attributes?: Attributes; + /** + * An optional number of child spans that were generated while this span + * was active. If set, allows implementation to detect missing child spans. + */ + childSpanCount?: number; + /** + * A description of the span's operation (up to 128 bytes). + * Stackdriver Trace displays the description in the + * {% dynamic print site_values.console_name %}. + * For example, the display name can be a qualified method name or a file name + * and a line number where the operation is called. A best practice is to use + * the same display name within an application and at the same call point. + * This makes it easier to correlate spans in different traces. + */ + displayName?: TruncatableString; + /** + * The end time of the span. On the client side, this is the time kept by + * the local machine where the span execution ends. On the server side, this + * is the time when the server application handler stops running. + */ + endTime?: string; + /** A maximum of 128 links are allowed per Span. */ + links?: Links; + /** + * The resource name of the span in the following format: + * + * projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project. + * [SPAN_ID] is a unique identifier for a span within a trace, + * assigned when the span is created. + */ + name?: string; + /** + * The [SPAN_ID] of this span's parent span. If this is a root span, + * then this field must be empty. + */ + parentSpanId?: string; + /** + * A highly recommended but not required flag that identifies when a trace + * crosses a process boundary. True when the parent_span belongs to the + * same process as the current span. + */ + sameProcessAsParentSpan?: boolean; + /** The [SPAN_ID] portion of the span's resource name. */ + spanId?: string; + /** Stack trace captured at the start of the span. */ + stackTrace?: StackTrace; + /** + * The start time of the span. On the client side, this is the time kept by + * the local machine where the span execution starts. On the server side, this + * is the time when the server's application handler starts running. + */ + startTime?: string; + /** An optional final status for this span. */ + status?: Status; + /** + * The included time events. There can be up to 32 annotations and 128 network + * events per span. + */ + timeEvents?: TimeEvents; + } + interface StackFrame { + /** + * The column number where the function call appears, if available. + * This is important in JavaScript because of its anonymous functions. + */ + columnNumber?: string; + /** + * The name of the source file where the function call appears (up to 256 + * bytes). + */ + fileName?: TruncatableString; + /** + * The fully-qualified name that uniquely identifies the function or + * method that is active in this frame (up to 1024 bytes). + */ + functionName?: TruncatableString; + /** The line number in `file_name` where the function call appears. */ + lineNumber?: string; + /** The binary module from where the code was loaded. */ + loadModule?: Module; + /** + * An un-mangled function name, if `function_name` is + * [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can + * be fully-qualified (up to 1024 bytes). + */ + originalFunctionName?: TruncatableString; + /** The version of the deployed source code (up to 128 bytes). */ + sourceVersion?: TruncatableString; + } + interface StackFrames { + /** + * The number of stack frames that were dropped because there + * were too many stack frames. + * If this value is 0, then no stack frames were dropped. + */ + droppedFramesCount?: number; + /** Stack frames in this call stack. */ + frame?: StackFrame[]; + } + interface StackTrace { + /** Stack frames in this stack trace. A maximum of 128 frames are allowed. */ + stackFrames?: StackFrames; + /** + * The hash ID is used to conserve network bandwidth for duplicate + * stack traces within a single trace. + * + * Often multiple spans will have identical stack traces. + * The first occurrence of a stack trace should contain both the + * `stackFrame` content and a value in `stackTraceHashId`. + * + * Subsequent spans within the same request can refer + * to that stack trace by only setting `stackTraceHashId`. + */ + stackTraceHashId?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface TimeEvent { + /** Text annotation with a set of attributes. */ + annotation?: Annotation; + /** An event describing an RPC message sent/received on the network. */ + networkEvent?: NetworkEvent; + /** The timestamp indicating the time the event occurred. */ + time?: string; + } + interface TimeEvents { + /** + * The number of dropped annotations in all the included time events. + * If the value is 0, then no annotations were dropped. + */ + droppedAnnotationsCount?: number; + /** + * The number of dropped network events in all the included time events. + * If the value is 0, then no network events were dropped. + */ + droppedNetworkEventsCount?: number; + /** A collection of `TimeEvent`s. */ + timeEvent?: TimeEvent[]; + } + interface TruncatableString { + /** + * The number of bytes removed from the original string. If this + * value is 0, then the string was not shortened. + */ + truncatedByteCount?: number; + /** + * The shortened string. For example, if the original string was 500 + * bytes long and the limit of the string was 128 bytes, then this + * value contains the first 128 bytes of the 500-byte string. Note that + * truncation always happens on the character boundary, to ensure that + * truncated string is still valid UTF8. In case of multi-byte characters, + * size of truncated string can be less than truncation limit. + */ + value?: string; + } + interface SpansResource { + /** Creates a new Span. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the span in the following format: + * + * projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project. + * [SPAN_ID] is a unique identifier for a span within a trace, + * assigned when the span is created. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface TracesResource { + /** + * Sends new spans to Stackdriver Trace or updates existing traces. If the + * name of a trace that you send matches that of an existing trace, new spans + * are added to the existing trace. Attempt to update existing spans results + * undefined behavior. If the name does not match, a new trace is created + * with given set of spans. + */ + batchWrite(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Required. Name of the project where the spans belong. The format is + * `projects/PROJECT_ID`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + spans: SpansResource; + } + interface ProjectsResource { + traces: TracesResource; + } + } +} diff --git a/types/gapi.client.cloudtrace/readme.md b/types/gapi.client.cloudtrace/readme.md new file mode 100644 index 0000000000..c7c8408a0b --- /dev/null +++ b/types/gapi.client.cloudtrace/readme.md @@ -0,0 +1,58 @@ +# TypeScript typings for Stackdriver Trace API v2 +Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis. + +For detailed description please check [documentation](https://cloud.google.com/trace). + +## Installing + +Install typings for Stackdriver Trace API: +``` +npm install @types/gapi.client.cloudtrace@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('cloudtrace', 'v2', () => { + // now we can use gapi.client.cloudtrace + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // Write Trace data for a project or application + 'https://www.googleapis.com/auth/trace.append', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Stackdriver Trace API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.cloudtrace/tsconfig.json b/types/gapi.client.cloudtrace/tsconfig.json new file mode 100644 index 0000000000..977a1fd91f --- /dev/null +++ b/types/gapi.client.cloudtrace/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.cloudtrace-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.cloudtrace/tslint.json b/types/gapi.client.cloudtrace/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.cloudtrace/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.clouduseraccounts/gapi.client.clouduseraccounts-tests.ts b/types/gapi.client.clouduseraccounts/gapi.client.clouduseraccounts-tests.ts new file mode 100644 index 0000000000..29c552c543 --- /dev/null +++ b/types/gapi.client.clouduseraccounts/gapi.client.clouduseraccounts-tests.ts @@ -0,0 +1,169 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('clouduseraccounts', 'vm_alpha', () => { + /** now we can use gapi.client.clouduseraccounts */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform.read-only', + /** Manage your Google Cloud User Accounts */ + 'https://www.googleapis.com/auth/cloud.useraccounts', + /** View your Google Cloud User Accounts */ + 'https://www.googleapis.com/auth/cloud.useraccounts.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Deletes the specified operation resource. */ + await gapi.client.globalAccountsOperations.delete({ + operation: "operation", + project: "project", + }); + /** Retrieves the specified operation resource. */ + await gapi.client.globalAccountsOperations.get({ + operation: "operation", + project: "project", + }); + /** Retrieves the list of operation resources contained within the specified project. */ + await gapi.client.globalAccountsOperations.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Adds users to the specified group. */ + await gapi.client.groups.addMember({ + groupName: "groupName", + project: "project", + }); + /** Deletes the specified Group resource. */ + await gapi.client.groups.delete({ + groupName: "groupName", + project: "project", + }); + /** Returns the specified Group resource. */ + await gapi.client.groups.get({ + groupName: "groupName", + project: "project", + }); + /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ + await gapi.client.groups.getIamPolicy({ + project: "project", + resource: "resource", + }); + /** Creates a Group resource in the specified project using the data included in the request. */ + await gapi.client.groups.insert({ + project: "project", + }); + /** Retrieves the list of groups contained within the specified project. */ + await gapi.client.groups.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Removes users from the specified group. */ + await gapi.client.groups.removeMember({ + groupName: "groupName", + project: "project", + }); + /** Sets the access control policy on the specified resource. Replaces any existing policy. */ + await gapi.client.groups.setIamPolicy({ + project: "project", + resource: "resource", + }); + /** Returns permissions that a caller has on the specified resource. */ + await gapi.client.groups.testIamPermissions({ + project: "project", + resource: "resource", + }); + /** Returns a list of authorized public keys for a specific user account. */ + await gapi.client.linux.getAuthorizedKeysView({ + instance: "instance", + login: true, + project: "project", + user: "user", + zone: "zone", + }); + /** Retrieves a list of user accounts for an instance within a specific project. */ + await gapi.client.linux.getLinuxAccountViews({ + filter: "filter", + instance: "instance", + maxResults: 3, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Adds a public key to the specified User resource with the data included in the request. */ + await gapi.client.users.addPublicKey({ + project: "project", + user: "user", + }); + /** Deletes the specified User resource. */ + await gapi.client.users.delete({ + project: "project", + user: "user", + }); + /** Returns the specified User resource. */ + await gapi.client.users.get({ + project: "project", + user: "user", + }); + /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ + await gapi.client.users.getIamPolicy({ + project: "project", + resource: "resource", + }); + /** Creates a User resource in the specified project using the data included in the request. */ + await gapi.client.users.insert({ + project: "project", + }); + /** Retrieves a list of users contained within the specified project. */ + await gapi.client.users.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Removes the specified public key from the user. */ + await gapi.client.users.removePublicKey({ + fingerprint: "fingerprint", + project: "project", + user: "user", + }); + /** Sets the access control policy on the specified resource. Replaces any existing policy. */ + await gapi.client.users.setIamPolicy({ + project: "project", + resource: "resource", + }); + /** Returns permissions that a caller has on the specified resource. */ + await gapi.client.users.testIamPermissions({ + project: "project", + resource: "resource", + }); + } +}); diff --git a/types/gapi.client.clouduseraccounts/index.d.ts b/types/gapi.client.clouduseraccounts/index.d.ts new file mode 100644 index 0000000000..75e8f0d852 --- /dev/null +++ b/types/gapi.client.clouduseraccounts/index.d.ts @@ -0,0 +1,1084 @@ +// Type definitions for Google Cloud User Accounts API vm_alpha 0.0 +// Project: https://cloud.google.com/compute/docs/access/user-accounts/api/latest/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/clouduseraccounts/vm_alpha/rest + +/// + +declare namespace gapi.client { + /** Load Cloud User Accounts API vm_alpha */ + function load(name: "clouduseraccounts", version: "vm_alpha"): PromiseLike; + function load(name: "clouduseraccounts", version: "vm_alpha", callback: () => any): void; + + const globalAccountsOperations: clouduseraccounts.GlobalAccountsOperationsResource; + + const groups: clouduseraccounts.GroupsResource; + + const linux: clouduseraccounts.LinuxResource; + + const users: clouduseraccounts.UsersResource; + + namespace clouduseraccounts { + interface AuditConfig { + /** + * Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of + * Binding.members. + */ + exemptedMembers?: string[]; + /** + * Specifies a service that will be enabled for "data access" audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a + * special value that covers all services. + */ + service?: string; + } + interface AuthorizedKeysView { + /** [Output Only] The list of authorized public keys in SSH format. */ + keys?: string[]; + /** [Output Only] Whether the user has the ability to elevate on the instance that requested the authorized keys. */ + sudoer?: boolean; + } + interface Binding { + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: + * + * * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. + * + * * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. + * + * * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. + * + * * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. + * + * * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. + * + * * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[]; + /** Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */ + role?: string; + } + interface Condition { + /** Trusted attributes supplied by the IAM system. */ + iam?: string; + /** An operator to apply the subject with. */ + op?: string; + /** Trusted attributes discharged by the service. */ + svc?: string; + /** Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. */ + sys?: string; + /** The object of the condition. Exactly one of these must be set. */ + value?: string; + /** The objects of the condition. This is mutually exclusive with 'value'. */ + values?: string[]; + } + interface Group { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** An optional textual description of the resource; provided by the client when the resource is created. */ + description?: string; + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always clouduseraccounts#group for groups. */ + kind?: string; + /** [Output Only] A list of URLs to User resources who belong to the group. Users may only be members of groups in the same project. */ + members?: string[]; + /** Name of the resource; provided by the client when the resource is created. */ + name?: string; + /** [Output Only] Server defined URL for the resource. */ + selfLink?: string; + } + interface GroupList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** [Output Only] A list of Group resources. */ + items?: Group[]; + /** [Output Only] Type of resource. Always clouduseraccounts#groupList for lists of groups. */ + kind?: string; + /** [Output Only] A token used to continue a truncated list request. */ + nextPageToken?: string; + /** [Output Only] Server defined URL for this resource. */ + selfLink?: string; + } + interface GroupsAddMemberRequest { + /** Fully-qualified URLs of the User resources to add. */ + users?: string[]; + } + interface GroupsRemoveMemberRequest { + /** Fully-qualified URLs of the User resources to remove. */ + users?: string[]; + } + interface LinuxAccountViews { + /** [Output Only] A list of all groups within a project. */ + groupViews?: LinuxGroupView[]; + /** [Output Only] Type of the resource. Always clouduseraccounts#linuxAccountViews for Linux resources. */ + kind?: string; + /** [Output Only] A list of all users within a project. */ + userViews?: LinuxUserView[]; + } + interface LinuxGetAuthorizedKeysViewResponse { + /** [Output Only] A list of authorized public keys for a user. */ + resource?: AuthorizedKeysView; + } + interface LinuxGetLinuxAccountViewsResponse { + /** [Output Only] A list of authorized user accounts and groups. */ + resource?: LinuxAccountViews; + } + interface LinuxGroupView { + /** [Output Only] The Group ID. */ + gid?: number; + /** [Output Only] Group name. */ + groupName?: string; + /** [Output Only] List of user accounts that belong to the group. */ + members?: string[]; + } + interface LinuxUserView { + /** [Output Only] The GECOS (user information) entry for this account. */ + gecos?: string; + /** [Output Only] User's default group ID. */ + gid?: number; + /** [Output Only] The path to the home directory for this account. */ + homeDirectory?: string; + /** [Output Only] The path to the login shell for this account. */ + shell?: string; + /** [Output Only] User ID. */ + uid?: number; + /** [Output Only] The username of the account. */ + username?: string; + } + interface LogConfig { + /** Counter options. */ + counter?: LogConfigCounterOptions; + } + interface LogConfigCounterOptions { + /** The field value to attribute. */ + field?: string; + /** The metric to update. */ + metric?: string; + } + interface Operation { + /** [Output Only] Reserved for future use. */ + clientOperationId?: string; + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] A textual description of the operation, which is set when the operation is created. */ + description?: string; + /** [Output Only] The time that this operation was completed. This value is in RFC3339 text format. */ + endTime?: string; + /** [Output Only] If errors are generated during processing of the operation, this field will be populated. */ + error?: { + /** [Output Only] The array of errors encountered while processing this operation. */ + errors?: Array<{ + /** [Output Only] The error type identifier for this error. */ + code?: string; + /** [Output Only] Indicates the field in the request that caused the error. This property is optional. */ + location?: string; + /** [Output Only] An optional, human-readable error message. */ + message?: string; + }>; + }; + /** [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. */ + httpErrorMessage?: string; + /** + * [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not + * found. + */ + httpErrorStatusCode?: number; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] The time that this operation was requested. This value is in RFC3339 text format. */ + insertTime?: string; + /** [Output Only] Type of the resource. Always compute#operation for Operation resources. */ + kind?: string; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] The type of operation, such as insert, update, or delete, and so on. */ + operationType?: string; + /** + * [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of + * operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation + * progresses. + */ + progress?: number; + /** [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. */ + startTime?: string; + /** [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. */ + status?: string; + /** [Output Only] An optional textual description of the current status of the operation. */ + statusMessage?: string; + /** [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. */ + targetId?: string; + /** [Output Only] The URL of the resource that the operation modifies. */ + targetLink?: string; + /** [Output Only] User who requested the operation, for example: user@example.com. */ + user?: string; + /** [Output Only] If warning messages are generated during processing of the operation, this field will be populated. */ + warnings?: Array<{ + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }>; + /** [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. */ + zone?: string; + } + interface OperationList { + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] A list of Operation resources. */ + items?: Operation[]; + /** [Output Only] Type of resource. Always compute#operations for Operations resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + } + interface Policy { + /** + * Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally + * refers to admin writes. + * + * Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging. + */ + auditConfigs?: AuditConfig[]; + /** + * Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an + * error. + */ + bindings?: Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly + * suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is + * returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will + * be applied to the same version of the policy. + * + * If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. + */ + etag?: string; + iamOwned?: boolean; + /** + * If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any + * DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any + * ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no + * rule applies, permission is denied. + */ + rules?: Rule[]; + /** Version of the `Policy`. The default version is 0. */ + version?: number; + } + interface PublicKey { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** An optional textual description of the resource; provided by the client when the resource is created. */ + description?: string; + /** Optional expiration timestamp. If provided, the timestamp must be in RFC3339 text format. If not provided, the public key never expires. */ + expirationTimestamp?: string; + /** [Output Only] The fingerprint of the key is defined by RFC4716 to be the MD5 digest of the public key. */ + fingerprint?: string; + /** Public key text in SSH format, defined by RFC4253 section 6.6. */ + key?: string; + } + interface Rule { + /** Required */ + action?: string; + /** Additional restrictions that must be met */ + conditions?: Condition[]; + /** Human-readable description of the rule. */ + description?: string; + /** The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries. */ + ins?: string[]; + /** The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. */ + logConfigs?: LogConfig[]; + /** The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. */ + notIns?: string[]; + /** + * A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., + * 'storage.buckets.*') matches all verbs. + */ + permissions?: string[]; + } + interface TestPermissionsRequest { + /** The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. */ + permissions?: string[]; + } + interface TestPermissionsResponse { + /** A subset of `TestPermissionsRequest.permissions` that the caller is allowed. */ + permissions?: string[]; + } + interface User { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** An optional textual description of the resource; provided by the client when the resource is created. */ + description?: string; + /** [Output Only] A list of URLs to Group resources who contain the user. Users are only members of groups in the same project. */ + groups?: string[]; + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always clouduseraccounts#user for users. */ + kind?: string; + /** Name of the resource; provided by the client when the resource is created. */ + name?: string; + /** + * Email address of account's owner. This account will be validated to make sure it exists. The email can belong to any domain, but it must be tied to a + * Google account. + */ + owner?: string; + /** [Output Only] Public keys that this user may use to login. */ + publicKeys?: PublicKey[]; + /** [Output Only] Server defined URL for the resource. */ + selfLink?: string; + } + interface UserList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** [Output Only] A list of User resources. */ + items?: User[]; + /** [Output Only] Type of resource. Always clouduseraccounts#userList for lists of users. */ + kind?: string; + /** [Output Only] A token used to continue a truncated list request. */ + nextPageToken?: string; + /** [Output Only] Server defined URL for this resource. */ + selfLink?: string; + } + interface GlobalAccountsOperationsResource { + /** Deletes the specified operation resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to delete. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the specified operation resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to return. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of operation resources contained within the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name + * comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + * + * Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances + * that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to + * organize and filter results based on label values. + * + * The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, + * (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match + * all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface GroupsResource { + /** Adds users to the specified group. */ + addMember(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the group for this request. */ + groupName: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified Group resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the Group resource to delete. */ + groupName: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified Group resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the Group resource to return. */ + groupName: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ + getIamPolicy(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a Group resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of groups contained within the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name + * comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + * + * Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances + * that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to + * organize and filter results based on label values. + * + * The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, + * (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match + * all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Removes users from the specified group. */ + removeMember(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the group for this request. */ + groupName: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the access control policy on the specified resource. Replaces any existing policy. */ + setIamPolicy(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns permissions that a caller has on the specified resource. */ + testIamPermissions(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface LinuxResource { + /** Returns a list of authorized public keys for a specific user account. */ + getAuthorizedKeysView(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The fully-qualified URL of the virtual machine requesting the view. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Whether the view was requested as part of a user-initiated login. */ + login?: boolean; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The user account for which you want to get a list of authorized public keys. */ + user: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves a list of user accounts for an instance within a specific project. */ + getLinuxAccountViews(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name + * comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + * + * Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances + * that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to + * organize and filter results based on label values. + * + * The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, + * (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match + * all expressions to pass the filters. + */ + filter?: string; + /** The fully-qualified URL of the virtual machine requesting the views. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + } + interface UsersResource { + /** Adds a public key to the specified User resource with the data included in the request. */ + addPublicKey(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the user for this request. */ + user: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified User resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the user resource to delete. */ + user: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified User resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the user resource to return. */ + user: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ + getIamPolicy(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a User resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of users contained within the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name + * comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + * + * Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances + * that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to + * organize and filter results based on label values. + * + * The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, + * (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match + * all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Removes the specified public key from the user. */ + removePublicKey(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the + * public key. + */ + fingerprint: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the user for this request. */ + user: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the access control policy on the specified resource. Replaces any existing policy. */ + setIamPolicy(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns permissions that a caller has on the specified resource. */ + testIamPermissions(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.clouduseraccounts/readme.md b/types/gapi.client.clouduseraccounts/readme.md new file mode 100644 index 0000000000..fb442397ca --- /dev/null +++ b/types/gapi.client.clouduseraccounts/readme.md @@ -0,0 +1,178 @@ +# TypeScript typings for Cloud User Accounts API vm_alpha +Creates and manages users and groups for accessing Google Compute Engine virtual machines. +For detailed description please check [documentation](https://cloud.google.com/compute/docs/access/user-accounts/api/latest/). + +## Installing + +Install typings for Cloud User Accounts API: +``` +npm install @types/gapi.client.clouduseraccounts@vm_alpha --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('clouduseraccounts', 'vm_alpha', () => { + // now we can use gapi.client.clouduseraccounts + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + + // Manage your Google Cloud User Accounts + 'https://www.googleapis.com/auth/cloud.useraccounts', + + // View your Google Cloud User Accounts + 'https://www.googleapis.com/auth/cloud.useraccounts.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Cloud User Accounts API resources: + +```typescript + +/* +Deletes the specified operation resource. +*/ +await gapi.client.globalAccountsOperations.delete({ operation: "operation", project: "project", }); + +/* +Retrieves the specified operation resource. +*/ +await gapi.client.globalAccountsOperations.get({ operation: "operation", project: "project", }); + +/* +Retrieves the list of operation resources contained within the specified project. +*/ +await gapi.client.globalAccountsOperations.list({ project: "project", }); + +/* +Adds users to the specified group. +*/ +await gapi.client.groups.addMember({ groupName: "groupName", project: "project", }); + +/* +Deletes the specified Group resource. +*/ +await gapi.client.groups.delete({ groupName: "groupName", project: "project", }); + +/* +Returns the specified Group resource. +*/ +await gapi.client.groups.get({ groupName: "groupName", project: "project", }); + +/* +Gets the access control policy for a resource. May be empty if no such policy or resource exists. +*/ +await gapi.client.groups.getIamPolicy({ project: "project", resource: "resource", }); + +/* +Creates a Group resource in the specified project using the data included in the request. +*/ +await gapi.client.groups.insert({ project: "project", }); + +/* +Retrieves the list of groups contained within the specified project. +*/ +await gapi.client.groups.list({ project: "project", }); + +/* +Removes users from the specified group. +*/ +await gapi.client.groups.removeMember({ groupName: "groupName", project: "project", }); + +/* +Sets the access control policy on the specified resource. Replaces any existing policy. +*/ +await gapi.client.groups.setIamPolicy({ project: "project", resource: "resource", }); + +/* +Returns permissions that a caller has on the specified resource. +*/ +await gapi.client.groups.testIamPermissions({ project: "project", resource: "resource", }); + +/* +Returns a list of authorized public keys for a specific user account. +*/ +await gapi.client.linux.getAuthorizedKeysView({ instance: "instance", project: "project", user: "user", zone: "zone", }); + +/* +Retrieves a list of user accounts for an instance within a specific project. +*/ +await gapi.client.linux.getLinuxAccountViews({ instance: "instance", project: "project", zone: "zone", }); + +/* +Adds a public key to the specified User resource with the data included in the request. +*/ +await gapi.client.users.addPublicKey({ project: "project", user: "user", }); + +/* +Deletes the specified User resource. +*/ +await gapi.client.users.delete({ project: "project", user: "user", }); + +/* +Returns the specified User resource. +*/ +await gapi.client.users.get({ project: "project", user: "user", }); + +/* +Gets the access control policy for a resource. May be empty if no such policy or resource exists. +*/ +await gapi.client.users.getIamPolicy({ project: "project", resource: "resource", }); + +/* +Creates a User resource in the specified project using the data included in the request. +*/ +await gapi.client.users.insert({ project: "project", }); + +/* +Retrieves a list of users contained within the specified project. +*/ +await gapi.client.users.list({ project: "project", }); + +/* +Removes the specified public key from the user. +*/ +await gapi.client.users.removePublicKey({ fingerprint: "fingerprint", project: "project", user: "user", }); + +/* +Sets the access control policy on the specified resource. Replaces any existing policy. +*/ +await gapi.client.users.setIamPolicy({ project: "project", resource: "resource", }); + +/* +Returns permissions that a caller has on the specified resource. +*/ +await gapi.client.users.testIamPermissions({ project: "project", resource: "resource", }); +``` \ No newline at end of file diff --git a/types/gapi.client.clouduseraccounts/tsconfig.json b/types/gapi.client.clouduseraccounts/tsconfig.json new file mode 100644 index 0000000000..a6e3b9ffec --- /dev/null +++ b/types/gapi.client.clouduseraccounts/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.clouduseraccounts-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.clouduseraccounts/tslint.json b/types/gapi.client.clouduseraccounts/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.clouduseraccounts/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.compute/gapi.client.compute-tests.ts b/types/gapi.client.compute/gapi.client.compute-tests.ts new file mode 100644 index 0000000000..7ebfeccdcd --- /dev/null +++ b/types/gapi.client.compute/gapi.client.compute-tests.ts @@ -0,0 +1,2184 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('compute', 'v1', () => { + /** now we can use gapi.client.compute */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View and manage your Google Compute Engine resources */ + 'https://www.googleapis.com/auth/compute', + /** View your Google Compute Engine resources */ + 'https://www.googleapis.com/auth/compute.readonly', + /** Manage your data and permissions in Google Cloud Storage */ + 'https://www.googleapis.com/auth/devstorage.full_control', + /** View your data in Google Cloud Storage */ + 'https://www.googleapis.com/auth/devstorage.read_only', + /** Manage your data in Google Cloud Storage */ + 'https://www.googleapis.com/auth/devstorage.read_write', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Retrieves an aggregated list of accelerator types. */ + await gapi.client.acceleratorTypes.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Returns the specified accelerator type. Get a list of available accelerator types by making a list() request. */ + await gapi.client.acceleratorTypes.get({ + acceleratorType: "acceleratorType", + project: "project", + zone: "zone", + }); + /** Retrieves a list of accelerator types available to the specified project. */ + await gapi.client.acceleratorTypes.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Retrieves an aggregated list of addresses. */ + await gapi.client.addresses.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified address resource. */ + await gapi.client.addresses.delete({ + address: "address", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Returns the specified address resource. */ + await gapi.client.addresses.get({ + address: "address", + project: "project", + region: "region", + }); + /** Creates an address resource in the specified project using the data included in the request. */ + await gapi.client.addresses.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of addresses contained within the specified region. */ + await gapi.client.addresses.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Retrieves an aggregated list of autoscalers. */ + await gapi.client.autoscalers.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified autoscaler. */ + await gapi.client.autoscalers.delete({ + autoscaler: "autoscaler", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request. */ + await gapi.client.autoscalers.get({ + autoscaler: "autoscaler", + project: "project", + zone: "zone", + }); + /** Creates an autoscaler in the specified project using the data included in the request. */ + await gapi.client.autoscalers.insert({ + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves a list of autoscalers contained within the specified zone. */ + await gapi.client.autoscalers.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** + * Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge + * patch format and processing rules. + */ + await gapi.client.autoscalers.patch({ + autoscaler: "autoscaler", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Updates an autoscaler in the specified project using the data included in the request. */ + await gapi.client.autoscalers.update({ + autoscaler: "autoscaler", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Deletes the specified BackendBucket resource. */ + await gapi.client.backendBuckets.delete({ + backendBucket: "backendBucket", + project: "project", + requestId: "requestId", + }); + /** Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request. */ + await gapi.client.backendBuckets.get({ + backendBucket: "backendBucket", + project: "project", + }); + /** Creates a BackendBucket resource in the specified project using the data included in the request. */ + await gapi.client.backendBuckets.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of BackendBucket resources available to the specified project. */ + await gapi.client.backendBuckets.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch + * format and processing rules. + */ + await gapi.client.backendBuckets.patch({ + backendBucket: "backendBucket", + project: "project", + requestId: "requestId", + }); + /** Updates the specified BackendBucket resource with the data included in the request. */ + await gapi.client.backendBuckets.update({ + backendBucket: "backendBucket", + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of all BackendService resources, regional and global, available to the specified project. */ + await gapi.client.backendServices.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified BackendService resource. */ + await gapi.client.backendServices.delete({ + backendService: "backendService", + project: "project", + requestId: "requestId", + }); + /** Returns the specified BackendService resource. Get a list of available backend services by making a list() request. */ + await gapi.client.backendServices.get({ + backendService: "backendService", + project: "project", + }); + /** Gets the most recent health check results for this BackendService. */ + await gapi.client.backendServices.getHealth({ + backendService: "backendService", + project: "project", + }); + /** + * Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to + * keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. + */ + await gapi.client.backendServices.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of BackendService resources available to the specified project. */ + await gapi.client.backendServices.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when + * updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch + * format and processing rules. + */ + await gapi.client.backendServices.patch({ + backendService: "backendService", + project: "project", + requestId: "requestId", + }); + /** + * Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when + * updating a backend service. Read Restrictions and Guidelines for more information. + */ + await gapi.client.backendServices.update({ + backendService: "backendService", + project: "project", + requestId: "requestId", + }); + /** Retrieves an aggregated list of disk types. */ + await gapi.client.diskTypes.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Returns the specified disk type. Get a list of available disk types by making a list() request. */ + await gapi.client.diskTypes.get({ + diskType: "diskType", + project: "project", + zone: "zone", + }); + /** Retrieves a list of disk types available to the specified project. */ + await gapi.client.diskTypes.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Retrieves an aggregated list of persistent disks. */ + await gapi.client.disks.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Creates a snapshot of a specified persistent disk. */ + await gapi.client.disks.createSnapshot({ + disk: "disk", + guestFlush: true, + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Deletes the specified persistent disk. Deleting a disk removes 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. + */ + await gapi.client.disks.delete({ + disk: "disk", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Returns a specified persistent disk. Get a list of available persistent disks by making a list() request. */ + await gapi.client.disks.get({ + disk: "disk", + project: "project", + zone: "zone", + }); + /** + * Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create + * an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb + * property. + */ + await gapi.client.disks.insert({ + project: "project", + requestId: "requestId", + sourceImage: "sourceImage", + zone: "zone", + }); + /** Retrieves a list of persistent disks contained within the specified zone. */ + await gapi.client.disks.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Resizes the specified persistent disk. */ + await gapi.client.disks.resize({ + disk: "disk", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. */ + await gapi.client.disks.setLabels({ + project: "project", + requestId: "requestId", + resource: "resource", + zone: "zone", + }); + /** Deletes the specified firewall. */ + await gapi.client.firewalls.delete({ + firewall: "firewall", + project: "project", + requestId: "requestId", + }); + /** Returns the specified firewall. */ + await gapi.client.firewalls.get({ + firewall: "firewall", + project: "project", + }); + /** Creates a firewall rule in the specified project using the data included in the request. */ + await gapi.client.firewalls.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of firewall rules available to the specified project. */ + await gapi.client.firewalls.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format + * and processing rules. + */ + await gapi.client.firewalls.patch({ + firewall: "firewall", + project: "project", + requestId: "requestId", + }); + /** + * Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: + * allowed, description, sourceRanges, sourceTags, targetTags. + */ + await gapi.client.firewalls.update({ + firewall: "firewall", + project: "project", + requestId: "requestId", + }); + /** Retrieves an aggregated list of forwarding rules. */ + await gapi.client.forwardingRules.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified ForwardingRule resource. */ + await gapi.client.forwardingRules.delete({ + forwardingRule: "forwardingRule", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Returns the specified ForwardingRule resource. */ + await gapi.client.forwardingRules.get({ + forwardingRule: "forwardingRule", + project: "project", + region: "region", + }); + /** Creates a ForwardingRule resource in the specified project and region using the data included in the request. */ + await gapi.client.forwardingRules.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of ForwardingRule resources available to the specified project and region. */ + await gapi.client.forwardingRules.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Changes target URL for forwarding rule. The new target should be of the same type as the old target. */ + await gapi.client.forwardingRules.setTarget({ + forwardingRule: "forwardingRule", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Deletes the specified address resource. */ + await gapi.client.globalAddresses.delete({ + address: "address", + project: "project", + requestId: "requestId", + }); + /** Returns the specified address resource. Get a list of available addresses by making a list() request. */ + await gapi.client.globalAddresses.get({ + address: "address", + project: "project", + }); + /** Creates an address resource in the specified project using the data included in the request. */ + await gapi.client.globalAddresses.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves a list of global addresses. */ + await gapi.client.globalAddresses.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified GlobalForwardingRule resource. */ + await gapi.client.globalForwardingRules.delete({ + forwardingRule: "forwardingRule", + project: "project", + requestId: "requestId", + }); + /** Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request. */ + await gapi.client.globalForwardingRules.get({ + forwardingRule: "forwardingRule", + project: "project", + }); + /** Creates a GlobalForwardingRule resource in the specified project using the data included in the request. */ + await gapi.client.globalForwardingRules.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves a list of GlobalForwardingRule resources available to the specified project. */ + await gapi.client.globalForwardingRules.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. */ + await gapi.client.globalForwardingRules.setTarget({ + forwardingRule: "forwardingRule", + project: "project", + requestId: "requestId", + }); + /** Retrieves an aggregated list of all operations. */ + await gapi.client.globalOperations.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified Operations resource. */ + await gapi.client.globalOperations.delete({ + operation: "operation", + project: "project", + }); + /** Retrieves the specified Operations resource. Get a list of operations by making a list() request. */ + await gapi.client.globalOperations.get({ + operation: "operation", + project: "project", + }); + /** Retrieves a list of Operation resources contained within the specified project. */ + await gapi.client.globalOperations.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified HealthCheck resource. */ + await gapi.client.healthChecks.delete({ + healthCheck: "healthCheck", + project: "project", + requestId: "requestId", + }); + /** Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request. */ + await gapi.client.healthChecks.get({ + healthCheck: "healthCheck", + project: "project", + }); + /** Creates a HealthCheck resource in the specified project using the data included in the request. */ + await gapi.client.healthChecks.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of HealthCheck resources available to the specified project. */ + await gapi.client.healthChecks.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON + * merge patch format and processing rules. + */ + await gapi.client.healthChecks.patch({ + healthCheck: "healthCheck", + project: "project", + requestId: "requestId", + }); + /** Updates a HealthCheck resource in the specified project using the data included in the request. */ + await gapi.client.healthChecks.update({ + healthCheck: "healthCheck", + project: "project", + requestId: "requestId", + }); + /** Deletes the specified HttpHealthCheck resource. */ + await gapi.client.httpHealthChecks.delete({ + httpHealthCheck: "httpHealthCheck", + project: "project", + requestId: "requestId", + }); + /** Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request. */ + await gapi.client.httpHealthChecks.get({ + httpHealthCheck: "httpHealthCheck", + project: "project", + }); + /** Creates a HttpHealthCheck resource in the specified project using the data included in the request. */ + await gapi.client.httpHealthChecks.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of HttpHealthCheck resources available to the specified project. */ + await gapi.client.httpHealthChecks.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the + * JSON merge patch format and processing rules. + */ + await gapi.client.httpHealthChecks.patch({ + httpHealthCheck: "httpHealthCheck", + project: "project", + requestId: "requestId", + }); + /** Updates a HttpHealthCheck resource in the specified project using the data included in the request. */ + await gapi.client.httpHealthChecks.update({ + httpHealthCheck: "httpHealthCheck", + project: "project", + requestId: "requestId", + }); + /** Deletes the specified HttpsHealthCheck resource. */ + await gapi.client.httpsHealthChecks.delete({ + httpsHealthCheck: "httpsHealthCheck", + project: "project", + requestId: "requestId", + }); + /** Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request. */ + await gapi.client.httpsHealthChecks.get({ + httpsHealthCheck: "httpsHealthCheck", + project: "project", + }); + /** Creates a HttpsHealthCheck resource in the specified project using the data included in the request. */ + await gapi.client.httpsHealthChecks.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of HttpsHealthCheck resources available to the specified project. */ + await gapi.client.httpsHealthChecks.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the + * JSON merge patch format and processing rules. + */ + await gapi.client.httpsHealthChecks.patch({ + httpsHealthCheck: "httpsHealthCheck", + project: "project", + requestId: "requestId", + }); + /** Updates a HttpsHealthCheck resource in the specified project using the data included in the request. */ + await gapi.client.httpsHealthChecks.update({ + httpsHealthCheck: "httpsHealthCheck", + project: "project", + requestId: "requestId", + }); + /** Deletes the specified image. */ + await gapi.client.images.delete({ + image: "image", + project: "project", + requestId: "requestId", + }); + /** + * Sets the deprecation status of an image. + * + * If an empty request body is given, clears the deprecation status instead. + */ + await gapi.client.images.deprecate({ + image: "image", + project: "project", + requestId: "requestId", + }); + /** Returns the specified image. Get a list of available images by making a list() request. */ + await gapi.client.images.get({ + image: "image", + project: "project", + }); + /** Returns the latest image that is part of an image family and is not deprecated. */ + await gapi.client.images.getFromFamily({ + family: "family", + project: "project", + }); + /** Creates an image in the specified project using the data included in the request. */ + await gapi.client.images.insert({ + forceCreate: true, + project: "project", + requestId: "requestId", + }); + /** + * Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method + * does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of + * publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. + */ + await gapi.client.images.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. */ + await gapi.client.images.setLabels({ + project: "project", + resource: "resource", + }); + /** + * Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it + * does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed + * instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have + * not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + await gapi.client.instanceGroupManagers.abandonInstances({ + instanceGroupManager: "instanceGroupManager", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves the list of managed instance groups and groups them by zone. */ + await gapi.client.instanceGroupManagers.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. + * Read Deleting an instance group for more information. + */ + await gapi.client.instanceGroupManagers.delete({ + instanceGroupManager: "instanceGroupManager", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which + * they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is + * marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action + * with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + await gapi.client.instanceGroupManagers.deleteInstances({ + instanceGroupManager: "instanceGroupManager", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request. */ + await gapi.client.instanceGroupManagers.get({ + instanceGroupManager: "instanceGroupManager", + project: "project", + zone: "zone", + }); + /** + * Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create + * instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the + * group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. + * + * A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. + */ + await gapi.client.instanceGroupManagers.insert({ + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves a list of managed instance groups that are contained within the specified project and zone. */ + await gapi.client.instanceGroupManagers.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** + * Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed + * instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous + * action failed, the list displays the errors for that failed action. + */ + await gapi.client.instanceGroupManagers.listManagedInstances({ + filter: "filter", + instanceGroupManager: "instanceGroupManager", + maxResults: 3, + order_by: "order_by", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** + * Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current + * instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been + * recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + await gapi.client.instanceGroupManagers.recreateInstances({ + instanceGroupManager: "instanceGroupManager", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the + * size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or + * deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + */ + await gapi.client.instanceGroupManagers.resize({ + instanceGroupManager: "instanceGroupManager", + project: "project", + requestId: "requestId", + size: 4, + zone: "zone", + }); + /** + * Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change + * unless you recreate them. + */ + await gapi.client.instanceGroupManagers.setInstanceTemplate({ + instanceGroupManager: "instanceGroupManager", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the + * instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their + * target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. + */ + await gapi.client.instanceGroupManagers.setTargetPools({ + instanceGroupManager: "instanceGroupManager", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read + * Adding instances for more information. + */ + await gapi.client.instanceGroups.addInstances({ + instanceGroup: "instanceGroup", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves the list of instance groups and sorts them by zone. */ + await gapi.client.instanceGroups.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read + * Deleting an instance group for more information. + */ + await gapi.client.instanceGroups.delete({ + instanceGroup: "instanceGroup", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Returns the specified instance group. Get a list of available instance groups by making a list() request. */ + await gapi.client.instanceGroups.get({ + instanceGroup: "instanceGroup", + project: "project", + zone: "zone", + }); + /** Creates an instance group in the specified project using the parameters that are included in the request. */ + await gapi.client.instanceGroups.insert({ + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves the list of instance groups that are located in the specified project and zone. */ + await gapi.client.instanceGroups.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Lists the instances in the specified instance group. */ + await gapi.client.instanceGroups.listInstances({ + filter: "filter", + instanceGroup: "instanceGroup", + maxResults: 3, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** + * Removes one or more instances from the specified instance group, but does not delete those instances. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration + * before the VM instance is removed or deleted. + */ + await gapi.client.instanceGroups.removeInstances({ + instanceGroup: "instanceGroup", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets the named ports for the specified instance group. */ + await gapi.client.instanceGroups.setNamedPorts({ + instanceGroup: "instanceGroup", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group + * will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone. + */ + await gapi.client.instanceTemplates.delete({ + instanceTemplate: "instanceTemplate", + project: "project", + requestId: "requestId", + }); + /** Returns the specified instance template. Get a list of available instance templates by making a list() request. */ + await gapi.client.instanceTemplates.get({ + instanceTemplate: "instanceTemplate", + project: "project", + }); + /** + * Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an + * existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. + */ + await gapi.client.instanceTemplates.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves a list of instance templates that are contained within the specified project and zone. */ + await gapi.client.instanceTemplates.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Adds an access config to an instance's network interface. */ + await gapi.client.instances.addAccessConfig({ + instance: "instance", + networkInterface: "networkInterface", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves aggregated list of instances. */ + await gapi.client.instances.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a + * disk at the same time. For more information, read Adding a persistent disk to your instance. + */ + await gapi.client.instances.attachDisk({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. */ + await gapi.client.instances.delete({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Deletes an access config from an instance's network interface. */ + await gapi.client.instances.deleteAccessConfig({ + accessConfig: "accessConfig", + instance: "instance", + networkInterface: "networkInterface", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Detaches a disk from an instance. */ + await gapi.client.instances.detachDisk({ + deviceName: "deviceName", + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Returns the specified Instance resource. Get a list of available instances by making a list() request. */ + await gapi.client.instances.get({ + instance: "instance", + project: "project", + zone: "zone", + }); + /** Returns the specified instance's serial port output. */ + await gapi.client.instances.getSerialPortOutput({ + instance: "instance", + port: 2, + project: "project", + start: "start", + zone: "zone", + }); + /** Creates an instance resource in the specified project using the data included in the request. */ + await gapi.client.instances.insert({ + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves the list of instances contained within the specified zone. */ + await gapi.client.instances.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Performs a reset on the instance. For more information, see Resetting an instance. */ + await gapi.client.instances.reset({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets the auto-delete flag for a disk attached to an instance. */ + await gapi.client.instances.setDiskAutoDelete({ + autoDelete: true, + deviceName: "deviceName", + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. */ + await gapi.client.instances.setLabels({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. */ + await gapi.client.instances.setMachineResources({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Changes the machine type for a stopped instance to the machine type specified in the request. */ + await gapi.client.instances.setMachineType({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets metadata for the specified instance to the data included in the request. */ + await gapi.client.instances.setMetadata({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read + * Specifying a Minimum CPU Platform. + */ + await gapi.client.instances.setMinCpuPlatform({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets an instance's scheduling options. */ + await gapi.client.instances.setScheduling({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. */ + await gapi.client.instances.setServiceAccount({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Sets tags for the specified instance to the data included in the request. */ + await gapi.client.instances.setTags({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. */ + await gapi.client.instances.start({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. */ + await gapi.client.instances.startWithEncryptionKey({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** + * Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, + * virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP + * addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. + */ + await gapi.client.instances.stop({ + instance: "instance", + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Returns the specified License resource. */ + await gapi.client.licenses.get({ + license: "license", + project: "project", + }); + /** Retrieves an aggregated list of machine types. */ + await gapi.client.machineTypes.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Returns the specified machine type. Get a list of available machine types by making a list() request. */ + await gapi.client.machineTypes.get({ + machineType: "machineType", + project: "project", + zone: "zone", + }); + /** Retrieves a list of machine types available to the specified project. */ + await gapi.client.machineTypes.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Adds a peering to the specified network. */ + await gapi.client.networks.addPeering({ + network: "network", + project: "project", + requestId: "requestId", + }); + /** Deletes the specified network. */ + await gapi.client.networks.delete({ + network: "network", + project: "project", + requestId: "requestId", + }); + /** Returns the specified network. Get a list of available networks by making a list() request. */ + await gapi.client.networks.get({ + network: "network", + project: "project", + }); + /** Creates a network in the specified project using the data included in the request. */ + await gapi.client.networks.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of networks available to the specified project. */ + await gapi.client.networks.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Patches the specified network with the data included in the request. */ + await gapi.client.networks.patch({ + network: "network", + project: "project", + requestId: "requestId", + }); + /** Removes a peering from the specified network. */ + await gapi.client.networks.removePeering({ + network: "network", + project: "project", + requestId: "requestId", + }); + /** Switches the network mode from auto subnet mode to custom subnet mode. */ + await gapi.client.networks.switchToCustomMode({ + network: "network", + project: "project", + requestId: "requestId", + }); + /** Disable this project as a shared VPC host project. */ + await gapi.client.projects.disableXpnHost({ + project: "project", + requestId: "requestId", + }); + /** Disable a serivce resource (a.k.a service project) associated with this host project. */ + await gapi.client.projects.disableXpnResource({ + project: "project", + requestId: "requestId", + }); + /** Enable this project as a shared VPC host project. */ + await gapi.client.projects.enableXpnHost({ + project: "project", + requestId: "requestId", + }); + /** + * Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service + * project. + */ + await gapi.client.projects.enableXpnResource({ + project: "project", + requestId: "requestId", + }); + /** Returns the specified Project resource. */ + await gapi.client.projects.get({ + project: "project", + }); + /** Get the shared VPC host project that this project links to. May be empty if no link exists. */ + await gapi.client.projects.getXpnHost({ + project: "project", + }); + /** Get service resources (a.k.a service project) associated with this host project. */ + await gapi.client.projects.getXpnResources({ + filter: "filter", + maxResults: 2, + order_by: "order_by", + pageToken: "pageToken", + project: "project", + }); + /** List all shared VPC host projects visible to the user in an organization. */ + await gapi.client.projects.listXpnHosts({ + filter: "filter", + maxResults: 2, + order_by: "order_by", + pageToken: "pageToken", + project: "project", + }); + /** Moves a persistent disk from one zone to another. */ + await gapi.client.projects.moveDisk({ + project: "project", + requestId: "requestId", + }); + /** Moves an instance and its attached persistent disks from one zone to another. */ + await gapi.client.projects.moveInstance({ + project: "project", + requestId: "requestId", + }); + /** Sets metadata common to all instances within the specified project using the data included in the request. */ + await gapi.client.projects.setCommonInstanceMetadata({ + project: "project", + requestId: "requestId", + }); + /** + * Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the + * usage export feature will be disabled. + */ + await gapi.client.projects.setUsageExportBucket({ + project: "project", + requestId: "requestId", + }); + /** Deletes the specified autoscaler. */ + await gapi.client.regionAutoscalers.delete({ + autoscaler: "autoscaler", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Returns the specified autoscaler. */ + await gapi.client.regionAutoscalers.get({ + autoscaler: "autoscaler", + project: "project", + region: "region", + }); + /** Creates an autoscaler in the specified project using the data included in the request. */ + await gapi.client.regionAutoscalers.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of autoscalers contained within the specified region. */ + await gapi.client.regionAutoscalers.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** + * Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge + * patch format and processing rules. + */ + await gapi.client.regionAutoscalers.patch({ + autoscaler: "autoscaler", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Updates an autoscaler in the specified project using the data included in the request. */ + await gapi.client.regionAutoscalers.update({ + autoscaler: "autoscaler", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Deletes the specified regional BackendService resource. */ + await gapi.client.regionBackendServices.delete({ + backendService: "backendService", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Returns the specified regional BackendService resource. */ + await gapi.client.regionBackendServices.get({ + backendService: "backendService", + project: "project", + region: "region", + }); + /** Gets the most recent health check results for this regional BackendService. */ + await gapi.client.regionBackendServices.getHealth({ + backendService: "backendService", + project: "project", + region: "region", + }); + /** + * Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and + * guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. + */ + await gapi.client.regionBackendServices.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves the list of regional BackendService resources available to the specified project in the given region. */ + await gapi.client.regionBackendServices.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** + * Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in + * mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON + * merge patch format and processing rules. + */ + await gapi.client.regionBackendServices.patch({ + backendService: "backendService", + project: "project", + region: "region", + requestId: "requestId", + }); + /** + * Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in + * mind when updating a backend service. Read Restrictions and Guidelines for more information. + */ + await gapi.client.regionBackendServices.update({ + backendService: "backendService", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves an aggregated list of commitments. */ + await gapi.client.regionCommitments.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Returns the specified commitment resource. Get a list of available commitments by making a list() request. */ + await gapi.client.regionCommitments.get({ + commitment: "commitment", + project: "project", + region: "region", + }); + /** Creates a commitment in the specified project using the data included in the request. */ + await gapi.client.regionCommitments.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of commitments contained within the specified region. */ + await gapi.client.regionCommitments.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** + * Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it + * does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed + * instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have + * not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + await gapi.client.regionInstanceGroupManagers.abandonInstances({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Deletes the specified managed instance group and all of the instances in that group. */ + await gapi.client.regionInstanceGroupManagers.delete({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + requestId: "requestId", + }); + /** + * Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which + * they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is + * marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action + * with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + await gapi.client.regionInstanceGroupManagers.deleteInstances({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Returns all of the details about the specified managed instance group. */ + await gapi.client.regionInstanceGroupManagers.get({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + }); + /** + * Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create + * instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the + * group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. + * + * A regional managed instance group can contain up to 2000 instances. + */ + await gapi.client.regionInstanceGroupManagers.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves the list of managed instance groups that are contained within the specified region. */ + await gapi.client.regionInstanceGroupManagers.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** + * Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group + * has scheduled for its instances. + */ + await gapi.client.regionInstanceGroupManagers.listManagedInstances({ + filter: "filter", + instanceGroupManager: "instanceGroupManager", + maxResults: 3, + order_by: "order_by", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** + * Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current + * instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been + * recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + await gapi.client.regionInstanceGroupManagers.recreateInstances({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + requestId: "requestId", + }); + /** + * Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the + * current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE + * when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the + * creating or deleting actions with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + */ + await gapi.client.regionInstanceGroupManagers.resize({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + requestId: "requestId", + size: 5, + }); + /** Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. */ + await gapi.client.regionInstanceGroupManagers.setInstanceTemplate({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. */ + await gapi.client.regionInstanceGroupManagers.setTargetPools({ + instanceGroupManager: "instanceGroupManager", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Returns the specified instance group resource. */ + await gapi.client.regionInstanceGroups.get({ + instanceGroup: "instanceGroup", + project: "project", + region: "region", + }); + /** Retrieves the list of instance group resources contained within the specified region. */ + await gapi.client.regionInstanceGroups.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** + * Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can + * list all instances or only the instances that are running. + */ + await gapi.client.regionInstanceGroups.listInstances({ + filter: "filter", + instanceGroup: "instanceGroup", + maxResults: 3, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Sets the named ports for the specified regional instance group. */ + await gapi.client.regionInstanceGroups.setNamedPorts({ + instanceGroup: "instanceGroup", + project: "project", + region: "region", + requestId: "requestId", + }); + /** Deletes the specified region-specific Operations resource. */ + await gapi.client.regionOperations.delete({ + operation: "operation", + project: "project", + region: "region", + }); + /** Retrieves the specified region-specific Operations resource. */ + await gapi.client.regionOperations.get({ + operation: "operation", + project: "project", + region: "region", + }); + /** Retrieves a list of Operation resources contained within the specified region. */ + await gapi.client.regionOperations.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Returns the specified Region resource. Get a list of available regions by making a list() request. */ + await gapi.client.regions.get({ + project: "project", + region: "region", + }); + /** Retrieves the list of region resources available to the specified project. */ + await gapi.client.regions.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Retrieves an aggregated list of routers. */ + await gapi.client.routers.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified Router resource. */ + await gapi.client.routers.delete({ + project: "project", + region: "region", + requestId: "requestId", + router: "router", + }); + /** Returns the specified Router resource. Get a list of available routers by making a list() request. */ + await gapi.client.routers.get({ + project: "project", + region: "region", + router: "router", + }); + /** Retrieves runtime information of the specified router. */ + await gapi.client.routers.getRouterStatus({ + project: "project", + region: "region", + router: "router", + }); + /** Creates a Router resource in the specified project and region using the data included in the request. */ + await gapi.client.routers.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of Router resources available to the specified project. */ + await gapi.client.routers.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** + * Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and + * processing rules. + */ + await gapi.client.routers.patch({ + project: "project", + region: "region", + requestId: "requestId", + router: "router", + }); + /** Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. */ + await gapi.client.routers.preview({ + project: "project", + region: "region", + router: "router", + }); + /** Updates the specified Router resource with the data included in the request. */ + await gapi.client.routers.update({ + project: "project", + region: "region", + requestId: "requestId", + router: "router", + }); + /** Deletes the specified Route resource. */ + await gapi.client.routes.delete({ + project: "project", + requestId: "requestId", + route: "route", + }); + /** Returns the specified Route resource. Get a list of available routes by making a list() request. */ + await gapi.client.routes.get({ + project: "project", + route: "route", + }); + /** Creates a Route resource in the specified project using the data included in the request. */ + await gapi.client.routes.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of Route resources available to the specified project. */ + await gapi.client.routes.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If + * any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. + * + * For more information, see Deleting snaphots. + */ + await gapi.client.snapshots.delete({ + project: "project", + requestId: "requestId", + snapshot: "snapshot", + }); + /** Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request. */ + await gapi.client.snapshots.get({ + project: "project", + snapshot: "snapshot", + }); + /** Retrieves the list of Snapshot resources contained within the specified project. */ + await gapi.client.snapshots.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. */ + await gapi.client.snapshots.setLabels({ + project: "project", + resource: "resource", + }); + /** Deletes the specified SslCertificate resource. */ + await gapi.client.sslCertificates.delete({ + project: "project", + requestId: "requestId", + sslCertificate: "sslCertificate", + }); + /** Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request. */ + await gapi.client.sslCertificates.get({ + project: "project", + sslCertificate: "sslCertificate", + }); + /** Creates a SslCertificate resource in the specified project using the data included in the request. */ + await gapi.client.sslCertificates.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of SslCertificate resources available to the specified project. */ + await gapi.client.sslCertificates.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Retrieves an aggregated list of subnetworks. */ + await gapi.client.subnetworks.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified subnetwork. */ + await gapi.client.subnetworks.delete({ + project: "project", + region: "region", + requestId: "requestId", + subnetwork: "subnetwork", + }); + /** Expands the IP CIDR range of the subnetwork to a specified value. */ + await gapi.client.subnetworks.expandIpCidrRange({ + project: "project", + region: "region", + requestId: "requestId", + subnetwork: "subnetwork", + }); + /** Returns the specified subnetwork. Get a list of available subnetworks list() request. */ + await gapi.client.subnetworks.get({ + project: "project", + region: "region", + subnetwork: "subnetwork", + }); + /** Creates a subnetwork in the specified project using the data included in the request. */ + await gapi.client.subnetworks.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of subnetworks available to the specified project. */ + await gapi.client.subnetworks.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. */ + await gapi.client.subnetworks.setPrivateIpGoogleAccess({ + project: "project", + region: "region", + requestId: "requestId", + subnetwork: "subnetwork", + }); + /** Deletes the specified TargetHttpProxy resource. */ + await gapi.client.targetHttpProxies.delete({ + project: "project", + requestId: "requestId", + targetHttpProxy: "targetHttpProxy", + }); + /** Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request. */ + await gapi.client.targetHttpProxies.get({ + project: "project", + targetHttpProxy: "targetHttpProxy", + }); + /** Creates a TargetHttpProxy resource in the specified project using the data included in the request. */ + await gapi.client.targetHttpProxies.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of TargetHttpProxy resources available to the specified project. */ + await gapi.client.targetHttpProxies.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Changes the URL map for TargetHttpProxy. */ + await gapi.client.targetHttpProxies.setUrlMap({ + project: "project", + requestId: "requestId", + targetHttpProxy: "targetHttpProxy", + }); + /** Deletes the specified TargetHttpsProxy resource. */ + await gapi.client.targetHttpsProxies.delete({ + project: "project", + requestId: "requestId", + targetHttpsProxy: "targetHttpsProxy", + }); + /** Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request. */ + await gapi.client.targetHttpsProxies.get({ + project: "project", + targetHttpsProxy: "targetHttpsProxy", + }); + /** Creates a TargetHttpsProxy resource in the specified project using the data included in the request. */ + await gapi.client.targetHttpsProxies.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of TargetHttpsProxy resources available to the specified project. */ + await gapi.client.targetHttpsProxies.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Replaces SslCertificates for TargetHttpsProxy. */ + await gapi.client.targetHttpsProxies.setSslCertificates({ + project: "project", + requestId: "requestId", + targetHttpsProxy: "targetHttpsProxy", + }); + /** Changes the URL map for TargetHttpsProxy. */ + await gapi.client.targetHttpsProxies.setUrlMap({ + project: "project", + requestId: "requestId", + targetHttpsProxy: "targetHttpsProxy", + }); + /** Retrieves an aggregated list of target instances. */ + await gapi.client.targetInstances.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified TargetInstance resource. */ + await gapi.client.targetInstances.delete({ + project: "project", + requestId: "requestId", + targetInstance: "targetInstance", + zone: "zone", + }); + /** Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request. */ + await gapi.client.targetInstances.get({ + project: "project", + targetInstance: "targetInstance", + zone: "zone", + }); + /** Creates a TargetInstance resource in the specified project and zone using the data included in the request. */ + await gapi.client.targetInstances.insert({ + project: "project", + requestId: "requestId", + zone: "zone", + }); + /** Retrieves a list of TargetInstance resources available to the specified project and zone. */ + await gapi.client.targetInstances.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Adds health check URLs to a target pool. */ + await gapi.client.targetPools.addHealthCheck({ + project: "project", + region: "region", + requestId: "requestId", + targetPool: "targetPool", + }); + /** Adds an instance to a target pool. */ + await gapi.client.targetPools.addInstance({ + project: "project", + region: "region", + requestId: "requestId", + targetPool: "targetPool", + }); + /** Retrieves an aggregated list of target pools. */ + await gapi.client.targetPools.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified target pool. */ + await gapi.client.targetPools.delete({ + project: "project", + region: "region", + requestId: "requestId", + targetPool: "targetPool", + }); + /** Returns the specified target pool. Get a list of available target pools by making a list() request. */ + await gapi.client.targetPools.get({ + project: "project", + region: "region", + targetPool: "targetPool", + }); + /** Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. */ + await gapi.client.targetPools.getHealth({ + project: "project", + region: "region", + targetPool: "targetPool", + }); + /** Creates a target pool in the specified project and region using the data included in the request. */ + await gapi.client.targetPools.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of target pools available to the specified project and region. */ + await gapi.client.targetPools.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Removes health check URL from a target pool. */ + await gapi.client.targetPools.removeHealthCheck({ + project: "project", + region: "region", + requestId: "requestId", + targetPool: "targetPool", + }); + /** Removes instance URL from a target pool. */ + await gapi.client.targetPools.removeInstance({ + project: "project", + region: "region", + requestId: "requestId", + targetPool: "targetPool", + }); + /** Changes a backup target pool's configurations. */ + await gapi.client.targetPools.setBackup({ + failoverRatio: 1, + project: "project", + region: "region", + requestId: "requestId", + targetPool: "targetPool", + }); + /** Deletes the specified TargetSslProxy resource. */ + await gapi.client.targetSslProxies.delete({ + project: "project", + requestId: "requestId", + targetSslProxy: "targetSslProxy", + }); + /** Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request. */ + await gapi.client.targetSslProxies.get({ + project: "project", + targetSslProxy: "targetSslProxy", + }); + /** Creates a TargetSslProxy resource in the specified project using the data included in the request. */ + await gapi.client.targetSslProxies.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of TargetSslProxy resources available to the specified project. */ + await gapi.client.targetSslProxies.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Changes the BackendService for TargetSslProxy. */ + await gapi.client.targetSslProxies.setBackendService({ + project: "project", + requestId: "requestId", + targetSslProxy: "targetSslProxy", + }); + /** Changes the ProxyHeaderType for TargetSslProxy. */ + await gapi.client.targetSslProxies.setProxyHeader({ + project: "project", + requestId: "requestId", + targetSslProxy: "targetSslProxy", + }); + /** Changes SslCertificates for TargetSslProxy. */ + await gapi.client.targetSslProxies.setSslCertificates({ + project: "project", + requestId: "requestId", + targetSslProxy: "targetSslProxy", + }); + /** Deletes the specified TargetTcpProxy resource. */ + await gapi.client.targetTcpProxies.delete({ + project: "project", + requestId: "requestId", + targetTcpProxy: "targetTcpProxy", + }); + /** Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request. */ + await gapi.client.targetTcpProxies.get({ + project: "project", + targetTcpProxy: "targetTcpProxy", + }); + /** Creates a TargetTcpProxy resource in the specified project using the data included in the request. */ + await gapi.client.targetTcpProxies.insert({ + project: "project", + requestId: "requestId", + }); + /** Retrieves the list of TargetTcpProxy resources available to the specified project. */ + await gapi.client.targetTcpProxies.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Changes the BackendService for TargetTcpProxy. */ + await gapi.client.targetTcpProxies.setBackendService({ + project: "project", + requestId: "requestId", + targetTcpProxy: "targetTcpProxy", + }); + /** Changes the ProxyHeaderType for TargetTcpProxy. */ + await gapi.client.targetTcpProxies.setProxyHeader({ + project: "project", + requestId: "requestId", + targetTcpProxy: "targetTcpProxy", + }); + /** Retrieves an aggregated list of target VPN gateways. */ + await gapi.client.targetVpnGateways.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified target VPN gateway. */ + await gapi.client.targetVpnGateways.delete({ + project: "project", + region: "region", + requestId: "requestId", + targetVpnGateway: "targetVpnGateway", + }); + /** Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request. */ + await gapi.client.targetVpnGateways.get({ + project: "project", + region: "region", + targetVpnGateway: "targetVpnGateway", + }); + /** Creates a target VPN gateway in the specified project and region using the data included in the request. */ + await gapi.client.targetVpnGateways.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of target VPN gateways available to the specified project and region. */ + await gapi.client.targetVpnGateways.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Deletes the specified UrlMap resource. */ + await gapi.client.urlMaps.delete({ + project: "project", + requestId: "requestId", + urlMap: "urlMap", + }); + /** Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request. */ + await gapi.client.urlMaps.get({ + project: "project", + urlMap: "urlMap", + }); + /** Creates a UrlMap resource in the specified project using the data included in the request. */ + await gapi.client.urlMaps.insert({ + project: "project", + requestId: "requestId", + }); + /** Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. */ + await gapi.client.urlMaps.invalidateCache({ + project: "project", + requestId: "requestId", + urlMap: "urlMap", + }); + /** Retrieves the list of UrlMap resources available to the specified project. */ + await gapi.client.urlMaps.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** + * Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format + * and processing rules. + */ + await gapi.client.urlMaps.patch({ + project: "project", + requestId: "requestId", + urlMap: "urlMap", + }); + /** Updates the specified UrlMap resource with the data included in the request. */ + await gapi.client.urlMaps.update({ + project: "project", + requestId: "requestId", + urlMap: "urlMap", + }); + /** Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. */ + await gapi.client.urlMaps.validate({ + project: "project", + urlMap: "urlMap", + }); + /** Retrieves an aggregated list of VPN tunnels. */ + await gapi.client.vpnTunnels.aggregatedList({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Deletes the specified VpnTunnel resource. */ + await gapi.client.vpnTunnels.delete({ + project: "project", + region: "region", + requestId: "requestId", + vpnTunnel: "vpnTunnel", + }); + /** Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request. */ + await gapi.client.vpnTunnels.get({ + project: "project", + region: "region", + vpnTunnel: "vpnTunnel", + }); + /** Creates a VpnTunnel resource in the specified project and region using the data included in the request. */ + await gapi.client.vpnTunnels.insert({ + project: "project", + region: "region", + requestId: "requestId", + }); + /** Retrieves a list of VpnTunnel resources contained in the specified project and region. */ + await gapi.client.vpnTunnels.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + region: "region", + }); + /** Deletes the specified zone-specific Operations resource. */ + await gapi.client.zoneOperations.delete({ + operation: "operation", + project: "project", + zone: "zone", + }); + /** Retrieves the specified zone-specific Operations resource. */ + await gapi.client.zoneOperations.get({ + operation: "operation", + project: "project", + zone: "zone", + }); + /** Retrieves a list of Operation resources contained within the specified zone. */ + await gapi.client.zoneOperations.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + zone: "zone", + }); + /** Returns the specified Zone resource. Get a list of available zones by making a list() request. */ + await gapi.client.zones.get({ + project: "project", + zone: "zone", + }); + /** Retrieves the list of Zone resources available to the specified project. */ + await gapi.client.zones.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + } +}); diff --git a/types/gapi.client.compute/index.d.ts b/types/gapi.client.compute/index.d.ts new file mode 100644 index 0000000000..fe53df316f --- /dev/null +++ b/types/gapi.client.compute/index.d.ts @@ -0,0 +1,17367 @@ +// Type definitions for Google Compute Engine API v1 1.0 +// Project: https://developers.google.com/compute/docs/reference/latest/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/compute/v1/rest + +/// + +declare namespace gapi.client { + /** Load Compute Engine API v1 */ + function load(name: "compute", version: "v1"): PromiseLike; + function load(name: "compute", version: "v1", callback: () => any): void; + + const acceleratorTypes: compute.AcceleratorTypesResource; + + const addresses: compute.AddressesResource; + + const autoscalers: compute.AutoscalersResource; + + const backendBuckets: compute.BackendBucketsResource; + + const backendServices: compute.BackendServicesResource; + + const diskTypes: compute.DiskTypesResource; + + const disks: compute.DisksResource; + + const firewalls: compute.FirewallsResource; + + const forwardingRules: compute.ForwardingRulesResource; + + const globalAddresses: compute.GlobalAddressesResource; + + const globalForwardingRules: compute.GlobalForwardingRulesResource; + + const globalOperations: compute.GlobalOperationsResource; + + const healthChecks: compute.HealthChecksResource; + + const httpHealthChecks: compute.HttpHealthChecksResource; + + const httpsHealthChecks: compute.HttpsHealthChecksResource; + + const images: compute.ImagesResource; + + const instanceGroupManagers: compute.InstanceGroupManagersResource; + + const instanceGroups: compute.InstanceGroupsResource; + + const instanceTemplates: compute.InstanceTemplatesResource; + + const instances: compute.InstancesResource; + + const licenses: compute.LicensesResource; + + const machineTypes: compute.MachineTypesResource; + + const networks: compute.NetworksResource; + + const projects: compute.ProjectsResource; + + const regionAutoscalers: compute.RegionAutoscalersResource; + + const regionBackendServices: compute.RegionBackendServicesResource; + + const regionCommitments: compute.RegionCommitmentsResource; + + const regionInstanceGroupManagers: compute.RegionInstanceGroupManagersResource; + + const regionInstanceGroups: compute.RegionInstanceGroupsResource; + + const regionOperations: compute.RegionOperationsResource; + + const regions: compute.RegionsResource; + + const routers: compute.RoutersResource; + + const routes: compute.RoutesResource; + + const snapshots: compute.SnapshotsResource; + + const sslCertificates: compute.SslCertificatesResource; + + const subnetworks: compute.SubnetworksResource; + + const targetHttpProxies: compute.TargetHttpProxiesResource; + + const targetHttpsProxies: compute.TargetHttpsProxiesResource; + + const targetInstances: compute.TargetInstancesResource; + + const targetPools: compute.TargetPoolsResource; + + const targetSslProxies: compute.TargetSslProxiesResource; + + const targetTcpProxies: compute.TargetTcpProxiesResource; + + const targetVpnGateways: compute.TargetVpnGatewaysResource; + + const urlMaps: compute.UrlMapsResource; + + const vpnTunnels: compute.VpnTunnelsResource; + + const zoneOperations: compute.ZoneOperationsResource; + + const zones: compute.ZonesResource; + + namespace compute { + interface AcceleratorConfig { + /** The number of the guest accelerator cards exposed to this instance. */ + acceleratorCount?: number; + /** Full or partial URL of the accelerator type resource to expose to this instance. */ + acceleratorType?: string; + } + interface AcceleratorType { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] The deprecation status associated with this accelerator type. */ + deprecated?: DeprecationStatus; + /** [Output Only] An optional textual description of the resource. */ + description?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] The type of the resource. Always compute#acceleratorType for accelerator types. */ + kind?: string; + /** [Output Only] Maximum accelerator cards allowed per instance. */ + maximumCardsPerInstance?: number; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] Server-defined fully-qualified URL for this resource. */ + selfLink?: string; + /** [Output Only] The name of the zone where the accelerator type resides, such as us-central1-a. */ + zone?: string; + } + interface AcceleratorTypeAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of AcceleratorTypesScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList for aggregated lists of accelerator 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AcceleratorTypeList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of AcceleratorType resources. */ + items?: AcceleratorType[]; + /** [Output Only] Type of resource. Always compute#acceleratorTypeList for lists of accelerator 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AcceleratorTypesScopedList { + /** [Output Only] List of accelerator types contained in this scope. */ + acceleratorTypes?: AcceleratorType[]; + /** [Output Only] An informational warning that appears when the accelerator types list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AccessConfig { + /** [Output Only] Type of the resource. Always compute#accessConfig for access configs. */ + kind?: string; + /** + * The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For + * example, My external IP or Network Access. + */ + name?: string; + /** + * An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field + * undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the + * zone of the instance. + */ + natIP?: string; + /** The type of configuration. The default and only option is ONE_TO_ONE_NAT. */ + type?: string; + } + interface Address { + /** The static IP address represented by this resource. */ + address?: string; + /** The type of address to reserve. If unspecified, defaults to EXTERNAL. */ + addressType?: string; + /** [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; + /** The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address. */ + ipVersion?: string; + /** [Output Only] Type of the resource. Always compute#address for addresses. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process + * of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is + * not available. + */ + status?: string; + /** + * For external addresses, this field should not be used. + * + * The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. + */ + subnetwork?: string; + /** [Output Only] The URLs of the resources that are using this address. */ + users?: string[]; + } + interface AddressAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of AddressesScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AddressList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Address resources. */ + items?: Address[]; + /** [Output Only] Type of resource. Always compute#addressList for lists of addresses. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AddressesScopedList { + /** [Output Only] List of addresses contained in this scope. */ + addresses?: Address[]; + /** [Output Only] Informational warning which replaces the list of addresses when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AliasIpRange { + /** + * The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses + * reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format + * string (e.g. 10.1.2.0/24). + */ + ipCidrRange?: string; + /** + * Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left + * unspecified, the primary range of the subnetwork will be used. + */ + subnetworkRangeName?: string; + } + interface AttachedDisk { + /** Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). */ + autoDelete?: boolean; + /** Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. */ + boot?: boolean; + /** + * Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the + * instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. + * + * If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by + * Google Compute Engine. This field is only applicable for persistent disks. + */ + deviceName?: string; + /** + * Encrypts or decrypts a disk using a customer-supplied encryption key. + * + * If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that + * is already encrypted, this field decrypts the disk using the customer-supplied encryption key. + * + * If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For + * example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. + * + * If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to + * use the disk later. + * + * Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. + */ + diskEncryptionKey?: CustomerEncryptionKey; + /** + * [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would + * have a unique index number. + */ + index?: number; + /** + * [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot + * disks or local SSDs attached to the new instance. + * + * This property is mutually exclusive with the source property; you can only define one or the other, but not both. + */ + initializeParams?: AttachedDiskInitializeParams; + /** + * Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI + * and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For + * performance characteristics of SCSI over NVMe, see Local SSD performance. + */ + interface?: string; + /** [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. */ + kind?: string; + /** [Output Only] Any valid publicly visible licenses. */ + licenses?: string[]; + /** The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. */ + mode?: string; + /** + * Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or + * disks.source is required. + * + * If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. + * + * Note that for InstanceTemplate, specify the disk name, not the URL for the disk. + */ + source?: string; + /** Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. */ + type?: string; + } + interface AttachedDiskInitializeParams { + /** Specifies the disk name. If not specified, the default is to use the name of the instance. */ + diskName?: string; + /** Specifies the size of the disk in base-2 GB. */ + diskSizeGb?: string; + /** + * Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: + * + * https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard + * + * Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are + * valid values: + * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType + * - projects/project/zones/zone/diskTypes/diskType + * - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL. + */ + diskType?: string; + /** + * The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. + * + * To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the + * latest Debian 8 image: + * + * projects/debian-cloud/global/images/family/debian-8 + * + * Alternatively, use a specific version of a public operating system image: + * + * projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD + * + * To create a disk with a private image that you created, specify the image name in the following format: + * + * global/images/my-private-image + * + * You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with + * family/family-name: + * + * global/images/family/my-private-family + * + * If the source image is deleted later, this field will not be set. + */ + sourceImage?: string; + /** + * The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. + * + * Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source + * images are encrypted with your own keys. + */ + sourceImageEncryptionKey?: CustomerEncryptionKey; + } + interface Autoscaler { + /** + * The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, + * customMetricUtilizations, and loadBalancingUtilization. + * + * If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. + */ + autoscalingPolicy?: AutoscalingPolicy; + /** [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 the resource. Always compute#autoscaler for autoscalers. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] The status of the autoscaler configuration. */ + status?: string; + /** + * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for + * examples of status messages you might encounter. + */ + statusDetails?: AutoscalerStatusDetails[]; + /** URL of the managed instance group that this autoscaler will scale. */ + target?: string; + /** [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). */ + zone?: string; + } + interface AutoscalerAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of AutoscalersScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AutoscalerList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Autoscaler resources. */ + items?: Autoscaler[]; + /** [Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AutoscalerStatusDetails { + /** The status message. */ + message?: string; + /** The type of error returned. */ + type?: string; + } + interface AutoscalersScopedList { + /** [Output Only] List of autoscalers contained in this scope. */ + autoscalers?: Autoscaler[]; + /** [Output Only] Informational warning which replaces the list of autoscalers when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface AutoscalingPolicy { + /** + * The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from + * collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is + * 60 seconds. + * + * Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To + * do this, create an instance and time the startup process. + */ + coolDownPeriodSec?: number; + /** Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. */ + cpuUtilization?: AutoscalingPolicyCpuUtilization; + /** Configuration parameters of autoscaling based on a custom metric. */ + customMetricUtilizations?: AutoscalingPolicyCustomMetricUtilization[]; + /** Configuration parameters of autoscaling based on load balancer. */ + loadBalancingUtilization?: AutoscalingPolicyLoadBalancingUtilization; + /** + * The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of + * replicas should not be lower than minimal number of replicas. + */ + maxNumReplicas?: number; + /** + * The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default + * value depending on maximum number of instances allowed. + */ + minNumReplicas?: number; + } + interface AutoscalingPolicyCpuUtilization { + /** + * The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. + * + * If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances + * you specified or until the average CPU of your instances reaches the target utilization. + * + * If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until + * the average utilization reaches the target utilization. + */ + utilizationTarget?: number; + } + interface AutoscalingPolicyCustomMetricUtilization { + /** + * The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that + * the number of virtual machines handling requests should increase or decrease proportionally to the metric. + * + * The metric must have a value type of INT64 or DOUBLE. + */ + metric?: string; + /** + * The target value of the metric that autoscaler should maintain. This must be a positive value. + * + * For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to + * keep this value constant for each of the instances. + */ + utilizationTarget?: number; + /** + * Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not + * specified, the default is GAUGE. + */ + utilizationTargetType?: string; + } + interface AutoscalingPolicyLoadBalancingUtilization { + /** + * Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. + * If not defined, the default is 0.8. + */ + utilizationTarget?: number; + } + interface Backend { + /** + * Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, + * RATE (for HTTP(S)) and CONNECTION (for TCP/SSL). + * + * For Internal Load Balancing, the default and only supported mode is CONNECTION. + */ + balancingMode?: string; + /** + * A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group + * will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its + * available Capacity. Valid range is [0.0,1.0]. + * + * This cannot be used for internal load balancing. + */ + capacityScaler?: number; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** + * The fully-qualified URL of a Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine + * instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use + * same Instance Group resource. + * + * Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL. + * + * When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. + */ + group?: string; + /** + * The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, + * either maxConnections or maxConnectionsPerInstance must be set. + * + * This cannot be used for internal load balancing. + */ + maxConnections?: number; + /** + * The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used + * in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. + * + * This cannot be used for internal load balancing. + */ + maxConnectionsPerInstance?: number; + /** + * The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, + * either maxRate or maxRatePerInstance must be set. + * + * This cannot be used for internal load balancing. + */ + maxRate?: number; + /** + * The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either + * balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. + * + * This cannot be used for internal load balancing. + */ + maxRatePerInstance?: number; + /** + * Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0]. + * + * This cannot be used for internal load balancing. + */ + maxUtilization?: number; + } + interface BackendBucket { + /** Cloud Storage bucket name. */ + bucketName?: string; + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** An optional textual description of the resource; provided by the client when the resource is created. */ + description?: string; + /** If true, enable Cloud CDN for this BackendBucket. */ + enableCdn?: boolean; + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** Type of the resource. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + } + interface BackendBucketList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of BackendBucket resources. */ + items?: BackendBucket[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface BackendService { + /** + * Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the + * browser session (or equivalent). The maximum allowed value for TTL is one day. + * + * When the load balancing scheme is INTERNAL, this field is not used. + */ + affinityCookieTtlSec?: number; + /** The list of backends that serve this BackendService. */ + backends?: Backend[]; + /** Cloud CDN configuration for this BackendService. */ + cdnPolicy?: BackendServiceCdnPolicy; + connectionDraining?: ConnectionDraining; + /** [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; + /** + * If true, enable Cloud CDN for this BackendService. + * + * When the load balancing scheme is INTERNAL, this field is not used. + */ + enableCDN?: 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 ignored when + * inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService. + */ + fingerprint?: string; + /** + * The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be + * specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud + * Function backend. + * + * For internal load balancing, a URL to a HealthCheck resource must be specified instead. + */ + healthChecks?: string[]; + iap?: BackendServiceIAP; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of resource. Always compute#backendService for backend services. */ + kind?: string; + /** + * Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing + * cannot be used with the other. Possible values are INTERNAL and EXTERNAL. + */ + loadBalancingScheme?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** + * Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. + * + * This cannot be used for internal load balancing. + */ + port?: number; + /** + * Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is + * EXTERNAL. + * + * When the load balancing scheme is INTERNAL, this field is not used. + */ + portName?: string; + /** + * The protocol this BackendService uses to communicate with backends. + * + * Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP. + * + * For internal load balancing, the possible values are TCP and UDP, and the default is TCP. + */ + protocol?: string; + /** [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * Type of session affinity to use. The default is NONE. + * + * When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE. + * + * When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. + * + * When the protocol is UDP, this field is not used. + */ + sessionAffinity?: string; + /** How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. */ + timeoutSec?: number; + } + interface BackendServiceAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of BackendServicesScopedList resources. */ + items?: Record; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface BackendServiceCdnPolicy { + /** The CacheKeyPolicy for this CdnPolicy. */ + cacheKeyPolicy?: CacheKeyPolicy; + } + interface BackendServiceGroupHealth { + healthStatus?: HealthStatus[]; + /** [Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services. */ + kind?: string; + } + interface BackendServiceIAP { + enabled?: boolean; + oauth2ClientId?: string; + oauth2ClientSecret?: string; + /** [Output Only] SHA256 hash value for the field oauth2_client_secret above. */ + oauth2ClientSecretSha256?: string; + } + interface BackendServiceList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of BackendService resources. */ + items?: BackendService[]; + /** [Output Only] Type of resource. Always compute#backendServiceList for lists of backend services. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface BackendServicesScopedList { + /** List of BackendServices contained in this scope. */ + backendServices?: BackendService[]; + /** Informational warning which replaces the list of backend services when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface CacheInvalidationRule { + /** If set, this invalidation rule will only apply to requests with a Host header matching host. */ + host?: string; + path?: string; + } + interface CacheKeyPolicy { + /** If true, requests to different hosts will be cached separately. */ + includeHost?: boolean; + /** If true, http and https requests will be cached separately. */ + includeProtocol?: boolean; + /** + * If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire + * query string will be included. If false, the query string will be excluded from the cache key entirely. + */ + includeQueryString?: boolean; + /** + * Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or + * query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. + */ + queryStringBlacklist?: string[]; + /** + * Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or + * query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. + */ + queryStringWhitelist?: string[]; + } + interface Commitment { + /** [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] Commitment end time in RFC3339 text format. */ + endTimestamp?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#commitment for commitments. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** + * The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and + * THIRTY_SIX_MONTH (3 years). + */ + plan?: string; + /** [Output Only] URL of the region where this commitment may be used. */ + region?: string; + /** List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. */ + resources?: ResourceCommitment[]; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] Commitment start time in RFC3339 text format. */ + startTimestamp?: string; + /** + * [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: + * NOT_YET_ACTIVE, ACTIVE, EXPIRED. + */ + status?: string; + /** [Output Only] An optional, human-readable explanation of the status. */ + statusMessage?: string; + } + interface CommitmentAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of CommitmentsScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface CommitmentList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Commitment resources. */ + items?: Commitment[]; + /** [Output Only] Type of resource. Always compute#commitmentList for lists of commitments. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface CommitmentsScopedList { + /** [Output Only] List of commitments contained in this scope. */ + commitments?: Commitment[]; + /** [Output Only] Informational warning which replaces the list of commitments when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface ConnectionDraining { + /** Time for which instance will be drained (not accept new connections, but still work to finish started). */ + drainingTimeoutSec?: number; + } + interface CustomerEncryptionKey { + /** Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. */ + rawKey?: string; + /** [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. */ + sha256?: string; + } + interface CustomerEncryptionKeyProtectedDisk { + /** Decrypts data associated with the disk with a customer-supplied encryption key. */ + diskEncryptionKey?: CustomerEncryptionKey; + /** Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks. */ + source?: string; + } + interface DeprecationStatus { + /** + * An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status + * will not change unless the client explicitly changes it. + */ + deleted?: string; + /** + * An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the + * status will not change unless the client explicitly changes it. + */ + deprecated?: string; + /** + * An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status + * will not change unless the client explicitly changes it. + */ + obsolete?: string; + /** + * The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated + * resource. + */ + replacement?: string; + /** + * The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED + * resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use + * OBSOLETE or DELETED resources will be rejected and result in an error. + */ + state?: string; + } + interface Disk { + /** [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; + /** + * Encrypts the disk using a customer-supplied encryption key. + * + * After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an + * image, or to attach the disk to a virtual machine). + * + * Customer-supplied encryption keys do not protect access to metadata of the disk. + * + * If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not + * need to provide a key to use the disk later. + */ + diskEncryptionKey?: CustomerEncryptionKey; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#disk for disks. */ + kind?: string; + /** + * A fingerprint for the labels being applied to this disk, 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 a disk. + */ + labelFingerprint?: string; + /** Labels to apply to this disk. These can be later modified by the setLabels method. */ + labels?: Record; + /** [Output Only] Last attach timestamp in RFC3339 text format. */ + lastAttachTimestamp?: string; + /** [Output Only] Last detach timestamp in RFC3339 text format. */ + lastDetachTimestamp?: string; + /** Any applicable publicly visible licenses. */ + licenses?: string[]; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** Internal use only. */ + options?: string; + /** [Output Only] Server-defined fully-qualified URL for this resource. */ + selfLink?: string; + /** + * Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot + * parameter, or specify it alone to create an empty persistent disk. + * + * If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size + * of the snapshot. Acceptable values are 1 to 65536, inclusive. + */ + sizeGb?: string; + /** + * The source image used to create this disk. If the source image is deleted, this field will not be set. + * + * To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the + * latest Debian 8 image: + * + * projects/debian-cloud/global/images/family/debian-8 + * + * Alternatively, use a specific version of a public operating system image: + * + * projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD + * + * To create a disk with a private image that you created, specify the image name in the following format: + * + * global/images/my-private-image + * + * You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with + * family/family-name: + * + * global/images/family/my-private-family + */ + sourceImage?: string; + /** The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. */ + sourceImageEncryptionKey?: CustomerEncryptionKey; + /** + * [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. + * For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would + * identify the exact version of the image that was used. + */ + sourceImageId?: string; + /** + * The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid + * values: + * - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot + * - projects/project/global/snapshots/snapshot + * - global/snapshots/snapshot + */ + sourceSnapshot?: string; + /** The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. */ + sourceSnapshotEncryptionKey?: CustomerEncryptionKey; + /** + * [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent + * disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID + * would identify the exact version of the snapshot that was used. + */ + sourceSnapshotId?: string; + /** [Output Only] The status of disk creation. */ + status?: string; + /** URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. */ + type?: string; + /** [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance */ + users?: string[]; + /** [Output Only] URL of the zone where the disk resides. */ + zone?: string; + } + interface DiskAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of DisksScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface DiskList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Disk resources. */ + items?: Disk[]; + /** [Output Only] Type of resource. Always compute#diskList for lists of disks. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface DiskMoveRequest { + /** + * The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone: + * - https://www.googleapis.com/compute/v1/projects/project/zones/zone + * - projects/project/zones/zone + * - zones/zone + */ + destinationZone?: string; + /** + * The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk: + * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + * - projects/project/zones/zone/disks/disk + * - zones/zone/disks/disk + */ + targetDisk?: string; + } + interface DiskType { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] Server-defined default disk size in GB. */ + defaultDiskSizeGb?: string; + /** [Output Only] The deprecation status associated with this disk type. */ + deprecated?: DeprecationStatus; + /** [Output Only] An optional description of this resource. */ + description?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#diskType for disk types. */ + kind?: string; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] An optional textual description of the valid disk size, such as "10GB-10TB". */ + validDiskSize?: string; + /** [Output Only] URL of the zone where the disk type resides. */ + zone?: string; + } + interface DiskTypeAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of DiskTypesScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#diskTypeAggregatedList. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface DiskTypeList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of DiskType resources. */ + items?: DiskType[]; + /** [Output Only] Type of resource. Always compute#diskTypeList for 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface DiskTypesScopedList { + /** [Output Only] List of disk types contained in this scope. */ + diskTypes?: DiskType[]; + /** [Output Only] Informational warning which replaces the list of disk types when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface DisksResizeRequest { + /** The new size of the persistent disk, which is specified in GB. */ + sizeGb?: string; + } + interface DisksScopedList { + /** [Output Only] List of disks contained in this scope. */ + disks?: Disk[]; + /** [Output Only] Informational warning which replaces the list of disks when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface Firewall { + /** The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. */ + allowed?: Array<{ + /** + * The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following + * well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number. + */ + IPProtocol?: string; + /** + * An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a + * range. If not specified, this rule applies to connections through any port. + * + * Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. + */ + ports?: string[]; + }>; + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. */ + denied?: Array<{ + /** + * The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following + * well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number. + */ + IPProtocol?: string; + /** + * An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a + * range. If not specified, this rule applies to connections through any port. + * + * Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. + */ + ports?: string[]; + }>; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** + * If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be + * expressed in CIDR format. Only IPv4 is supported. + */ + destinationRanges?: string[]; + /** + * Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; + * For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags. + */ + direction?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#firewall for firewall rules. */ + kind?: string; + /** + * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** + * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: + * global/networks/default + * If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: + * - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network + * - projects/myproject/global/networks/my-network + * - global/networks/default + */ + network?: string; + /** + * Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities + * determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a + * rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority. + */ + priority?: number; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in + * CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP + * address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both + * properties for the firewall to apply. Only IPv4 is supported. + */ + sourceRanges?: string[]; + /** + * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that + * have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to + * traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and + * sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP + * that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. + */ + sourceTags?: string[]; + /** + * A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no + * targetTags are specified, the firewall rule applies to all instances on the specified network. + */ + targetTags?: string[]; + } + interface FirewallList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Firewall resources. */ + items?: Firewall[]; + /** [Output Only] Type of resource. Always compute#firewallList for lists of firewalls. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface ForwardingRule { + /** + * The IP address that this forwarding rule is serving on behalf of. + * + * For global forwarding rules, the address must be a global IP. For regional forwarding rules, the address must live in the same region as the forwarding + * rule. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding + * rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. + * + * When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding + * rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the + * subnetwork or network configured for this forwarding rule. + */ + IPAddress?: string; + /** + * The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP. + * + * When the load balancing scheme is INTERNAL, only TCP and UDP are valid. + */ + IPProtocol?: string; + /** + * This field is not used for external load balancing. + * + * For internal load balancing, this field identifies the BackendService resource to receive the matched traffic. + */ + backendService?: string; + /** [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; + /** The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule. */ + ipVersion?: string; + /** [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources. */ + kind?: string; + /** + * This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that + * this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing + * (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) + */ + loadBalancingScheme?: string; + /** + * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** + * This field is not used for external load balancing. + * + * For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is + * not specified, the default network will be used. + */ + network?: string; + /** + * This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, + * TargetInstance. + * + * Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding + * rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. + * + * Some types of forwarding target have constraints on the acceptable ports: + * - TargetHttpProxy: 80, 8080 + * - TargetHttpsProxy: 443 + * - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 + * - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 + * - TargetVpnGateway: 500, 4500 + * - + */ + portRange?: string; + /** + * This field is used along with the backend_service field for internal load balancing. + * + * When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports + * will be forwarded to the backends configured with this forwarding rule. + * + * You may specify a maximum of up to 5 ports. + */ + ports?: string[]; + /** [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * This field is not used for external load balancing. + * + * For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule. + * + * If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be + * specified. + */ + subnetwork?: string; + /** + * The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the + * forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate + * to the target object. + * + * This field is not used for internal load balancing. + */ + target?: string; + } + interface ForwardingRuleAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of ForwardingRulesScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#forwardingRuleAggregatedList for lists of forwarding rules. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface ForwardingRuleList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of ForwardingRule resources. */ + items?: ForwardingRule[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface ForwardingRulesScopedList { + /** List of forwarding rules contained in this scope. */ + forwardingRules?: ForwardingRule[]; + /** Informational warning which replaces the list of forwarding rules when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface GlobalSetLabelsRequest { + /** + * 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 when updating or changing labels. Make a + * get() request to the resource to get the latest fingerprint. + */ + labelFingerprint?: string; + /** + * A list of labels to apply for this resource. Each label key & value must 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. For example, "webserver-frontend": "images". A label value + * can also be empty (e.g. "my-label": ""). + */ + labels?: Record; + } + interface GuestOsFeature { + /** + * The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this + * property with the value WINDOWS to indicate that this is a Windows image. + */ + type?: string; + } + interface HTTPHealthCheck { + /** + * The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed + * will be used. + */ + host?: string; + /** The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535. */ + port?: number; + /** Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. */ + portName?: string; + /** Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. */ + proxyHeader?: string; + /** The request path of the HTTP health check request. The default value is /. */ + requestPath?: string; + } + interface HTTPSHealthCheck { + /** + * The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed + * will be used. + */ + host?: string; + /** The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535. */ + port?: number; + /** Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. */ + portName?: string; + /** Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. */ + proxyHeader?: string; + /** The request path of the HTTPS health check request. The default value is /. */ + requestPath?: string; + } + interface HealthCheck { + /** How often (in seconds) to send a health check. The default value is 5 seconds. */ + checkIntervalSec?: number; + /** [Output Only] Creation timestamp in 3339 text format. */ + creationTimestamp?: string; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. */ + healthyThreshold?: number; + httpHealthCheck?: HTTPHealthCheck; + httpsHealthCheck?: HTTPSHealthCheck; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** Type of the resource. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + sslHealthCheck?: SSLHealthCheck; + tcpHealthCheck?: TCPHealthCheck; + /** + * How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than + * checkIntervalSec. + */ + timeoutSec?: number; + /** + * Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific + * health check field must be specified, which must match type field. + */ + type?: string; + /** A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. */ + unhealthyThreshold?: number; + } + interface HealthCheckList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of HealthCheck resources. */ + items?: HealthCheck[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface HealthCheckReference { + healthCheck?: string; + } + interface HealthStatus { + /** Health state of the instance. */ + healthState?: string; + /** URL of the instance resource. */ + instance?: string; + /** The IP address represented by this resource. */ + ipAddress?: string; + /** The port on the instance. */ + port?: number; + } + interface HostRule { + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** + * The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first + * character and must be followed in the pattern by either - or .. + */ + hosts?: string[]; + /** The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. */ + pathMatcher?: string; + } + interface HttpHealthCheck { + /** How often (in seconds) to send a health check. The default value is 5 seconds. */ + checkIntervalSec?: number; + /** [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; + /** A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. */ + healthyThreshold?: number; + /** + * The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is + * performed will be used. + */ + host?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#httpHealthCheck for HTTP health checks. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** The TCP port number for the HTTP health check request. The default value is 80. */ + port?: number; + /** The request path of the HTTP health check request. The default value is /. */ + requestPath?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than + * checkIntervalSec. + */ + timeoutSec?: number; + /** A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. */ + unhealthyThreshold?: number; + } + interface HttpHealthCheckList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of HttpHealthCheck resources. */ + items?: HttpHealthCheck[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface HttpsHealthCheck { + /** How often (in seconds) to send a health check. The default value is 5 seconds. */ + checkIntervalSec?: number; + /** [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; + /** A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. */ + healthyThreshold?: number; + /** + * The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is + * performed will be used. + */ + host?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** Type of the resource. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** The TCP port number for the HTTPS health check request. The default value is 443. */ + port?: number; + /** The request path of the HTTPS health check request. The default value is "/". */ + requestPath?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have a greater value than + * checkIntervalSec. + */ + timeoutSec?: number; + /** A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. */ + unhealthyThreshold?: number; + } + interface HttpsHealthCheckList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of HttpsHealthCheck resources. */ + items?: HttpsHealthCheck[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface Image { + /** Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). */ + archiveSizeBytes?: string; + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** The deprecation status associated with this image. */ + deprecated?: DeprecationStatus; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** Size of the image when restored onto a persistent disk (in GB). */ + diskSizeGb?: string; + /** + * The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The + * image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. + */ + family?: string; + /** + * A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, + * which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version + * 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE. + * + * For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. + */ + guestOsFeatures?: GuestOsFeature[]; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** + * Encrypts the image using a customer-supplied encryption key. + * + * After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the + * image). + * + * Customer-supplied encryption keys do not protect access to metadata of the disk. + * + * If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not + * need to provide a key to use the image later. + */ + imageEncryptionKey?: CustomerEncryptionKey; + /** [Output Only] Type of the resource. Always compute#image for images. */ + kind?: string; + /** + * A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is + * initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint + * hash in order to update or change labels. + * + * To see the latest fingerprint, make a get() request to retrieve an image. + */ + labelFingerprint?: string; + /** Labels to apply to this image. These can be later modified by the setLabels method. */ + labels?: Record; + /** Any applicable license URI. */ + licenses?: string[]; + /** + * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** The parameters of the raw disk image. */ + rawDisk?: { + /** + * The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime + * format. Provided by the client when the disk image is created. + */ + containerType?: string; + /** An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created. */ + sha1Checksum?: string; + /** The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both. */ + source?: string; + }; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source + * property but not both to create an image. For example, the following are valid values: + * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + * - projects/project/zones/zone/disks/disk + * - zones/zone/disks/disk + */ + sourceDisk?: string; + /** The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. */ + sourceDiskEncryptionKey?: CustomerEncryptionKey; + /** + * The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous + * instance of a given disk name. + */ + sourceDiskId?: string; + /** + * URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of: + * - this property, or + * - the rawDisk.source property, or + * - the sourceDisk property in order to create an image. + */ + sourceImage?: string; + /** The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. */ + sourceImageEncryptionKey?: CustomerEncryptionKey; + /** + * [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or + * a previous instance of a given image name. + */ + sourceImageId?: string; + /** The type of the image used to create this disk. The default and only value is RAW */ + sourceType?: string; + /** + * [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully + * created and the status is set to READY. Possible values are FAILED, PENDING, or READY. + */ + status?: string; + } + interface ImageList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Image resources. */ + items?: Image[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface Instance { + /** + * Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to + * forward routes. For more information, see Enabling IP Forwarding. + */ + canIpForward?: boolean; + /** [Output Only] The CPU platform used by this instance. */ + cpuPlatform?: string; + /** [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; + /** Array of disks associated with this instance. Persistent disks must be created before you can assign them. */ + disks?: AttachedDisk[]; + /** List of the type and count of accelerator cards attached to the instance. */ + guestAccelerators?: AcceleratorConfig[]; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#instance for instances. */ + kind?: string; + /** + * A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially + * generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in + * order to update or change metadata. + * + * To see the latest fingerprint, make get() request to the instance. + */ + labelFingerprint?: string; + /** Labels to apply to this instance. These can be later modified by the setLabels method. */ + labels?: Record; + /** + * Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the + * client when the instance is created. For example, the following is a valid partial url to a predefined machine type: + * + * zones/us-central1-f/machineTypes/n1-standard-1 + * + * To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, + * etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 + * MB): + * + * zones/zone/machineTypes/custom-CPUS-MEMORY + * + * For example: zones/us-central1-f/machineTypes/custom-4-5120 + * + * For a full list of restrictions, read the Specifications for custom machine types. + */ + machineType?: string; + /** The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. */ + metadata?: Metadata; + /** + * Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel + * Haswell" or minCpuPlatform: "Intel Sandy Bridge". + */ + minCpuPlatform?: string; + /** + * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with + * RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first + * character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot + * be a dash. + */ + name?: string; + /** + * An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as + * connecting to the internet. Multiple interfaces are supported per instance. + */ + networkInterfaces?: NetworkInterface[]; + /** Sets the scheduling options for this instance. */ + scheduling?: Scheduling; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** + * A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. + * + * Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See + * Service Accounts for more information. + */ + serviceAccounts?: ServiceAccount[]; + /** [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. */ + startRestricted?: boolean; + /** + * [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and + * TERMINATED. + */ + status?: string; + /** [Output Only] An optional, human-readable explanation of the status. */ + statusMessage?: string; + /** + * A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client + * during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. + */ + tags?: Tags; + /** [Output Only] URL of the zone where the instance resides. */ + zone?: string; + } + interface InstanceAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstancesScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroup { + /** [Output Only] The creation timestamp for this instance group 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 fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports + * concurrently. + */ + fingerprint?: string; + /** [Output Only] A unique identifier for this instance group, generated by the server. */ + id?: string; + /** [Output Only] The resource type, which is always compute#instanceGroup for instance groups. */ + kind?: string; + /** The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. */ + name?: string; + /** + * Assigns a name to a port number. For example: {name: "http", port: 80} + * + * This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: + * [{name: "http", port: 80},{name: "http", port: 8080}] + * + * Named ports apply to all instances in this instance group. + */ + namedPorts?: NamedPort[]; + /** The URL of the network to which all instances in the instance group belong. */ + network?: string; + /** The URL of the region where the instance group is located (for regional resources). */ + region?: string; + /** [Output Only] The URL for this instance group. The server generates this URL. */ + selfLink?: string; + /** [Output Only] The total number of instances in the instance group. */ + size?: number; + /** The URL of the subnetwork to which all instances in the instance group belong. */ + subnetwork?: string; + /** [Output Only] The URL of the zone where the instance group is located (for zonal resources). */ + zone?: string; + } + interface InstanceGroupAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceGroupsScopedList resources. */ + items?: Record; + /** [Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroupList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceGroup resources. */ + items?: InstanceGroup[]; + /** [Output Only] The resource type, which is always compute#instanceGroupList for instance group lists. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroupManager { + /** + * The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a + * random four-character string to the base instance name. The base instance name must comply with RFC1035. + */ + baseInstanceName?: string; + /** [Output Only] The creation timestamp for this managed instance group in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions. */ + currentActions?: InstanceGroupManagerActionsSummary; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** [Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource. */ + fingerprint?: string; + /** [Output Only] A unique identifier for this resource type. The server generates this identifier. */ + id?: string; + /** [Output Only] The URL of the Instance Group resource. */ + instanceGroup?: string; + /** + * The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the + * managed instance group. + */ + instanceTemplate?: string; + /** [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. */ + kind?: string; + /** The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. */ + name?: string; + /** Named ports configured for the Instance Groups complementary to this Instance Group Manager. */ + namedPorts?: NamedPort[]; + /** [Output Only] The URL of the region where the managed instance group resides (for regional resources). */ + region?: string; + /** [Output Only] The URL for this managed instance group. The server defines this URL. */ + selfLink?: string; + /** + * The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the + * instances in the managed instance group. + */ + targetPools?: string[]; + /** + * The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group + * changes this number. + */ + targetSize?: number; + /** [Output Only] The URL of the zone where the managed instance group is located (for zonal resources). */ + zone?: string; + } + interface InstanceGroupManagerActionsSummary { + /** + * [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from + * the managed instance group without deleting it. + */ + abandoning?: number; + /** + * [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails + * to create any of these instances, it tries again until it creates the instance successfully. + * + * If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. + */ + creating?: number; + /** + * [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If + * the group fails to create any of these instances, it decreases the group's targetSize value accordingly. + */ + creatingWithoutRetries?: number; + /** [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. */ + deleting?: number; + /** [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. */ + none?: number; + /** + * [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. + * Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template. + */ + recreating?: number; + /** + * [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a + * recreate action. For example, setting or removing target pools for the instance. + */ + refreshing?: number; + /** [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. */ + restarting?: number; + } + interface InstanceGroupManagerAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceGroupManagersScopedList resources. */ + items?: Record; + /** [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroupManagerList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceGroupManager resources. */ + items?: InstanceGroupManager[]; + /** [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroupManagersAbandonInstancesRequest { + /** The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. */ + instances?: string[]; + } + interface InstanceGroupManagersDeleteInstancesRequest { + /** The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. */ + instances?: string[]; + } + interface InstanceGroupManagersListManagedInstancesResponse { + /** [Output Only] The list of instances in the managed instance group. */ + managedInstances?: ManagedInstance[]; + } + interface InstanceGroupManagersRecreateInstancesRequest { + /** The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. */ + instances?: string[]; + } + interface InstanceGroupManagersScopedList { + /** [Output Only] The list of managed instance groups that are contained in the specified project and zone. */ + instanceGroupManagers?: InstanceGroupManager[]; + /** [Output Only] The warning that replaces the list of managed instance groups when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroupManagersSetInstanceTemplateRequest { + /** + * The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the + * managed instance group. + */ + instanceTemplate?: string; + } + interface InstanceGroupManagersSetTargetPoolsRequest { + /** + * The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings + * concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not + * overwrite changes that were applied from another concurrent request. + */ + fingerprint?: string; + /** + * The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of + * the instances in the group. Existing instances and new instances in the group all receive these target pool settings. + */ + targetPools?: string[]; + } + interface InstanceGroupsAddInstancesRequest { + /** The list of instances to add to the instance group. */ + instances?: InstanceReference[]; + } + interface InstanceGroupsListInstances { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceWithNamedPorts resources. */ + items?: InstanceWithNamedPorts[]; + /** [Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroupsListInstancesRequest { + /** + * A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes + * all instances regardless of their state. + */ + instanceState?: string; + } + interface InstanceGroupsRemoveInstancesRequest { + /** The list of instances to remove from the instance group. */ + instances?: InstanceReference[]; + } + interface InstanceGroupsScopedList { + /** [Output Only] The list of instance groups that are contained in this scope. */ + instanceGroups?: InstanceGroup[]; + /** [Output Only] An informational warning that replaces the list of instance groups when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceGroupsSetNamedPortsRequest { + /** + * The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the + * named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure + * that you do not overwrite changes that were applied from another concurrent request. + */ + fingerprint?: string; + /** The list of named ports to set for this instance group. */ + namedPorts?: NamedPort[]; + } + interface InstanceList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Instance resources. */ + items?: Instance[]; + /** [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceMoveRequest { + /** + * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: + * - https://www.googleapis.com/compute/v1/projects/project/zones/zone + * - projects/project/zones/zone + * - zones/zone + */ + destinationZone?: string; + /** + * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: + * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + * - projects/project/zones/zone/instances/instance + * - zones/zone/instances/instance + */ + targetInstance?: string; + } + interface InstanceProperties { + /** + * Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP + * addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. + * If unsure, leave this set to false. See the Enable IP forwarding documentation for more information. + */ + canIpForward?: boolean; + /** An optional text description for the instances that are created from this instance template. */ + description?: string; + /** An array of disks that are associated with the instances that are created from this template. */ + disks?: AttachedDisk[]; + /** A list of guest accelerator cards' type and count to use for instances created from the instance template. */ + guestAccelerators?: AcceleratorConfig[]; + /** Labels to apply to instances that are created from this template. */ + labels?: Record; + /** The machine type to use for instances that are created from this template. */ + machineType?: string; + /** + * The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. + * See Project and instance metadata for more information. + */ + metadata?: Metadata; + /** + * Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the + * friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying + * a Minimum CPU Platform. + */ + minCpuPlatform?: string; + /** An array of network access configurations for this interface. */ + networkInterfaces?: NetworkInterface[]; + /** Specifies the scheduling options for the instances that are created from this template. */ + scheduling?: Scheduling; + /** + * A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this + * template. Use metadata queries to obtain the access tokens for these instances. + */ + serviceAccounts?: ServiceAccount[]; + /** + * A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The + * setTags method can modify this list of tags. Each tag within the list must comply with RFC1035. + */ + tags?: Tags; + } + interface InstanceReference { + /** The URL for a specific instance. */ + instance?: string; + } + interface InstanceTemplate { + /** [Output Only] The creation timestamp for this instance template in RFC3339 text format. */ + creationTimestamp?: string; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** [Output Only] A unique identifier for this instance template. The server defines this identifier. */ + id?: string; + /** [Output Only] The resource type, which is always compute#instanceTemplate for instance templates. */ + kind?: string; + /** + * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** The instance properties for this instance template. */ + properties?: InstanceProperties; + /** [Output Only] The URL for this instance template. The server defines this URL. */ + selfLink?: string; + } + interface InstanceTemplateList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceTemplate resources. */ + items?: InstanceTemplate[]; + /** [Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstanceWithNamedPorts { + /** [Output Only] The URL of the instance. */ + instance?: string; + /** [Output Only] The named ports that belong to this instance group. */ + namedPorts?: NamedPort[]; + /** [Output Only] The status of the instance. */ + status?: string; + } + interface InstancesScopedList { + /** [Output Only] List of instances contained in this scope. */ + instances?: Instance[]; + /** [Output Only] Informational warning which replaces the list of instances when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface InstancesSetLabelsRequest { + /** + * Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to + * add or change labels. + */ + labelFingerprint?: string; + labels?: Record; + } + interface InstancesSetMachineResourcesRequest { + /** List of the type and count of accelerator cards attached to the instance. */ + guestAccelerators?: AcceleratorConfig[]; + } + interface InstancesSetMachineTypeRequest { + /** + * Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: + * zones/us-central1-f/machineTypes/n1-standard-1 + */ + machineType?: string; + } + interface InstancesSetMinCpuPlatformRequest { + /** Minimum cpu/platform this instance should be started at. */ + minCpuPlatform?: string; + } + interface InstancesSetServiceAccountRequest { + /** Email address of the service account. */ + email?: string; + /** The list of scopes to be made available for this service account. */ + scopes?: string[]; + } + interface InstancesStartWithEncryptionKeyRequest { + /** + * Array of disks associated with this instance that are protected with a customer-supplied encryption key. + * + * In order to start the instance, the disk url and its corresponding key must be provided. + * + * If the disk is not protected with a customer-supplied encryption key it should not be specified. + */ + disks?: CustomerEncryptionKeyProtectedDisk[]; + } + interface License { + /** [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee. */ + chargesUseFee?: boolean; + /** [Output Only] Type of resource. Always compute#license for licenses. */ + kind?: string; + /** [Output Only] Name of the resource. The name is 1-63 characters long and complies with RFC1035. */ + name?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + } + interface MachineType { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] The deprecation status associated with this machine type. */ + deprecated?: DeprecationStatus; + /** [Output Only] An optional textual description of the resource. */ + description?: string; + /** [Output Only] The number of virtual CPUs that are available to the instance. */ + guestCpus?: number; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Deprecated] This property is deprecated and will never be populated with any relevant values. */ + imageSpaceGb?: number; + /** [Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information. */ + isSharedCpu?: boolean; + /** [Output Only] The type of the resource. Always compute#machineType for machine types. */ + kind?: string; + /** [Output Only] Maximum persistent disks allowed. */ + maximumPersistentDisks?: number; + /** [Output Only] Maximum total persistent disks size (GB) allowed. */ + maximumPersistentDisksSizeGb?: string; + /** [Output Only] The amount of physical memory available to the instance, defined in MB. */ + memoryMb?: number; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] List of extended scratch disks assigned to the instance. */ + scratchDisks?: Array<{ + /** Size of the scratch disk, defined in GB. */ + diskGb?: number; + }>; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] The name of the zone where the machine type resides, such as us-central1-a. */ + zone?: string; + } + interface MachineTypeAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of MachineTypesScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#machineTypeAggregatedList for aggregated lists of machine 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface MachineTypeList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of MachineType resources. */ + items?: MachineType[]; + /** [Output Only] Type of resource. Always compute#machineTypeList for lists of machine 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface MachineTypesScopedList { + /** [Output Only] List of machine types contained in this scope. */ + machineTypes?: MachineType[]; + /** [Output Only] An informational warning that appears when the machine types list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface ManagedInstance { + /** + * [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: + * - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. + * - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. + * - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it + * does not try again and the group's targetSize value is decreased instead. + * - RECREATING The managed instance group is recreating this instance. + * - DELETING The managed instance group is permanently deleting this instance. + * - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools + * that are associated with this group. + * - RESTARTING The managed instance group is restarting the instance. + * - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the + * target pool list for an instance without stopping that instance. + */ + currentAction?: string; + /** [Output only] The unique identifier for this resource. This field is empty when instance does not exist. */ + id?: string; + /** [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created. */ + instance?: string; + /** [Output Only] The status of the instance. This field is empty when the instance does not exist. */ + instanceStatus?: string; + /** [Output Only] Information about the last attempt to create or delete the instance. */ + lastAttempt?: ManagedInstanceLastAttempt; + } + interface ManagedInstanceLastAttempt { + /** [Output Only] Encountered errors during the last attempt to create or delete the instance. */ + errors?: { + /** [Output Only] The array of errors encountered while processing this operation. */ + errors?: Array<{ + /** [Output Only] The error type identifier for this error. */ + code?: string; + /** [Output Only] Indicates the field in the request that caused the error. This property is optional. */ + location?: string; + /** [Output Only] An optional, human-readable error message. */ + message?: string; + }>; + }; + } + interface Metadata { + /** + * Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is + * initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint + * hash in order to update or change metadata. + */ + fingerprint?: string; + /** Array of key/value pairs. The total size of all keys and values must be less than 512 KB. */ + items?: Array<{ + /** + * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part + * of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. + */ + key?: string; + /** + * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only + * restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB). + */ + value?: string; + }>; + /** [Output Only] Type of the resource. Always compute#metadata for metadata. */ + kind?: string; + } + interface NamedPort { + /** The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. */ + name?: string; + /** The port number, which can be a value between 1 and 65535. */ + port?: number; + } + interface Network { + /** + * The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client + * when the network is created. + */ + IPv4Range?: string; + /** + * When set to true, the network is created in "auto subnet mode". When set to false, the network is in "custom subnet mode". + * + * In "auto subnet mode", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region. + */ + autoCreateSubnetworks?: boolean; + /** [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; + /** + * A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first + * usable address in the IPv4Range. + */ + gatewayIPv4?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#network for networks. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] List of network peerings for the resource. */ + peerings?: NetworkPeering[]; + /** The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. */ + routingConfig?: NetworkRoutingConfig; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] Server-defined fully-qualified URLs for all subnetworks in this network. */ + subnetworks?: string[]; + } + interface NetworkInterface { + /** + * An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs + * specified, then this instance will have no external internet access. + */ + accessConfigs?: AccessConfig[]; + /** An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. */ + aliasIpRanges?: AliasIpRange[]; + /** [Output Only] Type of the resource. Always compute#networkInterface for network interfaces. */ + kind?: string; + /** [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. */ + name?: string; + /** + * URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network + * global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. + * + * This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is + * used. + * + * If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: + * - https://www.googleapis.com/compute/v1/projects/project/global/networks/network + * - projects/project/global/networks/network + * - global/networks/default + */ + network?: string; + /** + * An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned + * by the system. + */ + networkIP?: string; + /** + * The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in + * auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify + * this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: + * - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork + * - regions/region/subnetworks/subnetwork + */ + subnetwork?: string; + } + interface NetworkList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Network resources. */ + items?: Network[]; + /** [Output Only] Type of resource. Always compute#networkList for lists of networks. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface NetworkPeering { + /** + * Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage + * the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network. + */ + autoCreateRoutes?: boolean; + /** + * Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 + * characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the + * following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** + * The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not + * contain project, it is assumed that the peer network is in the same project as the current network. + */ + network?: string; + /** [Output Only] State for the peering. */ + state?: string; + /** [Output Only] Details about the current state of the peering. */ + stateDetails?: string; + } + interface NetworkRoutingConfig { + /** + * The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnetworks of this network in + * the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnetworks of this network, across + * regions. + */ + routingMode?: string; + } + interface NetworksAddPeeringRequest { + /** Whether Google Compute Engine manages the routes automatically. */ + autoCreateRoutes?: boolean; + /** Name of the peering, which should conform to RFC1035. */ + name?: string; + /** + * URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not + * contain project, it is assumed that the peer network is in the same project as the current network. + */ + peerNetwork?: string; + } + interface NetworksRemovePeeringRequest { + /** Name of the peering, which should conform to RFC1035. */ + name?: string; + } + interface Operation { + /** [Output Only] Reserved for future use. */ + clientOperationId?: string; + /** [Deprecated] This field is deprecated. */ + creationTimestamp?: string; + /** [Output Only] A textual description of the operation, which is set when the operation is created. */ + description?: string; + /** [Output Only] The time that this operation was completed. This value is in RFC3339 text format. */ + endTime?: string; + /** [Output Only] If errors are generated during processing of the operation, this field will be populated. */ + error?: { + /** [Output Only] The array of errors encountered while processing this operation. */ + errors?: Array<{ + /** [Output Only] The error type identifier for this error. */ + code?: string; + /** [Output Only] Indicates the field in the request that caused the error. This property is optional. */ + location?: string; + /** [Output Only] An optional, human-readable error message. */ + message?: string; + }>; + }; + /** [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. */ + httpErrorMessage?: string; + /** + * [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not + * found. + */ + httpErrorStatusCode?: number; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] The time that this operation was requested. This value is in RFC3339 text format. */ + insertTime?: string; + /** [Output Only] Type of the resource. Always compute#operation for Operation resources. */ + kind?: string; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] The type of operation, such as insert, update, or delete, and so on. */ + operationType?: string; + /** + * [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of + * operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation + * progresses. + */ + progress?: number; + /** [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. */ + startTime?: string; + /** [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. */ + status?: string; + /** [Output Only] An optional textual description of the current status of the operation. */ + statusMessage?: string; + /** [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. */ + targetId?: string; + /** + * [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk + * that the snapshot was created from. + */ + targetLink?: string; + /** [Output Only] User who requested the operation, for example: user@example.com. */ + user?: string; + /** [Output Only] If warning messages are generated during processing of the operation, this field will be populated. */ + warnings?: Array<{ + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }>; + /** [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. */ + zone?: string; + } + interface OperationAggregatedList { + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] A map of scoped operation lists. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#operationAggregatedList for aggregated lists of operations. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface OperationList { + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] A list of Operation resources. */ + items?: Operation[]; + /** [Output Only] Type of resource. Always compute#operations for Operations resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface OperationsScopedList { + /** [Output Only] List of operations contained in this scope. */ + operations?: Operation[]; + /** [Output Only] Informational warning which replaces the list of operations when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface PathMatcher { + /** + * The full or partial URL to the BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's + * path portion. For example, the following are all valid URLs to a BackendService resource: + * - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService + * - compute/v1/projects/project/global/backendServices/backendService + * - global/backendServices/backendService + */ + defaultService?: string; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** The name to which this PathMatcher is referred by the HostRule. */ + name?: string; + /** The list of path rules. */ + pathRules?: PathRule[]; + } + interface PathRule { + /** + * The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path + * matcher does not include any text after the first ? or #, and those chars are not allowed here. + */ + paths?: string[]; + /** The URL of the BackendService resource if this rule is matched. */ + service?: string; + } + interface Project { + /** Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information. */ + commonInstanceMetadata?: Metadata; + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] Default service account used by VMs running in this project. */ + defaultServiceAccount?: string; + /** An optional textual description of the resource. */ + description?: string; + /** Restricted features enabled for use on this project. */ + enabledFeatures?: string[]; + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID + * used by Compute Engine to identify resources. + */ + id?: string; + /** [Output Only] Type of the resource. Always compute#project for projects. */ + kind?: string; + /** The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine. */ + name?: string; + /** [Output Only] Quotas assigned to this project. */ + quotas?: Quota[]; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored. */ + usageExportLocation?: UsageExportLocation; + /** [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated. */ + xpnProjectStatus?: string; + } + interface ProjectsDisableXpnResourceRequest { + /** Service resource (a.k.a service project) ID. */ + xpnResource?: XpnResourceId; + } + interface ProjectsEnableXpnResourceRequest { + /** Service resource (a.k.a service project) ID. */ + xpnResource?: XpnResourceId; + } + interface ProjectsGetXpnResources { + /** [Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects) */ + 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; + /** Service resources (a.k.a service projects) attached to this project as their shared VPC host. */ + resources?: XpnResourceId[]; + } + interface ProjectsListXpnHostsRequest { + /** + * Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be + * inferred from the project. + */ + organization?: string; + } + interface Quota { + /** [Output Only] Quota limit for this metric. */ + limit?: number; + /** [Output Only] Name of the quota metric. */ + metric?: string; + /** [Output Only] Current usage of this metric. */ + usage?: number; + } + interface Region { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] The deprecation status associated with this region. */ + deprecated?: DeprecationStatus; + /** [Output Only] Textual description of 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 the resource. Always compute#region for regions. */ + kind?: string; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] Quotas assigned to this region. */ + quotas?: Quota[]; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] Status of the region, either UP or DOWN. */ + status?: string; + /** [Output Only] A list of zones available in this region, in the form of resource URLs. */ + zones?: string[]; + } + interface RegionAutoscalerList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Autoscaler resources. */ + items?: Autoscaler[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface RegionInstanceGroupList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceGroup resources. */ + items?: InstanceGroup[]; + /** The resource type. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface RegionInstanceGroupManagerList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceGroupManager resources. */ + items?: InstanceGroupManager[]; + /** + * [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups that exist in th regional + * scope. + */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface RegionInstanceGroupManagersAbandonInstancesRequest { + /** The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. */ + instances?: string[]; + } + interface RegionInstanceGroupManagersDeleteInstancesRequest { + /** The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. */ + instances?: string[]; + } + interface RegionInstanceGroupManagersListInstancesResponse { + /** List of managed instances. */ + managedInstances?: ManagedInstance[]; + } + interface RegionInstanceGroupManagersRecreateRequest { + /** The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. */ + instances?: string[]; + } + interface RegionInstanceGroupManagersSetTargetPoolsRequest { + /** + * Fingerprint of the target pools information, which is a hash of the contents. This field is used for optimistic locking when you update the target pool + * entries. This field is optional. + */ + fingerprint?: string; + /** + * The URL of all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the + * instances in the managed instance group. + */ + targetPools?: string[]; + } + interface RegionInstanceGroupManagersSetTemplateRequest { + /** URL of the InstanceTemplate resource from which all new instances will be created. */ + instanceTemplate?: string; + } + interface RegionInstanceGroupsListInstances { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of InstanceWithNamedPorts resources. */ + items?: InstanceWithNamedPorts[]; + /** The resource type. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface RegionInstanceGroupsListInstancesRequest { + /** Instances in which state should be returned. Valid options are: 'ALL', 'RUNNING'. By default, it lists all instances. */ + instanceState?: string; + /** + * Name of port user is interested in. It is optional. If it is set, only information about this ports will be returned. If it is not set, all the named + * ports will be returned. Always lists all instances. + */ + portName?: string; + } + interface RegionInstanceGroupsSetNamedPortsRequest { + /** + * The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the + * named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure + * that you do not overwrite changes that were applied from another concurrent request. + */ + fingerprint?: string; + /** The list of named ports to set for this instance group. */ + namedPorts?: NamedPort[]; + } + interface RegionList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Region resources. */ + items?: Region[]; + /** [Output Only] Type of resource. Always compute#regionList for lists of regions. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface ResourceCommitment { + /** + * The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be + * provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU. + */ + amount?: string; + /** Type of resource for which this commitment applies. Possible values are VCPU and MEMORY */ + type?: string; + } + interface ResourceGroupReference { + /** A URI referencing one of the instance groups listed in the backend service. */ + group?: string; + } + interface Route { + /** [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; + /** The destination range of outgoing packets that this route applies to. Only IPv4 is supported. */ + destRange?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of this resource. Always compute#routes for Route resources. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** Fully-qualified URL of the network that this route applies to. */ + network?: string; + /** + * The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: + * projects//global/gateways/default-internet-gateway + */ + nextHopGateway?: string; + /** + * The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: + * https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ + */ + nextHopInstance?: string; + /** The network IP address of an instance that should handle matching packets. Only IPv4 is supported. */ + nextHopIp?: string; + /** The URL of the local network if it should handle matching packets. */ + nextHopNetwork?: string; + /** [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. */ + nextHopPeering?: string; + /** The URL to a VpnTunnel that should handle matching packets. */ + nextHopVpnTunnel?: string; + /** + * The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of + * two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. + */ + priority?: number; + /** [Output Only] Server-defined fully-qualified URL for this resource. */ + selfLink?: string; + /** A list of instance tags to which this route applies. */ + tags?: string[]; + /** [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. */ + warnings?: Array<{ + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }>; + } + interface RouteList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Route resources. */ + items?: Route[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface Router { + /** BGP information specific to this router. */ + bgp?: RouterBgp; + /** + * BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, + * IP, or peer IP. Please refer to RFC4273. + */ + bgpPeers?: RouterBgpPeer[]; + /** [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; + /** + * Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or + * both. + */ + interfaces?: RouterInterface[]; + /** [Output Only] Type of resource. Always compute#router for routers. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** URI of the network to which this router belongs. */ + network?: string; + /** [Output Only] URI of the region where the router resides. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + } + interface RouterAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Router resources. */ + items?: Record; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface RouterBgp { + /** + * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. + * All VPN tunnels that link to this router will have the same local ASN. + */ + asn?: number; + } + interface RouterBgpPeer { + /** + * 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 lowest + * priority value win. + */ + advertisedRoutePriority?: number; + /** Name of the interface the BGP peer is associated with. */ + interfaceName?: string; + /** IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. */ + ipAddress?: string; + /** Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035. */ + name?: string; + /** Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel. */ + peerAsn?: number; + /** IP address of the BGP interface outside Google cloud. Only IPv4 is supported. */ + peerIpAddress?: string; + } + interface RouterInterface { + /** + * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: + * 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface. + */ + ipRange?: string; + /** + * URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a + * VPN Tunnel or an interconnect attachment. + */ + linkedVpnTunnel?: string; + /** Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035. */ + name?: string; + } + interface RouterList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Router resources. */ + items?: Router[]; + /** [Output Only] Type of resource. Always compute#router for routers. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface RouterStatus { + /** Best routes for this router's network. */ + bestRoutes?: Route[]; + /** Best routes learned by this router. */ + bestRoutesForRouter?: Route[]; + bgpPeerStatus?: RouterStatusBgpPeerStatus[]; + /** URI of the network to which this router belongs. */ + network?: string; + } + interface RouterStatusBgpPeerStatus { + /** Routes that were advertised to the remote BGP peer */ + advertisedRoutes?: Route[]; + /** IP address of the local BGP interface. */ + ipAddress?: string; + /** URL of the VPN tunnel that this BGP peer controls. */ + linkedVpnTunnel?: string; + /** Name of this BGP peer. Unique within the Routers resource. */ + name?: string; + /** Number of routes learned from the remote BGP Peer. */ + numLearnedRoutes?: number; + /** IP address of the remote BGP interface. */ + peerIpAddress?: string; + /** BGP state as specified in RFC1771. */ + state?: string; + /** Status of the BGP peer: {UP, DOWN} */ + status?: string; + /** Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds */ + uptime?: string; + /** Time this session has been up, in seconds. Format: 145 */ + uptimeSeconds?: string; + } + interface RouterStatusResponse { + /** Type of resource. */ + kind?: string; + result?: RouterStatus; + } + interface RoutersPreviewResponse { + /** Preview of given router. */ + resource?: Router; + } + interface RoutersScopedList { + /** List of routers contained in this scope. */ + routers?: Router[]; + /** Informational warning which replaces the list of routers when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface SSLHealthCheck { + /** The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535. */ + port?: number; + /** Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. */ + portName?: string; + /** Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. */ + proxyHeader?: string; + /** + * The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the + * connection establishment alone will indicate health. The request data can only be ASCII. + */ + request?: string; + /** + * The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data + * can only be ASCII. + */ + response?: string; + } + interface Scheduling { + /** + * Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the + * automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. + * + * By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine. + */ + automaticRestart?: boolean; + /** + * Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and + * only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. + */ + onHostMaintenance?: string; + /** + * Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been + * created. + */ + preemptible?: boolean; + } + interface SerialPortOutput { + /** [Output Only] The contents of the console output. */ + contents?: string; + /** [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output. */ + kind?: string; + /** [Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter. */ + next?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** + * The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output + * exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched. + */ + start?: string; + } + interface ServiceAccount { + /** Email address of the service account. */ + email?: string; + /** The list of scopes to be made available for this service account. */ + scopes?: string[]; + } + interface Snapshot { + /** [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] Size of the snapshot, specified in GB. */ + diskSizeGb?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources. */ + kind?: string; + /** + * A fingerprint for the labels being applied to this snapshot, 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 a snapshot. + */ + labelFingerprint?: string; + /** Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. */ + labels?: Record; + /** + * [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a + * Windows image). + */ + licenses?: string[]; + /** + * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * Encrypts the snapshot using a customer-supplied encryption key. + * + * After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the + * encryption key when you create a disk from the encrypted snapshot in a future request. + * + * Customer-supplied encryption keys do not protect access to metadata of the disk. + * + * If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do + * not need to provide a key to use the snapshot later. + */ + snapshotEncryptionKey?: CustomerEncryptionKey; + /** [Output Only] The source disk used to create this snapshot. */ + sourceDisk?: string; + /** The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. */ + sourceDiskEncryptionKey?: CustomerEncryptionKey; + /** + * [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the + * current or a previous instance of a given disk name. + */ + sourceDiskId?: string; + /** [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. */ + status?: string; + /** + * [Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot + * creation/deletion. + */ + storageBytes?: string; + /** + * [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status + * can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. + */ + storageBytesStatus?: string; + } + interface SnapshotList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Snapshot resources. */ + items?: Snapshot[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface SslCertificate { + /** + * A local certificate file. The certificate must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at + * least one intermediate cert. + */ + certificate?: string; + /** [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 the resource. Always compute#sslCertificate for SSL certificates. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** A write-only private key in PEM format. Only insert requests will include this field. */ + privateKey?: string; + /** [Output only] Server-defined URL for the resource. */ + selfLink?: string; + } + interface SslCertificateList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of SslCertificate resources. */ + items?: SslCertificate[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface Subnetwork { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. */ + description?: string; + /** + * [Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. This field can be set only at resource + * creation time. + */ + gatewayAddress?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** + * The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or + * 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation + * time. + */ + ipCidrRange?: string; + /** [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. */ + kind?: string; + /** + * The name of the resource, provided by the client when initially creating the resource. 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; + /** + * The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the + * distributed mode can have subnetworks. This field can be set only at resource creation time. + */ + network?: string; + /** + * Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time + * and updated using setPrivateIpGoogleAccess. + */ + privateIpGoogleAccess?: boolean; + /** URL of the region where the Subnetwork resides. This field can be set only at resource creation time. */ + region?: string; + /** + * An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary + * ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. + */ + secondaryIpRanges?: SubnetworkSecondaryRange[]; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + } + interface SubnetworkAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of SubnetworksScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#subnetworkAggregatedList for aggregated lists of subnetworks. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface SubnetworkList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Subnetwork resources. */ + items?: Subnetwork[]; + /** [Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface SubnetworkSecondaryRange { + /** + * The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and + * non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. + */ + ipCidrRange?: string; + /** + * The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, + * and comply with RFC1035. The name must be unique within the subnetwork. + */ + rangeName?: string; + } + interface SubnetworksExpandIpCidrRangeRequest { + /** + * The IP (in CIDR format or netmask) of internal addresses that are legal on this Subnetwork. This range should be disjoint from other subnetworks within + * this network. This range can only be larger than (i.e. a superset of) the range previously defined before the update. + */ + ipCidrRange?: string; + } + interface SubnetworksScopedList { + /** List of subnetworks contained in this scope. */ + subnetworks?: Subnetwork[]; + /** An informational warning that appears when the list of addresses is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface SubnetworksSetPrivateIpGoogleAccessRequest { + privateIpGoogleAccess?: boolean; + } + interface TCPHealthCheck { + /** The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535. */ + port?: number; + /** Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. */ + portName?: string; + /** Specifies 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 application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the + * connection establishment alone will indicate health. The request data can only be ASCII. + */ + request?: string; + /** + * The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data + * can only be ASCII. + */ + response?: string; + } + interface Tags { + /** + * Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is + * initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint + * hash in order to update or change metadata. + * + * To see the latest fingerprint, make get() request to the instance. + */ + fingerprint?: string; + /** An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. */ + items?: string[]; + } + interface TargetHttpProxy { + /** [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#targetHttpProxy for target HTTP proxies. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** URL to the UrlMap resource that defines the mapping from URL to the BackendService. */ + urlMap?: string; + } + interface TargetHttpProxyList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetHttpProxy resources. */ + items?: TargetHttpProxy[]; + /** Type of resource. Always compute#targetHttpProxyList for lists of target HTTP proxies. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetHttpsProxiesSetSslCertificatesRequest { + /** New set of SslCertificate resources to associate with this TargetHttpsProxy resource. Currently exactly one SslCertificate resource must be specified. */ + sslCertificates?: string[]; + } + interface TargetHttpsProxy { + /** [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#targetHttpsProxy for target HTTPS proxies. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate + * must be specified. + */ + sslCertificates?: string[]; + /** + * A fully-qualified or valid partial URL to the UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are + * all valid URLs for specifying a URL map: + * - https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map + * - projects/project/global/urlMaps/url-map + * - global/urlMaps/url-map + */ + urlMap?: string; + } + interface TargetHttpsProxyList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetHttpsProxy resources. */ + items?: TargetHttpsProxy[]; + /** Type of resource. Always compute#targetHttpsProxyList for lists of target HTTPS proxies. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetInstance { + /** [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; + /** + * A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the + * fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: + * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + * - projects/project/zones/zone/instances/instance + * - zones/zone/instances/instance + */ + instance?: string; + /** [Output Only] The type of the resource. Always compute#targetInstance for target instances. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported. */ + natPolicy?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] URL of the zone where the target instance resides. */ + zone?: string; + } + interface TargetInstanceAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetInstance resources. */ + items?: Record; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetInstanceList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetInstance resources. */ + items?: TargetInstance[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetInstancesScopedList { + /** List of target instances contained in this scope. */ + targetInstances?: TargetInstance[]; + /** Informational warning which replaces the list of addresses when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetPool { + /** + * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly + * set to a value between [0, 1]. + * + * backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary + * pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. + * + * In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the + * primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is + * healthy. + */ + backupPool?: string; + /** [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; + /** + * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some + * other target pool). The value of the field must be in [0, 1]. + * + * If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in + * the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. + * + * In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in + * the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. + */ + failoverRatio?: number; + /** + * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list + * means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified. + */ + healthChecks?: string[]; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. */ + instances?: string[]; + /** [Output Only] Type of the resource. Always compute#targetPool for target pools. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** [Output Only] URL of the region where the target pool resides. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * Sesssion affinity option, must be one of the following values: + * NONE: Connections from the same client IP may go to any instance in the pool. + * CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. + * CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains + * healthy. + */ + sessionAffinity?: string; + } + interface TargetPoolAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetPool resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#targetPoolAggregatedList for aggregated lists of target pools. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetPoolInstanceHealth { + healthStatus?: HealthStatus[]; + /** [Output Only] Type of resource. Always compute#targetPoolInstanceHealth when checking the health of an instance. */ + kind?: string; + } + interface TargetPoolList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetPool resources. */ + items?: TargetPool[]; + /** [Output Only] Type of resource. Always compute#targetPoolList for lists of target pools. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetPoolsAddHealthCheckRequest { + /** The HttpHealthCheck to add to the target pool. */ + healthChecks?: HealthCheckReference[]; + } + interface TargetPoolsAddInstanceRequest { + /** + * A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are valid URLs: + * - https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name + * - projects/project-id/zones/zone/instances/instance-name + * - zones/zone/instances/instance-name + */ + instances?: InstanceReference[]; + } + interface TargetPoolsRemoveHealthCheckRequest { + /** + * Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs: + * - https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check + * - projects/project/global/httpHealthChecks/health-check + * - global/httpHealthChecks/health-check + */ + healthChecks?: HealthCheckReference[]; + } + interface TargetPoolsRemoveInstanceRequest { + /** URLs of the instances to be removed from target pool. */ + instances?: InstanceReference[]; + } + interface TargetPoolsScopedList { + /** List of target pools contained in this scope. */ + targetPools?: TargetPool[]; + /** Informational warning which replaces the list of addresses when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetReference { + target?: string; + } + interface TargetSslProxiesSetBackendServiceRequest { + /** The URL of the new BackendService resource for the targetSslProxy. */ + service?: string; + } + interface TargetSslProxiesSetProxyHeaderRequest { + /** The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed. */ + proxyHeader?: string; + } + interface TargetSslProxiesSetSslCertificatesRequest { + /** New set of URLs to SslCertificate resources to associate with this TargetSslProxy. Currently exactly one ssl certificate must be specified. */ + sslCertificates?: string[]; + } + interface TargetSslProxy { + /** [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 the resource. Always compute#targetSslProxy for target SSL proxies. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: 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; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** URL to the BackendService resource. */ + service?: string; + /** URLs to SslCertificate resources that are used to authenticate connections to Backends. Currently exactly one SSL certificate must be specified. */ + sslCertificates?: string[]; + } + interface TargetSslProxyList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetSslProxy resources. */ + items?: TargetSslProxy[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetTcpProxiesSetBackendServiceRequest { + /** The URL of the new BackendService resource for the targetTcpProxy. */ + service?: string; + } + interface TargetTcpProxiesSetProxyHeaderRequest { + /** The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed. */ + proxyHeader?: string; + } + interface TargetTcpProxy { + /** [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 the resource. Always compute#targetTcpProxy for target TCP proxies. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: 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; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** URL to the BackendService resource. */ + service?: string; + } + interface TargetTcpProxyList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetTcpProxy resources. */ + items?: TargetTcpProxy[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetVpnGateway { + /** [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] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated to a VPN + * gateway. + */ + forwardingRules?: 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#targetVpnGateway for target VPN gateways. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created. */ + network?: string; + /** [Output Only] URL of the region where the target VPN gateway resides. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] The status of the VPN gateway. */ + status?: string; + /** [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert method and associated to a VPN gateway. */ + tunnels?: string[]; + } + interface TargetVpnGatewayAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetVpnGateway resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#targetVpnGateway for target 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetVpnGatewayList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of TargetVpnGateway resources. */ + items?: TargetVpnGateway[]; + /** [Output Only] Type of resource. Always compute#targetVpnGateway for target 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TargetVpnGatewaysScopedList { + /** [Output Only] List of target vpn gateways contained in this scope. */ + targetVpnGateways?: TargetVpnGateway[]; + /** [Output Only] Informational warning which replaces the list of addresses when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface TestFailure { + actualService?: string; + expectedService?: string; + host?: string; + path?: string; + } + interface UrlMap { + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** The URL of the BackendService resource if none of the hostRules match. */ + defaultService?: string; + /** An optional description of this resource. Provide this property when you create the resource. */ + description?: string; + /** + * Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when + * inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap. + */ + fingerprint?: string; + /** The list of HostRules to use against the URL. */ + hostRules?: HostRule[]; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] Type of the resource. Always compute#urlMaps for url maps. */ + kind?: string; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** The list of named PathMatchers to use against the URL. */ + pathMatchers?: PathMatcher[]; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass. */ + tests?: UrlMapTest[]; + } + interface UrlMapList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of UrlMap resources. */ + items?: UrlMap[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface UrlMapReference { + urlMap?: string; + } + interface UrlMapTest { + /** Description of this test case. */ + description?: string; + /** Host portion of the URL. */ + host?: string; + /** Path portion of the URL. */ + path?: string; + /** Expected BackendService resource the given URL should be mapped to. */ + service?: string; + } + interface UrlMapValidationResult { + loadErrors?: string[]; + /** Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons. */ + loadSucceeded?: boolean; + testFailures?: TestFailure[]; + /** If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure. */ + testPassed?: boolean; + } + interface UrlMapsValidateRequest { + /** Content of the UrlMap to be validated. */ + resource?: UrlMap; + } + interface UrlMapsValidateResponse { + result?: UrlMapValidationResult; + } + interface UsageExportLocation { + /** + * The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this + * bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front + * of it, such as gs://example-bucket. + */ + bucketName?: string; + /** + * An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file + * named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform + * to Cloud Storage object naming conventions. + */ + reportNamePrefix?: string; + } + interface VpnTunnel { + /** [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] Detailed status message for the VPN tunnel. */ + detailedStatus?: string; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2. */ + ikeVersion?: number; + /** [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. */ + kind?: string; + /** + * Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: + * 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported. + */ + localTrafficSelector?: string[]; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** IP address of the peer VPN gateway. Only IPv4 is supported. */ + peerIp?: string; + /** [Output Only] URL of the region where the VPN tunnel resides. */ + region?: string; + /** + * Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: + * 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported. + */ + remoteTrafficSelector?: string[]; + /** URL of router resource to be used for dynamic routing. */ + router?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. */ + sharedSecret?: string; + /** Hash of the shared secret. */ + sharedSecretHash?: string; + /** [Output Only] The status of the VPN tunnel. */ + status?: string; + /** URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. */ + targetVpnGateway?: string; + } + interface VpnTunnelAggregatedList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of VpnTunnelsScopedList resources. */ + items?: Record; + /** [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface VpnTunnelList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of VpnTunnel resources. */ + items?: VpnTunnel[]; + /** [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface VpnTunnelsScopedList { + /** List of vpn tunnels contained in this scope. */ + vpnTunnels?: VpnTunnel[]; + /** Informational warning which replaces the list of addresses when the list is empty. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface XpnHostList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** [Output Only] A list of shared VPC host project URLs. */ + items?: Project[]; + /** [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts. */ + 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?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface XpnResourceId { + /** The ID of the service resource. In the case of projects, this field matches the project ID (e.g., my-project), not the project number (e.g., 12345678). */ + id?: string; + /** The type of the service resource. */ + type?: string; + } + interface Zone { + /** [Output Only] Available cpu/platform selections for the zone. */ + availableCpuPlatforms?: string[]; + /** [Output Only] Creation timestamp in RFC3339 text format. */ + creationTimestamp?: string; + /** [Output Only] The deprecation status associated with this zone. */ + deprecated?: DeprecationStatus; + /** [Output Only] Textual description of 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 the resource. Always compute#zone for zones. */ + kind?: string; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] Full URL reference to the region which hosts the zone. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] Status of the zone, either UP or DOWN. */ + status?: string; + } + interface ZoneList { + /** [Output Only] Unique identifier for the resource; defined by the server. */ + id?: string; + /** A list of Zone resources. */ + items?: Zone[]; + /** Type of resource. */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the + * nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to + * continue paging through the results. + */ + nextPageToken?: string; + /** [Output Only] Server-defined URL for this resource. */ + selfLink?: string; + /** [Output Only] Informational warning message. */ + warning?: { + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }; + } + interface ZoneSetLabelsRequest { + /** + * 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?: Record; + } + interface AcceleratorTypesResource { + /** Retrieves an aggregated list of accelerator types. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified accelerator type. Get a list of available accelerator types by making a list() request. */ + get(request: { + /** Name of the accelerator type to return. */ + acceleratorType: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves a list of accelerator types available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + } + interface AddressesResource { + /** Retrieves an aggregated list of addresses. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified address resource. */ + delete(request: { + /** Name of the address resource to delete. */ + address: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified address resource. */ + get(request: { + /** Name of the address resource to return. */ + address: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** Creates an address resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of addresses contained within the specified region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AutoscalersResource { + /** Retrieves an aggregated list of autoscalers. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified autoscaler. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to delete. */ + autoscaler: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to return. */ + autoscaler: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** Creates an autoscaler in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves a list of autoscalers contained within the specified zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** + * Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge + * patch format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to patch. */ + autoscaler?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** Updates an autoscaler in the specified project using the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to update. */ + autoscaler?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + } + interface BackendBucketsResource { + /** Deletes the specified BackendBucket resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendBucket resource to delete. */ + backendBucket: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendBucket resource to return. */ + backendBucket: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a BackendBucket resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of BackendBucket resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch + * format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendBucket resource to patch. */ + backendBucket: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the specified BackendBucket resource with the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendBucket resource to update. */ + backendBucket: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface BackendServicesResource { + /** Retrieves the list of all BackendService resources, regional and global, available to the specified project. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Name of the project scoping this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified BackendService resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to delete. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified BackendService resource. Get a list of available backend services by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to return. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the most recent health check results for this BackendService. */ + getHealth(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to which the queried instance belongs. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to + * keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of BackendService resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when + * updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch + * format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to patch. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when + * updating a backend service. Read Restrictions and Guidelines for more information. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to update. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DiskTypesResource { + /** Retrieves an aggregated list of disk types. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified disk type. Get a list of available disk types by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the disk type to return. */ + diskType: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves a list of disk types available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + } + interface DisksResource { + /** Retrieves an aggregated list of persistent disks. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a snapshot of a specified persistent disk. */ + createSnapshot(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the persistent disk to snapshot. */ + disk: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + guestFlush?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** + * Deletes the specified persistent disk. Deleting a disk removes 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. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the persistent disk to delete. */ + disk: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Returns a specified persistent disk. Get a list of available persistent disks by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the persistent disk to return. */ + disk: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** + * Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create + * an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb + * property. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves a list of persistent disks contained within the specified zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Resizes the specified persistent disk. */ + resize(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the persistent disk. */ + disk: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. */ + setLabels(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + } + interface FirewallsResource { + /** Deletes the specified firewall. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the firewall rule to delete. */ + firewall: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified firewall. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the firewall rule to return. */ + firewall: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a firewall rule in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of firewall rules available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format + * and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the firewall rule to patch. */ + firewall: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: + * allowed, description, sourceRanges, sourceTags, targetTags. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the firewall rule to update. */ + firewall: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ForwardingRulesResource { + /** Retrieves an aggregated list of forwarding rules. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified ForwardingRule resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the ForwardingRule resource to delete. */ + forwardingRule: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified ForwardingRule resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the ForwardingRule resource to return. */ + forwardingRule: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a ForwardingRule resource in the specified project and region using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of ForwardingRule resources available to the specified project and region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes target URL for forwarding rule. The new target should be of the same type as the old target. */ + setTarget(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the ForwardingRule resource in which target is to be set. */ + forwardingRule: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface GlobalAddressesResource { + /** Deletes the specified address resource. */ + delete(request: { + /** Name of the address resource to delete. */ + address: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified address resource. Get a list of available addresses by making a list() request. */ + get(request: { + /** Name of the address resource to return. */ + address: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** Creates an address resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of global addresses. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface GlobalForwardingRulesResource { + /** Deletes the specified GlobalForwardingRule resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the ForwardingRule resource to delete. */ + forwardingRule: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the ForwardingRule resource to return. */ + forwardingRule: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a GlobalForwardingRule resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of GlobalForwardingRule resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. */ + setTarget(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the ForwardingRule resource in which target is to be set. */ + forwardingRule: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface GlobalOperationsResource { + /** Retrieves an aggregated list of all operations. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified Operations resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to delete. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the specified Operations resource. Get a list of operations by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to return. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of Operation resources contained within the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface HealthChecksResource { + /** Deletes the specified HealthCheck resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HealthCheck resource to delete. */ + healthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HealthCheck resource to return. */ + healthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a HealthCheck resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of HealthCheck resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON + * merge patch format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HealthCheck resource to patch. */ + healthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a HealthCheck resource in the specified project using the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HealthCheck resource to update. */ + healthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface HttpHealthChecksResource { + /** Deletes the specified HttpHealthCheck resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpHealthCheck resource to delete. */ + httpHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpHealthCheck resource to return. */ + httpHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a HttpHealthCheck resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of HttpHealthCheck resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the + * JSON merge patch format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpHealthCheck resource to patch. */ + httpHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a HttpHealthCheck resource in the specified project using the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpHealthCheck resource to update. */ + httpHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface HttpsHealthChecksResource { + /** Deletes the specified HttpsHealthCheck resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpsHealthCheck resource to delete. */ + httpsHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpsHealthCheck resource to return. */ + httpsHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a HttpsHealthCheck resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of HttpsHealthCheck resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the + * JSON merge patch format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpsHealthCheck resource to patch. */ + httpsHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a HttpsHealthCheck resource in the specified project using the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the HttpsHealthCheck resource to update. */ + httpsHealthCheck: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ImagesResource { + /** Deletes the specified image. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the image resource to delete. */ + image: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Sets the deprecation status of an image. + * + * If an empty request body is given, clears the deprecation status instead. + */ + deprecate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Image name. */ + image: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified image. Get a list of available images by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the image resource to return. */ + image: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the latest image that is part of an image family and is not deprecated. */ + getFromFamily(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the image family to search for. */ + family: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates an image in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Force image creation if true. */ + forceCreate?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method + * does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of + * publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. */ + setLabels(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface InstanceGroupManagersResource { + /** + * Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it + * does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed + * instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have + * not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + abandonInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** Retrieves the list of managed instance groups and groups them by zone. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. + * Read Deleting an instance group for more information. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group to delete. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** + * Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which + * they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is + * marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action + * with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + deleteInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** + * Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create + * instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the + * group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. + * + * A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where you want to create the managed instance group. */ + zone: string; + }): Request; + /** Retrieves a list of managed instance groups that are contained within the specified project and zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** + * Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed + * instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous + * action failed, the list displays the errors for that failed action. + */ + listManagedInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + filter?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + order_by?: string; + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** + * Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current + * instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been + * recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + recreateInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** + * Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the + * size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or + * deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + */ + resize(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to + * maintain the number of instances specified by this parameter. + */ + size: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** + * Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change + * unless you recreate them. + */ + setInstanceTemplate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + /** + * Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the + * instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their + * target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. + */ + setTargetPools(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the managed instance group is located. */ + zone: string; + }): Request; + } + interface InstanceGroupsResource { + /** + * Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read + * Adding instances for more information. + */ + addInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the instance group where you are adding instances. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the instance group is located. */ + zone: string; + }): Request; + /** Retrieves the list of instance groups and sorts them by zone. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read + * Deleting an instance group for more information. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the instance group to delete. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the instance group is located. */ + zone: string; + }): Request; + /** Returns the specified instance group. Get a list of available instance groups by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the instance group. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the instance group is located. */ + zone: string; + }): Request; + /** Creates an instance group in the specified project using the parameters that are included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where you want to create the instance group. */ + zone: string; + }): Request; + /** Retrieves the list of instance groups that are located in the specified project and zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the instance group is located. */ + zone: string; + }): Request; + /** Lists the instances in the specified instance group. */ + listInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** The name of the instance group from which you want to generate a list of included instances. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the instance group is located. */ + zone: string; + }): Request; + /** + * Removes one or more instances from the specified instance group, but does not delete those instances. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration + * before the VM instance is removed or deleted. + */ + removeInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the instance group where the specified instances will be removed. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the instance group is located. */ + zone: string; + }): Request; + /** Sets the named ports for the specified instance group. */ + setNamedPorts(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the instance group where the named ports are updated. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone where the instance group is located. */ + zone: string; + }): Request; + } + interface InstanceTemplatesResource { + /** + * Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group + * will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the instance template to delete. */ + instanceTemplate: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified instance template. Get a list of available instance templates by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the instance template. */ + instanceTemplate: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an + * existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of instance templates that are contained within the specified project and zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface InstancesResource { + /** Adds an access config to an instance's network interface. */ + addAccessConfig(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The instance name for this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the network interface to add to this instance. */ + networkInterface: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves aggregated list of instances. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a + * disk at the same time. For more information, read Adding a persistent disk to your instance. + */ + attachDisk(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The instance name for this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance resource to delete. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Deletes an access config from an instance's network interface. */ + deleteAccessConfig(request: { + /** The name of the access config to delete. */ + accessConfig: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The instance name for this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the network interface. */ + networkInterface: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Detaches a disk from an instance. */ + detachDisk(request: { + /** Data format for the response. */ + alt?: string; + /** Disk device name to detach. */ + deviceName: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Instance name. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Returns the specified Instance resource. Get a list of available instances by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance resource to return. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Returns the specified instance's serial port output. */ + getSerialPortOutput(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Specifies which COM or serial port to retrieve data from. */ + port?: number; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For + * the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call. + */ + start?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Creates an instance resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves the list of instances contained within the specified zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Performs a reset on the instance. For more information, see Resetting an instance. */ + reset(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Sets the auto-delete flag for a disk attached to an instance. */ + setDiskAutoDelete(request: { + /** Data format for the response. */ + alt?: string; + /** Whether to auto-delete the disk when the instance is deleted. */ + autoDelete: boolean; + /** The device name of the disk to modify. */ + deviceName: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The instance name. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. */ + setLabels(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. */ + setMachineResources(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Changes the machine type for a stopped instance to the machine type specified in the request. */ + setMachineType(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Sets metadata for the specified instance to the data included in the request. */ + setMetadata(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** + * Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read + * Specifying a Minimum CPU Platform. + */ + setMinCpuPlatform(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Sets an instance's scheduling options. */ + setScheduling(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Instance name. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. */ + setServiceAccount(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance resource to start. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Sets tags for the specified instance to the data included in the request. */ + setTags(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance scoping this request. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. */ + start(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance resource to start. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. */ + startWithEncryptionKey(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance resource to start. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** + * Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, + * virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP + * addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. + */ + stop(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance resource to stop. */ + instance: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + } + interface LicensesResource { + /** Returns the specified License resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the License resource to return. */ + license: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MachineTypesResource { + /** Retrieves an aggregated list of machine types. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified machine type. Get a list of available machine types by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the machine type to return. */ + machineType: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves a list of machine types available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The name of the zone for this request. */ + zone: string; + }): Request; + } + interface NetworksResource { + /** Adds a peering to the specified network. */ + addPeering(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the network resource to add peering to. */ + network: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified network. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the network to delete. */ + network: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified network. Get a list of available networks by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the network to return. */ + network: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a network in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of networks available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Patches the specified network with the data included in the request. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the network to update. */ + network: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Removes a peering from the specified network. */ + removePeering(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the network resource to remove peering from. */ + network: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Switches the network mode from auto subnet mode to custom subnet mode. */ + switchToCustomMode(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Name of the network to be updated. */ + network: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProjectsResource { + /** Disable this project as a shared VPC host project. */ + disableXpnHost(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Disable a serivce resource (a.k.a service project) associated with this host project. */ + disableXpnResource(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Enable this project as a shared VPC host project. */ + enableXpnHost(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service + * project. + */ + enableXpnResource(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified Project resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get the shared VPC host project that this project links to. May be empty if no link exists. */ + getXpnHost(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Get service resources (a.k.a service project) associated with this host project. */ + getXpnResources(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + order_by?: string; + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** List all shared VPC host projects visible to the user in an organization. */ + listXpnHosts(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + order_by?: string; + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Moves a persistent disk from one zone to another. */ + moveDisk(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Moves an instance and its attached persistent disks from one zone to another. */ + moveInstance(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets metadata common to all instances within the specified project using the data included in the request. */ + setCommonInstanceMetadata(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the + * usage export feature will be disabled. + */ + setUsageExportBucket(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionAutoscalersResource { + /** Deletes the specified autoscaler. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to delete. */ + autoscaler: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified autoscaler. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to return. */ + autoscaler: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates an autoscaler in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of autoscalers contained within the specified region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge + * patch format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to patch. */ + autoscaler?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an autoscaler in the specified project using the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the autoscaler to update. */ + autoscaler?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionBackendServicesResource { + /** Deletes the specified regional BackendService resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to delete. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified regional BackendService resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to return. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the most recent health check results for this regional BackendService. */ + getHealth(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to which the queried instance belongs. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and + * guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of regional BackendService resources available to the specified project in the given region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in + * mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON + * merge patch format and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to patch. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in + * mind when updating a backend service. Read Restrictions and Guidelines for more information. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the BackendService resource to update. */ + backendService: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionCommitmentsResource { + /** Retrieves an aggregated list of commitments. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified commitment resource. Get a list of available commitments by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name of the commitment to return. */ + commitment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a commitment in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of commitments contained within the specified region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionInstanceGroupManagersResource { + /** + * Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it + * does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed + * instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have + * not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + abandonInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified managed instance group and all of the instances in that group. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the managed instance group to delete. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which + * they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is + * marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action + * with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + deleteInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns all of the details about the specified managed instance group. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the managed instance group to return. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create + * instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the + * group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. + * + * A regional managed instance group can contain up to 2000 instances. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of managed instance groups that are contained within the specified region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group + * has scheduled for its instances. + */ + listManagedInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + filter?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + order_by?: string; + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current + * instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been + * recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. + */ + recreateInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the + * current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE + * when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the + * creating or deleting actions with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has + * elapsed before the VM instance is removed or deleted. + */ + resize(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Number of instances that should exist in this instance group manager. */ + size: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. */ + setInstanceTemplate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. */ + setTargetPools(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the managed instance group. */ + instanceGroupManager: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionInstanceGroupsResource { + /** Returns the specified instance group resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Name of the instance group resource to return. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of instance group resources contained within the specified region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can + * list all instances or only the instances that are running. + */ + listInstances(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** Name of the regional instance group for which we want to list the instances. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the named ports for the specified regional instance group. */ + setNamedPorts(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The name of the regional instance group where the named ports are updated. */ + instanceGroup: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionOperationsResource { + /** Deletes the specified region-specific Operations resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to delete. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the specified region-specific Operations resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to return. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of Operation resources contained within the specified region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionsResource { + /** Returns the specified Region resource. Get a list of available regions by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region resource to return. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of region resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RoutersResource { + /** Retrieves an aggregated list of routers. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified Router resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 Router resource to delete. */ + router: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified Router resource. Get a list of available routers by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** Name of the Router resource to return. */ + router: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves runtime information of the specified router. */ + getRouterStatus(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** Name of the Router resource to query. */ + router: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a Router resource in the specified project and region using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of Router resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and + * processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 Router resource to patch. */ + router: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. */ + preview(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** Name of the Router resource to query. */ + router: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the specified Router resource with the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 Router resource to update. */ + router: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RoutesResource { + /** Deletes the specified Route resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 Route resource to delete. */ + route: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified Route resource. Get a list of available routes by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the Route resource to return. */ + route: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a Route resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of Route resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SnapshotsResource { + /** + * Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If + * any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. + * + * For more information, see Deleting snaphots. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 Snapshot resource to delete. */ + snapshot: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the Snapshot resource to return. */ + snapshot: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of Snapshot resources contained within the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. */ + setLabels(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SslCertificatesResource { + /** Deletes the specified SslCertificate resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 SslCertificate resource to delete. */ + sslCertificate: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the SslCertificate resource to return. */ + sslCertificate: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a SslCertificate resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of SslCertificate resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SubnetworksResource { + /** Retrieves an aggregated list of subnetworks. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified subnetwork. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the Subnetwork resource to delete. */ + subnetwork: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Expands the IP CIDR range of the subnetwork to a specified value. */ + expandIpCidrRange(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the Subnetwork resource to update. */ + subnetwork: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified subnetwork. Get a list of available subnetworks list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** Name of the Subnetwork resource to return. */ + subnetwork: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a subnetwork in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of subnetworks available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. */ + setPrivateIpGoogleAccess(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the Subnetwork resource. */ + subnetwork: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetHttpProxiesResource { + /** Deletes the specified TargetHttpProxy resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetHttpProxy resource to delete. */ + targetHttpProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the TargetHttpProxy resource to return. */ + targetHttpProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a TargetHttpProxy resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of TargetHttpProxy resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes the URL map for TargetHttpProxy. */ + setUrlMap(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetHttpProxy to set a URL map for. */ + targetHttpProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetHttpsProxiesResource { + /** Deletes the specified TargetHttpsProxy resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetHttpsProxy resource to delete. */ + targetHttpsProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the TargetHttpsProxy resource to return. */ + targetHttpsProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a TargetHttpsProxy resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of TargetHttpsProxy resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Replaces SslCertificates for TargetHttpsProxy. */ + setSslCertificates(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetHttpsProxy resource to set an SslCertificates resource for. */ + targetHttpsProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes the URL map for TargetHttpsProxy. */ + setUrlMap(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetHttpsProxy resource whose URL map is to be set. */ + targetHttpsProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetInstancesResource { + /** Retrieves an aggregated list of target instances. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified TargetInstance resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetInstance resource to delete. */ + targetInstance: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone scoping this request. */ + zone: string; + }): Request; + /** Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the TargetInstance resource to return. */ + targetInstance: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone scoping this request. */ + zone: string; + }): Request; + /** Creates a TargetInstance resource in the specified project and zone using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone scoping this request. */ + zone: string; + }): Request; + /** Retrieves a list of TargetInstance resources available to the specified project and zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone scoping this request. */ + zone: string; + }): Request; + } + interface TargetPoolsResource { + /** Adds health check URLs to a target pool. */ + addHealthCheck(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the target pool to add a health check to. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds an instance to a target pool. */ + addInstance(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the TargetPool resource to add instances to. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves an aggregated list of target pools. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified target pool. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the TargetPool resource to delete. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified target pool. Get a list of available target pools by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** Name of the TargetPool resource to return. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. */ + getHealth(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** Name of the TargetPool resource to which the queried instance belongs. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a target pool in the specified project and region using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of target pools available to the specified project and region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Removes health check URL from a target pool. */ + removeHealthCheck(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 target pool to remove health checks from. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Removes instance URL from a target pool. */ + removeInstance(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the TargetPool resource to remove instances from. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes a backup target pool's configurations. */ + setBackup(request: { + /** Data format for the response. */ + alt?: string; + /** New failoverRatio value for the target pool. */ + failoverRatio?: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region scoping this request. */ + region: string; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the + * request if it has already been completed. + * + * For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from + * accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** Name of the TargetPool resource to set a backup pool for. */ + targetPool: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetSslProxiesResource { + /** Deletes the specified TargetSslProxy resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetSslProxy resource to delete. */ + targetSslProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the TargetSslProxy resource to return. */ + targetSslProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a TargetSslProxy resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of TargetSslProxy resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes the BackendService for TargetSslProxy. */ + setBackendService(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetSslProxy resource whose BackendService resource is to be set. */ + targetSslProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes the ProxyHeaderType for TargetSslProxy. */ + setProxyHeader(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetSslProxy resource whose ProxyHeader is to be set. */ + targetSslProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes SslCertificates for TargetSslProxy. */ + setSslCertificates(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetSslProxy resource whose SslCertificate resource is to be set. */ + targetSslProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetTcpProxiesResource { + /** Deletes the specified TargetTcpProxy resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetTcpProxy resource to delete. */ + targetTcpProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the TargetTcpProxy resource to return. */ + targetTcpProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a TargetTcpProxy resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of TargetTcpProxy resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes the BackendService for TargetTcpProxy. */ + setBackendService(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetTcpProxy resource whose BackendService resource is to be set. */ + targetTcpProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Changes the ProxyHeaderType for TargetTcpProxy. */ + setProxyHeader(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 TargetTcpProxy resource whose ProxyHeader is to be set. */ + targetTcpProxy: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetVpnGatewaysResource { + /** Retrieves an aggregated list of target VPN gateways. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified target VPN gateway. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 target VPN gateway to delete. */ + targetVpnGateway: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** Name of the target VPN gateway to return. */ + targetVpnGateway: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a target VPN gateway in the specified project and region using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of target VPN gateways available to the specified project and region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UrlMapsResource { + /** Deletes the specified UrlMap resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 UrlMap resource to delete. */ + urlMap: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the UrlMap resource to return. */ + urlMap: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a UrlMap resource in the specified project using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. */ + invalidateCache(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 UrlMap scoping this request. */ + urlMap: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of UrlMap resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format + * and processing rules. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 UrlMap resource to patch. */ + urlMap: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the specified UrlMap resource with the data included in the request. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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 UrlMap resource to update. */ + urlMap: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. */ + validate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the UrlMap resource to be validated as. */ + urlMap: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface VpnTunnelsResource { + /** Retrieves an aggregated list of VPN tunnels. */ + aggregatedList(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified VpnTunnel resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the VpnTunnel resource to delete. */ + vpnTunnel: string; + }): Request; + /** Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the VpnTunnel resource to return. */ + vpnTunnel: string; + }): Request; + /** Creates a VpnTunnel resource in the specified project and region using the data included in the request. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: 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; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of VpnTunnel resources contained in the specified project and region. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the region for this request. */ + region: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ZoneOperationsResource { + /** Deletes the specified zone-specific Operations resource. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to delete. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves the specified zone-specific Operations resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Name of the Operations resource to return. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for this request. */ + zone: string; + }): Request; + /** Retrieves a list of Operation resources contained within the specified zone. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone for request. */ + zone: string; + }): Request; + } + interface ZonesResource { + /** Returns the specified Zone resource. Get a list of available zones by making a list() request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Name of the zone resource to return. */ + zone: string; + }): Request; + /** Retrieves the list of Zone resources available to the specified project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.compute/readme.md b/types/gapi.client.compute/readme.md new file mode 100644 index 0000000000..fcee121864 --- /dev/null +++ b/types/gapi.client.compute/readme.md @@ -0,0 +1,1557 @@ +# TypeScript typings for Compute Engine API v1 +Creates and runs virtual machines on Google Cloud Platform. +For detailed description please check [documentation](https://developers.google.com/compute/docs/reference/latest/). + +## Installing + +Install typings for Compute Engine API: +``` +npm install @types/gapi.client.compute@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('compute', 'v1', () => { + // now we can use gapi.client.compute + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View and manage your Google Compute Engine resources + 'https://www.googleapis.com/auth/compute', + + // View your Google Compute Engine resources + 'https://www.googleapis.com/auth/compute.readonly', + + // Manage your data and permissions in Google Cloud Storage + 'https://www.googleapis.com/auth/devstorage.full_control', + + // View your data in Google Cloud Storage + 'https://www.googleapis.com/auth/devstorage.read_only', + + // Manage your data in Google Cloud Storage + 'https://www.googleapis.com/auth/devstorage.read_write', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Compute Engine API resources: + +```typescript + +/* +Retrieves an aggregated list of accelerator types. +*/ +await gapi.client.acceleratorTypes.aggregatedList({ project: "project", }); + +/* +Returns the specified accelerator type. Get a list of available accelerator types by making a list() request. +*/ +await gapi.client.acceleratorTypes.get({ acceleratorType: "acceleratorType", project: "project", zone: "zone", }); + +/* +Retrieves a list of accelerator types available to the specified project. +*/ +await gapi.client.acceleratorTypes.list({ project: "project", zone: "zone", }); + +/* +Retrieves an aggregated list of addresses. +*/ +await gapi.client.addresses.aggregatedList({ project: "project", }); + +/* +Deletes the specified address resource. +*/ +await gapi.client.addresses.delete({ address: "address", project: "project", region: "region", }); + +/* +Returns the specified address resource. +*/ +await gapi.client.addresses.get({ address: "address", project: "project", region: "region", }); + +/* +Creates an address resource in the specified project using the data included in the request. +*/ +await gapi.client.addresses.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of addresses contained within the specified region. +*/ +await gapi.client.addresses.list({ project: "project", region: "region", }); + +/* +Retrieves an aggregated list of autoscalers. +*/ +await gapi.client.autoscalers.aggregatedList({ project: "project", }); + +/* +Deletes the specified autoscaler. +*/ +await gapi.client.autoscalers.delete({ autoscaler: "autoscaler", project: "project", zone: "zone", }); + +/* +Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request. +*/ +await gapi.client.autoscalers.get({ autoscaler: "autoscaler", project: "project", zone: "zone", }); + +/* +Creates an autoscaler in the specified project using the data included in the request. +*/ +await gapi.client.autoscalers.insert({ project: "project", zone: "zone", }); + +/* +Retrieves a list of autoscalers contained within the specified zone. +*/ +await gapi.client.autoscalers.list({ project: "project", zone: "zone", }); + +/* +Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.autoscalers.patch({ project: "project", zone: "zone", }); + +/* +Updates an autoscaler in the specified project using the data included in the request. +*/ +await gapi.client.autoscalers.update({ project: "project", zone: "zone", }); + +/* +Deletes the specified BackendBucket resource. +*/ +await gapi.client.backendBuckets.delete({ backendBucket: "backendBucket", project: "project", }); + +/* +Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request. +*/ +await gapi.client.backendBuckets.get({ backendBucket: "backendBucket", project: "project", }); + +/* +Creates a BackendBucket resource in the specified project using the data included in the request. +*/ +await gapi.client.backendBuckets.insert({ project: "project", }); + +/* +Retrieves the list of BackendBucket resources available to the specified project. +*/ +await gapi.client.backendBuckets.list({ project: "project", }); + +/* +Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.backendBuckets.patch({ backendBucket: "backendBucket", project: "project", }); + +/* +Updates the specified BackendBucket resource with the data included in the request. +*/ +await gapi.client.backendBuckets.update({ backendBucket: "backendBucket", project: "project", }); + +/* +Retrieves the list of all BackendService resources, regional and global, available to the specified project. +*/ +await gapi.client.backendServices.aggregatedList({ project: "project", }); + +/* +Deletes the specified BackendService resource. +*/ +await gapi.client.backendServices.delete({ backendService: "backendService", project: "project", }); + +/* +Returns the specified BackendService resource. Get a list of available backend services by making a list() request. +*/ +await gapi.client.backendServices.get({ backendService: "backendService", project: "project", }); + +/* +Gets the most recent health check results for this BackendService. +*/ +await gapi.client.backendServices.getHealth({ backendService: "backendService", project: "project", }); + +/* +Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. +*/ +await gapi.client.backendServices.insert({ project: "project", }); + +/* +Retrieves the list of BackendService resources available to the specified project. +*/ +await gapi.client.backendServices.list({ project: "project", }); + +/* +Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.backendServices.patch({ backendService: "backendService", project: "project", }); + +/* +Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. +*/ +await gapi.client.backendServices.update({ backendService: "backendService", project: "project", }); + +/* +Retrieves an aggregated list of disk types. +*/ +await gapi.client.diskTypes.aggregatedList({ project: "project", }); + +/* +Returns the specified disk type. Get a list of available disk types by making a list() request. +*/ +await gapi.client.diskTypes.get({ diskType: "diskType", project: "project", zone: "zone", }); + +/* +Retrieves a list of disk types available to the specified project. +*/ +await gapi.client.diskTypes.list({ project: "project", zone: "zone", }); + +/* +Retrieves an aggregated list of persistent disks. +*/ +await gapi.client.disks.aggregatedList({ project: "project", }); + +/* +Creates a snapshot of a specified persistent disk. +*/ +await gapi.client.disks.createSnapshot({ disk: "disk", project: "project", zone: "zone", }); + +/* +Deletes the specified persistent disk. Deleting a disk removes 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. +*/ +await gapi.client.disks.delete({ disk: "disk", project: "project", zone: "zone", }); + +/* +Returns a specified persistent disk. Get a list of available persistent disks by making a list() request. +*/ +await gapi.client.disks.get({ disk: "disk", project: "project", zone: "zone", }); + +/* +Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. +*/ +await gapi.client.disks.insert({ project: "project", zone: "zone", }); + +/* +Retrieves a list of persistent disks contained within the specified zone. +*/ +await gapi.client.disks.list({ project: "project", zone: "zone", }); + +/* +Resizes the specified persistent disk. +*/ +await gapi.client.disks.resize({ disk: "disk", project: "project", zone: "zone", }); + +/* +Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. +*/ +await gapi.client.disks.setLabels({ project: "project", resource: "resource", zone: "zone", }); + +/* +Deletes the specified firewall. +*/ +await gapi.client.firewalls.delete({ firewall: "firewall", project: "project", }); + +/* +Returns the specified firewall. +*/ +await gapi.client.firewalls.get({ firewall: "firewall", project: "project", }); + +/* +Creates a firewall rule in the specified project using the data included in the request. +*/ +await gapi.client.firewalls.insert({ project: "project", }); + +/* +Retrieves the list of firewall rules available to the specified project. +*/ +await gapi.client.firewalls.list({ project: "project", }); + +/* +Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.firewalls.patch({ firewall: "firewall", project: "project", }); + +/* +Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. +*/ +await gapi.client.firewalls.update({ firewall: "firewall", project: "project", }); + +/* +Retrieves an aggregated list of forwarding rules. +*/ +await gapi.client.forwardingRules.aggregatedList({ project: "project", }); + +/* +Deletes the specified ForwardingRule resource. +*/ +await gapi.client.forwardingRules.delete({ forwardingRule: "forwardingRule", project: "project", region: "region", }); + +/* +Returns the specified ForwardingRule resource. +*/ +await gapi.client.forwardingRules.get({ forwardingRule: "forwardingRule", project: "project", region: "region", }); + +/* +Creates a ForwardingRule resource in the specified project and region using the data included in the request. +*/ +await gapi.client.forwardingRules.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of ForwardingRule resources available to the specified project and region. +*/ +await gapi.client.forwardingRules.list({ project: "project", region: "region", }); + +/* +Changes target URL for forwarding rule. The new target should be of the same type as the old target. +*/ +await gapi.client.forwardingRules.setTarget({ forwardingRule: "forwardingRule", project: "project", region: "region", }); + +/* +Deletes the specified address resource. +*/ +await gapi.client.globalAddresses.delete({ address: "address", project: "project", }); + +/* +Returns the specified address resource. Get a list of available addresses by making a list() request. +*/ +await gapi.client.globalAddresses.get({ address: "address", project: "project", }); + +/* +Creates an address resource in the specified project using the data included in the request. +*/ +await gapi.client.globalAddresses.insert({ project: "project", }); + +/* +Retrieves a list of global addresses. +*/ +await gapi.client.globalAddresses.list({ project: "project", }); + +/* +Deletes the specified GlobalForwardingRule resource. +*/ +await gapi.client.globalForwardingRules.delete({ forwardingRule: "forwardingRule", project: "project", }); + +/* +Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request. +*/ +await gapi.client.globalForwardingRules.get({ forwardingRule: "forwardingRule", project: "project", }); + +/* +Creates a GlobalForwardingRule resource in the specified project using the data included in the request. +*/ +await gapi.client.globalForwardingRules.insert({ project: "project", }); + +/* +Retrieves a list of GlobalForwardingRule resources available to the specified project. +*/ +await gapi.client.globalForwardingRules.list({ project: "project", }); + +/* +Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. +*/ +await gapi.client.globalForwardingRules.setTarget({ forwardingRule: "forwardingRule", project: "project", }); + +/* +Retrieves an aggregated list of all operations. +*/ +await gapi.client.globalOperations.aggregatedList({ project: "project", }); + +/* +Deletes the specified Operations resource. +*/ +await gapi.client.globalOperations.delete({ operation: "operation", project: "project", }); + +/* +Retrieves the specified Operations resource. Get a list of operations by making a list() request. +*/ +await gapi.client.globalOperations.get({ operation: "operation", project: "project", }); + +/* +Retrieves a list of Operation resources contained within the specified project. +*/ +await gapi.client.globalOperations.list({ project: "project", }); + +/* +Deletes the specified HealthCheck resource. +*/ +await gapi.client.healthChecks.delete({ healthCheck: "healthCheck", project: "project", }); + +/* +Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request. +*/ +await gapi.client.healthChecks.get({ healthCheck: "healthCheck", project: "project", }); + +/* +Creates a HealthCheck resource in the specified project using the data included in the request. +*/ +await gapi.client.healthChecks.insert({ project: "project", }); + +/* +Retrieves the list of HealthCheck resources available to the specified project. +*/ +await gapi.client.healthChecks.list({ project: "project", }); + +/* +Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.healthChecks.patch({ healthCheck: "healthCheck", project: "project", }); + +/* +Updates a HealthCheck resource in the specified project using the data included in the request. +*/ +await gapi.client.healthChecks.update({ healthCheck: "healthCheck", project: "project", }); + +/* +Deletes the specified HttpHealthCheck resource. +*/ +await gapi.client.httpHealthChecks.delete({ httpHealthCheck: "httpHealthCheck", project: "project", }); + +/* +Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request. +*/ +await gapi.client.httpHealthChecks.get({ httpHealthCheck: "httpHealthCheck", project: "project", }); + +/* +Creates a HttpHealthCheck resource in the specified project using the data included in the request. +*/ +await gapi.client.httpHealthChecks.insert({ project: "project", }); + +/* +Retrieves the list of HttpHealthCheck resources available to the specified project. +*/ +await gapi.client.httpHealthChecks.list({ project: "project", }); + +/* +Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.httpHealthChecks.patch({ httpHealthCheck: "httpHealthCheck", project: "project", }); + +/* +Updates a HttpHealthCheck resource in the specified project using the data included in the request. +*/ +await gapi.client.httpHealthChecks.update({ httpHealthCheck: "httpHealthCheck", project: "project", }); + +/* +Deletes the specified HttpsHealthCheck resource. +*/ +await gapi.client.httpsHealthChecks.delete({ httpsHealthCheck: "httpsHealthCheck", project: "project", }); + +/* +Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request. +*/ +await gapi.client.httpsHealthChecks.get({ httpsHealthCheck: "httpsHealthCheck", project: "project", }); + +/* +Creates a HttpsHealthCheck resource in the specified project using the data included in the request. +*/ +await gapi.client.httpsHealthChecks.insert({ project: "project", }); + +/* +Retrieves the list of HttpsHealthCheck resources available to the specified project. +*/ +await gapi.client.httpsHealthChecks.list({ project: "project", }); + +/* +Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.httpsHealthChecks.patch({ httpsHealthCheck: "httpsHealthCheck", project: "project", }); + +/* +Updates a HttpsHealthCheck resource in the specified project using the data included in the request. +*/ +await gapi.client.httpsHealthChecks.update({ httpsHealthCheck: "httpsHealthCheck", project: "project", }); + +/* +Deletes the specified image. +*/ +await gapi.client.images.delete({ image: "image", project: "project", }); + +/* +Sets the deprecation status of an image. + +If an empty request body is given, clears the deprecation status instead. +*/ +await gapi.client.images.deprecate({ image: "image", project: "project", }); + +/* +Returns the specified image. Get a list of available images by making a list() request. +*/ +await gapi.client.images.get({ image: "image", project: "project", }); + +/* +Returns the latest image that is part of an image family and is not deprecated. +*/ +await gapi.client.images.getFromFamily({ family: "family", project: "project", }); + +/* +Creates an image in the specified project using the data included in the request. +*/ +await gapi.client.images.insert({ project: "project", }); + +/* +Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. +*/ +await gapi.client.images.list({ project: "project", }); + +/* +Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. +*/ +await gapi.client.images.setLabels({ project: "project", resource: "resource", }); + +/* +Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + +You can specify a maximum of 1000 instances with this method per request. +*/ +await gapi.client.instanceGroupManagers.abandonInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Retrieves the list of managed instance groups and groups them by zone. +*/ +await gapi.client.instanceGroupManagers.aggregatedList({ project: "project", }); + +/* +Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. +*/ +await gapi.client.instanceGroupManagers.delete({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + +You can specify a maximum of 1000 instances with this method per request. +*/ +await gapi.client.instanceGroupManagers.deleteInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request. +*/ +await gapi.client.instanceGroupManagers.get({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. + +A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. +*/ +await gapi.client.instanceGroupManagers.insert({ project: "project", zone: "zone", }); + +/* +Retrieves a list of managed instance groups that are contained within the specified project and zone. +*/ +await gapi.client.instanceGroupManagers.list({ project: "project", zone: "zone", }); + +/* +Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. +*/ +await gapi.client.instanceGroupManagers.listManagedInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + +You can specify a maximum of 1000 instances with this method per request. +*/ +await gapi.client.instanceGroupManagers.recreateInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. +*/ +await gapi.client.instanceGroupManagers.resize({ instanceGroupManager: "instanceGroupManager", project: "project", size: 1, zone: "zone", }); + +/* +Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. +*/ +await gapi.client.instanceGroupManagers.setInstanceTemplate({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. +*/ +await gapi.client.instanceGroupManagers.setTargetPools({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", }); + +/* +Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. +*/ +await gapi.client.instanceGroups.addInstances({ instanceGroup: "instanceGroup", project: "project", zone: "zone", }); + +/* +Retrieves the list of instance groups and sorts them by zone. +*/ +await gapi.client.instanceGroups.aggregatedList({ project: "project", }); + +/* +Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. +*/ +await gapi.client.instanceGroups.delete({ instanceGroup: "instanceGroup", project: "project", zone: "zone", }); + +/* +Returns the specified instance group. Get a list of available instance groups by making a list() request. +*/ +await gapi.client.instanceGroups.get({ instanceGroup: "instanceGroup", project: "project", zone: "zone", }); + +/* +Creates an instance group in the specified project using the parameters that are included in the request. +*/ +await gapi.client.instanceGroups.insert({ project: "project", zone: "zone", }); + +/* +Retrieves the list of instance groups that are located in the specified project and zone. +*/ +await gapi.client.instanceGroups.list({ project: "project", zone: "zone", }); + +/* +Lists the instances in the specified instance group. +*/ +await gapi.client.instanceGroups.listInstances({ instanceGroup: "instanceGroup", project: "project", zone: "zone", }); + +/* +Removes one or more instances from the specified instance group, but does not delete those instances. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. +*/ +await gapi.client.instanceGroups.removeInstances({ instanceGroup: "instanceGroup", project: "project", zone: "zone", }); + +/* +Sets the named ports for the specified instance group. +*/ +await gapi.client.instanceGroups.setNamedPorts({ instanceGroup: "instanceGroup", project: "project", zone: "zone", }); + +/* +Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone. +*/ +await gapi.client.instanceTemplates.delete({ instanceTemplate: "instanceTemplate", project: "project", }); + +/* +Returns the specified instance template. Get a list of available instance templates by making a list() request. +*/ +await gapi.client.instanceTemplates.get({ instanceTemplate: "instanceTemplate", project: "project", }); + +/* +Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. +*/ +await gapi.client.instanceTemplates.insert({ project: "project", }); + +/* +Retrieves a list of instance templates that are contained within the specified project and zone. +*/ +await gapi.client.instanceTemplates.list({ project: "project", }); + +/* +Adds an access config to an instance's network interface. +*/ +await gapi.client.instances.addAccessConfig({ instance: "instance", networkInterface: "networkInterface", project: "project", zone: "zone", }); + +/* +Retrieves aggregated list of instances. +*/ +await gapi.client.instances.aggregatedList({ project: "project", }); + +/* +Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. +*/ +await gapi.client.instances.attachDisk({ instance: "instance", project: "project", zone: "zone", }); + +/* +Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. +*/ +await gapi.client.instances.delete({ instance: "instance", project: "project", zone: "zone", }); + +/* +Deletes an access config from an instance's network interface. +*/ +await gapi.client.instances.deleteAccessConfig({ accessConfig: "accessConfig", instance: "instance", networkInterface: "networkInterface", project: "project", zone: "zone", }); + +/* +Detaches a disk from an instance. +*/ +await gapi.client.instances.detachDisk({ deviceName: "deviceName", instance: "instance", project: "project", zone: "zone", }); + +/* +Returns the specified Instance resource. Get a list of available instances by making a list() request. +*/ +await gapi.client.instances.get({ instance: "instance", project: "project", zone: "zone", }); + +/* +Returns the specified instance's serial port output. +*/ +await gapi.client.instances.getSerialPortOutput({ instance: "instance", project: "project", zone: "zone", }); + +/* +Creates an instance resource in the specified project using the data included in the request. +*/ +await gapi.client.instances.insert({ project: "project", zone: "zone", }); + +/* +Retrieves the list of instances contained within the specified zone. +*/ +await gapi.client.instances.list({ project: "project", zone: "zone", }); + +/* +Performs a reset on the instance. For more information, see Resetting an instance. +*/ +await gapi.client.instances.reset({ instance: "instance", project: "project", zone: "zone", }); + +/* +Sets the auto-delete flag for a disk attached to an instance. +*/ +await gapi.client.instances.setDiskAutoDelete({ autoDelete: , deviceName: "deviceName", instance: "instance", project: "project", zone: "zone", }); + +/* +Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. +*/ +await gapi.client.instances.setLabels({ instance: "instance", project: "project", zone: "zone", }); + +/* +Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. +*/ +await gapi.client.instances.setMachineResources({ instance: "instance", project: "project", zone: "zone", }); + +/* +Changes the machine type for a stopped instance to the machine type specified in the request. +*/ +await gapi.client.instances.setMachineType({ instance: "instance", project: "project", zone: "zone", }); + +/* +Sets metadata for the specified instance to the data included in the request. +*/ +await gapi.client.instances.setMetadata({ instance: "instance", project: "project", zone: "zone", }); + +/* +Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. +*/ +await gapi.client.instances.setMinCpuPlatform({ instance: "instance", project: "project", zone: "zone", }); + +/* +Sets an instance's scheduling options. +*/ +await gapi.client.instances.setScheduling({ instance: "instance", project: "project", zone: "zone", }); + +/* +Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. +*/ +await gapi.client.instances.setServiceAccount({ instance: "instance", project: "project", zone: "zone", }); + +/* +Sets tags for the specified instance to the data included in the request. +*/ +await gapi.client.instances.setTags({ instance: "instance", project: "project", zone: "zone", }); + +/* +Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. +*/ +await gapi.client.instances.start({ instance: "instance", project: "project", zone: "zone", }); + +/* +Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. +*/ +await gapi.client.instances.startWithEncryptionKey({ instance: "instance", project: "project", zone: "zone", }); + +/* +Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. +*/ +await gapi.client.instances.stop({ instance: "instance", project: "project", zone: "zone", }); + +/* +Returns the specified License resource. +*/ +await gapi.client.licenses.get({ license: "license", project: "project", }); + +/* +Retrieves an aggregated list of machine types. +*/ +await gapi.client.machineTypes.aggregatedList({ project: "project", }); + +/* +Returns the specified machine type. Get a list of available machine types by making a list() request. +*/ +await gapi.client.machineTypes.get({ machineType: "machineType", project: "project", zone: "zone", }); + +/* +Retrieves a list of machine types available to the specified project. +*/ +await gapi.client.machineTypes.list({ project: "project", zone: "zone", }); + +/* +Adds a peering to the specified network. +*/ +await gapi.client.networks.addPeering({ network: "network", project: "project", }); + +/* +Deletes the specified network. +*/ +await gapi.client.networks.delete({ network: "network", project: "project", }); + +/* +Returns the specified network. Get a list of available networks by making a list() request. +*/ +await gapi.client.networks.get({ network: "network", project: "project", }); + +/* +Creates a network in the specified project using the data included in the request. +*/ +await gapi.client.networks.insert({ project: "project", }); + +/* +Retrieves the list of networks available to the specified project. +*/ +await gapi.client.networks.list({ project: "project", }); + +/* +Patches the specified network with the data included in the request. +*/ +await gapi.client.networks.patch({ network: "network", project: "project", }); + +/* +Removes a peering from the specified network. +*/ +await gapi.client.networks.removePeering({ network: "network", project: "project", }); + +/* +Switches the network mode from auto subnet mode to custom subnet mode. +*/ +await gapi.client.networks.switchToCustomMode({ network: "network", project: "project", }); + +/* +Disable this project as a shared VPC host project. +*/ +await gapi.client.projects.disableXpnHost({ project: "project", }); + +/* +Disable a serivce resource (a.k.a service project) associated with this host project. +*/ +await gapi.client.projects.disableXpnResource({ project: "project", }); + +/* +Enable this project as a shared VPC host project. +*/ +await gapi.client.projects.enableXpnHost({ project: "project", }); + +/* +Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. +*/ +await gapi.client.projects.enableXpnResource({ project: "project", }); + +/* +Returns the specified Project resource. +*/ +await gapi.client.projects.get({ project: "project", }); + +/* +Get the shared VPC host project that this project links to. May be empty if no link exists. +*/ +await gapi.client.projects.getXpnHost({ project: "project", }); + +/* +Get service resources (a.k.a service project) associated with this host project. +*/ +await gapi.client.projects.getXpnResources({ project: "project", }); + +/* +List all shared VPC host projects visible to the user in an organization. +*/ +await gapi.client.projects.listXpnHosts({ project: "project", }); + +/* +Moves a persistent disk from one zone to another. +*/ +await gapi.client.projects.moveDisk({ project: "project", }); + +/* +Moves an instance and its attached persistent disks from one zone to another. +*/ +await gapi.client.projects.moveInstance({ project: "project", }); + +/* +Sets metadata common to all instances within the specified project using the data included in the request. +*/ +await gapi.client.projects.setCommonInstanceMetadata({ project: "project", }); + +/* +Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. +*/ +await gapi.client.projects.setUsageExportBucket({ project: "project", }); + +/* +Deletes the specified autoscaler. +*/ +await gapi.client.regionAutoscalers.delete({ autoscaler: "autoscaler", project: "project", region: "region", }); + +/* +Returns the specified autoscaler. +*/ +await gapi.client.regionAutoscalers.get({ autoscaler: "autoscaler", project: "project", region: "region", }); + +/* +Creates an autoscaler in the specified project using the data included in the request. +*/ +await gapi.client.regionAutoscalers.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of autoscalers contained within the specified region. +*/ +await gapi.client.regionAutoscalers.list({ project: "project", region: "region", }); + +/* +Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.regionAutoscalers.patch({ project: "project", region: "region", }); + +/* +Updates an autoscaler in the specified project using the data included in the request. +*/ +await gapi.client.regionAutoscalers.update({ project: "project", region: "region", }); + +/* +Deletes the specified regional BackendService resource. +*/ +await gapi.client.regionBackendServices.delete({ backendService: "backendService", project: "project", region: "region", }); + +/* +Returns the specified regional BackendService resource. +*/ +await gapi.client.regionBackendServices.get({ backendService: "backendService", project: "project", region: "region", }); + +/* +Gets the most recent health check results for this regional BackendService. +*/ +await gapi.client.regionBackendServices.getHealth({ backendService: "backendService", project: "project", region: "region", }); + +/* +Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. +*/ +await gapi.client.regionBackendServices.insert({ project: "project", region: "region", }); + +/* +Retrieves the list of regional BackendService resources available to the specified project in the given region. +*/ +await gapi.client.regionBackendServices.list({ project: "project", region: "region", }); + +/* +Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.regionBackendServices.patch({ backendService: "backendService", project: "project", region: "region", }); + +/* +Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. +*/ +await gapi.client.regionBackendServices.update({ backendService: "backendService", project: "project", region: "region", }); + +/* +Retrieves an aggregated list of commitments. +*/ +await gapi.client.regionCommitments.aggregatedList({ project: "project", }); + +/* +Returns the specified commitment resource. Get a list of available commitments by making a list() request. +*/ +await gapi.client.regionCommitments.get({ commitment: "commitment", project: "project", region: "region", }); + +/* +Creates a commitment in the specified project using the data included in the request. +*/ +await gapi.client.regionCommitments.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of commitments contained within the specified region. +*/ +await gapi.client.regionCommitments.list({ project: "project", region: "region", }); + +/* +Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + +You can specify a maximum of 1000 instances with this method per request. +*/ +await gapi.client.regionInstanceGroupManagers.abandonInstances({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Deletes the specified managed instance group and all of the instances in that group. +*/ +await gapi.client.regionInstanceGroupManagers.delete({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + +You can specify a maximum of 1000 instances with this method per request. +*/ +await gapi.client.regionInstanceGroupManagers.deleteInstances({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Returns all of the details about the specified managed instance group. +*/ +await gapi.client.regionInstanceGroupManagers.get({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. + +A regional managed instance group can contain up to 2000 instances. +*/ +await gapi.client.regionInstanceGroupManagers.insert({ project: "project", region: "region", }); + +/* +Retrieves the list of managed instance groups that are contained within the specified region. +*/ +await gapi.client.regionInstanceGroupManagers.list({ project: "project", region: "region", }); + +/* +Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. +*/ +await gapi.client.regionInstanceGroupManagers.listManagedInstances({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + +You can specify a maximum of 1000 instances with this method per request. +*/ +await gapi.client.regionInstanceGroupManagers.recreateInstances({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. + +If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. +*/ +await gapi.client.regionInstanceGroupManagers.resize({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", size: 1, }); + +/* +Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. +*/ +await gapi.client.regionInstanceGroupManagers.setInstanceTemplate({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. +*/ +await gapi.client.regionInstanceGroupManagers.setTargetPools({ instanceGroupManager: "instanceGroupManager", project: "project", region: "region", }); + +/* +Returns the specified instance group resource. +*/ +await gapi.client.regionInstanceGroups.get({ instanceGroup: "instanceGroup", project: "project", region: "region", }); + +/* +Retrieves the list of instance group resources contained within the specified region. +*/ +await gapi.client.regionInstanceGroups.list({ project: "project", region: "region", }); + +/* +Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. +*/ +await gapi.client.regionInstanceGroups.listInstances({ instanceGroup: "instanceGroup", project: "project", region: "region", }); + +/* +Sets the named ports for the specified regional instance group. +*/ +await gapi.client.regionInstanceGroups.setNamedPorts({ instanceGroup: "instanceGroup", project: "project", region: "region", }); + +/* +Deletes the specified region-specific Operations resource. +*/ +await gapi.client.regionOperations.delete({ operation: "operation", project: "project", region: "region", }); + +/* +Retrieves the specified region-specific Operations resource. +*/ +await gapi.client.regionOperations.get({ operation: "operation", project: "project", region: "region", }); + +/* +Retrieves a list of Operation resources contained within the specified region. +*/ +await gapi.client.regionOperations.list({ project: "project", region: "region", }); + +/* +Returns the specified Region resource. Get a list of available regions by making a list() request. +*/ +await gapi.client.regions.get({ project: "project", region: "region", }); + +/* +Retrieves the list of region resources available to the specified project. +*/ +await gapi.client.regions.list({ project: "project", }); + +/* +Retrieves an aggregated list of routers. +*/ +await gapi.client.routers.aggregatedList({ project: "project", }); + +/* +Deletes the specified Router resource. +*/ +await gapi.client.routers.delete({ project: "project", region: "region", router: "router", }); + +/* +Returns the specified Router resource. Get a list of available routers by making a list() request. +*/ +await gapi.client.routers.get({ project: "project", region: "region", router: "router", }); + +/* +Retrieves runtime information of the specified router. +*/ +await gapi.client.routers.getRouterStatus({ project: "project", region: "region", router: "router", }); + +/* +Creates a Router resource in the specified project and region using the data included in the request. +*/ +await gapi.client.routers.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of Router resources available to the specified project. +*/ +await gapi.client.routers.list({ project: "project", region: "region", }); + +/* +Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. +*/ +await gapi.client.routers.patch({ project: "project", region: "region", router: "router", }); + +/* +Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. +*/ +await gapi.client.routers.preview({ project: "project", region: "region", router: "router", }); + +/* +Updates the specified Router resource with the data included in the request. +*/ +await gapi.client.routers.update({ project: "project", region: "region", router: "router", }); + +/* +Deletes the specified Route resource. +*/ +await gapi.client.routes.delete({ project: "project", route: "route", }); + +/* +Returns the specified Route resource. Get a list of available routes by making a list() request. +*/ +await gapi.client.routes.get({ project: "project", route: "route", }); + +/* +Creates a Route resource in the specified project using the data included in the request. +*/ +await gapi.client.routes.insert({ project: "project", }); + +/* +Retrieves the list of Route resources available to the specified project. +*/ +await gapi.client.routes.list({ project: "project", }); + +/* +Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. + +For more information, see Deleting snaphots. +*/ +await gapi.client.snapshots.delete({ project: "project", snapshot: "snapshot", }); + +/* +Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request. +*/ +await gapi.client.snapshots.get({ project: "project", snapshot: "snapshot", }); + +/* +Retrieves the list of Snapshot resources contained within the specified project. +*/ +await gapi.client.snapshots.list({ project: "project", }); + +/* +Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. +*/ +await gapi.client.snapshots.setLabels({ project: "project", resource: "resource", }); + +/* +Deletes the specified SslCertificate resource. +*/ +await gapi.client.sslCertificates.delete({ project: "project", sslCertificate: "sslCertificate", }); + +/* +Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request. +*/ +await gapi.client.sslCertificates.get({ project: "project", sslCertificate: "sslCertificate", }); + +/* +Creates a SslCertificate resource in the specified project using the data included in the request. +*/ +await gapi.client.sslCertificates.insert({ project: "project", }); + +/* +Retrieves the list of SslCertificate resources available to the specified project. +*/ +await gapi.client.sslCertificates.list({ project: "project", }); + +/* +Retrieves an aggregated list of subnetworks. +*/ +await gapi.client.subnetworks.aggregatedList({ project: "project", }); + +/* +Deletes the specified subnetwork. +*/ +await gapi.client.subnetworks.delete({ project: "project", region: "region", subnetwork: "subnetwork", }); + +/* +Expands the IP CIDR range of the subnetwork to a specified value. +*/ +await gapi.client.subnetworks.expandIpCidrRange({ project: "project", region: "region", subnetwork: "subnetwork", }); + +/* +Returns the specified subnetwork. Get a list of available subnetworks list() request. +*/ +await gapi.client.subnetworks.get({ project: "project", region: "region", subnetwork: "subnetwork", }); + +/* +Creates a subnetwork in the specified project using the data included in the request. +*/ +await gapi.client.subnetworks.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of subnetworks available to the specified project. +*/ +await gapi.client.subnetworks.list({ project: "project", region: "region", }); + +/* +Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. +*/ +await gapi.client.subnetworks.setPrivateIpGoogleAccess({ project: "project", region: "region", subnetwork: "subnetwork", }); + +/* +Deletes the specified TargetHttpProxy resource. +*/ +await gapi.client.targetHttpProxies.delete({ project: "project", targetHttpProxy: "targetHttpProxy", }); + +/* +Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request. +*/ +await gapi.client.targetHttpProxies.get({ project: "project", targetHttpProxy: "targetHttpProxy", }); + +/* +Creates a TargetHttpProxy resource in the specified project using the data included in the request. +*/ +await gapi.client.targetHttpProxies.insert({ project: "project", }); + +/* +Retrieves the list of TargetHttpProxy resources available to the specified project. +*/ +await gapi.client.targetHttpProxies.list({ project: "project", }); + +/* +Changes the URL map for TargetHttpProxy. +*/ +await gapi.client.targetHttpProxies.setUrlMap({ project: "project", targetHttpProxy: "targetHttpProxy", }); + +/* +Deletes the specified TargetHttpsProxy resource. +*/ +await gapi.client.targetHttpsProxies.delete({ project: "project", targetHttpsProxy: "targetHttpsProxy", }); + +/* +Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request. +*/ +await gapi.client.targetHttpsProxies.get({ project: "project", targetHttpsProxy: "targetHttpsProxy", }); + +/* +Creates a TargetHttpsProxy resource in the specified project using the data included in the request. +*/ +await gapi.client.targetHttpsProxies.insert({ project: "project", }); + +/* +Retrieves the list of TargetHttpsProxy resources available to the specified project. +*/ +await gapi.client.targetHttpsProxies.list({ project: "project", }); + +/* +Replaces SslCertificates for TargetHttpsProxy. +*/ +await gapi.client.targetHttpsProxies.setSslCertificates({ project: "project", targetHttpsProxy: "targetHttpsProxy", }); + +/* +Changes the URL map for TargetHttpsProxy. +*/ +await gapi.client.targetHttpsProxies.setUrlMap({ project: "project", targetHttpsProxy: "targetHttpsProxy", }); + +/* +Retrieves an aggregated list of target instances. +*/ +await gapi.client.targetInstances.aggregatedList({ project: "project", }); + +/* +Deletes the specified TargetInstance resource. +*/ +await gapi.client.targetInstances.delete({ project: "project", targetInstance: "targetInstance", zone: "zone", }); + +/* +Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request. +*/ +await gapi.client.targetInstances.get({ project: "project", targetInstance: "targetInstance", zone: "zone", }); + +/* +Creates a TargetInstance resource in the specified project and zone using the data included in the request. +*/ +await gapi.client.targetInstances.insert({ project: "project", zone: "zone", }); + +/* +Retrieves a list of TargetInstance resources available to the specified project and zone. +*/ +await gapi.client.targetInstances.list({ project: "project", zone: "zone", }); + +/* +Adds health check URLs to a target pool. +*/ +await gapi.client.targetPools.addHealthCheck({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Adds an instance to a target pool. +*/ +await gapi.client.targetPools.addInstance({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Retrieves an aggregated list of target pools. +*/ +await gapi.client.targetPools.aggregatedList({ project: "project", }); + +/* +Deletes the specified target pool. +*/ +await gapi.client.targetPools.delete({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Returns the specified target pool. Get a list of available target pools by making a list() request. +*/ +await gapi.client.targetPools.get({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. +*/ +await gapi.client.targetPools.getHealth({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Creates a target pool in the specified project and region using the data included in the request. +*/ +await gapi.client.targetPools.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of target pools available to the specified project and region. +*/ +await gapi.client.targetPools.list({ project: "project", region: "region", }); + +/* +Removes health check URL from a target pool. +*/ +await gapi.client.targetPools.removeHealthCheck({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Removes instance URL from a target pool. +*/ +await gapi.client.targetPools.removeInstance({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Changes a backup target pool's configurations. +*/ +await gapi.client.targetPools.setBackup({ project: "project", region: "region", targetPool: "targetPool", }); + +/* +Deletes the specified TargetSslProxy resource. +*/ +await gapi.client.targetSslProxies.delete({ project: "project", targetSslProxy: "targetSslProxy", }); + +/* +Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request. +*/ +await gapi.client.targetSslProxies.get({ project: "project", targetSslProxy: "targetSslProxy", }); + +/* +Creates a TargetSslProxy resource in the specified project using the data included in the request. +*/ +await gapi.client.targetSslProxies.insert({ project: "project", }); + +/* +Retrieves the list of TargetSslProxy resources available to the specified project. +*/ +await gapi.client.targetSslProxies.list({ project: "project", }); + +/* +Changes the BackendService for TargetSslProxy. +*/ +await gapi.client.targetSslProxies.setBackendService({ project: "project", targetSslProxy: "targetSslProxy", }); + +/* +Changes the ProxyHeaderType for TargetSslProxy. +*/ +await gapi.client.targetSslProxies.setProxyHeader({ project: "project", targetSslProxy: "targetSslProxy", }); + +/* +Changes SslCertificates for TargetSslProxy. +*/ +await gapi.client.targetSslProxies.setSslCertificates({ project: "project", targetSslProxy: "targetSslProxy", }); + +/* +Deletes the specified TargetTcpProxy resource. +*/ +await gapi.client.targetTcpProxies.delete({ project: "project", targetTcpProxy: "targetTcpProxy", }); + +/* +Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request. +*/ +await gapi.client.targetTcpProxies.get({ project: "project", targetTcpProxy: "targetTcpProxy", }); + +/* +Creates a TargetTcpProxy resource in the specified project using the data included in the request. +*/ +await gapi.client.targetTcpProxies.insert({ project: "project", }); + +/* +Retrieves the list of TargetTcpProxy resources available to the specified project. +*/ +await gapi.client.targetTcpProxies.list({ project: "project", }); + +/* +Changes the BackendService for TargetTcpProxy. +*/ +await gapi.client.targetTcpProxies.setBackendService({ project: "project", targetTcpProxy: "targetTcpProxy", }); + +/* +Changes the ProxyHeaderType for TargetTcpProxy. +*/ +await gapi.client.targetTcpProxies.setProxyHeader({ project: "project", targetTcpProxy: "targetTcpProxy", }); + +/* +Retrieves an aggregated list of target VPN gateways. +*/ +await gapi.client.targetVpnGateways.aggregatedList({ project: "project", }); + +/* +Deletes the specified target VPN gateway. +*/ +await gapi.client.targetVpnGateways.delete({ project: "project", region: "region", targetVpnGateway: "targetVpnGateway", }); + +/* +Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request. +*/ +await gapi.client.targetVpnGateways.get({ project: "project", region: "region", targetVpnGateway: "targetVpnGateway", }); + +/* +Creates a target VPN gateway in the specified project and region using the data included in the request. +*/ +await gapi.client.targetVpnGateways.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of target VPN gateways available to the specified project and region. +*/ +await gapi.client.targetVpnGateways.list({ project: "project", region: "region", }); + +/* +Deletes the specified UrlMap resource. +*/ +await gapi.client.urlMaps.delete({ project: "project", urlMap: "urlMap", }); + +/* +Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request. +*/ +await gapi.client.urlMaps.get({ project: "project", urlMap: "urlMap", }); + +/* +Creates a UrlMap resource in the specified project using the data included in the request. +*/ +await gapi.client.urlMaps.insert({ project: "project", }); + +/* +Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. +*/ +await gapi.client.urlMaps.invalidateCache({ project: "project", urlMap: "urlMap", }); + +/* +Retrieves the list of UrlMap resources available to the specified project. +*/ +await gapi.client.urlMaps.list({ project: "project", }); + +/* +Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. +*/ +await gapi.client.urlMaps.patch({ project: "project", urlMap: "urlMap", }); + +/* +Updates the specified UrlMap resource with the data included in the request. +*/ +await gapi.client.urlMaps.update({ project: "project", urlMap: "urlMap", }); + +/* +Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. +*/ +await gapi.client.urlMaps.validate({ project: "project", urlMap: "urlMap", }); + +/* +Retrieves an aggregated list of VPN tunnels. +*/ +await gapi.client.vpnTunnels.aggregatedList({ project: "project", }); + +/* +Deletes the specified VpnTunnel resource. +*/ +await gapi.client.vpnTunnels.delete({ project: "project", region: "region", vpnTunnel: "vpnTunnel", }); + +/* +Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request. +*/ +await gapi.client.vpnTunnels.get({ project: "project", region: "region", vpnTunnel: "vpnTunnel", }); + +/* +Creates a VpnTunnel resource in the specified project and region using the data included in the request. +*/ +await gapi.client.vpnTunnels.insert({ project: "project", region: "region", }); + +/* +Retrieves a list of VpnTunnel resources contained in the specified project and region. +*/ +await gapi.client.vpnTunnels.list({ project: "project", region: "region", }); + +/* +Deletes the specified zone-specific Operations resource. +*/ +await gapi.client.zoneOperations.delete({ operation: "operation", project: "project", zone: "zone", }); + +/* +Retrieves the specified zone-specific Operations resource. +*/ +await gapi.client.zoneOperations.get({ operation: "operation", project: "project", zone: "zone", }); + +/* +Retrieves a list of Operation resources contained within the specified zone. +*/ +await gapi.client.zoneOperations.list({ project: "project", zone: "zone", }); + +/* +Returns the specified Zone resource. Get a list of available zones by making a list() request. +*/ +await gapi.client.zones.get({ project: "project", zone: "zone", }); + +/* +Retrieves the list of Zone resources available to the specified project. +*/ +await gapi.client.zones.list({ project: "project", }); +``` \ No newline at end of file diff --git a/types/gapi.client.compute/tsconfig.json b/types/gapi.client.compute/tsconfig.json new file mode 100644 index 0000000000..496204435b --- /dev/null +++ b/types/gapi.client.compute/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.compute-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.compute/tslint.json b/types/gapi.client.compute/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.compute/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.consumersurveys/gapi.client.consumersurveys-tests.ts b/types/gapi.client.consumersurveys/gapi.client.consumersurveys-tests.ts new file mode 100644 index 0000000000..a374f6283a --- /dev/null +++ b/types/gapi.client.consumersurveys/gapi.client.consumersurveys-tests.ts @@ -0,0 +1,86 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('consumersurveys', 'v2', () => { + /** now we can use gapi.client.consumersurveys */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and edit your surveys and results */ + 'https://www.googleapis.com/auth/consumersurveys', + /** View the results for your surveys */ + 'https://www.googleapis.com/auth/consumersurveys.readonly', + /** View your email address */ + 'https://www.googleapis.com/auth/userinfo.email', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Retrieves a MobileAppPanel that is available to the authenticated user. */ + await gapi.client.mobileapppanels.get({ + panelId: "panelId", + }); + /** Lists the MobileAppPanels available to the authenticated user. */ + await gapi.client.mobileapppanels.list({ + maxResults: 1, + startIndex: 2, + token: "token", + }); + /** Updates a MobileAppPanel. Currently the only property that can be updated is the owners property. */ + await gapi.client.mobileapppanels.update({ + panelId: "panelId", + }); + /** + * Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. You must add "?alt=media" to the URL as an + * argument to get results. + */ + await gapi.client.results.get({ + surveyUrlId: "surveyUrlId", + }); + /** Removes a survey from view in all user GET requests. */ + await gapi.client.surveys.delete({ + surveyUrlId: "surveyUrlId", + }); + /** Retrieves information about the specified survey. */ + await gapi.client.surveys.get({ + surveyUrlId: "surveyUrlId", + }); + /** Creates a survey. */ + await gapi.client.surveys.insert({ + }); + /** Lists the surveys owned by the authenticated user. */ + await gapi.client.surveys.list({ + maxResults: 1, + startIndex: 2, + token: "token", + }); + /** Begins running a survey. */ + await gapi.client.surveys.start({ + resourceId: "resourceId", + }); + /** Stops a running survey. */ + await gapi.client.surveys.stop({ + resourceId: "resourceId", + }); + /** Updates a survey. Currently the only property that can be updated is the owners property. */ + await gapi.client.surveys.update({ + surveyUrlId: "surveyUrlId", + }); + } +}); diff --git a/types/gapi.client.consumersurveys/index.d.ts b/types/gapi.client.consumersurveys/index.d.ts new file mode 100644 index 0000000000..41531fce6d --- /dev/null +++ b/types/gapi.client.consumersurveys/index.d.ts @@ -0,0 +1,397 @@ +// Type definitions for Google Consumer Surveys API v2 2.0 +// Project: undefined +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/consumersurveys/v2/rest + +/// + +declare namespace gapi.client { + /** Load Consumer Surveys API v2 */ + function load(name: "consumersurveys", version: "v2"): PromiseLike; + function load(name: "consumersurveys", version: "v2", callback: () => any): void; + + const mobileapppanels: consumersurveys.MobileapppanelsResource; + + const results: consumersurveys.ResultsResource; + + const surveys: consumersurveys.SurveysResource; + + namespace consumersurveys { + interface FieldMask { + fields?: FieldMask[]; + id?: number; + } + interface MobileAppPanel { + country?: string; + isPublicPanel?: boolean; + language?: string; + mobileAppPanelId?: string; + name?: string; + owners?: string[]; + } + interface MobileAppPanelsListResponse { + pageInfo?: 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?: MobileAppPanel[]; + tokenPagination?: TokenPagination; + } + interface PageInfo { + resultPerPage?: number; + startIndex?: number; + totalResults?: number; + } + interface ResultsGetRequest { + resultMask?: ResultsMask; + } + interface ResultsMask { + fields?: FieldMask[]; + projection?: string; + } + interface Survey { + audience?: SurveyAudience; + cost?: SurveyCost; + customerData?: string; + description?: string; + owners?: string[]; + questions?: SurveyQuestion[]; + rejectionReason?: SurveyRejection; + state?: string; + surveyUrlId?: string; + title?: string; + wantedResponseCount?: number; + } + interface SurveyAudience { + ages?: string[]; + country?: string; + countrySubdivision?: string; + gender?: string; + languages?: string[]; + mobileAppPanelId?: string; + populationSource?: string; + } + interface SurveyCost { + costPerResponseNanos?: string; + currencyCode?: string; + maxCostPerResponseNanos?: string; + nanos?: string; + } + interface SurveyQuestion { + answerOrder?: string; + answers?: string[]; + hasOther?: boolean; + highValueLabel?: string; + images?: SurveyQuestionImage[]; + lastAnswerPositionPinned?: boolean; + lowValueLabel?: string; + mustPickSuggestion?: boolean; + numStars?: string; + openTextPlaceholder?: string; + openTextSuggestions?: string[]; + question?: string; + sentimentText?: string; + singleLineResponse?: boolean; + thresholdAnswers?: string[]; + type?: string; + unitOfMeasurementLabel?: string; + videoId?: string; + } + interface SurveyQuestionImage { + altText?: string; + data?: string; + url?: string; + } + interface SurveyRejection { + explanation?: string; + type?: string; + } + interface SurveyResults { + status?: string; + surveyUrlId?: string; + } + interface SurveysDeleteResponse { + /** Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. */ + requestId?: string; + } + interface SurveysListResponse { + pageInfo?: PageInfo; + /** Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. */ + requestId?: string; + /** An individual survey resource. */ + resources?: Survey[]; + tokenPagination?: TokenPagination; + } + interface 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. */ + maxCostPerResponseNanos?: string; + } + interface SurveysStartResponse { + /** Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. */ + requestId?: string; + } + interface SurveysStopResponse { + /** Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. */ + requestId?: string; + } + interface TokenPagination { + nextPageToken?: string; + previousPageToken?: string; + } + interface MobileapppanelsResource { + /** Retrieves a MobileAppPanel that is available to the authenticated user. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** External URL ID for the panel. */ + panelId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the MobileAppPanels available to the authenticated user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + startIndex?: number; + token?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a MobileAppPanel. Currently the only property that can be updated is the owners property. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** External URL ID for the panel. */ + panelId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ResultsResource { + /** + * Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. You must add "?alt=media" to the URL as an + * argument to get results. + */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** External URL ID for the survey. */ + surveyUrlId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SurveysResource { + /** Removes a survey from view in all user GET requests. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** External URL ID for the survey. */ + surveyUrlId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves information about the specified survey. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** External URL ID for the survey. */ + surveyUrlId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a survey. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the surveys owned by the authenticated user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + startIndex?: number; + token?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Begins running a survey. */ + start(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + resourceId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Stops a running survey. */ + stop(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + resourceId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a survey. Currently the only property that can be updated is the owners property. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** External URL ID for the survey. */ + surveyUrlId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.consumersurveys/readme.md b/types/gapi.client.consumersurveys/readme.md new file mode 100644 index 0000000000..2c9ec3157f --- /dev/null +++ b/types/gapi.client.consumersurveys/readme.md @@ -0,0 +1,115 @@ +# TypeScript typings for Consumer Surveys API v2 +Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys. +For detailed description please check [documentation](undefined). + +## Installing + +Install typings for Consumer Surveys API: +``` +npm install @types/gapi.client.consumersurveys@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('consumersurveys', 'v2', () => { + // now we can use gapi.client.consumersurveys + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and edit your surveys and results + 'https://www.googleapis.com/auth/consumersurveys', + + // View the results for your surveys + 'https://www.googleapis.com/auth/consumersurveys.readonly', + + // View your email address + 'https://www.googleapis.com/auth/userinfo.email', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Consumer Surveys API resources: + +```typescript + +/* +Retrieves a MobileAppPanel that is available to the authenticated user. +*/ +await gapi.client.mobileapppanels.get({ panelId: "panelId", }); + +/* +Lists the MobileAppPanels available to the authenticated user. +*/ +await gapi.client.mobileapppanels.list({ }); + +/* +Updates a MobileAppPanel. Currently the only property that can be updated is the owners property. +*/ +await gapi.client.mobileapppanels.update({ panelId: "panelId", }); + +/* +Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. You must add "?alt=media" to the URL as an argument to get results. +*/ +await gapi.client.results.get({ surveyUrlId: "surveyUrlId", }); + +/* +Removes a survey from view in all user GET requests. +*/ +await gapi.client.surveys.delete({ surveyUrlId: "surveyUrlId", }); + +/* +Retrieves information about the specified survey. +*/ +await gapi.client.surveys.get({ surveyUrlId: "surveyUrlId", }); + +/* +Creates a survey. +*/ +await gapi.client.surveys.insert({ }); + +/* +Lists the surveys owned by the authenticated user. +*/ +await gapi.client.surveys.list({ }); + +/* +Begins running a survey. +*/ +await gapi.client.surveys.start({ resourceId: "resourceId", }); + +/* +Stops a running survey. +*/ +await gapi.client.surveys.stop({ resourceId: "resourceId", }); + +/* +Updates a survey. Currently the only property that can be updated is the owners property. +*/ +await gapi.client.surveys.update({ surveyUrlId: "surveyUrlId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.consumersurveys/tsconfig.json b/types/gapi.client.consumersurveys/tsconfig.json new file mode 100644 index 0000000000..e8c3646083 --- /dev/null +++ b/types/gapi.client.consumersurveys/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.consumersurveys-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.consumersurveys/tslint.json b/types/gapi.client.consumersurveys/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.consumersurveys/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.container/gapi.client.container-tests.ts b/types/gapi.client.container/gapi.client.container-tests.ts new file mode 100644 index 0000000000..7a30c61361 --- /dev/null +++ b/types/gapi.client.container/gapi.client.container-tests.ts @@ -0,0 +1,32 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('container', 'v1', () => { + /** now we can use gapi.client.container */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.container/index.d.ts b/types/gapi.client.container/index.d.ts new file mode 100644 index 0000000000..41fa31c25f --- /dev/null +++ b/types/gapi.client.container/index.d.ts @@ -0,0 +1,2201 @@ +// Type definitions for Google Google Container Engine API v1 1.0 +// Project: https://cloud.google.com/container-engine/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://container.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Container Engine API v1 */ + function load(name: "container", version: "v1"): PromiseLike; + function load(name: "container", version: "v1", callback: () => any): void; + + const projects: container.ProjectsResource; + + namespace container { + interface AcceleratorConfig { + /** The number of the accelerator cards exposed to an instance. */ + acceleratorCount?: string; + /** + * The accelerator type resource name. List of supported accelerators + * [here](/compute/docs/gpus/#Introduction) + */ + acceleratorType?: string; + } + interface AddonsConfig { + /** + * Configuration for the horizontal pod autoscaling feature, which + * increases or decreases the number of replica pods a replication controller + * has based on the resource usage of the existing pods. + */ + horizontalPodAutoscaling?: HorizontalPodAutoscaling; + /** + * Configuration for the HTTP (L7) load balancing controller addon, which + * makes it easy to set up HTTP load balancers for services in a cluster. + */ + httpLoadBalancing?: HttpLoadBalancing; + /** Configuration for the Kubernetes Dashboard. */ + kubernetesDashboard?: KubernetesDashboard; + /** + * Configuration for NetworkPolicy. This only tracks whether the addon + * is enabled or not on the Master, it does not track whether network policy + * is enabled for the nodes. + */ + networkPolicyConfig?: NetworkPolicyConfig; + } + interface AutoUpgradeOptions { + /** + * [Output only] This field is set when upgrades are about to commence + * with the approximate start time for the upgrades, in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + */ + autoUpgradeStartTime?: string; + /** + * [Output only] This field is set when upgrades are about to commence + * with the description of the upgrade. + */ + description?: string; + } + interface CidrBlock { + /** cidr_block must be specified in CIDR notation. */ + cidrBlock?: string; + /** display_name is an optional field for users to identify CIDR blocks. */ + displayName?: string; + } + interface ClientCertificateConfig { + /** Issue a client certificate. */ + issueClientCertificate?: boolean; + } + interface Cluster { + /** Configurations for the various addons available to run in the cluster. */ + addonsConfig?: AddonsConfig; + /** + * The IP address range of the container pods in this cluster, in + * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`). Leave blank to have + * one automatically chosen or specify a `/14` block in `10.0.0.0/8`. + */ + clusterIpv4Cidr?: string; + /** + * [Output only] The time the cluster was created, in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + */ + createTime?: string; + /** [Output only] The current software version of the master endpoint. */ + currentMasterVersion?: string; + /** [Output only] The number of nodes currently in the cluster. */ + currentNodeCount?: number; + /** + * [Output only] The current version of the node software components. + * If they are currently at multiple versions because they're in the process + * of being upgraded, this reflects the minimum version of all nodes. + */ + currentNodeVersion?: string; + /** An optional description of this cluster. */ + description?: string; + /** + * Kubernetes alpha features are enabled on this cluster. This includes alpha + * API groups (e.g. v1alpha1) and features that may not be production ready in + * the kubernetes version of the master and nodes. + * The cluster has no SLA for uptime and master/node upgrades are disabled. + * Alpha enabled clusters are automatically deleted thirty days after + * creation. + */ + enableKubernetesAlpha?: boolean; + /** + * [Output only] The IP address of this cluster's master endpoint. + * The endpoint can be accessed from the internet at + * `https://username:password@endpoint/`. + * + * See the `masterAuth` property of this resource for username and + * password information. + */ + endpoint?: string; + /** + * [Output only] The time the cluster will be automatically + * deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + */ + expireTime?: string; + /** + * The initial Kubernetes version for this cluster. Valid versions are those + * found in validMasterVersions returned by getServerConfig. The version can + * be upgraded over time; such upgrades are reflected in + * currentMasterVersion and currentNodeVersion. + */ + initialClusterVersion?: string; + /** + * The number of nodes to create in this cluster. You must ensure that your + * Compute Engine resource quota + * is sufficient for this number of instances. You must also have available + * firewall and routes quota. + * For requests, this field should only be used in lieu of a + * "node_pool" object, since this configuration (along with the + * "node_config") will be used to create a "NodePool" object with an + * auto-generated name. Do not use this and a node_pool at the same time. + */ + initialNodeCount?: number; + /** + * [Output only] The resource URLs of [instance + * groups](/compute/docs/instance-groups/) associated with this + * cluster. + */ + instanceGroupUrls?: string[]; + /** Configuration for cluster IP allocation. */ + ipAllocationPolicy?: IPAllocationPolicy; + /** The fingerprint of the set of labels for this cluster. */ + labelFingerprint?: string; + /** Configuration for the legacy ABAC authorization mode. */ + legacyAbac?: LegacyAbac; + /** + * The list of Google Compute Engine + * [locations](/compute/docs/zones#available) in which the cluster's nodes + * should be located. + */ + locations?: string[]; + /** + * The logging service the cluster should use to write logs. + * Currently available options: + * + * * `logging.googleapis.com` - the Google Cloud Logging service. + * * `none` - no logs will be exported from the cluster. + * * if left as an empty string,`logging.googleapis.com` will be used. + */ + loggingService?: string; + /** Configure the maintenance policy for this cluster. */ + maintenancePolicy?: MaintenancePolicy; + /** The authentication information for accessing the master endpoint. */ + masterAuth?: MasterAuth; + /** + * Master authorized networks is a Beta feature. + * The configuration options for master authorized networks feature. + */ + masterAuthorizedNetworksConfig?: MasterAuthorizedNetworksConfig; + /** + * The monitoring service the cluster should use to write metrics. + * Currently available options: + * + * * `monitoring.googleapis.com` - the Google Cloud Monitoring service. + * * `none` - no metrics will be exported from the cluster. + * * if left as an empty string, `monitoring.googleapis.com` will be used. + */ + monitoringService?: string; + /** + * The name of this cluster. The name must be unique within this project + * and zone, and can be up to 40 characters with the following restrictions: + * + * * Lowercase letters, numbers, and hyphens only. + * * Must start with a letter. + * * Must end with a number or a letter. + */ + name?: string; + /** + * The name of the Google Compute Engine + * [network](/compute/docs/networks-and-firewalls#networks) to which the + * cluster is connected. If left unspecified, the `default` network + * will be used. + */ + network?: string; + /** Configuration options for the NetworkPolicy feature. */ + networkPolicy?: NetworkPolicy; + /** + * Parameters used in creating the cluster's nodes. + * See `nodeConfig` for the description of its properties. + * For requests, this field should only be used in lieu of a + * "node_pool" object, since this configuration (along with the + * "initial_node_count") will be used to create a "NodePool" object with an + * auto-generated name. Do not use this and a node_pool at the same time. + * For responses, this field will be populated with the node configuration of + * the first node pool. + * + * If unspecified, the defaults are used. + */ + nodeConfig?: NodeConfig; + /** + * [Output only] The size of the address space on each node for hosting + * containers. This is provisioned from within the `container_ipv4_cidr` + * range. + */ + nodeIpv4CidrSize?: number; + /** + * The node pools associated with this cluster. + * This field should not be set if "node_config" or "initial_node_count" are + * specified. + */ + nodePools?: NodePool[]; + /** + * The resource labels for the cluster to use to annotate any related + * Google Compute Engine resources. + */ + resourceLabels?: Record; + /** [Output only] Server-defined URL for the resource. */ + selfLink?: string; + /** + * [Output only] The IP address range of the Kubernetes services in + * this cluster, in + * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `1.2.3.4/29`). Service addresses are + * typically put in the last `/16` from the container CIDR. + */ + servicesIpv4Cidr?: string; + /** [Output only] The current status of this cluster. */ + status?: string; + /** + * [Output only] Additional information about the current status of this + * cluster, if available. + */ + statusMessage?: string; + /** + * The name of the Google Compute Engine + * [subnetwork](/compute/docs/subnetworks) to which the + * cluster is connected. + */ + subnetwork?: string; + /** + * [Output only] The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone?: string; + } + interface ClusterUpdate { + /** Configurations for the various addons available to run in the cluster. */ + desiredAddonsConfig?: AddonsConfig; + /** + * The desired image type for the node pool. + * NOTE: Set the "desired_node_pool" field as well. + */ + desiredImageType?: string; + /** + * The desired list of Google Compute Engine + * [locations](/compute/docs/zones#available) in which the cluster's nodes + * should be located. Changing the locations a cluster is in will result + * in nodes being either created or removed from the cluster, depending on + * whether locations are being added or removed. + * + * This list must always include the cluster's primary zone. + */ + desiredLocations?: string[]; + /** + * Master authorized networks is a Beta feature. + * The desired configuration options for master authorized networks feature. + */ + desiredMasterAuthorizedNetworksConfig?: MasterAuthorizedNetworksConfig; + /** + * The Kubernetes version to change the master to. The only valid value is the + * latest supported version. Use "-" to have the server automatically select + * the latest version. + */ + desiredMasterVersion?: string; + /** + * The monitoring service the cluster should use to write metrics. + * Currently available options: + * + * * "monitoring.googleapis.com" - the Google Cloud Monitoring service + * * "none" - no metrics will be exported from the cluster + */ + desiredMonitoringService?: string; + /** + * Autoscaler configuration for the node pool specified in + * desired_node_pool_id. If there is only one pool in the + * cluster and desired_node_pool_id is not provided then + * the change applies to that single node pool. + */ + desiredNodePoolAutoscaling?: NodePoolAutoscaling; + /** + * The node pool to be upgraded. This field is mandatory if + * "desired_node_version", "desired_image_family" or + * "desired_node_pool_autoscaling" is specified and there is more than one + * node pool on the cluster. + */ + desiredNodePoolId?: string; + /** + * The Kubernetes version to change the nodes to (typically an + * upgrade). Use `-` to upgrade to the latest version supported by + * the server. + */ + desiredNodeVersion?: string; + } + interface CreateClusterRequest { + /** + * A [cluster + * resource](/container-engine/reference/rest/v1/projects.zones.clusters) + */ + cluster?: Cluster; + } + interface CreateNodePoolRequest { + /** The node pool to create. */ + nodePool?: NodePool; + } + interface DailyMaintenanceWindow { + /** + * [Output only] Duration of the time window, automatically chosen to be + * smallest possible in the given scenario. + * Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) + * format "PTnHnMnS". + */ + duration?: string; + /** + * Time within the maintenance window to start the maintenance operations. + * Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) + * format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT. + */ + startTime?: string; + } + interface HorizontalPodAutoscaling { + /** + * Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. + * When enabled, it ensures that a Heapster pod is running in the cluster, + * which is also used by the Cloud Monitoring service. + */ + disabled?: boolean; + } + interface HttpLoadBalancing { + /** + * Whether the HTTP Load Balancing controller is enabled in the cluster. + * When enabled, it runs a small pod in the cluster that manages the load + * balancers. + */ + disabled?: boolean; + } + interface IPAllocationPolicy { + /** This field is deprecated, use cluster_ipv4_cidr_block. */ + clusterIpv4Cidr?: string; + /** + * The IP address range for the cluster pod IPs. If this field is set, then + * `cluster.cluster_ipv4_cidr` must be left blank. + * + * This field is only applicable when `use_ip_aliases` is true. + * + * Set to blank to have a range chosen with the default size. + * + * Set to /netmask (e.g. `/14`) to have a range chosen with a specific + * netmask. + * + * Set to a + * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + */ + clusterIpv4CidrBlock?: string; + /** + * The name of the secondary range to be used for the cluster CIDR + * block. The secondary range will be used for pod IP + * addresses. This must be an existing secondary range associated + * with the cluster subnetwork. + * + * This field is only applicable with use_ip_aliases is true and + * create_subnetwork is false. + */ + clusterSecondaryRangeName?: string; + /** + * Whether a new subnetwork will be created automatically for the cluster. + * + * This field is only applicable when `use_ip_aliases` is true. + */ + createSubnetwork?: boolean; + /** This field is deprecated, use node_ipv4_cidr_block. */ + nodeIpv4Cidr?: string; + /** + * The IP address range of the instance IPs in this cluster. + * + * This is applicable only if `create_subnetwork` is true. + * + * Set to blank to have a range chosen with the default size. + * + * Set to /netmask (e.g. `/14`) to have a range chosen with a specific + * netmask. + * + * Set to a + * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + */ + nodeIpv4CidrBlock?: string; + /** This field is deprecated, use services_ipv4_cidr_block. */ + servicesIpv4Cidr?: string; + /** + * The IP address range of the services IPs in this cluster. If blank, a range + * will be automatically chosen with the default size. + * + * This field is only applicable when `use_ip_aliases` is true. + * + * Set to blank to have a range chosen with the default size. + * + * Set to /netmask (e.g. `/14`) to have a range chosen with a specific + * netmask. + * + * Set to a + * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + */ + servicesIpv4CidrBlock?: string; + /** + * The name of the secondary range to be used as for the services + * CIDR block. The secondary range will be used for service + * ClusterIPs. This must be an existing secondary range associated + * with the cluster subnetwork. + * + * This field is only applicable with use_ip_aliases is true and + * create_subnetwork is false. + */ + servicesSecondaryRangeName?: string; + /** + * A custom subnetwork name to be used if `create_subnetwork` is true. If + * this field is empty, then an automatic name will be chosen for the new + * subnetwork. + */ + subnetworkName?: string; + /** Whether alias IPs will be used for pod IPs in the cluster. */ + useIpAliases?: boolean; + } + interface KubernetesDashboard { + /** Whether the Kubernetes Dashboard is enabled for this cluster. */ + disabled?: boolean; + } + interface LegacyAbac { + /** + * Whether the ABAC authorizer is enabled for this cluster. When enabled, + * identities in the system, including service accounts, nodes, and + * controllers, will have statically granted permissions beyond those + * provided by the RBAC configuration or IAM. + */ + enabled?: boolean; + } + interface ListClustersResponse { + /** + * A list of clusters in the project in the specified zone, or + * across all ones. + */ + clusters?: Cluster[]; + /** + * If any zones are listed here, the list of clusters returned + * may be missing those zones. + */ + missingZones?: string[]; + } + interface ListNodePoolsResponse { + /** A list of node pools for a cluster. */ + nodePools?: NodePool[]; + } + interface ListOperationsResponse { + /** + * If any zones are listed here, the list of operations returned + * may be missing the operations from those zones. + */ + missingZones?: string[]; + /** A list of operations in the project in the specified zone. */ + operations?: Operation[]; + } + interface MaintenancePolicy { + /** Specifies the maintenance window in which maintenance may be performed. */ + window?: MaintenanceWindow; + } + interface MaintenanceWindow { + /** DailyMaintenanceWindow specifies a daily maintenance operation window. */ + dailyMaintenanceWindow?: DailyMaintenanceWindow; + } + interface MasterAuth { + /** + * [Output only] Base64-encoded public certificate used by clients to + * authenticate to the cluster endpoint. + */ + clientCertificate?: string; + /** + * Configuration for client certificate authentication on the cluster. If no + * configuration is specified, a client certificate is issued. + */ + clientCertificateConfig?: ClientCertificateConfig; + /** + * [Output only] Base64-encoded private key used by clients to authenticate + * to the cluster endpoint. + */ + clientKey?: string; + /** + * [Output only] Base64-encoded public certificate that is the root of + * trust for the cluster. + */ + clusterCaCertificate?: string; + /** + * The password to use for HTTP basic authentication to the master endpoint. + * Because the master endpoint is open to the Internet, you should create a + * strong password. If a password is provided for cluster creation, username + * must be non-empty. + */ + password?: string; + /** + * The username to use for HTTP basic authentication to the master endpoint. + * For clusters v1.6.0 and later, you can disable basic authentication by + * providing an empty username. + */ + username?: string; + } + interface MasterAuthorizedNetworksConfig { + /** + * cidr_blocks define up to 10 external networks that could access + * Kubernetes master through HTTPS. + */ + cidrBlocks?: CidrBlock[]; + /** Whether or not master authorized networks is enabled. */ + enabled?: boolean; + } + interface NetworkPolicy { + /** Whether network policy is enabled on the cluster. */ + enabled?: boolean; + /** The selected network policy provider. */ + provider?: string; + } + interface NetworkPolicyConfig { + /** Whether NetworkPolicy is enabled for this cluster. */ + disabled?: boolean; + } + interface NodeConfig { + /** + * A list of hardware accelerators to be attached to each node. + * See https://cloud.google.com/compute/docs/gpus for more information about + * support for GPUs. + */ + accelerators?: AcceleratorConfig[]; + /** + * Size of the disk attached to each node, specified in GB. + * The smallest allowed disk size is 10GB. + * + * If unspecified, the default disk size is 100GB. + */ + diskSizeGb?: number; + /** + * The image type to use for this node. Note that for a given image type, + * the latest version of it will be used. + */ + imageType?: string; + /** + * The map of Kubernetes labels (key/value pairs) to be applied to each node. + * These will added in addition to any default label(s) that + * Kubernetes may apply to the node. + * In case of conflict in label keys, the applied set may differ depending on + * the Kubernetes version -- it's best to assume the behavior is undefined + * and conflicts should be avoided. + * For more information, including usage and the valid values, see: + * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + */ + labels?: Record; + /** + * The number of local SSD disks to be attached to the node. + * + * The limit for this value is dependant upon the maximum number of + * disks available on a machine per zone. See: + * https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits + * for more information. + */ + localSsdCount?: number; + /** + * The name of a Google Compute Engine [machine + * type](/compute/docs/machine-types) (e.g. + * `n1-standard-1`). + * + * If unspecified, the default machine type is + * `n1-standard-1`. + */ + machineType?: string; + /** + * The metadata key/value pairs assigned to instances in the cluster. + * + * Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes + * in length. These are reflected as part of a URL in the metadata server. + * Additionally, to avoid ambiguity, keys must not conflict with any other + * metadata keys for the project or be one of the four reserved keys: + * "instance-template", "kube-env", "startup-script", and "user-data" + * + * Values are free-form strings, and only have meaning as interpreted by + * the image running in the instance. The only restriction placed on them is + * that each value's size must be less than or equal to 32 KB. + * + * The total size of all keys and values must be less than 512 KB. + */ + metadata?: Record; + /** + * Minimum CPU platform to be used by this instance. The instance may be + * scheduled on the specified or newer CPU platform. Applicable values are the + * friendly names of CPU platforms, such as + * minCpuPlatform: "Intel Haswell" or + * minCpuPlatform: "Intel Sandy Bridge". For more + * information, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) + */ + minCpuPlatform?: string; + /** + * The set of Google API scopes to be made available on all of the + * node VMs under the "default" service account. + * + * The following scopes are recommended, but not required, and by default are + * not included: + * + * * `https://www.googleapis.com/auth/compute` is required for mounting + * persistent storage on your nodes. + * * `https://www.googleapis.com/auth/devstorage.read_only` is required for + * communicating with **gcr.io** + * (the [Google Container Registry](/container-registry/)). + * + * If unspecified, no scopes are added, unless Cloud Logging or Cloud + * Monitoring are enabled, in which case their required scopes will be added. + */ + oauthScopes?: string[]; + /** + * Whether the nodes are created as preemptible VM instances. See: + * https://cloud.google.com/compute/docs/instances/preemptible for more + * information about preemptible VM instances. + */ + preemptible?: boolean; + /** + * The Google Cloud Platform Service Account to be used by the node VMs. If + * no Service Account is specified, the "default" service account is used. + */ + serviceAccount?: string; + /** + * The list of instance tags applied to all nodes. Tags are used to identify + * valid sources or targets for network firewalls and are specified by + * the client during cluster or node pool creation. Each tag within the list + * must comply with RFC1035. + */ + tags?: string[]; + } + interface NodeManagement { + /** + * A flag that specifies whether the node auto-repair is enabled for the node + * pool. If enabled, the nodes in this node pool will be monitored and, if + * they fail health checks too many times, an automatic repair action will be + * triggered. + */ + autoRepair?: boolean; + /** + * A flag that specifies whether node auto-upgrade is enabled for the node + * pool. If enabled, node auto-upgrade helps keep the nodes in your node pool + * up to date with the latest release version of Kubernetes. + */ + autoUpgrade?: boolean; + /** Specifies the Auto Upgrade knobs for the node pool. */ + upgradeOptions?: AutoUpgradeOptions; + } + interface NodePool { + /** + * Autoscaler configuration for this NodePool. Autoscaler is enabled + * only if a valid configuration is present. + */ + autoscaling?: NodePoolAutoscaling; + /** The node configuration of the pool. */ + config?: NodeConfig; + /** + * The initial node count for the pool. You must ensure that your + * Compute Engine resource quota + * is sufficient for this number of instances. You must also have available + * firewall and routes quota. + */ + initialNodeCount?: number; + /** + * [Output only] The resource URLs of [instance + * groups](/compute/docs/instance-groups/) associated with this + * node pool. + */ + instanceGroupUrls?: string[]; + /** NodeManagement configuration for this NodePool. */ + management?: NodeManagement; + /** The name of the node pool. */ + name?: string; + /** [Output only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output only] The status of the nodes in this pool instance. */ + status?: string; + /** + * [Output only] Additional information about the current status of this + * node pool instance, if available. + */ + statusMessage?: string; + /** [Output only] The version of the Kubernetes of this node. */ + version?: string; + } + interface NodePoolAutoscaling { + /** Is autoscaling enabled for this node pool. */ + enabled?: boolean; + /** + * Maximum number of nodes in the NodePool. Must be >= min_node_count. There + * has to enough quota to scale up the cluster. + */ + maxNodeCount?: number; + /** + * Minimum number of nodes in the NodePool. Must be >= 1 and <= + * max_node_count. + */ + minNodeCount?: number; + } + interface Operation { + /** Detailed operation progress, if available. */ + detail?: string; + /** + * [Output only] The time the operation completed, in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + */ + endTime?: string; + /** The server-assigned ID for the operation. */ + name?: string; + /** The operation type. */ + operationType?: string; + /** Server-defined URL for the resource. */ + selfLink?: string; + /** + * [Output only] The time the operation started, in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + */ + startTime?: string; + /** The current status of the operation. */ + status?: string; + /** If an error has occurred, a textual description of the error. */ + statusMessage?: string; + /** Server-defined URL for the target of the operation. */ + targetLink?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the operation + * is taking place. + */ + zone?: string; + } + interface ServerConfig { + /** Version of Kubernetes the service deploys by default. */ + defaultClusterVersion?: string; + /** Default image type. */ + defaultImageType?: string; + /** List of valid image types. */ + validImageTypes?: string[]; + /** List of valid master versions. */ + validMasterVersions?: string[]; + /** List of valid node upgrade target versions. */ + validNodeVersions?: string[]; + } + interface SetAddonsConfigRequest { + /** + * The desired configurations for the various addons available to run in the + * cluster. + */ + addonsConfig?: AddonsConfig; + } + interface SetLabelsRequest { + /** + * The fingerprint of the previous set of labels for this resource, + * used to detect conflicts. The fingerprint is initially generated by + * Container Engine and changes after every request to modify or update + * labels. You must always provide an up-to-date fingerprint hash when + * updating or changing labels. Make a get() request to the + * resource to get the latest fingerprint. + */ + labelFingerprint?: string; + /** The labels to set for that cluster. */ + resourceLabels?: Record; + } + interface SetLegacyAbacRequest { + /** Whether ABAC authorization will be enabled in the cluster. */ + enabled?: boolean; + } + interface SetLocationsRequest { + /** + * The desired list of Google Compute Engine + * [locations](/compute/docs/zones#available) in which the cluster's nodes + * should be located. Changing the locations a cluster is in will result + * in nodes being either created or removed from the cluster, depending on + * whether locations are being added or removed. + * + * This list must always include the cluster's primary zone. + */ + locations?: string[]; + } + interface SetLoggingServiceRequest { + /** + * The logging service the cluster should use to write metrics. + * Currently available options: + * + * * "logging.googleapis.com" - the Google Cloud Logging service + * * "none" - no metrics will be exported from the cluster + */ + loggingService?: string; + } + interface SetMaintenancePolicyRequest { + /** + * The maintenance policy to be set for the cluster. An empty field + * clears the existing maintenance policy. + */ + maintenancePolicy?: MaintenancePolicy; + } + interface SetMasterAuthRequest { + /** The exact form of action to be taken on the master auth. */ + action?: string; + /** A description of the update. */ + update?: MasterAuth; + } + interface SetMonitoringServiceRequest { + /** + * The monitoring service the cluster should use to write metrics. + * Currently available options: + * + * * "monitoring.googleapis.com" - the Google Cloud Monitoring service + * * "none" - no metrics will be exported from the cluster + */ + monitoringService?: string; + } + interface SetNetworkPolicyRequest { + /** Configuration options for the NetworkPolicy feature. */ + networkPolicy?: NetworkPolicy; + } + interface SetNodePoolAutoscalingRequest { + /** Autoscaling configuration for the node pool. */ + autoscaling?: NodePoolAutoscaling; + } + interface SetNodePoolManagementRequest { + /** NodeManagement configuration for the node pool. */ + management?: NodeManagement; + } + interface SetNodePoolSizeRequest { + /** The desired node count for the pool. */ + nodeCount?: number; + } + interface UpdateClusterRequest { + /** A description of the update. */ + update?: ClusterUpdate; + } + interface UpdateMasterRequest { + /** + * The Kubernetes version to change the master to. The only valid value is the + * latest supported version. Use "-" to have the server automatically select + * the latest version. + */ + masterVersion?: string; + } + interface UpdateNodePoolRequest { + /** The desired image type for the node pool. */ + imageType?: string; + /** + * The Kubernetes version to change the nodes to (typically an + * upgrade). Use `-` to upgrade to the latest version supported by + * the server. + */ + nodeVersion?: string; + } + interface NodePoolsResource { + /** Sets the autoscaling settings of a specific node pool. */ + autoscaling(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the node pool to upgrade. */ + nodePoolId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Creates a node pool for a cluster. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Deletes a node pool from a cluster. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the node pool to delete. */ + nodePoolId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Retrieves the node pool requested. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the node pool. */ + nodePoolId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Lists the node pools for a cluster. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** + * Roll back the previously Aborted or Failed NodePool upgrade. + * This will be an no-op if the last upgrade successfully completed. + */ + rollback(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to rollback. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the node pool to rollback. */ + nodePoolId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Sets the NodeManagement options for a node pool. */ + setManagement(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to update. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the node pool to update. */ + nodePoolId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Sets the size of a specific node pool. */ + setSize(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to update. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the node pool to update. */ + nodePoolId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Updates the version and/or image type of a specific node pool. */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the node pool to upgrade. */ + nodePoolId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + } + interface ClustersResource { + /** Sets the addons of a specific cluster. */ + addons(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Completes master IP rotation. */ + completeIpRotation(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** + * Creates a cluster, consisting of the specified number and type of Google + * Compute Engine instances. + * + * By default, the cluster is created in the project's + * [default network](/compute/docs/networks-and-firewalls#networks). + * + * One firewall is added for the cluster. After cluster creation, + * the cluster creates routes for each node to allow the containers + * on that node to communicate with all other instances in the + * cluster. + * + * Finally, an entry is added to the project's global metadata indicating + * which CIDR range is being used by the cluster. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** + * Deletes the cluster, including the Kubernetes endpoint and all worker + * nodes. + * + * Firewalls and routes that were configured during cluster creation + * are also deleted. + * + * Other Google Compute Engine resources that might be in use by the cluster + * (e.g. load balancer resources) will not be deleted if they weren't present + * at the initial create time. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to delete. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Gets the details of a specific cluster. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to retrieve. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Enables or disables the ABAC authorization mechanism on a cluster. */ + legacyAbac(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to update. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** + * Lists all clusters owned by a project in either the specified zone or all + * zones. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides, or "-" for all zones. + */ + zone: string; + }): Request; + /** Sets the locations of a specific cluster. */ + locations(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Sets the logging service of a specific cluster. */ + logging(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Updates the master of a specific cluster. */ + master(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Sets the monitoring service of a specific cluster. */ + monitoring(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Sets labels on a cluster. */ + resourceLabels(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Sets the maintenance policy for a cluster. */ + setMaintenancePolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to update. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** + * Used to set master auth materials. Currently supports :- + * Changing the admin password of a specific cluster. + * This can be either via password generation or explicitly set the password. + */ + setMasterAuth(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Enables/Disables Network Policy for a cluster. */ + setNetworkPolicy(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Start master IP rotation. */ + startIpRotation(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://developers.google.com/console/help/new/#projectnumber). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Updates the settings of a specific cluster. */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The name of the cluster to upgrade. */ + clusterId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + nodePools: NodePoolsResource; + } + interface OperationsResource { + /** Cancels the specified operation. */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The server-assigned `name` of the operation. */ + operationId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the operation resides. + */ + zone: string; + }): Request<{}>; + /** Gets the specified operation. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The server-assigned `name` of the operation. */ + operationId: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine + * [zone](/compute/docs/zones#available) in which the cluster + * resides. + */ + zone: string; + }): Request; + /** Lists all operations in a project in a specific zone or all zones. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine [zone](/compute/docs/zones#available) + * to return operations for, or `-` for all zones. + */ + zone: string; + }): Request; + } + interface ZonesResource { + /** Returns configuration info about the Container Engine service. */ + getServerconfig(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The Google Developers Console [project ID or project + * number](https://support.google.com/cloud/answer/6158840). + */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * The name of the Google Compute Engine [zone](/compute/docs/zones#available) + * to return operations for. + */ + zone: string; + }): Request; + clusters: ClustersResource; + operations: OperationsResource; + } + interface ProjectsResource { + zones: ZonesResource; + } + } +} diff --git a/types/gapi.client.container/readme.md b/types/gapi.client.container/readme.md new file mode 100644 index 0000000000..a36149296e --- /dev/null +++ b/types/gapi.client.container/readme.md @@ -0,0 +1,54 @@ +# TypeScript typings for Google Container Engine API v1 +The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology. +For detailed description please check [documentation](https://cloud.google.com/container-engine/). + +## Installing + +Install typings for Google Container Engine API: +``` +npm install @types/gapi.client.container@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('container', 'v1', () => { + // now we can use gapi.client.container + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Container Engine API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.container/tsconfig.json b/types/gapi.client.container/tsconfig.json new file mode 100644 index 0000000000..51ff6c98bb --- /dev/null +++ b/types/gapi.client.container/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.container-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.container/tslint.json b/types/gapi.client.container/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.container/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.content/gapi.client.content-tests.ts b/types/gapi.client.content/gapi.client.content-tests.ts new file mode 100644 index 0000000000..20b6ef8c93 --- /dev/null +++ b/types/gapi.client.content/gapi.client.content-tests.ts @@ -0,0 +1,387 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('content', 'v2', () => { + /** now we can use gapi.client.content */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage your product listings and accounts for Google Shopping */ + 'https://www.googleapis.com/auth/content', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Returns information about the authenticated user. */ + await gapi.client.accounts.authinfo({ + }); + /** + * Claims the website of a Merchant Center sub-account. This method can only be called for accounts to which the managing account has access: either the + * managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.accounts.claimwebsite({ + accountId: "accountId", + merchantId: "merchantId", + overwrite: true, + }); + /** Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. */ + await gapi.client.accounts.custombatch({ + dryRun: true, + }); + /** Deletes a Merchant Center sub-account. This method can only be called for multi-client accounts. */ + await gapi.client.accounts.delete({ + accountId: "accountId", + dryRun: true, + force: true, + merchantId: "merchantId", + }); + /** + * Retrieves a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account + * itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.accounts.get({ + accountId: "accountId", + merchantId: "merchantId", + }); + /** Creates a Merchant Center sub-account. This method can only be called for multi-client accounts. */ + await gapi.client.accounts.insert({ + dryRun: true, + merchantId: "merchantId", + }); + /** Lists the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + await gapi.client.accounts.list({ + maxResults: 1, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** + * Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account + * itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch semantics. + */ + await gapi.client.accounts.patch({ + accountId: "accountId", + dryRun: true, + merchantId: "merchantId", + }); + /** + * Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account + * itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.accounts.update({ + accountId: "accountId", + dryRun: true, + merchantId: "merchantId", + }); + await gapi.client.accountstatuses.custombatch({ + }); + /** + * Retrieves the status of a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the + * managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.accountstatuses.get({ + accountId: "accountId", + merchantId: "merchantId", + }); + /** Lists the statuses of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + await gapi.client.accountstatuses.list({ + maxResults: 1, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** Retrieves and updates tax settings of multiple accounts in a single request. */ + await gapi.client.accounttax.custombatch({ + dryRun: true, + }); + /** + * Retrieves the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.accounttax.get({ + accountId: "accountId", + merchantId: "merchantId", + }); + /** Lists the tax settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + await gapi.client.accounttax.list({ + maxResults: 1, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** + * Updates the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch + * semantics. + */ + await gapi.client.accounttax.patch({ + accountId: "accountId", + dryRun: true, + merchantId: "merchantId", + }); + /** + * Updates the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.accounttax.update({ + accountId: "accountId", + dryRun: true, + merchantId: "merchantId", + }); + await gapi.client.datafeeds.custombatch({ + dryRun: true, + }); + /** Deletes a datafeed configuration from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.datafeeds.delete({ + datafeedId: "datafeedId", + dryRun: true, + merchantId: "merchantId", + }); + /** Retrieves a datafeed configuration from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.datafeeds.get({ + datafeedId: "datafeedId", + merchantId: "merchantId", + }); + /** Registers a datafeed configuration with your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.datafeeds.insert({ + dryRun: true, + merchantId: "merchantId", + }); + /** Lists the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.datafeeds.list({ + maxResults: 1, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** + * Updates a datafeed configuration of your Merchant Center account. This method can only be called for non-multi-client accounts. This method supports + * patch semantics. + */ + await gapi.client.datafeeds.patch({ + datafeedId: "datafeedId", + dryRun: true, + merchantId: "merchantId", + }); + /** Updates a datafeed configuration of your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.datafeeds.update({ + datafeedId: "datafeedId", + dryRun: true, + merchantId: "merchantId", + }); + await gapi.client.datafeedstatuses.custombatch({ + }); + /** Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.datafeedstatuses.get({ + country: "country", + datafeedId: "datafeedId", + language: "language", + merchantId: "merchantId", + }); + /** Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.datafeedstatuses.list({ + maxResults: 1, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** + * Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. + * This method can only be called for non-multi-client accounts. + */ + await gapi.client.inventory.custombatch({ + dryRun: true, + }); + /** + * Updates price and availability of a product in your Merchant Center account. This operation does not update the expiration date of the product. This + * method can only be called for non-multi-client accounts. + */ + await gapi.client.inventory.set({ + dryRun: true, + merchantId: "merchantId", + productId: "productId", + storeCode: "storeCode", + }); + /** Marks an order as acknowledged. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.acknowledge({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.advancetestorder({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.cancel({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.cancellineitem({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Sandbox only. Creates a test order. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.createtestorder({ + merchantId: "merchantId", + }); + /** Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.custombatch({ + }); + /** Retrieves an order from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.get({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.getbymerchantorderid({ + merchantId: "merchantId", + merchantOrderId: "merchantOrderId", + }); + /** + * Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. This method can only be called for + * non-multi-client accounts. + */ + await gapi.client.orders.gettestordertemplate({ + merchantId: "merchantId", + templateName: "templateName", + }); + /** Lists the orders in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.list({ + acknowledged: true, + maxResults: 2, + merchantId: "merchantId", + orderBy: "orderBy", + pageToken: "pageToken", + placedDateEnd: "placedDateEnd", + placedDateStart: "placedDateStart", + statuses: "statuses", + }); + /** Refund a portion of the order, up to the full amount paid. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.refund({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Returns a line item. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.returnlineitem({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Marks line item(s) as shipped. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.shiplineitems({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Updates the merchant order ID for a given order. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.updatemerchantorderid({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-multi-client accounts. */ + await gapi.client.orders.updateshipment({ + merchantId: "merchantId", + orderId: "orderId", + }); + /** Retrieves, inserts, and deletes multiple products in a single request. This method can only be called for non-multi-client accounts. */ + await gapi.client.products.custombatch({ + dryRun: true, + }); + /** Deletes a product from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.products.delete({ + dryRun: true, + merchantId: "merchantId", + productId: "productId", + }); + /** Retrieves a product from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.products.get({ + merchantId: "merchantId", + productId: "productId", + }); + /** + * Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this + * method updates that entry. This method can only be called for non-multi-client accounts. + */ + await gapi.client.products.insert({ + dryRun: true, + merchantId: "merchantId", + }); + /** Lists the products in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.products.list({ + includeInvalidInsertedItems: true, + maxResults: 2, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** Gets the statuses of multiple products in a single request. This method can only be called for non-multi-client accounts. */ + await gapi.client.productstatuses.custombatch({ + includeAttributes: true, + }); + /** Gets the status of a product from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.productstatuses.get({ + includeAttributes: true, + merchantId: "merchantId", + productId: "productId", + }); + /** Lists the statuses of the products in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + await gapi.client.productstatuses.list({ + includeAttributes: true, + includeInvalidInsertedItems: true, + maxResults: 3, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** Retrieves and updates the shipping settings of multiple accounts in a single request. */ + await gapi.client.shippingsettings.custombatch({ + dryRun: true, + }); + /** + * Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the + * managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.shippingsettings.get({ + accountId: "accountId", + merchantId: "merchantId", + }); + /** Retrieves supported carriers and carrier services for an account. */ + await gapi.client.shippingsettings.getsupportedcarriers({ + merchantId: "merchantId", + }); + /** Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + await gapi.client.shippingsettings.list({ + maxResults: 1, + merchantId: "merchantId", + pageToken: "pageToken", + }); + /** + * Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch + * semantics. + */ + await gapi.client.shippingsettings.patch({ + accountId: "accountId", + dryRun: true, + merchantId: "merchantId", + }); + /** + * Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + await gapi.client.shippingsettings.update({ + accountId: "accountId", + dryRun: true, + merchantId: "merchantId", + }); + } +}); diff --git a/types/gapi.client.content/index.d.ts b/types/gapi.client.content/index.d.ts new file mode 100644 index 0000000000..f3b3b51845 --- /dev/null +++ b/types/gapi.client.content/index.d.ts @@ -0,0 +1,3459 @@ +// Type definitions for Google Content API for Shopping v2 2.0 +// Project: https://developers.google.com/shopping-content +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/content/v2/rest + +/// + +declare namespace gapi.client { + /** Load Content API for Shopping v2 */ + function load(name: "content", version: "v2"): PromiseLike; + function load(name: "content", version: "v2", callback: () => any): void; + + const accounts: content.AccountsResource; + + const accountstatuses: content.AccountstatusesResource; + + const accounttax: content.AccounttaxResource; + + const datafeeds: content.DatafeedsResource; + + const datafeedstatuses: content.DatafeedstatusesResource; + + const inventory: content.InventoryResource; + + const orders: content.OrdersResource; + + const products: content.ProductsResource; + + const productstatuses: content.ProductstatusesResource; + + const shippingsettings: content.ShippingsettingsResource; + + namespace content { + interface Account { + /** Indicates whether the merchant sells adult content. */ + adultContent?: boolean; + /** + * List of linked AdWords accounts that are active or pending approval. To create a new link request, add a new link with status active to the list. It + * will remain in a pending state until approved or rejected either in the AdWords interface or through the AdWords API. To delete an active link, or to + * cancel a link request, remove it from the list. + */ + adwordsLinks?: AccountAdwordsLink[]; + /** Merchant Center account ID. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#account". */ + kind?: string; + /** Display name for the account. */ + name?: string; + /** URL for individual seller reviews, i.e., reviews for each child account. */ + reviewsUrl?: string; + /** Client-specific, locally-unique, internal ID for the child account. */ + sellerId?: string; + /** Users with access to the account. Every account (except for subaccounts) must have at least one admin user. */ + users?: AccountUser[]; + /** The merchant's website. */ + websiteUrl?: string; + /** + * List of linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status active to the list. It + * will remain in a pending state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, + * remove it from the list. + */ + youtubeChannelLinks?: AccountYouTubeChannelLink[]; + } + interface AccountAdwordsLink { + /** Customer ID of the AdWords account. */ + adwordsId?: string; + /** + * Status of the link between this Merchant Center account and the AdWords account. Upon retrieval, it represents the actual status of the link and can be + * either active if it was approved in Google AdWords or pending if it's pending approval. Upon insertion, it represents the intended status of the link. + * Re-uploading a link with status active when it's still pending or with status pending when it's already active will have no effect: the status will + * remain unchanged. Re-uploading a link with deprecated status inactive is equivalent to not submitting the link at all and will delete the link if it + * was active or cancel the link request if it was pending. + */ + status?: string; + } + interface AccountIdentifier { + /** The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount). */ + aggregatorId?: string; + /** The merchant account ID, set for individual accounts and subaccounts. */ + merchantId?: string; + } + interface AccountStatus { + /** The ID of the account for which the status is reported. */ + accountId?: string; + /** A list of account level issues. */ + accountLevelIssues?: AccountStatusAccountLevelIssue[]; + /** A list of data quality issues. */ + dataQualityIssues?: AccountStatusDataQualityIssue[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#accountStatus". */ + kind?: string; + /** Whether the account's website is claimed or not. */ + websiteClaimed?: boolean; + } + interface AccountStatusAccountLevelIssue { + /** Country for which this issue is reported. */ + country?: string; + /** Additional details about the issue. */ + detail?: string; + /** Issue identifier. */ + id?: string; + /** Severity of the issue. */ + severity?: string; + /** Short description of the issue. */ + title?: string; + } + interface AccountStatusDataQualityIssue { + /** Country for which this issue is reported. */ + country?: string; + /** A more detailed description of the issue. */ + detail?: string; + /** Actual value displayed on the landing page. */ + displayedValue?: string; + /** Example items featuring the issue. */ + exampleItems?: AccountStatusExampleItem[]; + /** Issue identifier. */ + id?: string; + /** Last time the account was checked for this issue. */ + lastChecked?: string; + /** The attribute name that is relevant for the issue. */ + location?: string; + /** Number of items in the account found to have the said issue. */ + numItems?: number; + /** Severity of the problem. */ + severity?: string; + /** Submitted value that causes the issue. */ + submittedValue?: string; + } + interface AccountStatusExampleItem { + /** Unique item ID as specified in the uploaded product data. */ + itemId?: string; + /** Landing page of the item. */ + link?: string; + /** The item value that was submitted. */ + submittedValue?: string; + /** Title of the item. */ + title?: string; + /** The actual value on the landing page. */ + valueOnLandingPage?: string; + } + interface AccountTax { + /** The ID of the account to which these account tax settings belong. */ + accountId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#accountTax". */ + kind?: string; + /** Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all. */ + rules?: AccountTaxTaxRule[]; + } + interface AccountTaxTaxRule { + /** Country code in which tax is applicable. */ + country?: string; + /** State (or province) is which the tax is applicable, described by its location id (also called criteria id). */ + locationId?: string; + /** Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative. */ + ratePercent?: string; + /** If true, shipping charges are also taxed. */ + shippingTaxed?: boolean; + /** Whether the tax rate is taken from a global tax table or specified explicitly. */ + useGlobalRate?: boolean; + } + interface AccountUser { + /** Whether user is an admin. */ + admin?: boolean; + /** User's email address. */ + emailAddress?: string; + } + interface AccountYouTubeChannelLink { + /** Channel ID. */ + channelId?: string; + /** + * Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be + * either active if it was approved in YT Creator Studio or pending if it's pending approval. Upon insertion, it represents the intended status of the + * link. Re-uploading a link with status active when it's still pending or with status pending when it's already active will have no effect: the status + * will remain unchanged. Re-uploading a link with deprecated status inactive is equivalent to not submitting the link at all and will delete the link if + * it was active or cancel the link request if it was pending. + */ + status?: string; + } + interface AccountsAuthInfoResponse { + /** + * The account identifiers corresponding to the authenticated user. + * - For an individual account: only the merchant ID is defined + * - For an aggregator: only the aggregator ID is defined + * - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. + */ + accountIdentifiers?: AccountIdentifier[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#accountsAuthInfoResponse". */ + kind?: string; + } + interface AccountsClaimWebsiteResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#accountsClaimWebsiteResponse". */ + kind?: string; + } + interface AccountsCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: AccountsCustomBatchRequestEntry[]; + } + interface AccountsCustomBatchRequestEntry { + /** The account to create or update. Only defined if the method is insert or update. */ + account?: Account; + /** The ID of the targeted account. Only defined if the method is get, delete or claimwebsite. */ + accountId?: string; + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** Whether the account should be deleted if the account has offers. Only applicable if the method is delete. */ + force?: boolean; + /** The ID of the managing account. */ + merchantId?: string; + method?: string; + /** Only applicable if the method is claimwebsite. Indicates whether or not to take the claim from another account in case there is a conflict. */ + overwrite?: boolean; + } + interface AccountsCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: AccountsCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponse". */ + kind?: string; + } + interface AccountsCustomBatchResponseEntry { + /** The retrieved, created, or updated account. Not defined if the method was delete or claimwebsite. */ + account?: Account; + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + /** Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponseEntry". */ + kind?: string; + } + interface AccountsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#accountsListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of accounts. */ + nextPageToken?: string; + resources?: Account[]; + } + interface AccountstatusesCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: AccountstatusesCustomBatchRequestEntry[]; + } + interface AccountstatusesCustomBatchRequestEntry { + /** The ID of the (sub-)account whose status to get. */ + accountId?: string; + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** The ID of the managing account. */ + merchantId?: string; + /** The method (get). */ + method?: string; + } + interface AccountstatusesCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: AccountstatusesCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesCustomBatchResponse". */ + kind?: string; + } + interface AccountstatusesCustomBatchResponseEntry { + /** The requested account status. Defined if and only if the request was successful. */ + accountStatus?: AccountStatus; + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + } + interface AccountstatusesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of account statuses. */ + nextPageToken?: string; + resources?: AccountStatus[]; + } + interface AccounttaxCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: AccounttaxCustomBatchRequestEntry[]; + } + interface AccounttaxCustomBatchRequestEntry { + /** The ID of the account for which to get/update account tax settings. */ + accountId?: string; + /** The account tax settings to update. Only defined if the method is update. */ + accountTax?: AccountTax; + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** The ID of the managing account. */ + merchantId?: string; + method?: string; + } + interface AccounttaxCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: AccounttaxCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse". */ + kind?: string; + } + interface AccounttaxCustomBatchResponseEntry { + /** The retrieved or updated account tax settings. */ + accountTax?: AccountTax; + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + /** Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponseEntry". */ + kind?: string; + } + interface AccounttaxListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#accounttaxListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of account tax settings. */ + nextPageToken?: string; + resources?: AccountTax[]; + } + interface CarrierRate { + /** Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required. */ + carrierName?: string; + /** + * Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. + * Required. + */ + carrierService?: string; + /** + * Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : + * "USD" } removes $3 from the rate. Optional. + */ + flatAdjustment?: Price; + /** Name of the carrier rate. Must be unique per rate group. Required. */ + name?: string; + /** Shipping origin for this carrier rate. Required. */ + originPostalCode?: string; + /** + * Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases + * the rate by 3%. Optional. + */ + percentageAdjustment?: string; + } + interface CarriersCarrier { + /** The CLDR country code of the carrier (e.g., "US"). Always present. */ + country?: string; + /** The name of the carrier (e.g., "UPS"). Always present. */ + name?: string; + /** A list of supported services (e.g., "ground") for that carrier. Contains at least one service. */ + services?: string[]; + } + interface Datafeed { + /** The two-letter ISO 639-1 language in which the attributes are defined in the data feed. */ + attributeLanguage?: string; + /** + * [DEPRECATED] Please use target.language instead. The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for + * targetCountry. + */ + contentLanguage?: string; + /** The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported. */ + contentType?: string; + /** Fetch schedule for the feed file. */ + fetchSchedule?: DatafeedFetchSchedule; + /** The filename of the feed. All feeds must have a unique file name. */ + fileName?: string; + /** Format of the feed file. */ + format?: DatafeedFormat; + /** The ID of the data feed. */ + id?: string; + /** [DEPRECATED] Please use target.includedDestination instead. The list of intended destinations (corresponds to checked check boxes in Merchant Center). */ + intendedDestinations?: string[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#datafeed". */ + kind?: string; + /** A descriptive name of the data feed. */ + name?: string; + /** + * [DEPRECATED] Please use target.country instead. The country where the items in the feed will be included in the search index, represented as a CLDR + * territory code. + */ + targetCountry?: string; + /** The targets this feed should apply to (country, language, destinations). */ + targets?: DatafeedTarget[]; + } + interface DatafeedFetchSchedule { + /** The day of the month the feed file should be fetched (1-31). */ + dayOfMonth?: number; + /** + * The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP + * protocols, so the value will need to be a valid link using one of those four protocols. + */ + fetchUrl?: string; + /** The hour of the day the feed file should be fetched (0-23). */ + hour?: number; + /** The minute of the hour the feed file should be fetched (0-59). Read-only. */ + minuteOfHour?: number; + /** An optional password for fetch_url. */ + password?: string; + /** Whether the scheduled fetch is paused or not. */ + paused?: boolean; + /** Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". */ + timeZone?: string; + /** An optional user name for fetch_url. */ + username?: string; + /** The day of the week the feed file should be fetched. */ + weekday?: string; + } + interface DatafeedFormat { + /** + * Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV + * data feeds. + */ + columnDelimiter?: string; + /** Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. */ + fileEncoding?: string; + /** Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. */ + quotingMode?: string; + } + interface DatafeedStatus { + /** The country for which the status is reported, represented as a CLDR territory code. */ + country?: string; + /** The ID of the feed for which the status is reported. */ + datafeedId?: string; + /** The list of errors occurring in the feed. */ + errors?: DatafeedStatusError[]; + /** The number of items in the feed that were processed. */ + itemsTotal?: string; + /** The number of items in the feed that were valid. */ + itemsValid?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#datafeedStatus". */ + kind?: string; + /** The two-letter ISO 639-1 language for which the status is reported. */ + language?: string; + /** The last date at which the feed was uploaded. */ + lastUploadDate?: string; + /** The processing status of the feed. */ + processingStatus?: string; + /** The list of errors occurring in the feed. */ + warnings?: DatafeedStatusError[]; + } + interface DatafeedStatusError { + /** The code of the error, e.g., "validation/invalid_value". */ + code?: string; + /** The number of occurrences of the error in the feed. */ + count?: string; + /** A list of example occurrences of the error, grouped by product. */ + examples?: DatafeedStatusExample[]; + /** The error message, e.g., "Invalid price". */ + message?: string; + } + interface DatafeedStatusExample { + /** The ID of the example item. */ + itemId?: string; + /** Line number in the data feed where the example is found. */ + lineNumber?: string; + /** The problematic value. */ + value?: string; + } + interface DatafeedTarget { + /** The country where the items in the feed will be included in the search index, represented as a CLDR territory code. */ + country?: string; + /** The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center). */ + excludedDestinations?: string[]; + /** + * The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included + * unless provided in the excluded_destination field. + */ + includedDestinations?: string[]; + /** The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targets[].country. */ + language?: string; + } + interface DatafeedsCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: DatafeedsCustomBatchRequestEntry[]; + } + interface DatafeedsCustomBatchRequestEntry { + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** The data feed to insert. */ + datafeed?: Datafeed; + /** The ID of the data feed to get or delete. */ + datafeedId?: string; + /** The ID of the managing account. */ + merchantId?: string; + method?: string; + } + interface DatafeedsCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: DatafeedsCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#datafeedsCustomBatchResponse". */ + kind?: string; + } + interface DatafeedsCustomBatchResponseEntry { + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** The requested data feed. Defined if and only if the request was successful. */ + datafeed?: Datafeed; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + } + interface DatafeedsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#datafeedsListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of datafeeds. */ + nextPageToken?: string; + resources?: Datafeed[]; + } + interface DatafeedstatusesCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: DatafeedstatusesCustomBatchRequestEntry[]; + } + interface DatafeedstatusesCustomBatchRequestEntry { + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** + * The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that for multi-target + * datafeeds this parameter is required. + */ + country?: string; + /** The ID of the data feed to get. */ + datafeedId?: string; + /** + * The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that for multi-target + * datafeeds this parameter is required. + */ + language?: string; + /** The ID of the managing account. */ + merchantId?: string; + method?: string; + } + interface DatafeedstatusesCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: DatafeedstatusesCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesCustomBatchResponse". */ + kind?: string; + } + interface DatafeedstatusesCustomBatchResponseEntry { + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** The requested data feed status. Defined if and only if the request was successful. */ + datafeedStatus?: DatafeedStatus; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + } + interface DatafeedstatusesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of datafeed statuses. */ + nextPageToken?: string; + resources?: DatafeedStatus[]; + } + interface DeliveryTime { + /** + * Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to + * minTransitTimeInDays. Required. + */ + maxTransitTimeInDays?: number; + /** Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required. */ + minTransitTimeInDays?: number; + } + interface Error { + /** The domain of the error. */ + domain?: string; + /** A description of the error. */ + message?: string; + /** The error code. */ + reason?: string; + } + interface Errors { + /** The HTTP status of the first error in errors. */ + code?: number; + /** A list of errors. */ + errors?: Error[]; + /** The message of the first error in errors. */ + message?: string; + } + interface Headers { + /** A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set. */ + locations?: LocationIdSet[]; + /** + * A list of inclusive number of items upper bounds. The last value can be "infinity". For example ["10", "50", "infinity"] represents the headers "<= 10 + * items", " 50 items". Must be non-empty. Can only be set if all other fields are not set. + */ + numberOfItems?: string[]; + /** + * A list of postal group names. The last value can be "all other locations". Example: ["zone 1", "zone 2", "all other locations"]. The referred postal + * code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set. + */ + postalCodeGroupNames?: string[]; + /** + * be "infinity". For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] + * represents the headers "<= $10", " $500". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other + * fields are not set. + */ + prices?: Price[]; + /** + * be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers + * "<= 10kg", " 50kg". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set. + */ + weights?: Weight[]; + } + interface Installment { + /** The amount the buyer has to pay per month. */ + amount?: Price; + /** The number of installments the buyer has to pay. */ + months?: string; + } + interface Inventory { + /** The availability of the product. */ + availability?: string; + /** Number and amount of installments to pay for an item. Brazil only. */ + installment?: Installment; + /** Identifies what kind of resource this is. Value: the fixed string "content#inventory". */ + kind?: string; + /** Loyalty points that users receive after purchasing the item. Japan only. */ + loyaltyPoints?: LoyaltyPoints; + /** + * Store pickup information. Only supported for local inventory. Not setting pickup means "don't update" while setting it to the empty value ({} in JSON) + * means "delete". Otherwise, pickupMethod and pickupSla must be set together, unless pickupMethod is "not supported". + */ + pickup?: InventoryPickup; + /** The price of the product. */ + price?: Price; + /** The quantity of the product. Must be equal to or greater than zero. Supported only for local products. */ + quantity?: number; + /** The sale price of the product. Mandatory if sale_price_effective_date is defined. */ + salePrice?: Price; + /** A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. */ + salePriceEffectiveDate?: string; + /** The quantity of the product that is reserved for sell-on-google ads. Supported only for online products. */ + sellOnGoogleQuantity?: number; + } + interface InventoryCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: InventoryCustomBatchRequestEntry[]; + } + interface InventoryCustomBatchRequestEntry { + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** Price and availability of the product. */ + inventory?: Inventory; + /** The ID of the managing account. */ + merchantId?: string; + /** The ID of the product for which to update price and availability. */ + productId?: string; + /** The code of the store for which to update price and availability. Use online to update price and availability of an online product. */ + storeCode?: string; + } + interface InventoryCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: InventoryCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponse". */ + kind?: string; + } + interface InventoryCustomBatchResponseEntry { + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + /** Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponseEntry". */ + kind?: string; + } + interface InventoryPickup { + /** + * Whether store pickup is available for this offer and whether the pickup option should be shown as buy, reserve, or not supported. Only supported for + * local inventory. Unless the value is "not supported", must be submitted together with pickupSla. + */ + pickupMethod?: string; + /** + * The expected date that an order will be ready for pickup, relative to when the order is placed. Only supported for local inventory. Must be submitted + * together with pickupMethod. + */ + pickupSla?: string; + } + interface InventorySetRequest { + /** The availability of the product. */ + availability?: string; + /** Number and amount of installments to pay for an item. Brazil only. */ + installment?: Installment; + /** Loyalty points that users receive after purchasing the item. Japan only. */ + loyaltyPoints?: LoyaltyPoints; + /** + * Store pickup information. Only supported for local inventory. Not setting pickup means "don't update" while setting it to the empty value ({} in JSON) + * means "delete". Otherwise, pickupMethod and pickupSla must be set together, unless pickupMethod is "not supported". + */ + pickup?: InventoryPickup; + /** The price of the product. */ + price?: Price; + /** The quantity of the product. Must be equal to or greater than zero. Supported only for local products. */ + quantity?: number; + /** The sale price of the product. Mandatory if sale_price_effective_date is defined. */ + salePrice?: Price; + /** A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. */ + salePriceEffectiveDate?: string; + /** The quantity of the product that is reserved for sell-on-google ads. Supported only for online products. */ + sellOnGoogleQuantity?: number; + } + interface InventorySetResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#inventorySetResponse". */ + kind?: string; + } + interface LocationIdSet { + /** A non-empty list of location IDs. They must all be of the same location type (e.g., state). */ + locationIds?: string[]; + } + interface LoyaltyPoints { + /** Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters. */ + name?: string; + /** The retailer's loyalty points in absolute value. */ + pointsValue?: string; + /** The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0. */ + ratio?: number; + } + interface Order { + /** Whether the order was acknowledged. */ + acknowledged?: boolean; + /** The channel type of the order: "purchaseOnGoogle" or "googleExpress". */ + channelType?: string; + /** The details of the customer who placed the order. */ + customer?: OrderCustomer; + /** The details for the delivery. */ + deliveryDetails?: OrderDeliveryDetails; + /** The REST id of the order. Globally unique. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#order". */ + kind?: string; + /** Line items that are ordered. */ + lineItems?: OrderLineItem[]; + merchantId?: string; + /** Merchant-provided id of the order. */ + merchantOrderId?: string; + /** + * The net amount for the order. For example, if an order was originally for a grand total of $100 and a refund was issued for $20, the net amount will be + * $80. + */ + netAmount?: Price; + /** The details of the payment method. */ + paymentMethod?: OrderPaymentMethod; + /** The status of the payment. */ + paymentStatus?: string; + /** The date when the order was placed, in ISO 8601 format. */ + placedDate?: string; + /** The details of the merchant provided promotions applied to the order. More details about the program are here. */ + promotions?: OrderPromotion[]; + /** Refunds for the order. */ + refunds?: OrderRefund[]; + /** Shipments of the order. */ + shipments?: OrderShipment[]; + /** The total cost of shipping for all items. */ + shippingCost?: Price; + /** The tax for the total shipping cost. */ + shippingCostTax?: Price; + /** The requested shipping option. */ + shippingOption?: string; + /** The status of the order. */ + status?: string; + } + interface OrderAddress { + /** CLDR country code (e.g. "US"). */ + country?: string; + /** + * Strings representing the lines of the printed label for mailing the order, for example: + * John Smith + * 1600 Amphitheatre Parkway + * Mountain View, CA, 94043 + * United States + */ + fullAddress?: string[]; + /** Whether the address is a post office box. */ + isPostOfficeBox?: boolean; + /** City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs). */ + locality?: string; + /** Postal Code or ZIP (e.g. "94043"). */ + postalCode?: string; + /** Name of the recipient. */ + recipientName?: string; + /** Top-level administrative subdivision of the country (e.g. "CA"). */ + region?: string; + /** Street-level part of the address. */ + streetAddress?: string[]; + } + interface OrderCancellation { + /** The actor that created the cancellation. */ + actor?: string; + /** Date on which the cancellation has been created, in ISO 8601 format. */ + creationDate?: string; + /** The quantity that was canceled. */ + quantity?: number; + /** + * The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to the removal of the product from POG until you make an + * update to that product. This will not affect your Shopping ads. + */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrderCustomer { + /** Email address of the customer. */ + email?: string; + /** + * If set, this indicates the user explicitly chose to opt in or out of providing marketing rights to the merchant. If unset, this indicates the user has + * already made this choice in a previous purchase, and was thus not shown the marketing right opt in/out checkbox during the checkout flow. + */ + explicitMarketingPreference?: boolean; + /** Full name of the customer. */ + fullName?: string; + } + interface OrderDeliveryDetails { + /** The delivery address */ + address?: OrderAddress; + /** The phone number of the person receiving the delivery. */ + phoneNumber?: string; + } + interface OrderLineItem { + /** Cancellations of the line item. */ + cancellations?: OrderCancellation[]; + /** The channel type of the order: "purchaseOnGoogle" or "googleExpress". */ + channelType?: string; + /** The id of the line item. */ + id?: string; + /** Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. */ + price?: Price; + /** Product data from the time of the order placement. */ + product?: OrderLineItemProduct; + /** Number of items canceled. */ + quantityCanceled?: number; + /** Number of items delivered. */ + quantityDelivered?: number; + /** Number of items ordered. */ + quantityOrdered?: number; + /** Number of items pending. */ + quantityPending?: number; + /** Number of items returned. */ + quantityReturned?: number; + /** Number of items shipped. */ + quantityShipped?: number; + /** Details of the return policy for the line item. */ + returnInfo?: OrderLineItemReturnInfo; + /** Returns of the line item. */ + returns?: OrderReturn[]; + /** Details of the requested shipping for the line item. */ + shippingDetails?: OrderLineItemShippingDetails; + /** Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4. */ + tax?: Price; + } + interface OrderLineItemProduct { + /** Brand of the item. */ + brand?: string; + /** The item's channel (online or local). */ + channel?: string; + /** Condition or state of the item. */ + condition?: string; + /** The two-letter ISO 639-1 language code for the item. */ + contentLanguage?: string; + /** Global Trade Item Number (GTIN) of the item. */ + gtin?: string; + /** The REST id of the product. */ + id?: string; + /** URL of an image of the item. */ + imageLink?: string; + /** Shared identifier for all variants of the same product. */ + itemGroupId?: string; + /** Manufacturer Part Number (MPN) of the item. */ + mpn?: string; + /** An identifier of the item. */ + offerId?: string; + /** Price of the item. */ + price?: Price; + /** URL to the cached image shown to the user when order was placed. */ + shownImage?: string; + /** The CLDR territory code of the target country of the product. */ + targetCountry?: string; + /** The title of the product. */ + title?: string; + /** + * Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive + * list of variant attributes here. + */ + variantAttributes?: OrderLineItemProductVariantAttribute[]; + } + interface OrderLineItemProductVariantAttribute { + /** The dimension of the variant. */ + dimension?: string; + /** The value for the dimension. */ + value?: string; + } + interface OrderLineItemReturnInfo { + /** How many days later the item can be returned. */ + daysToReturn?: number; + /** Whether the item is returnable. */ + isReturnable?: boolean; + /** URL of the item return policy. */ + policyUrl?: string; + } + interface OrderLineItemShippingDetails { + /** The delivery by date, in ISO 8601 format. */ + deliverByDate?: string; + /** Details of the shipping method. */ + method?: OrderLineItemShippingDetailsMethod; + /** The ship by date, in ISO 8601 format. */ + shipByDate?: string; + } + interface OrderLineItemShippingDetailsMethod { + /** The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values. */ + carrier?: string; + /** Maximum transit time. */ + maxDaysInTransit?: number; + /** The name of the shipping method. */ + methodName?: string; + /** Minimum transit time. */ + minDaysInTransit?: number; + } + interface OrderPaymentMethod { + /** The billing address. */ + billingAddress?: OrderAddress; + /** The card expiration month (January = 1, February = 2 etc.). */ + expirationMonth?: number; + /** The card expiration year (4-digit, e.g. 2015). */ + expirationYear?: number; + /** The last four digits of the card number. */ + lastFourDigits?: string; + /** The billing phone number. */ + phoneNumber?: string; + /** + * The type of instrument. + * + * Acceptable values are: + * - "AMEX" + * - "DISCOVER" + * - "JCB" + * - "MASTERCARD" + * - "UNIONPAY" + * - "VISA" + * - "" + */ + type?: string; + } + interface OrderPromotion { + benefits?: OrderPromotionBenefit[]; + /** + * The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours + * due to the validation review. + * Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the + * time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the + * same format. + */ + effectiveDates?: string; + /** Optional. The text code that corresponds to the promotion when applied on the retailer?s website. */ + genericRedemptionCode?: string; + /** The unique ID of the promotion. */ + id?: string; + /** The full title of the promotion. */ + longTitle?: string; + /** Whether the promotion is applicable to all products or only specific products. */ + productApplicability?: string; + /** Indicates that the promotion is valid online. */ + redemptionChannel?: string; + } + interface OrderPromotionBenefit { + /** The discount in the order price when the promotion is applied. */ + discount?: Price; + /** The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. */ + offerIds?: string[]; + /** Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. */ + subType?: string; + /** The impact on tax when the promotion is applied. */ + taxImpact?: Price; + /** Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). */ + type?: string; + } + interface OrderRefund { + /** The actor that created the refund. */ + actor?: string; + /** The amount that is refunded. */ + amount?: Price; + /** Date on which the item has been created, in ISO 8601 format. */ + creationDate?: string; + /** The reason for the refund. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrderReturn { + /** The actor that created the refund. */ + actor?: string; + /** Date on which the item has been created, in ISO 8601 format. */ + creationDate?: string; + /** Quantity that is returned. */ + quantity?: number; + /** The reason for the return. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrderShipment { + /** + * The carrier handling the shipment. + * + * Acceptable values are: + * - "gsx" + * - "ups" + * - "united parcel service" + * - "usps" + * - "united states postal service" + * - "fedex" + * - "dhl" + * - "ecourier" + * - "cxt" + * - "google" + * - "on trac" + * - "ontrac" + * - "on-trac" + * - "on_trac" + * - "delvic" + * - "dynamex" + * - "lasership" + * - "smartpost" + * - "fedex smartpost" + * - "mpx" + * - "uds" + * - "united delivery service" + */ + carrier?: string; + /** Date on which the shipment has been created, in ISO 8601 format. */ + creationDate?: string; + /** Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is delievered */ + deliveryDate?: string; + /** The id of the shipment. */ + id?: string; + /** The line items that are shipped. */ + lineItems?: OrderShipmentLineItemShipment[]; + /** The status of the shipment. */ + status?: string; + /** The tracking id for the shipment. */ + trackingId?: string; + } + interface OrderShipmentLineItemShipment { + /** The id of the line item that is shipped. */ + lineItemId?: string; + /** The quantity that is shipped. */ + quantity?: number; + } + interface OrdersAcknowledgeRequest { + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + } + interface OrdersAcknowledgeResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersAcknowledgeResponse". */ + kind?: string; + } + interface OrdersAdvanceTestOrderResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersAdvanceTestOrderResponse". */ + kind?: string; + } + interface OrdersCancelLineItemRequest { + /** + * Amount to refund for the cancelation. Optional. If not set, Google will calculate the default based on the price and tax of the items involved. The + * amount must not be larger than the net amount left on the order. + */ + amount?: Price; + /** The ID of the line item to cancel. */ + lineItemId?: string; + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + /** The quantity to cancel. */ + quantity?: number; + /** The reason for the cancellation. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersCancelLineItemResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelLineItemResponse". */ + kind?: string; + } + interface OrdersCancelRequest { + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + /** The reason for the cancellation. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersCancelResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersCancelResponse". */ + kind?: string; + } + interface OrdersCreateTestOrderRequest { + /** + * The test order template to use. Specify as an alternative to testOrder as a shortcut for retrieving a template and then creating an order using that + * template. + */ + templateName?: string; + /** The test order to create. */ + testOrder?: TestOrder; + } + interface OrdersCreateTestOrderResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersCreateTestOrderResponse". */ + kind?: string; + /** The ID of the newly created test order. */ + orderId?: string; + } + interface OrdersCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: OrdersCustomBatchRequestEntry[]; + } + interface OrdersCustomBatchRequestEntry { + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** Required for cancel method. */ + cancel?: OrdersCustomBatchRequestEntryCancel; + /** Required for cancelLineItem method. */ + cancelLineItem?: OrdersCustomBatchRequestEntryCancelLineItem; + /** The ID of the managing account. */ + merchantId?: string; + /** The merchant order id. Required for updateMerchantOrderId and getByMerchantOrderId methods. */ + merchantOrderId?: string; + /** The method to apply. */ + method?: string; + /** The ID of the operation. Unique across all operations for a given order. Required for all methods beside get and getByMerchantOrderId. */ + operationId?: string; + /** The ID of the order. Required for all methods beside getByMerchantOrderId. */ + orderId?: string; + /** Required for refund method. */ + refund?: OrdersCustomBatchRequestEntryRefund; + /** Required for returnLineItem method. */ + returnLineItem?: OrdersCustomBatchRequestEntryReturnLineItem; + /** Required for shipLineItems method. */ + shipLineItems?: OrdersCustomBatchRequestEntryShipLineItems; + /** Required for updateShipment method. */ + updateShipment?: OrdersCustomBatchRequestEntryUpdateShipment; + } + interface OrdersCustomBatchRequestEntryCancel { + /** The reason for the cancellation. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersCustomBatchRequestEntryCancelLineItem { + /** + * Amount to refund for the cancelation. Optional. If not set, Google will calculate the default based on the price and tax of the items involved. The + * amount must not be larger than the net amount left on the order. + */ + amount?: Price; + /** The ID of the line item to cancel. */ + lineItemId?: string; + /** The quantity to cancel. */ + quantity?: number; + /** The reason for the cancellation. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersCustomBatchRequestEntryRefund { + /** The amount that is refunded. */ + amount?: Price; + /** The reason for the refund. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersCustomBatchRequestEntryReturnLineItem { + /** The ID of the line item to return. */ + lineItemId?: string; + /** The quantity to return. */ + quantity?: number; + /** The reason for the return. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersCustomBatchRequestEntryShipLineItems { + /** + * Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a + * list of acceptable values. + */ + carrier?: string; + /** Line items to ship. */ + lineItems?: OrderShipmentLineItemShipment[]; + /** Deprecated. Please use shipmentInfo instead. The ID of the shipment. */ + shipmentId?: string; + /** Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs). */ + shipmentInfos?: OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; + /** Deprecated. Please use shipmentInfo instead. The tracking id for the shipment. */ + trackingId?: string; + } + interface OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo { + /** The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values. */ + carrier?: string; + /** The ID of the shipment. */ + shipmentId?: string; + /** The tracking id for the shipment. */ + trackingId?: string; + } + interface OrdersCustomBatchRequestEntryUpdateShipment { + /** + * The carrier handling the shipment. Not updated if missing. See shipments[].carrier in the Orders resource representation for a list of acceptable + * values. + */ + carrier?: string; + /** The ID of the shipment. */ + shipmentId?: string; + /** New status for the shipment. Not updated if missing. */ + status?: string; + /** The tracking id for the shipment. Not updated if missing. */ + trackingId?: string; + } + interface OrdersCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: OrdersCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersCustomBatchResponse". */ + kind?: string; + } + interface OrdersCustomBatchResponseEntry { + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + /** The status of the execution. Only defined if the method is not get or getByMerchantOrderId and if the request was successful. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersCustomBatchResponseEntry". */ + kind?: string; + /** The retrieved order. Only defined if the method is get and if the request was successful. */ + order?: Order; + } + interface OrdersGetByMerchantOrderIdResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersGetByMerchantOrderIdResponse". */ + kind?: string; + /** The requested order. */ + order?: Order; + } + interface OrdersGetTestOrderTemplateResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersGetTestOrderTemplateResponse". */ + kind?: string; + /** The requested test order template. */ + template?: TestOrder; + } + interface OrdersListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of orders. */ + nextPageToken?: string; + resources?: Order[]; + } + interface OrdersRefundRequest { + /** The amount that is refunded. */ + amount?: Price; + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + /** The reason for the refund. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersRefundResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersRefundResponse". */ + kind?: string; + } + interface OrdersReturnLineItemRequest { + /** The ID of the line item to return. */ + lineItemId?: string; + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + /** The quantity to return. */ + quantity?: number; + /** The reason for the return. */ + reason?: string; + /** The explanation of the reason. */ + reasonText?: string; + } + interface OrdersReturnLineItemResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersReturnLineItemResponse". */ + kind?: string; + } + interface OrdersShipLineItemsRequest { + /** + * Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a + * list of acceptable values. + */ + carrier?: string; + /** Line items to ship. */ + lineItems?: OrderShipmentLineItemShipment[]; + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + /** Deprecated. Please use shipmentInfo instead. The ID of the shipment. */ + shipmentId?: string; + /** Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs). */ + shipmentInfos?: OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; + /** Deprecated. Please use shipmentInfo instead. The tracking id for the shipment. */ + trackingId?: string; + } + interface OrdersShipLineItemsResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersShipLineItemsResponse". */ + kind?: string; + } + interface OrdersUpdateMerchantOrderIdRequest { + /** The merchant order id to be assigned to the order. Must be unique per merchant. */ + merchantOrderId?: string; + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + } + interface OrdersUpdateMerchantOrderIdResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateMerchantOrderIdResponse". */ + kind?: string; + } + interface OrdersUpdateShipmentRequest { + /** + * The carrier handling the shipment. Not updated if missing. See shipments[].carrier in the Orders resource representation for a list of acceptable + * values. + */ + carrier?: string; + /** The ID of the operation. Unique across all operations for a given order. */ + operationId?: string; + /** The ID of the shipment. */ + shipmentId?: string; + /** New status for the shipment. Not updated if missing. */ + status?: string; + /** The tracking id for the shipment. Not updated if missing. */ + trackingId?: string; + } + interface OrdersUpdateShipmentResponse { + /** The status of the execution. */ + executionStatus?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#ordersUpdateShipmentResponse". */ + kind?: string; + } + interface PostalCodeGroup { + /** The CLDR territory code of the country the postal code group applies to. Required. */ + country?: string; + /** The name of the postal code group, referred to in headers. Required. */ + name?: string; + /** A range of postal codes. Required. */ + postalCodeRanges?: PostalCodeRange[]; + } + interface PostalCodeRange { + /** + * A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: "94108", "9410*", + * "9*". Required. + */ + postalCodeRangeBegin?: string; + /** + * A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as + * postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern + * then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes + * matching postalCodeRangeBegin. + */ + postalCodeRangeEnd?: string; + } + interface Price { + /** The currency of the price. */ + currency?: string; + /** The price represented as a number. */ + value?: string; + } + interface Product { + /** Additional URLs of images of the item. */ + additionalImageLinks?: string[]; + /** Additional categories of the item (formatted as in products feed specification). */ + additionalProductTypes?: string[]; + /** Set to true if the item is targeted towards adults. */ + adult?: boolean; + /** Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. */ + adwordsGrouping?: string; + /** Similar to adwords_grouping, but only works on CPC. */ + adwordsLabels?: string[]; + /** Allows advertisers to override the item URL when the product is shown within the context of Product Ads. */ + adwordsRedirect?: string; + /** Target age group of the item. */ + ageGroup?: string; + /** Specifies the intended aspects for the product. */ + aspects?: ProductAspect[]; + /** Availability status of the item. */ + availability?: string; + /** The day a pre-ordered product becomes available for delivery, in ISO 8601 format. */ + availabilityDate?: string; + /** Brand of the item. */ + brand?: string; + /** The item's channel (online or local). */ + channel?: string; + /** Color of the item. */ + color?: string; + /** Condition or state of the item. */ + condition?: string; + /** The two-letter ISO 639-1 language code for the item. */ + contentLanguage?: string; + /** + * A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (e.g., + * { "name": "size type", "type": "text", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API. + */ + customAttributes?: ProductCustomAttribute[]; + /** A list of custom (merchant-provided) custom attribute groups. */ + customGroups?: ProductCustomGroup[]; + /** Custom label 0 for custom grouping of items in a Shopping campaign. */ + customLabel0?: string; + /** Custom label 1 for custom grouping of items in a Shopping campaign. */ + customLabel1?: string; + /** Custom label 2 for custom grouping of items in a Shopping campaign. */ + customLabel2?: string; + /** Custom label 3 for custom grouping of items in a Shopping campaign. */ + customLabel3?: string; + /** Custom label 4 for custom grouping of items in a Shopping campaign. */ + customLabel4?: string; + /** Description of the item. */ + description?: string; + /** Specifies the intended destinations for the product. */ + destinations?: ProductDestination[]; + /** An identifier for an item for dynamic remarketing campaigns. */ + displayAdsId?: string; + /** URL directly to your item's landing page for dynamic remarketing campaigns. */ + displayAdsLink?: string; + /** Advertiser-specified recommendations. */ + displayAdsSimilarIds?: string[]; + /** Title of an item for dynamic remarketing campaigns. */ + displayAdsTitle?: string; + /** Offer margin for dynamic remarketing campaigns. */ + displayAdsValue?: number; + /** The energy efficiency class as defined in EU directive 2010/30/EU. */ + energyEfficiencyClass?: string; + /** + * Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in + * productstatuses as googleExpirationDate and might be earlier if expirationDate is too far in the future. + */ + expirationDate?: string; + /** Target gender of the item. */ + gender?: string; + /** Google's category of the item (see Google product taxonomy). */ + googleProductCategory?: string; + /** Global Trade Item Number (GTIN) of the item. */ + gtin?: string; + /** The REST id of the product. */ + id?: string; + /** + * False when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Required according to the + * Unique Product Identifier Rules for all target countries except for Canada. + */ + identifierExists?: boolean; + /** URL of an image of the item. */ + imageLink?: string; + /** Number and amount of installments to pay for an item. Brazil only. */ + installment?: Installment; + /** Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price. */ + isBundle?: boolean; + /** Shared identifier for all variants of the same product. */ + itemGroupId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#product". */ + kind?: string; + /** URL directly linking to your item's page on your website. */ + link?: string; + /** Loyalty points that users receive after purchasing the item. Japan only. */ + loyaltyPoints?: LoyaltyPoints; + /** The material of which the item is made. */ + material?: string; + /** Maximal product handling time (in business days). */ + maxHandlingTime?: string; + /** Minimal product handling time (in business days). */ + minHandlingTime?: string; + /** Link to a mobile-optimized version of the landing page. */ + mobileLink?: string; + /** Manufacturer Part Number (MPN) of the item. */ + mpn?: string; + /** The number of identical products in a merchant-defined multipack. */ + multipack?: string; + /** + * An identifier of the item. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. + * Only valid unicode characters are accepted. See the products feed specification for details. + */ + offerId?: string; + /** Whether an item is available for purchase only online. */ + onlineOnly?: boolean; + /** The item's pattern (e.g. polka dots). */ + pattern?: string; + /** Price of the item. */ + price?: Price; + /** Your category of the item (formatted as in products feed specification). */ + productType?: string; + /** The unique ID of a promotion. */ + promotionIds?: string[]; + /** Advertised sale price of the item. */ + salePrice?: Price; + /** Date range during which the item is on sale (see products feed specification). */ + salePriceEffectiveDate?: string; + /** The quantity of the product that is reserved for sell-on-google ads. */ + sellOnGoogleQuantity?: string; + /** Shipping rules. */ + shipping?: ProductShipping[]; + /** Height of the item for shipping. */ + shippingHeight?: ProductShippingDimension; + /** The shipping label of the product, used to group product in account-level shipping rules. */ + shippingLabel?: string; + /** Length of the item for shipping. */ + shippingLength?: ProductShippingDimension; + /** Weight of the item for shipping. */ + shippingWeight?: ProductShippingWeight; + /** Width of the item for shipping. */ + shippingWidth?: ProductShippingDimension; + /** System in which the size is specified. Recommended for apparel items. */ + sizeSystem?: string; + /** The cut of the item. Recommended for apparel items. */ + sizeType?: string; + /** Size of the item. */ + sizes?: string[]; + /** The CLDR territory code for the item. */ + targetCountry?: string; + /** Tax information. */ + taxes?: ProductTax[]; + /** Title of the item. */ + title?: string; + /** The preference of the denominator of the unit price. */ + unitPricingBaseMeasure?: ProductUnitPricingBaseMeasure; + /** The measure and dimension of an item. */ + unitPricingMeasure?: ProductUnitPricingMeasure; + /** The read-only list of intended destinations which passed validation. */ + validatedDestinations?: string[]; + /** Read-only warnings. */ + warnings?: Error[]; + } + interface ProductAspect { + /** The name of the aspect. */ + aspectName?: string; + /** The name of the destination. Leave out to apply to all destinations. */ + destinationName?: string; + /** Whether the aspect is required, excluded or should be validated. */ + intention?: string; + } + interface ProductCustomAttribute { + /** The name of the attribute. Underscores will be replaced by spaces upon insertion. */ + name?: string; + /** The type of the attribute. */ + type?: string; + /** Free-form unit of the attribute. Unit can only be used for values of type INT or FLOAT. */ + unit?: string; + /** The value of the attribute. */ + value?: string; + } + interface ProductCustomGroup { + /** The sub-attributes. */ + attributes?: ProductCustomAttribute[]; + /** The name of the group. Underscores will be replaced by spaces upon insertion. */ + name?: string; + } + interface ProductDestination { + /** The name of the destination. */ + destinationName?: string; + /** Whether the destination is required, excluded or should be validated. */ + intention?: string; + } + interface ProductShipping { + /** The CLDR territory code of the country to which an item will ship. */ + country?: string; + /** The location where the shipping is applicable, represented by a location group name. */ + locationGroupName?: string; + /** The numeric id of a location that the shipping rate applies to as defined in the AdWords API. */ + locationId?: string; + /** + * The postal code range that the shipping rate applies to, represented by a postal code, a postal code prefix followed by a * wildcard, a range between + * two postal codes or two postal code prefixes of equal length. + */ + postalCode?: string; + /** Fixed shipping price, represented as a number. */ + price?: Price; + /** The geographic region to which a shipping rate applies. */ + region?: string; + /** A free-form description of the service class or delivery speed. */ + service?: string; + } + interface ProductShippingDimension { + /** + * The unit of value. + * + * Acceptable values are: + * - "cm" + * - "in" + */ + unit?: string; + /** The dimension of the product used to calculate the shipping cost of the item. */ + value?: number; + } + interface ProductShippingWeight { + /** The unit of value. */ + unit?: string; + /** The weight of the product used to calculate the shipping cost of the item. */ + value?: number; + } + interface ProductStatus { + /** Date on which the item has been created, in ISO 8601 format. */ + creationDate?: string; + /** A list of data quality issues associated with the product. */ + dataQualityIssues?: ProductStatusDataQualityIssue[]; + /** The intended destinations for the product. */ + destinationStatuses?: ProductStatusDestinationStatus[]; + /** Date on which the item expires in Google Shopping, in ISO 8601 format. */ + googleExpirationDate?: string; + /** Identifies what kind of resource this is. Value: the fixed string "content#productStatus". */ + kind?: string; + /** Date on which the item has been last updated, in ISO 8601 format. */ + lastUpdateDate?: string; + /** The link to the product. */ + link?: string; + /** Product data after applying all the join inputs. */ + product?: Product; + /** The id of the product for which status is reported. */ + productId?: string; + /** The title of the product. */ + title?: string; + } + interface ProductStatusDataQualityIssue { + /** A more detailed error string. */ + detail?: string; + /** The fetch status for landing_page_errors. */ + fetchStatus?: string; + /** The id of the data quality issue. */ + id?: string; + /** The attribute name that is relevant for the issue. */ + location?: string; + /** The severity of the data quality issue. */ + severity?: string; + /** The time stamp of the data quality issue. */ + timestamp?: string; + /** The value of that attribute that was found on the landing page */ + valueOnLandingPage?: string; + /** The value the attribute had at time of evaluation. */ + valueProvided?: string; + } + interface ProductStatusDestinationStatus { + /** The destination's approval status. */ + approvalStatus?: string; + /** The name of the destination */ + destination?: string; + /** Whether the destination is required, excluded, selected by default or should be validated. */ + intention?: string; + } + interface ProductTax { + /** The country within which the item is taxed, specified as a CLDR territory code. */ + country?: string; + /** The numeric id of a location that the tax rate applies to as defined in the AdWords API. */ + locationId?: string; + /** + * The postal code range that the tax rate applies to, represented by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP codes or two + * ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460, 94*-95*. + */ + postalCode?: string; + /** The percentage of tax rate that applies to the item price. */ + rate?: number; + /** The geographic region to which the tax rate applies. */ + region?: string; + /** Set to true if tax is charged on shipping. */ + taxShip?: boolean; + } + interface ProductUnitPricingBaseMeasure { + /** The unit of the denominator. */ + unit?: string; + /** The denominator of the unit price. */ + value?: string; + } + interface ProductUnitPricingMeasure { + /** The unit of the measure. */ + unit?: string; + /** The measure of an item. */ + value?: number; + } + interface ProductsCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: ProductsCustomBatchRequestEntry[]; + } + interface ProductsCustomBatchRequestEntry { + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** The ID of the managing account. */ + merchantId?: string; + method?: string; + /** The product to insert. Only required if the method is insert. */ + product?: Product; + /** The ID of the product to get or delete. Only defined if the method is get or delete. */ + productId?: string; + } + interface ProductsCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: ProductsCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#productsCustomBatchResponse". */ + kind?: string; + } + interface ProductsCustomBatchResponseEntry { + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** A list of errors defined if and only if the request failed. */ + errors?: Errors; + /** Identifies what kind of resource this is. Value: the fixed string "content#productsCustomBatchResponseEntry". */ + kind?: string; + /** The inserted product. Only defined if the method is insert and if the request was successful. */ + product?: Product; + } + interface ProductsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#productsListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of products. */ + nextPageToken?: string; + resources?: Product[]; + } + interface ProductstatusesCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: ProductstatusesCustomBatchRequestEntry[]; + } + interface ProductstatusesCustomBatchRequestEntry { + /** An entry ID, unique within the batch request. */ + batchId?: number; + includeAttributes?: boolean; + /** The ID of the managing account. */ + merchantId?: string; + method?: string; + /** The ID of the product whose status to get. */ + productId?: string; + } + interface ProductstatusesCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: ProductstatusesCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#productstatusesCustomBatchResponse". */ + kind?: string; + } + interface ProductstatusesCustomBatchResponseEntry { + /** The ID of the request entry this entry responds to. */ + batchId?: number; + /** A list of errors, if the request failed. */ + errors?: Errors; + /** Identifies what kind of resource this is. Value: the fixed string "content#productstatusesCustomBatchResponseEntry". */ + kind?: string; + /** The requested product status. Only defined if the request was successful. */ + productStatus?: ProductStatus; + } + interface ProductstatusesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#productstatusesListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of products statuses. */ + nextPageToken?: string; + resources?: ProductStatus[]; + } + interface RateGroup { + /** + * A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the + * rate group to apply. May only be empty for the last rate group of a service. Required. + */ + applicableShippingLabels?: string[]; + /** A list of carrier rates that can be referred to by mainTable or singleValue. */ + carrierRates?: CarrierRate[]; + /** A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set. */ + mainTable?: Table; + /** The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set. */ + singleValue?: Value; + /** A list of subtables referred to by mainTable. Can only be set if mainTable is set. */ + subtables?: Table[]; + } + interface Row { + /** + * The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional + * tables. Required. + */ + cells?: Value[]; + } + interface Service { + /** A boolean exposing the active status of the shipping service. Required. */ + active?: boolean; + /** The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups. */ + currency?: string; + /** The CLDR territory code of the country to which the service applies. Required. */ + deliveryCountry?: string; + /** Time spent in various aspects from order to the delivery of the product. Required. */ + deliveryTime?: DeliveryTime; + /** + * Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have + * the same currency. + */ + minimumOrderValue?: Price; + /** Free-form name of the service. Must be unique within target account. Required. */ + name?: string; + /** + * Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means "everything else". The other + * applicableShippingLabels must not overlap. + */ + rateGroups?: RateGroup[]; + } + interface ShippingSettings { + /** The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses. */ + accountId?: string; + /** A list of postal code groups that can be referred to in services. Optional. */ + postalCodeGroups?: PostalCodeGroup[]; + /** The target account's list of services. Optional. */ + services?: Service[]; + } + interface ShippingsettingsCustomBatchRequest { + /** The request entries to be processed in the batch. */ + entries?: ShippingsettingsCustomBatchRequestEntry[]; + } + interface ShippingsettingsCustomBatchRequestEntry { + /** The ID of the account for which to get/update account shipping settings. */ + accountId?: string; + /** An entry ID, unique within the batch request. */ + batchId?: number; + /** The ID of the managing account. */ + merchantId?: string; + method?: string; + /** The account shipping settings to update. Only defined if the method is update. */ + shippingSettings?: ShippingSettings; + } + interface ShippingsettingsCustomBatchResponse { + /** The result of the execution of the batch requests. */ + entries?: ShippingsettingsCustomBatchResponseEntry[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsCustomBatchResponse". */ + kind?: string; + } + interface ShippingsettingsCustomBatchResponseEntry { + /** The ID of the request entry to which this entry responds. */ + batchId?: number; + /** A list of errors defined if, and only if, the request failed. */ + errors?: Errors; + /** Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsCustomBatchResponseEntry". */ + kind?: string; + /** The retrieved or updated account shipping settings. */ + shippingSettings?: ShippingSettings; + } + interface ShippingsettingsGetSupportedCarriersResponse { + /** A list of supported carriers. May be empty. */ + carriers?: CarriersCarrier[]; + /** Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsGetSupportedCarriersResponse". */ + kind?: string; + } + interface ShippingsettingsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "content#shippingsettingsListResponse". */ + kind?: string; + /** The token for the retrieval of the next page of shipping settings. */ + nextPageToken?: string; + resources?: ShippingSettings[]; + } + interface Table { + /** Headers of the table's columns. Optional: if not set then the table has only one dimension. */ + columnHeaders?: Headers; + /** Name of the table. Required for subtables, ignored for the main table. */ + name?: string; + /** Headers of the table's rows. Required. */ + rowHeaders?: Headers; + /** The list of rows that constitute the table. Must have the same length as rowHeaders. Required. */ + rows?: Row[]; + } + interface TestOrder { + /** The details of the customer who placed the order. */ + customer?: TestOrderCustomer; + /** Identifies what kind of resource this is. Value: the fixed string "content#testOrder". */ + kind?: string; + /** Line items that are ordered. At least one line item must be provided. */ + lineItems?: TestOrderLineItem[]; + /** The details of the payment method. */ + paymentMethod?: TestOrderPaymentMethod; + /** Identifier of one of the predefined delivery addresses for the delivery. */ + predefinedDeliveryAddress?: string; + /** The details of the merchant provided promotions applied to the order. More details about the program are here. */ + promotions?: OrderPromotion[]; + /** The total cost of shipping for all items. */ + shippingCost?: Price; + /** The tax for the total shipping cost. */ + shippingCostTax?: Price; + /** The requested shipping option. */ + shippingOption?: string; + } + interface TestOrderCustomer { + /** Email address of the customer. */ + email?: string; + /** + * If set, this indicates the user explicitly chose to opt in or out of providing marketing rights to the merchant. If unset, this indicates the user has + * already made this choice in a previous purchase, and was thus not shown the marketing right opt in/out checkbox during the checkout flow. Optional. + */ + explicitMarketingPreference?: boolean; + /** Full name of the customer. */ + fullName?: string; + } + interface TestOrderLineItem { + /** Product data from the time of the order placement. */ + product?: TestOrderLineItemProduct; + /** Number of items ordered. */ + quantityOrdered?: number; + /** Details of the return policy for the line item. */ + returnInfo?: OrderLineItemReturnInfo; + /** Details of the requested shipping for the line item. */ + shippingDetails?: OrderLineItemShippingDetails; + /** Unit tax for the line item. */ + unitTax?: Price; + } + interface TestOrderLineItemProduct { + /** Brand of the item. */ + brand?: string; + /** The item's channel. */ + channel?: string; + /** Condition or state of the item. */ + condition?: string; + /** The two-letter ISO 639-1 language code for the item. */ + contentLanguage?: string; + /** Global Trade Item Number (GTIN) of the item. Optional. */ + gtin?: string; + /** URL of an image of the item. */ + imageLink?: string; + /** Shared identifier for all variants of the same product. Optional. */ + itemGroupId?: string; + /** Manufacturer Part Number (MPN) of the item. Optional. */ + mpn?: string; + /** An identifier of the item. */ + offerId?: string; + /** The price for the product. */ + price?: Price; + /** The CLDR territory code of the target country of the product. */ + targetCountry?: string; + /** The title of the product. */ + title?: string; + /** Variant attributes for the item. Optional. */ + variantAttributes?: OrderLineItemProductVariantAttribute[]; + } + interface TestOrderPaymentMethod { + /** The card expiration month (January = 1, February = 2 etc.). */ + expirationMonth?: number; + /** The card expiration year (4-digit, e.g. 2015). */ + expirationYear?: number; + /** The last four digits of the card number. */ + lastFourDigits?: string; + /** The billing address. */ + predefinedBillingAddress?: string; + /** The type of instrument. Note that real orders might have different values than the four values accepted by createTestOrder. */ + type?: string; + } + interface Value { + /** The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set. */ + carrierRateName?: string; + /** A flat rate. Can only be set if all other fields are not set. */ + flatRate?: Price; + /** If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set. */ + noShipping?: boolean; + /** A percentage of the price represented as a number in decimal notation (e.g., "5.4"). Can only be set if all other fields are not set. */ + pricePercentage?: string; + /** The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set. */ + subtableName?: string; + } + interface Weight { + /** The weight unit. */ + unit?: string; + /** The weight represented as a number. */ + value?: string; + } + interface AccountsResource { + /** Returns information about the authenticated user. */ + authinfo(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Claims the website of a Merchant Center sub-account. This method can only be called for accounts to which the managing account has access: either the + * managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + claimwebsite(request: { + /** The ID of the account whose website is claimed. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces + * it with a claim from this account. + */ + overwrite?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. */ + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a Merchant Center sub-account. This method can only be called for multi-client accounts. */ + delete(request: { + /** The ID of the account. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Flag to delete sub-accounts with products. The default value is false. */ + force?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account + * itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + get(request: { + /** The ID of the account. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a Merchant Center sub-account. This method can only be called for multi-client accounts. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of accounts to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account + * itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch semantics. + */ + patch(request: { + /** The ID of the account. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account + * itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + update(request: { + /** The ID of the account. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountstatusesResource { + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves the status of a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the + * managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + get(request: { + /** The ID of the account. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the statuses of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of account statuses to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccounttaxResource { + /** Retrieves and updates tax settings of multiple accounts in a single request. */ + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + get(request: { + /** The ID of the account for which to get/update account tax settings. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the tax settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of tax settings to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch + * semantics. + */ + patch(request: { + /** The ID of the account for which to get/update account tax settings. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + update(request: { + /** The ID of the account for which to get/update account tax settings. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DatafeedsResource { + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a datafeed configuration from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + datafeedId: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a datafeed configuration from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + get(request: { + /** Data format for the response. */ + alt?: string; + datafeedId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Registers a datafeed configuration with your Merchant Center account. This method can only be called for non-multi-client accounts. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of products to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates a datafeed configuration of your Merchant Center account. This method can only be called for non-multi-client accounts. This method supports + * patch semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + datafeedId: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a datafeed configuration of your Merchant Center account. This method can only be called for non-multi-client accounts. */ + update(request: { + /** Data format for the response. */ + alt?: string; + datafeedId: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DatafeedstatusesResource { + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** + * The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is + * required for feeds targeting multiple countries and languages, since a feed may have a different status for each target. + */ + country?: string; + datafeedId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is + * required for feeds targeting multiple countries and languages, since a feed may have a different status for each target. + */ + language?: string; + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of products to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface InventoryResource { + /** + * Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. + * This method can only be called for non-multi-client accounts. + */ + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates price and availability of a product in your Merchant Center account. This operation does not update the expiration date of the product. This + * method can only be called for non-multi-client accounts. + */ + set(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product for which to update price and availability. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The code of the store for which to update price and availability. Use online to update price and availability of an online product. */ + storeCode: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface OrdersResource { + /** Marks an order as acknowledged. This method can only be called for non-multi-client accounts. */ + acknowledge(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts. */ + advancetestorder(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the test order to modify. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts. */ + cancel(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order to cancel. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts. */ + cancellineitem(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sandbox only. Creates a test order. This method can only be called for non-multi-client accounts. */ + createtestorder(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts. */ + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves an order from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts. */ + getbymerchantorderid(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** The merchant order id to be looked for. */ + merchantOrderId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. This method can only be called for + * non-multi-client accounts. + */ + gettestordertemplate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The name of the template to retrieve. */ + templateName: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the orders in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + list(request: { + /** + * Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that + * have not been acknowledged. + * We recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned. + */ + acknowledged?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 + * orders per page. + * Known issue: All List calls will return all Orders without limit regardless of the value of this field. + */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The ordering of the returned list. The only supported value are placedDate desc and placedDate asc for now, which returns orders sorted by placement + * date. "placedDate desc" stands for listing orders by placement date, from oldest to most recent. "placedDate asc" stands for listing orders by + * placement date, from most recent to oldest. In future releases we'll support other sorting criteria. + */ + orderBy?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Obtains orders placed before this date (exclusively), in ISO 8601 format. */ + placedDateEnd?: string; + /** Obtains orders placed after this date (inclusively), in ISO 8601 format. */ + placedDateStart?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, please note that active + * is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered, partiallyReturned, + * returned, and canceled. + */ + statuses?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Refund a portion of the order, up to the full amount paid. This method can only be called for non-multi-client accounts. */ + refund(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order to refund. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns a line item. This method can only be called for non-multi-client accounts. */ + returnlineitem(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Marks line item(s) as shipped. This method can only be called for non-multi-client accounts. */ + shiplineitems(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the merchant order ID for a given order. This method can only be called for non-multi-client accounts. */ + updatemerchantorderid(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-multi-client accounts. */ + updateshipment(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the order. */ + orderId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProductsResource { + /** Retrieves, inserts, and deletes multiple products in a single request. This method can only be called for non-multi-client accounts. */ + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a product from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a product from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this + * method updates that entry. This method can only be called for non-multi-client accounts. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the products in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false). */ + includeInvalidInsertedItems?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of products to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProductstatusesResource { + /** Gets the statuses of multiple products in a single request. This method can only be called for non-multi-client accounts. */ + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Flag to include full product data in the results of this request. The default value is false. */ + includeAttributes?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the status of a product from your Merchant Center account. This method can only be called for non-multi-client accounts. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Flag to include full product data in the result of this get request. The default value is false. */ + includeAttributes?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the product. */ + productId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the statuses of the products in your Merchant Center account. This method can only be called for non-multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Flag to include full product data in the results of the list request. The default value is false. */ + includeAttributes?: boolean; + /** Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false). */ + includeInvalidInsertedItems?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of product statuses to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ShippingsettingsResource { + /** Retrieves and updates the shipping settings of multiple accounts in a single request. */ + custombatch(request: { + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the + * managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + get(request: { + /** The ID of the account for which to get/update shipping settings. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves supported carriers and carrier services for an account. */ + getsupportedcarriers(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the account for which to retrieve the supported carriers. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The maximum number of shipping settings to return in the response, used for paging. */ + maxResults?: number; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The token returned by the previous request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch + * semantics. + */ + patch(request: { + /** The ID of the account for which to get/update shipping settings. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing + * account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. + */ + update(request: { + /** The ID of the account for which to get/update shipping settings. */ + accountId: string; + /** Data format for the response. */ + alt?: string; + /** Flag to run the request in dry-run mode. */ + dryRun?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The ID of the managing account. */ + merchantId: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.content/readme.md b/types/gapi.client.content/readme.md new file mode 100644 index 0000000000..043429370a --- /dev/null +++ b/types/gapi.client.content/readme.md @@ -0,0 +1,344 @@ +# TypeScript typings for Content API for Shopping v2 +Manages product items, inventory, and Merchant Center accounts for Google Shopping. +For detailed description please check [documentation](https://developers.google.com/shopping-content). + +## Installing + +Install typings for Content API for Shopping: +``` +npm install @types/gapi.client.content@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('content', 'v2', () => { + // now we can use gapi.client.content + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage your product listings and accounts for Google Shopping + 'https://www.googleapis.com/auth/content', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Content API for Shopping resources: + +```typescript + +/* +Returns information about the authenticated user. +*/ +await gapi.client.accounts.authinfo({ }); + +/* +Claims the website of a Merchant Center sub-account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.accounts.claimwebsite({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. +*/ +await gapi.client.accounts.custombatch({ }); + +/* +Deletes a Merchant Center sub-account. This method can only be called for multi-client accounts. +*/ +await gapi.client.accounts.delete({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Retrieves a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.accounts.get({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Creates a Merchant Center sub-account. This method can only be called for multi-client accounts. +*/ +await gapi.client.accounts.insert({ merchantId: "merchantId", }); + +/* +Lists the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. +*/ +await gapi.client.accounts.list({ merchantId: "merchantId", }); + +/* +Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch semantics. +*/ +await gapi.client.accounts.patch({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.accounts.update({ accountId: "accountId", merchantId: "merchantId", }); + +/* +undefined +*/ +await gapi.client.accountstatuses.custombatch({ }); + +/* +Retrieves the status of a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.accountstatuses.get({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Lists the statuses of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. +*/ +await gapi.client.accountstatuses.list({ merchantId: "merchantId", }); + +/* +Retrieves and updates tax settings of multiple accounts in a single request. +*/ +await gapi.client.accounttax.custombatch({ }); + +/* +Retrieves the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.accounttax.get({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Lists the tax settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. +*/ +await gapi.client.accounttax.list({ merchantId: "merchantId", }); + +/* +Updates the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch semantics. +*/ +await gapi.client.accounttax.patch({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Updates the tax settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.accounttax.update({ accountId: "accountId", merchantId: "merchantId", }); + +/* +undefined +*/ +await gapi.client.datafeeds.custombatch({ }); + +/* +Deletes a datafeed configuration from your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.datafeeds.delete({ datafeedId: "datafeedId", merchantId: "merchantId", }); + +/* +Retrieves a datafeed configuration from your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.datafeeds.get({ datafeedId: "datafeedId", merchantId: "merchantId", }); + +/* +Registers a datafeed configuration with your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.datafeeds.insert({ merchantId: "merchantId", }); + +/* +Lists the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.datafeeds.list({ merchantId: "merchantId", }); + +/* +Updates a datafeed configuration of your Merchant Center account. This method can only be called for non-multi-client accounts. This method supports patch semantics. +*/ +await gapi.client.datafeeds.patch({ datafeedId: "datafeedId", merchantId: "merchantId", }); + +/* +Updates a datafeed configuration of your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.datafeeds.update({ datafeedId: "datafeedId", merchantId: "merchantId", }); + +/* +undefined +*/ +await gapi.client.datafeedstatuses.custombatch({ }); + +/* +Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.datafeedstatuses.get({ datafeedId: "datafeedId", merchantId: "merchantId", }); + +/* +Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.datafeedstatuses.list({ merchantId: "merchantId", }); + +/* +Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.inventory.custombatch({ }); + +/* +Updates price and availability of a product in your Merchant Center account. This operation does not update the expiration date of the product. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.inventory.set({ merchantId: "merchantId", productId: "productId", storeCode: "storeCode", }); + +/* +Marks an order as acknowledged. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.acknowledge({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.advancetestorder({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.cancel({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.cancellineitem({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Sandbox only. Creates a test order. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.createtestorder({ merchantId: "merchantId", }); + +/* +Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.custombatch({ }); + +/* +Retrieves an order from your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.get({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.getbymerchantorderid({ merchantId: "merchantId", merchantOrderId: "merchantOrderId", }); + +/* +Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.gettestordertemplate({ merchantId: "merchantId", templateName: "templateName", }); + +/* +Lists the orders in your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.list({ merchantId: "merchantId", }); + +/* +Refund a portion of the order, up to the full amount paid. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.refund({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Returns a line item. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.returnlineitem({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Marks line item(s) as shipped. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.shiplineitems({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Updates the merchant order ID for a given order. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.updatemerchantorderid({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.orders.updateshipment({ merchantId: "merchantId", orderId: "orderId", }); + +/* +Retrieves, inserts, and deletes multiple products in a single request. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.products.custombatch({ }); + +/* +Deletes a product from your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.products.delete({ merchantId: "merchantId", productId: "productId", }); + +/* +Retrieves a product from your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.products.get({ merchantId: "merchantId", productId: "productId", }); + +/* +Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.products.insert({ merchantId: "merchantId", }); + +/* +Lists the products in your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.products.list({ merchantId: "merchantId", }); + +/* +Gets the statuses of multiple products in a single request. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.productstatuses.custombatch({ }); + +/* +Gets the status of a product from your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.productstatuses.get({ merchantId: "merchantId", productId: "productId", }); + +/* +Lists the statuses of the products in your Merchant Center account. This method can only be called for non-multi-client accounts. +*/ +await gapi.client.productstatuses.list({ merchantId: "merchantId", }); + +/* +Retrieves and updates the shipping settings of multiple accounts in a single request. +*/ +await gapi.client.shippingsettings.custombatch({ }); + +/* +Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.shippingsettings.get({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Retrieves supported carriers and carrier services for an account. +*/ +await gapi.client.shippingsettings.getsupportedcarriers({ merchantId: "merchantId", }); + +/* +Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. +*/ +await gapi.client.shippingsettings.list({ merchantId: "merchantId", }); + +/* +Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. This method supports patch semantics. +*/ +await gapi.client.shippingsettings.patch({ accountId: "accountId", merchantId: "merchantId", }); + +/* +Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account. +*/ +await gapi.client.shippingsettings.update({ accountId: "accountId", merchantId: "merchantId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.content/tsconfig.json b/types/gapi.client.content/tsconfig.json new file mode 100644 index 0000000000..566c98a224 --- /dev/null +++ b/types/gapi.client.content/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.content-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.content/tslint.json b/types/gapi.client.content/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.content/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.customsearch/gapi.client.customsearch-tests.ts b/types/gapi.client.customsearch/gapi.client.customsearch-tests.ts new file mode 100644 index 0000000000..6fc523681f --- /dev/null +++ b/types/gapi.client.customsearch/gapi.client.customsearch-tests.ts @@ -0,0 +1,50 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('customsearch', 'v1', () => { + /** now we can use gapi.client.customsearch */ + + run(); + }); + + async function run() { + /** Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. */ + await gapi.client.cse.list({ + c2coff: "c2coff", + cr: "cr", + cx: "cx", + dateRestrict: "dateRestrict", + exactTerms: "exactTerms", + excludeTerms: "excludeTerms", + fileType: "fileType", + filter: "filter", + gl: "gl", + googlehost: "googlehost", + highRange: "highRange", + hl: "hl", + hq: "hq", + imgColorType: "imgColorType", + imgDominantColor: "imgDominantColor", + imgSize: "imgSize", + imgType: "imgType", + linkSite: "linkSite", + lowRange: "lowRange", + lr: "lr", + num: 21, + orTerms: "orTerms", + q: "q", + relatedSite: "relatedSite", + rights: "rights", + safe: "safe", + searchType: "searchType", + siteSearch: "siteSearch", + siteSearchFilter: "siteSearchFilter", + sort: "sort", + start: 31, + }); + } +}); diff --git a/types/gapi.client.customsearch/index.d.ts b/types/gapi.client.customsearch/index.d.ts new file mode 100644 index 0000000000..1722767845 --- /dev/null +++ b/types/gapi.client.customsearch/index.d.ts @@ -0,0 +1,226 @@ +// Type definitions for Google CustomSearch API v1 1.0 +// Project: https://developers.google.com/custom-search/v1/using_rest +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/customsearch/v1/rest + +/// + +declare namespace gapi.client { + /** Load CustomSearch API v1 */ + function load(name: "customsearch", version: "v1"): PromiseLike; + function load(name: "customsearch", version: "v1", callback: () => any): void; + + const cse: customsearch.CseResource; + + namespace customsearch { + interface Context { + facets?: Array>; + title?: string; + } + interface Promotion { + bodyLines?: Array<{ + htmlTitle?: string; + link?: string; + title?: string; + url?: string; + }>; + displayLink?: string; + htmlTitle?: string; + image?: { + height?: number; + source?: string; + width?: number; + }; + link?: string; + title?: string; + } + interface Query { + count?: number; + cr?: string; + cx?: string; + dateRestrict?: string; + disableCnTwTranslation?: string; + exactTerms?: string; + excludeTerms?: string; + fileType?: string; + filter?: string; + gl?: string; + googleHost?: string; + highRange?: string; + hl?: string; + hq?: string; + imgColorType?: string; + imgDominantColor?: string; + imgSize?: string; + imgType?: string; + inputEncoding?: string; + language?: string; + linkSite?: string; + lowRange?: string; + orTerms?: string; + outputEncoding?: string; + relatedSite?: string; + rights?: string; + safe?: string; + searchTerms?: string; + searchType?: string; + siteSearch?: string; + siteSearchFilter?: string; + sort?: string; + startIndex?: number; + startPage?: number; + title?: string; + totalResults?: string; + } + interface Result { + cacheId?: string; + displayLink?: string; + fileFormat?: string; + formattedUrl?: string; + htmlFormattedUrl?: string; + htmlSnippet?: string; + htmlTitle?: string; + image?: { + byteSize?: number; + contextLink?: string; + height?: number; + thumbnailHeight?: number; + thumbnailLink?: string; + thumbnailWidth?: number; + width?: number; + }; + kind?: string; + labels?: Array<{ + displayName?: string; + label_with_op?: string; + name?: string; + }>; + link?: string; + mime?: string; + pagemap?: Record>>; + snippet?: string; + title?: string; + } + interface Search { + context?: Context; + items?: Result[]; + kind?: string; + promotions?: Promotion[]; + queries?: Record; + searchInformation?: { + formattedSearchTime?: string; + formattedTotalResults?: string; + searchTime?: number; + totalResults?: string; + }; + spelling?: { + correctedQuery?: string; + htmlCorrectedQuery?: string; + }; + url?: { + template?: string; + type?: string; + }; + } + interface CseResource { + /** Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Turns off the translation between zh-CN and zh-TW. */ + c2coff?: string; + /** Country restrict(s). */ + cr?: string; + /** The custom search engine ID to scope this search query */ + cx?: string; + /** Specifies all search results are from a time period */ + dateRestrict?: string; + /** Identifies a phrase that all documents in the search results must contain */ + exactTerms?: string; + /** Identifies a word or phrase that should not appear in any documents in the search results */ + excludeTerms?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ... */ + fileType?: string; + /** Controls turning on or off the duplicate content filter. */ + filter?: string; + /** Geolocation of end user. */ + gl?: string; + /** The local Google domain to use to perform the search. */ + googlehost?: string; + /** Creates a range in form as_nlo value..as_nhi value and attempts to append it to query */ + highRange?: string; + /** Sets the user interface language. */ + hl?: string; + /** Appends the extra query terms to the query. */ + hq?: string; + /** Returns black and white, grayscale, or color images: mono, gray, and color. */ + imgColorType?: string; + /** Returns images of a specific dominant color: yellow, green, teal, blue, purple, pink, white, gray, black and brown. */ + imgDominantColor?: string; + /** Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge. */ + imgSize?: string; + /** Returns images of a type, which can be one of: clipart, face, lineart, news, and photo. */ + imgType?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Specifies that all search results should contain a link to a particular URL */ + linkSite?: string; + /** Creates a range in form as_nlo value..as_nhi value and attempts to append it to query */ + lowRange?: string; + /** The language restriction for the search results */ + lr?: string; + /** Number of search results to return */ + num?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional + * search terms + */ + orTerms?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Query */ + q: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Specifies that all search results should be pages that are related to the specified URL */ + relatedSite?: string; + /** + * Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of + * these. + */ + rights?: string; + /** Search safety level */ + safe?: string; + /** Specifies the search type: image. */ + searchType?: string; + /** Specifies all search results should be pages from a given site */ + siteSearch?: string; + /** Controls whether to include or exclude results from the site named in the as_sitesearch parameter */ + siteSearchFilter?: string; + /** The sort expression to apply to the results */ + sort?: string; + /** The index of the first result to return */ + start?: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.customsearch/readme.md b/types/gapi.client.customsearch/readme.md new file mode 100644 index 0000000000..836af575ac --- /dev/null +++ b/types/gapi.client.customsearch/readme.md @@ -0,0 +1,40 @@ +# TypeScript typings for CustomSearch API v1 +Searches over a website or collection of websites +For detailed description please check [documentation](https://developers.google.com/custom-search/v1/using_rest). + +## Installing + +Install typings for CustomSearch API: +``` +npm install @types/gapi.client.customsearch@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('customsearch', 'v1', () => { + // now we can use gapi.client.customsearch + // ... +}); +``` + + + +After that you can use CustomSearch API resources: + +```typescript + +/* +Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. +*/ +await gapi.client.cse.list({ q: "q", }); +``` \ No newline at end of file diff --git a/types/gapi.client.customsearch/tsconfig.json b/types/gapi.client.customsearch/tsconfig.json new file mode 100644 index 0000000000..9b5c4f447d --- /dev/null +++ b/types/gapi.client.customsearch/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.customsearch-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.customsearch/tslint.json b/types/gapi.client.customsearch/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.customsearch/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.dataflow/gapi.client.dataflow-tests.ts b/types/gapi.client.dataflow/gapi.client.dataflow-tests.ts new file mode 100644 index 0000000000..8223d7e49f --- /dev/null +++ b/types/gapi.client.dataflow/gapi.client.dataflow-tests.ts @@ -0,0 +1,42 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('dataflow', 'v1b3', () => { + /** now we can use gapi.client.dataflow */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View and manage your Google Compute Engine resources */ + 'https://www.googleapis.com/auth/compute', + /** View your Google Compute Engine resources */ + 'https://www.googleapis.com/auth/compute.readonly', + /** View your email address */ + 'https://www.googleapis.com/auth/userinfo.email', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Send a worker_message to the service. */ + await gapi.client.projects.workerMessages({ + projectId: "projectId", + }); + } +}); diff --git a/types/gapi.client.dataflow/index.d.ts b/types/gapi.client.dataflow/index.d.ts new file mode 100644 index 0000000000..6c04dad9ea --- /dev/null +++ b/types/gapi.client.dataflow/index.d.ts @@ -0,0 +1,3245 @@ +// Type definitions for Google Google Dataflow API v1b3 1.0 +// Project: https://cloud.google.com/dataflow +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://dataflow.googleapis.com/$discovery/rest?version=v1b3 + +/// + +declare namespace gapi.client { + /** Load Google Dataflow API v1b3 */ + function load(name: "dataflow", version: "v1b3"): PromiseLike; + function load(name: "dataflow", version: "v1b3", callback: () => any): void; + + const projects: dataflow.ProjectsResource; + + namespace dataflow { + interface ApproximateProgress { + /** Obsolete. */ + percentComplete?: number; + /** Obsolete. */ + position?: Position; + /** Obsolete. */ + remainingTime?: string; + } + interface ApproximateReportedProgress { + /** + * Total amount of parallelism in the portion of input of this task that has + * already been consumed and is no longer active. In the first two examples + * above (see remaining_parallelism), the value should be 29 or 2 + * respectively. The sum of remaining_parallelism and consumed_parallelism + * should equal the total amount of parallelism in this work item. If + * specified, must be finite. + */ + consumedParallelism?: ReportedParallelism; + /** + * Completion as fraction of the input consumed, from 0.0 (beginning, nothing + * consumed), to 1.0 (end of the input, entire input consumed). + */ + fractionConsumed?: number; + /** A Position within the work to represent a progress. */ + position?: Position; + /** + * Total amount of parallelism in the input of this task that remains, + * (i.e. can be delegated to this task and any new tasks via dynamic + * splitting). Always at least 1 for non-finished work items and 0 for + * finished. + * + * "Amount of parallelism" refers to how many non-empty parts of the input + * can be read in parallel. This does not necessarily equal number + * of records. An input that can be read in parallel down to the + * individual records is called "perfectly splittable". + * An example of non-perfectly parallelizable input is a block-compressed + * file format where a block of records has to be read as a whole, + * but different blocks can be read in parallel. + * + * Examples: + * * If we are processing record #30 (starting at 1) out of 50 in a perfectly + * splittable 50-record input, this value should be 21 (20 remaining + 1 + * current). + * * If we are reading through block 3 in a block-compressed file consisting + * of 5 blocks, this value should be 3 (since blocks 4 and 5 can be + * processed in parallel by new tasks via dynamic splitting and the current + * task remains processing block 3). + * * If we are reading through the last block in a block-compressed file, + * or reading or processing the last record in a perfectly splittable + * input, this value should be 1, because apart from the current task, no + * additional remainder can be split off. + */ + remainingParallelism?: ReportedParallelism; + } + interface ApproximateSplitRequest { + /** + * A fraction at which to split the work item, from 0.0 (beginning of the + * input) to 1.0 (end of the input). + */ + fractionConsumed?: number; + /** A Position at which to split the work item. */ + position?: Position; + } + interface AutoscalingEvent { + /** The current number of workers the job has. */ + currentNumWorkers?: string; + /** + * A message describing why the system decided to adjust the current + * number of workers, why it failed, or why the system decided to + * not make any changes to the number of workers. + */ + description?: StructuredMessage; + /** The type of autoscaling event to report. */ + eventType?: string; + /** The target number of workers the worker pool wants to resize to use. */ + targetNumWorkers?: string; + /** + * The time this event was emitted to indicate a new target or current + * num_workers value. + */ + time?: string; + } + interface AutoscalingSettings { + /** The algorithm to use for autoscaling. */ + algorithm?: string; + /** The maximum number of workers to cap scaling at. */ + maxNumWorkers?: number; + } + interface CPUTime { + /** + * Average CPU utilization rate (% non-idle cpu / second) since previous + * sample. + */ + rate?: number; + /** Timestamp of the measurement. */ + timestamp?: string; + /** + * Total active CPU time across all cores (ie., non-idle) in milliseconds + * since start-up. + */ + totalMs?: string; + } + interface ComponentSource { + /** Dataflow service generated name for this source. */ + name?: string; + /** + * User name for the original user transform or collection with which this + * source is most closely associated. + */ + originalTransformOrCollection?: string; + /** Human-readable name for this transform; may be user or system generated. */ + userName?: string; + } + interface ComponentTransform { + /** Dataflow service generated name for this source. */ + name?: string; + /** + * User name for the original user transform with which this transform is + * most closely associated. + */ + originalTransform?: string; + /** Human-readable name for this transform; may be user or system generated. */ + userName?: string; + } + interface ComputationTopology { + /** The ID of the computation. */ + computationId?: string; + /** The inputs to the computation. */ + inputs?: StreamLocation[]; + /** The key ranges processed by the computation. */ + keyRanges?: KeyRangeLocation[]; + /** The outputs from the computation. */ + outputs?: StreamLocation[]; + /** The state family values. */ + stateFamilies?: StateFamilyConfig[]; + /** The system stage name. */ + systemStageName?: string; + } + interface ConcatPosition { + /** Index of the inner source. */ + index?: number; + /** Position within the inner source. */ + position?: Position; + } + interface CounterMetadata { + /** Human-readable description of the counter semantics. */ + description?: string; + /** Counter aggregation kind. */ + kind?: string; + /** A string referring to the unit type. */ + otherUnits?: string; + /** System defined Units, see above enum. */ + standardUnits?: string; + } + interface CounterStructuredName { + /** Name of the optimized step being executed by the workers. */ + componentStepName?: string; + /** Name of the stage. An execution step contains multiple component steps. */ + executionStepName?: string; + /** + * Counter name. Not necessarily globally-unique, but unique within the + * context of the other fields. + * Required. + */ + name?: string; + /** One of the standard Origins defined above. */ + origin?: string; + /** A string containing a more specific namespace of the counter's origin. */ + originNamespace?: string; + /** The GroupByKey step name from the original graph. */ + originalShuffleStepName?: string; + /** + * System generated name of the original step in the user's graph, before + * optimization. + */ + originalStepName?: string; + /** Portion of this counter, either key or value. */ + portion?: string; + /** + * ID of a side input being read from/written to. Side inputs are identified + * by a pair of (reader, input_index). The reader is usually equal to the + * original name, but it may be different, if a ParDo emits it's Iterator / + * Map side input object. + */ + sideInput?: SideInputId; + /** ID of a particular worker. */ + workerId?: string; + } + interface CounterStructuredNameAndMetadata { + /** Metadata associated with a counter */ + metadata?: CounterMetadata; + /** Structured name of the counter. */ + name?: CounterStructuredName; + } + interface CounterUpdate { + /** Boolean value for And, Or. */ + boolean?: boolean; + /** + * True if this counter is reported as the total cumulative aggregate + * value accumulated since the worker started working on this WorkItem. + * By default this is false, indicating that this counter is reported + * as a delta. + */ + cumulative?: boolean; + /** Distribution data */ + distribution?: DistributionUpdate; + /** Floating point value for Sum, Max, Min. */ + floatingPoint?: number; + /** List of floating point numbers, for Set. */ + floatingPointList?: FloatingPointList; + /** Floating point mean aggregation value for Mean. */ + floatingPointMean?: FloatingPointMean; + /** Integer value for Sum, Max, Min. */ + integer?: SplitInt64; + /** List of integers, for Set. */ + integerList?: IntegerList; + /** Integer mean aggregation value for Mean. */ + integerMean?: IntegerMean; + /** Value for internally-defined counters used by the Dataflow service. */ + internal?: any; + /** Counter name and aggregation type. */ + nameAndKind?: NameAndKind; + /** + * The service-generated short identifier for this counter. + * The short_id -> (name, metadata) mapping is constant for the lifetime of + * a job. + */ + shortId?: string; + /** List of strings, for Set. */ + stringList?: StringList; + /** Counter structured name and metadata. */ + structuredNameAndMetadata?: CounterStructuredNameAndMetadata; + } + interface CreateJobFromTemplateRequest { + /** The runtime environment for the job. */ + environment?: RuntimeEnvironment; + /** + * Required. A Cloud Storage path to the template from which to + * create the job. + * Must be a valid Cloud Storage URL, beginning with `gs://`. + */ + gcsPath?: string; + /** Required. The job name to use for the created job. */ + jobName?: string; + /** The location to which to direct the request. */ + location?: string; + /** The runtime parameters to pass to the job. */ + parameters?: Record; + } + interface CustomSourceLocation { + /** Whether this source is stateful. */ + stateful?: boolean; + } + interface DataDiskAssignment { + /** + * Mounted data disks. The order is important a data disk's 0-based index in + * this list defines which persistent directory the disk is mounted to, for + * example the list of { "myproject-1014-104817-4c2-harness-0-disk-0" }, + * { "myproject-1014-104817-4c2-harness-0-disk-1" }. + */ + dataDisks?: string[]; + /** + * VM instance name the data disks mounted to, for example + * "myproject-1014-104817-4c2-harness-0". + */ + vmInstance?: string; + } + interface DerivedSource { + /** What source to base the produced source on (if any). */ + derivationMode?: string; + /** Specification of the source. */ + source?: Source; + } + interface Disk { + /** + * Disk storage type, as defined by Google Compute Engine. This + * must be a disk type appropriate to the project and zone in which + * the workers will run. If unknown or unspecified, the service + * will attempt to choose a reasonable default. + * + * For example, the standard persistent disk type is a resource name + * typically ending in "pd-standard". If SSD persistent disks are + * available, the resource name typically ends with "pd-ssd". The + * actual valid values are defined the Google Compute Engine API, + * not by the Cloud Dataflow API; consult the Google Compute Engine + * documentation for more information about determining the set of + * available disk types for a particular project and zone. + * + * Google Compute Engine Disk types are local to a particular + * project in a particular zone, and so the resource name will + * typically look something like this: + * + * compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard + */ + diskType?: string; + /** Directory in a VM where disk is mounted. */ + mountPoint?: string; + /** + * Size of disk in GB. If zero or unspecified, the service will + * attempt to choose a reasonable default. + */ + sizeGb?: number; + } + interface DisplayData { + /** Contains value if the data is of a boolean type. */ + boolValue?: boolean; + /** Contains value if the data is of duration type. */ + durationValue?: string; + /** Contains value if the data is of float type. */ + floatValue?: number; + /** Contains value if the data is of int64 type. */ + int64Value?: string; + /** Contains value if the data is of java class type. */ + javaClassValue?: string; + /** + * The key identifying the display data. + * This is intended to be used as a label for the display data + * when viewed in a dax monitoring system. + */ + key?: string; + /** An optional label to display in a dax UI for the element. */ + label?: string; + /** + * The namespace for the key. This is usually a class name or programming + * language namespace (i.e. python module) which defines the display data. + * This allows a dax monitoring system to specially handle the data + * and perform custom rendering. + */ + namespace?: string; + /** + * A possible additional shorter value to display. + * For example a java_class_name_value of com.mypackage.MyDoFn + * will be stored with MyDoFn as the short_str_value and + * com.mypackage.MyDoFn as the java_class_name value. + * short_str_value can be displayed and java_class_name_value + * will be displayed as a tooltip. + */ + shortStrValue?: string; + /** Contains value if the data is of string type. */ + strValue?: string; + /** Contains value if the data is of timestamp type. */ + timestampValue?: string; + /** An optional full URL. */ + url?: string; + } + interface DistributionUpdate { + /** The count of the number of elements present in the distribution. */ + count?: SplitInt64; + /** (Optional) Histogram of value counts for the distribution. */ + histogram?: Histogram; + /** The maximum value present in the distribution. */ + max?: SplitInt64; + /** The minimum value present in the distribution. */ + min?: SplitInt64; + /** + * Use an int64 since we'd prefer the added precision. If overflow is a common + * problem we can detect it and use an additional int64 or a double. + */ + sum?: SplitInt64; + /** Use a double since the sum of squares is likely to overflow int64. */ + sumOfSquares?: number; + } + interface DynamicSourceSplit { + /** + * Primary part (continued to be processed by worker). + * Specified relative to the previously-current source. + * Becomes current. + */ + primary?: DerivedSource; + /** + * Residual part (returned to the pool of work). + * Specified relative to the previously-current source. + */ + residual?: DerivedSource; + } + interface Environment { + /** + * The type of cluster manager API to use. If unknown or + * unspecified, the service will attempt to choose a reasonable + * default. This should be in the form of the API service name, + * e.g. "compute.googleapis.com". + */ + clusterManagerApiService?: string; + /** + * The dataset for the current project where various workflow + * related tables are stored. + * + * The supported resource type is: + * + * Google BigQuery: + * bigquery.googleapis.com/{dataset} + */ + dataset?: string; + /** The list of experiments to enable. */ + experiments?: string[]; + /** Experimental settings. */ + internalExperiments?: Record; + /** + * The Cloud Dataflow SDK pipeline options specified by the user. These + * options are passed through the service and are used to recreate the + * SDK pipeline options on the worker in a language agnostic and platform + * independent way. + */ + sdkPipelineOptions?: Record; + /** Identity to run virtual machines as. Defaults to the default account. */ + serviceAccountEmail?: string; + /** + * The prefix of the resources the system should use for temporary + * storage. The system will append the suffix "/temp-{JOBNAME} to + * this resource prefix, where {JOBNAME} is the value of the + * job_name field. The resulting bucket and object prefix is used + * as the prefix of the resources used to store temporary data + * needed during the job execution. NOTE: This will override the + * value in taskrunner_settings. + * The supported resource type is: + * + * Google Cloud Storage: + * + * storage.googleapis.com/{bucket}/{object} + * bucket.storage.googleapis.com/{object} + */ + tempStoragePrefix?: string; + /** A description of the process that generated the request. */ + userAgent?: Record; + /** + * A structure describing which components and their versions of the service + * are required in order to run the job. + */ + version?: Record; + /** + * The worker pools. At least one "harness" worker pool must be + * specified in order for the job to have workers. + */ + workerPools?: WorkerPool[]; + } + interface ExecutionStageState { + /** The time at which the stage transitioned to this state. */ + currentStateTime?: string; + /** The name of the execution stage. */ + executionStageName?: string; + /** Executions stage states allow the same set of values as JobState. */ + executionStageState?: string; + } + interface ExecutionStageSummary { + /** Collections produced and consumed by component transforms of this stage. */ + componentSource?: ComponentSource[]; + /** Transforms that comprise this execution stage. */ + componentTransform?: ComponentTransform[]; + /** Dataflow service generated id for this stage. */ + id?: string; + /** Input sources for this stage. */ + inputSource?: StageSource[]; + /** Type of tranform this stage is executing. */ + kind?: string; + /** Dataflow service generated name for this stage. */ + name?: string; + /** Output sources for this stage. */ + outputSource?: StageSource[]; + } + interface FailedLocation { + /** The name of the failed location. */ + name?: string; + } + interface FlattenInstruction { + /** Describes the inputs to the flatten instruction. */ + inputs?: InstructionInput[]; + } + interface FloatingPointList { + /** Elements of the list. */ + elements?: number[]; + } + interface FloatingPointMean { + /** The number of values being aggregated. */ + count?: SplitInt64; + /** The sum of all values being aggregated. */ + sum?: number; + } + interface GetDebugConfigRequest { + /** + * The internal component id for which debug configuration is + * requested. + */ + componentId?: string; + /** The location which contains the job specified by job_id. */ + location?: string; + /** The worker id, i.e., VM hostname. */ + workerId?: string; + } + interface GetDebugConfigResponse { + /** The encoded debug configuration for the requested component. */ + config?: string; + } + interface GetTemplateResponse { + /** + * The template metadata describing the template name, available + * parameters, etc. + */ + metadata?: TemplateMetadata; + /** + * The status of the get template request. Any problems with the + * request will be indicated in the error_details. + */ + status?: Status; + } + interface Histogram { + /** + * Counts of values in each bucket. For efficiency, prefix and trailing + * buckets with count = 0 are elided. Buckets can store the full range of + * values of an unsigned long, with ULLONG_MAX falling into the 59th bucket + * with range [1e19, 2e19). + */ + bucketCounts?: string[]; + /** + * Starting index of first stored bucket. The non-inclusive upper-bound of + * the ith bucket is given by: + * pow(10,(i-first_bucket_offset)/3) * (1,2,5)[(i-first_bucket_offset)%3] + */ + firstBucketOffset?: number; + } + interface InstructionInput { + /** The output index (origin zero) within the producer. */ + outputNum?: number; + /** + * The index (origin zero) of the parallel instruction that produces + * the output to be consumed by this input. This index is relative + * to the list of instructions in this input's instruction's + * containing MapTask. + */ + producerInstructionIndex?: number; + } + interface InstructionOutput { + /** The codec to use to encode data being written via this output. */ + codec?: Record; + /** The user-provided name of this output. */ + name?: string; + /** + * For system-generated byte and mean byte metrics, certain instructions + * should only report the key size. + */ + onlyCountKeyBytes?: boolean; + /** + * For system-generated byte and mean byte metrics, certain instructions + * should only report the value size. + */ + onlyCountValueBytes?: boolean; + /** + * System-defined name for this output in the original workflow graph. + * Outputs that do not contribute to an original instruction do not set this. + */ + originalName?: string; + /** + * System-defined name of this output. + * Unique across the workflow. + */ + systemName?: string; + } + interface IntegerList { + /** Elements of the list. */ + elements?: SplitInt64[]; + } + interface IntegerMean { + /** The number of values being aggregated. */ + count?: SplitInt64; + /** The sum of all values being aggregated. */ + sum?: SplitInt64; + } + interface Job { + /** + * The client's unique identifier of the job, re-used across retried attempts. + * If this field is set, the service will ensure its uniqueness. + * The request to create a job will fail if the service has knowledge of a + * previously submitted job with the same client's ID and job name. + * The caller may use this field to ensure idempotence of job + * creation across retried attempts to create a job. + * By default, the field is empty and, in that case, the service ignores it. + */ + clientRequestId?: string; + /** + * The timestamp when the job was initially created. Immutable and set by the + * Cloud Dataflow service. + */ + createTime?: string; + /** + * The current state of the job. + * + * Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise + * specified. + * + * A job in the `JOB_STATE_RUNNING` state may asynchronously enter a + * terminal state. After a job has reached a terminal state, no + * further state updates may be made. + * + * This field may be mutated by the Cloud Dataflow service; + * callers cannot mutate it. + */ + currentState?: string; + /** The timestamp associated with the current state. */ + currentStateTime?: string; + /** The environment for the job. */ + environment?: Environment; + /** Deprecated. */ + executionInfo?: JobExecutionInfo; + /** + * The unique ID of this job. + * + * This field is set by the Cloud Dataflow service when the Job is + * created, and is immutable for the life of the job. + */ + id?: string; + /** + * User-defined labels for this job. + * + * The labels map can contain no more than 64 entries. Entries of the labels + * map are UTF8 strings that comply with the following restrictions: + * + * * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} + * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + * * Both keys and values are additionally constrained to be <= 128 bytes in + * size. + */ + labels?: Record; + /** The location that contains this job. */ + location?: string; + /** + * The user-specified Cloud Dataflow job name. + * + * Only one Job with a given name may exist in a project at any + * given time. If a caller attempts to create a Job with the same + * name as an already-existing Job, the attempt returns the + * existing Job. + * + * The name must match the regular expression + * `[a-z]([-a-z0-9]{0,38}[a-z0-9])?` + */ + name?: string; + /** + * Preliminary field: The format of this data may change at any time. + * A description of the user pipeline and stages through which it is executed. + * Created by Cloud Dataflow service. Only retrieved with + * JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. + */ + pipelineDescription?: PipelineDescription; + /** The ID of the Cloud Platform project that the job belongs to. */ + projectId?: string; + /** + * If this job is an update of an existing job, this field is the job ID + * of the job it replaced. + * + * When sending a `CreateJobRequest`, you can update a job by specifying it + * here. The job named here is stopped, and its intermediate state is + * transferred to this job. + */ + replaceJobId?: string; + /** + * If another job is an update of this job (and thus, this job is in + * `JOB_STATE_UPDATED`), this field contains the ID of that job. + */ + replacedByJobId?: string; + /** + * The job's requested state. + * + * `UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` and + * `JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` may + * also be used to directly set a job's requested state to + * `JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating the + * job if it has not already reached a terminal state. + */ + requestedState?: string; + /** + * This field may be mutated by the Cloud Dataflow service; + * callers cannot mutate it. + */ + stageStates?: ExecutionStageState[]; + /** The top-level steps that constitute the entire job. */ + steps?: Step[]; + /** + * A set of files the system should be aware of that are used + * for temporary storage. These temporary files will be + * removed on job completion. + * No duplicates are allowed. + * No file patterns are supported. + * + * The supported files are: + * + * Google Cloud Storage: + * + * storage.googleapis.com/{bucket}/{object} + * bucket.storage.googleapis.com/{object} + */ + tempFiles?: string[]; + /** + * The map of transform name prefixes of the job to be replaced to the + * corresponding name prefixes of the new job. + */ + transformNameMapping?: Record; + /** The type of Cloud Dataflow job. */ + type?: string; + } + interface JobExecutionInfo { + /** A mapping from each stage to the information about that stage. */ + stages?: Record; + } + interface JobExecutionStageInfo { + /** + * The steps associated with the execution stage. + * Note that stages may have several steps, and that a given step + * might be run by more than one stage. + */ + stepName?: string[]; + } + interface JobMessage { + /** Deprecated. */ + id?: string; + /** Importance level of the message. */ + messageImportance?: string; + /** The text of the message. */ + messageText?: string; + /** The timestamp of the message. */ + time?: string; + } + interface JobMetrics { + /** Timestamp as of which metric values are current. */ + metricTime?: string; + /** All metrics for this job. */ + metrics?: MetricUpdate[]; + } + interface KeyRangeDataDiskAssignment { + /** + * The name of the data disk where data for this range is stored. + * This name is local to the Google Cloud Platform project and uniquely + * identifies the disk within that project, for example + * "myproject-1014-104817-4c2-harness-0-disk-1". + */ + dataDisk?: string; + /** The end (exclusive) of the key range. */ + end?: string; + /** The start (inclusive) of the key range. */ + start?: string; + } + interface KeyRangeLocation { + /** + * The name of the data disk where data for this range is stored. + * This name is local to the Google Cloud Platform project and uniquely + * identifies the disk within that project, for example + * "myproject-1014-104817-4c2-harness-0-disk-1". + */ + dataDisk?: string; + /** + * The physical location of this range assignment to be used for + * streaming computation cross-worker message delivery. + */ + deliveryEndpoint?: string; + /** + * DEPRECATED. The location of the persistent state for this range, as a + * persistent directory in the worker local filesystem. + */ + deprecatedPersistentDirectory?: string; + /** The end (exclusive) of the key range. */ + end?: string; + /** The start (inclusive) of the key range. */ + start?: string; + } + interface LaunchTemplateParameters { + /** The runtime environment for the job. */ + environment?: RuntimeEnvironment; + /** Required. The job name to use for the created job. */ + jobName?: string; + /** The runtime parameters to pass to the job. */ + parameters?: Record; + } + interface LaunchTemplateResponse { + /** + * The job that was launched, if the request was not a dry run and + * the job was successfully launched. + */ + job?: Job; + } + interface LeaseWorkItemRequest { + /** The current timestamp at the worker. */ + currentWorkerTime?: string; + /** The location which contains the WorkItem's job. */ + location?: string; + /** The initial lease period. */ + requestedLeaseDuration?: string; + /** Filter for WorkItem type. */ + workItemTypes?: string[]; + /** + * Worker capabilities. WorkItems might be limited to workers with specific + * capabilities. + */ + workerCapabilities?: string[]; + /** + * Identifies the worker leasing work -- typically the ID of the + * virtual machine running the worker. + */ + workerId?: string; + } + interface LeaseWorkItemResponse { + /** A list of the leased WorkItems. */ + workItems?: WorkItem[]; + } + interface ListJobMessagesResponse { + /** Autoscaling events in ascending timestamp order. */ + autoscalingEvents?: AutoscalingEvent[]; + /** Messages in ascending timestamp order. */ + jobMessages?: JobMessage[]; + /** The token to obtain the next page of results if there are more. */ + nextPageToken?: string; + } + interface ListJobsResponse { + /** Zero or more messages describing locations that failed to respond. */ + failedLocation?: FailedLocation[]; + /** A subset of the requested job information. */ + jobs?: Job[]; + /** Set if there may be more results than fit in this response. */ + nextPageToken?: string; + } + interface MapTask { + /** The instructions in the MapTask. */ + instructions?: ParallelInstruction[]; + /** + * System-defined name of the stage containing this MapTask. + * Unique across the workflow. + */ + stageName?: string; + /** + * System-defined name of this MapTask. + * Unique across the workflow. + */ + systemName?: string; + } + interface MetricShortId { + /** + * The index of the corresponding metric in + * the ReportWorkItemStatusRequest. Required. + */ + metricIndex?: number; + /** The service-generated short identifier for the metric. */ + shortId?: string; + } + interface MetricStructuredName { + /** + * Zero or more labeled fields which identify the part of the job this + * metric is associated with, such as the name of a step or collection. + * + * For example, built-in counters associated with steps will have + * context['step'] = . Counters associated with PCollections + * in the SDK will have context['pcollection'] = . + */ + context?: Record; + /** Worker-defined metric name. */ + name?: string; + /** + * Origin (namespace) of metric name. May be blank for user-define metrics; + * will be "dataflow" for metrics defined by the Dataflow service or SDK. + */ + origin?: string; + } + interface MetricUpdate { + /** + * True if this metric is reported as the total cumulative aggregate + * value accumulated since the worker started working on this WorkItem. + * By default this is false, indicating that this metric is reported + * as a delta that is not associated with any WorkItem. + */ + cumulative?: boolean; + /** A struct value describing properties of a distribution of numeric values. */ + distribution?: any; + /** + * Worker-computed aggregate value for internal use by the Dataflow + * service. + */ + internal?: any; + /** + * Metric aggregation kind. The possible metric aggregation kinds are + * "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution". + * The specified aggregation kind is case-insensitive. + * + * If omitted, this is not an aggregated value but instead + * a single metric sample value. + */ + kind?: string; + /** + * Worker-computed aggregate value for the "Mean" aggregation kind. + * This holds the count of the aggregated values and is used in combination + * with mean_sum above to obtain the actual mean aggregate value. + * The only possible value type is Long. + */ + meanCount?: any; + /** + * Worker-computed aggregate value for the "Mean" aggregation kind. + * This holds the sum of the aggregated values and is used in combination + * with mean_count below to obtain the actual mean aggregate value. + * The only possible value types are Long and Double. + */ + meanSum?: any; + /** Name of the metric. */ + name?: MetricStructuredName; + /** + * Worker-computed aggregate value for aggregation kinds "Sum", "Max", "Min", + * "And", and "Or". The possible value types are Long, Double, and Boolean. + */ + scalar?: any; + /** + * Worker-computed aggregate value for the "Set" aggregation kind. The only + * possible value type is a list of Values whose type can be Long, Double, + * or String, according to the metric's type. All Values in the list must + * be of the same type. + */ + set?: any; + /** + * Timestamp associated with the metric value. Optional when workers are + * reporting work progress; it will be filled in responses from the + * metrics API. + */ + updateTime?: string; + } + interface MountedDataDisk { + /** + * The name of the data disk. + * This name is local to the Google Cloud Platform project and uniquely + * identifies the disk within that project, for example + * "myproject-1014-104817-4c2-harness-0-disk-1". + */ + dataDisk?: string; + } + interface MultiOutputInfo { + /** + * The id of the tag the user code will emit to this output by; this + * should correspond to the tag of some SideInputInfo. + */ + tag?: string; + } + interface NameAndKind { + /** Counter aggregation kind. */ + kind?: string; + /** Name of the counter. */ + name?: string; + } + interface Package { + /** + * The resource to read the package from. The supported resource type is: + * + * Google Cloud Storage: + * + * storage.googleapis.com/{bucket} + * bucket.storage.googleapis.com/ + */ + location?: string; + /** The name of the package. */ + name?: string; + } + interface ParDoInstruction { + /** The input. */ + input?: InstructionInput; + /** Information about each of the outputs, if user_fn is a MultiDoFn. */ + multiOutputInfos?: MultiOutputInfo[]; + /** The number of outputs. */ + numOutputs?: number; + /** Zero or more side inputs. */ + sideInputs?: SideInputInfo[]; + /** The user function to invoke. */ + userFn?: Record; + } + interface ParallelInstruction { + /** Additional information for Flatten instructions. */ + flatten?: FlattenInstruction; + /** User-provided name of this operation. */ + name?: string; + /** System-defined name for the operation in the original workflow graph. */ + originalName?: string; + /** Describes the outputs of the instruction. */ + outputs?: InstructionOutput[]; + /** Additional information for ParDo instructions. */ + parDo?: ParDoInstruction; + /** Additional information for PartialGroupByKey instructions. */ + partialGroupByKey?: PartialGroupByKeyInstruction; + /** Additional information for Read instructions. */ + read?: ReadInstruction; + /** + * System-defined name of this operation. + * Unique across the workflow. + */ + systemName?: string; + /** Additional information for Write instructions. */ + write?: WriteInstruction; + } + interface Parameter { + /** Key or name for this parameter. */ + key?: string; + /** Value for this parameter. */ + value?: any; + } + interface ParameterMetadata { + /** Required. The help text to display for the parameter. */ + helpText?: string; + /** Optional. Whether the parameter is optional. Defaults to false. */ + isOptional?: boolean; + /** Required. The label to display for the parameter. */ + label?: string; + /** Required. The name of the parameter. */ + name?: string; + /** Optional. Regexes that the parameter must match. */ + regexes?: string[]; + } + interface PartialGroupByKeyInstruction { + /** Describes the input to the partial group-by-key instruction. */ + input?: InstructionInput; + /** The codec to use for interpreting an element in the input PTable. */ + inputElementCodec?: Record; + /** + * If this instruction includes a combining function this is the name of the + * intermediate store between the GBK and the CombineValues. + */ + originalCombineValuesInputStoreName?: string; + /** + * If this instruction includes a combining function, this is the name of the + * CombineValues instruction lifted into this instruction. + */ + originalCombineValuesStepName?: string; + /** Zero or more side inputs. */ + sideInputs?: SideInputInfo[]; + /** The value combining function to invoke. */ + valueCombiningFn?: Record; + } + interface PipelineDescription { + /** Pipeline level display data. */ + displayData?: DisplayData[]; + /** Description of each stage of execution of the pipeline. */ + executionPipelineStage?: ExecutionStageSummary[]; + /** Description of each transform in the pipeline and collections between them. */ + originalPipelineTransform?: TransformSummary[]; + } + interface Position { + /** Position is a byte offset. */ + byteOffset?: string; + /** CloudPosition is a concat position. */ + concatPosition?: ConcatPosition; + /** + * Position is past all other positions. Also useful for the end + * position of an unbounded range. + */ + end?: boolean; + /** Position is a string key, ordered lexicographically. */ + key?: string; + /** Position is a record index. */ + recordIndex?: string; + /** + * CloudPosition is a base64 encoded BatchShufflePosition (with FIXED + * sharding). + */ + shufflePosition?: string; + } + interface PubsubLocation { + /** Indicates whether the pipeline allows late-arriving data. */ + dropLateData?: boolean; + /** + * If set, contains a pubsub label from which to extract record ids. + * If left empty, record deduplication will be strictly best effort. + */ + idLabel?: string; + /** + * A pubsub subscription, in the form of + * "pubsub.googleapis.com/subscriptions//" + */ + subscription?: string; + /** + * If set, contains a pubsub label from which to extract record timestamps. + * If left empty, record timestamps will be generated upon arrival. + */ + timestampLabel?: string; + /** + * A pubsub topic, in the form of + * "pubsub.googleapis.com/topics//" + */ + topic?: string; + /** + * If set, specifies the pubsub subscription that will be used for tracking + * custom time timestamps for watermark estimation. + */ + trackingSubscription?: string; + /** If true, then the client has requested to get pubsub attributes. */ + withAttributes?: boolean; + } + interface ReadInstruction { + /** The source to read from. */ + source?: Source; + } + interface ReportWorkItemStatusRequest { + /** The current timestamp at the worker. */ + currentWorkerTime?: string; + /** The location which contains the WorkItem's job. */ + location?: string; + /** + * The order is unimportant, except that the order of the + * WorkItemServiceState messages in the ReportWorkItemStatusResponse + * corresponds to the order of WorkItemStatus messages here. + */ + workItemStatuses?: WorkItemStatus[]; + /** + * The ID of the worker reporting the WorkItem status. If this + * does not match the ID of the worker which the Dataflow service + * believes currently has the lease on the WorkItem, the report + * will be dropped (with an error response). + */ + workerId?: string; + } + interface ReportWorkItemStatusResponse { + /** + * A set of messages indicating the service-side state for each + * WorkItem whose status was reported, in the same order as the + * WorkItemStatus messages in the ReportWorkItemStatusRequest which + * resulting in this response. + */ + workItemServiceStates?: WorkItemServiceState[]; + } + interface ReportedParallelism { + /** + * Specifies whether the parallelism is infinite. If true, "value" is + * ignored. + * Infinite parallelism means the service will assume that the work item + * can always be split into more non-empty work items by dynamic splitting. + * This is a work-around for lack of support for infinity by the current + * JSON-based Java RPC stack. + */ + isInfinite?: boolean; + /** Specifies the level of parallelism in case it is finite. */ + value?: number; + } + interface ResourceUtilizationReport { + /** CPU utilization samples. */ + cpuTime?: CPUTime[]; + } + interface RuntimeEnvironment { + /** + * Whether to bypass the safety checks for the job's temporary directory. + * Use with caution. + */ + bypassTempDirValidation?: boolean; + /** + * The machine type to use for the job. Defaults to the value from the + * template if not specified. + */ + machineType?: string; + /** + * The maximum number of Google Compute Engine instances to be made + * available to your pipeline during execution, from 1 to 1000. + */ + maxWorkers?: number; + /** The email address of the service account to run the job as. */ + serviceAccountEmail?: string; + /** + * The Cloud Storage path to use for temporary files. + * Must be a valid Cloud Storage URL, beginning with `gs://`. + */ + tempLocation?: string; + /** + * The Compute Engine [availability + * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) + * for launching worker instances to run your pipeline. + */ + zone?: string; + } + interface SendDebugCaptureRequest { + /** The internal component id for which debug information is sent. */ + componentId?: string; + /** The encoded debug information. */ + data?: string; + /** The location which contains the job specified by job_id. */ + location?: string; + /** The worker id, i.e., VM hostname. */ + workerId?: string; + } + interface SendWorkerMessagesRequest { + /** The location which contains the job */ + location?: string; + /** The WorkerMessages to send. */ + workerMessages?: WorkerMessage[]; + } + interface SendWorkerMessagesResponse { + /** The servers response to the worker messages. */ + workerMessageResponses?: WorkerMessageResponse[]; + } + interface SeqMapTask { + /** Information about each of the inputs. */ + inputs?: SideInputInfo[]; + /** The user-provided name of the SeqDo operation. */ + name?: string; + /** Information about each of the outputs. */ + outputInfos?: SeqMapTaskOutputInfo[]; + /** + * System-defined name of the stage containing the SeqDo operation. + * Unique across the workflow. + */ + stageName?: string; + /** + * System-defined name of the SeqDo operation. + * Unique across the workflow. + */ + systemName?: string; + /** The user function to invoke. */ + userFn?: Record; + } + interface SeqMapTaskOutputInfo { + /** The sink to write the output value to. */ + sink?: Sink; + /** The id of the TupleTag the user code will tag the output value by. */ + tag?: string; + } + interface ShellTask { + /** The shell command to run. */ + command?: string; + /** Exit code for the task. */ + exitCode?: number; + } + interface SideInputId { + /** The step that receives and usually consumes this side input. */ + declaringStepName?: string; + /** The index of the side input, from the list of non_parallel_inputs. */ + inputIndex?: number; + } + interface SideInputInfo { + /** How to interpret the source element(s) as a side input value. */ + kind?: Record; + /** + * The source(s) to read element(s) from to get the value of this side input. + * If more than one source, then the elements are taken from the + * sources, in the specified order if order matters. + * At least one source is required. + */ + sources?: Source[]; + /** + * The id of the tag the user code will access this side input by; + * this should correspond to the tag of some MultiOutputInfo. + */ + tag?: string; + } + interface Sink { + /** The codec to use to encode data written to the sink. */ + codec?: Record; + /** The sink to write to, plus its parameters. */ + spec?: Record; + } + interface Source { + /** + * While splitting, sources may specify the produced bundles + * as differences against another source, in order to save backend-side + * memory and allow bigger jobs. For details, see SourceSplitRequest. + * To support this use case, the full set of parameters of the source + * is logically obtained by taking the latest explicitly specified value + * of each parameter in the order: + * base_specs (later items win), spec (overrides anything in base_specs). + */ + baseSpecs?: Array>; + /** The codec to use to decode data read from the source. */ + codec?: Record; + /** + * Setting this value to true hints to the framework that the source + * doesn't need splitting, and using SourceSplitRequest on it would + * yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. + * + * E.g. a file splitter may set this to true when splitting a single file + * into a set of byte ranges of appropriate size, and set this + * to false when splitting a filepattern into individual files. + * However, for efficiency, a file splitter may decide to produce + * file subranges directly from the filepattern to avoid a splitting + * round-trip. + * + * See SourceSplitRequest for an overview of the splitting process. + * + * This field is meaningful only in the Source objects populated + * by the user (e.g. when filling in a DerivedSource). + * Source objects supplied by the framework to the user don't have + * this field populated. + */ + doesNotNeedSplitting?: boolean; + /** + * Optionally, metadata for this source can be supplied right away, + * avoiding a SourceGetMetadataOperation roundtrip + * (see SourceOperationRequest). + * + * This field is meaningful only in the Source objects populated + * by the user (e.g. when filling in a DerivedSource). + * Source objects supplied by the framework to the user don't have + * this field populated. + */ + metadata?: SourceMetadata; + /** The source to read from, plus its parameters. */ + spec?: Record; + } + interface SourceFork { + /** DEPRECATED */ + primary?: SourceSplitShard; + /** DEPRECATED */ + primarySource?: DerivedSource; + /** DEPRECATED */ + residual?: SourceSplitShard; + /** DEPRECATED */ + residualSource?: DerivedSource; + } + interface SourceGetMetadataRequest { + /** Specification of the source whose metadata should be computed. */ + source?: Source; + } + interface SourceGetMetadataResponse { + /** The computed metadata. */ + metadata?: SourceMetadata; + } + interface SourceMetadata { + /** + * An estimate of the total size (in bytes) of the data that would be + * read from this source. This estimate is in terms of external storage + * size, before any decompression or other processing done by the reader. + */ + estimatedSizeBytes?: string; + /** + * Specifies that the size of this source is known to be infinite + * (this is a streaming source). + */ + infinite?: boolean; + /** + * Whether this source is known to produce key/value pairs with + * the (encoded) keys in lexicographically sorted order. + */ + producesSortedKeys?: boolean; + } + interface SourceOperationRequest { + /** Information about a request to get metadata about a source. */ + getMetadata?: SourceGetMetadataRequest; + /** Information about a request to split a source. */ + split?: SourceSplitRequest; + } + interface SourceOperationResponse { + /** A response to a request to get metadata about a source. */ + getMetadata?: SourceGetMetadataResponse; + /** A response to a request to split a source. */ + split?: SourceSplitResponse; + } + interface SourceSplitOptions { + /** + * The source should be split into a set of bundles where the estimated size + * of each is approximately this many bytes. + */ + desiredBundleSizeBytes?: string; + /** DEPRECATED in favor of desired_bundle_size_bytes. */ + desiredShardSizeBytes?: string; + } + interface SourceSplitRequest { + /** Hints for tuning the splitting process. */ + options?: SourceSplitOptions; + /** Specification of the source to be split. */ + source?: Source; + } + interface SourceSplitResponse { + /** + * If outcome is SPLITTING_HAPPENED, then this is a list of bundles + * into which the source was split. Otherwise this field is ignored. + * This list can be empty, which means the source represents an empty input. + */ + bundles?: DerivedSource[]; + /** + * Indicates whether splitting happened and produced a list of bundles. + * If this is USE_CURRENT_SOURCE_AS_IS, the current source should + * be processed "as is" without splitting. "bundles" is ignored in this case. + * If this is SPLITTING_HAPPENED, then "bundles" contains a list of + * bundles into which the source was split. + */ + outcome?: string; + /** DEPRECATED in favor of bundles. */ + shards?: SourceSplitShard[]; + } + interface SourceSplitShard { + /** DEPRECATED */ + derivationMode?: string; + /** DEPRECATED */ + source?: Source; + } + interface SplitInt64 { + /** The high order bits, including the sign: n >> 32. */ + highBits?: number; + /** The low order bits: n & 0xffffffff. */ + lowBits?: number; + } + interface StageSource { + /** Dataflow service generated name for this source. */ + name?: string; + /** + * User name for the original user transform or collection with which this + * source is most closely associated. + */ + originalTransformOrCollection?: string; + /** Size of the source, if measurable. */ + sizeBytes?: string; + /** Human-readable name for this source; may be user or system generated. */ + userName?: string; + } + interface StateFamilyConfig { + /** If true, this family corresponds to a read operation. */ + isRead?: boolean; + /** The state family value. */ + stateFamily?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface Step { + /** The kind of step in the Cloud Dataflow job. */ + kind?: string; + /** + * The name that identifies the step. This must be unique for each + * step with respect to all other steps in the Cloud Dataflow job. + */ + name?: string; + /** + * Named properties associated with the step. Each kind of + * predefined step has its own required set of properties. + * Must be provided on Create. Only retrieved with JOB_VIEW_ALL. + */ + properties?: Record; + } + interface StreamLocation { + /** The stream is a custom source. */ + customSourceLocation?: CustomSourceLocation; + /** The stream is a pubsub stream. */ + pubsubLocation?: PubsubLocation; + /** The stream is a streaming side input. */ + sideInputLocation?: StreamingSideInputLocation; + /** + * The stream is part of another computation within the current + * streaming Dataflow job. + */ + streamingStageLocation?: StreamingStageLocation; + } + interface StreamingComputationConfig { + /** Unique identifier for this computation. */ + computationId?: string; + /** Instructions that comprise the computation. */ + instructions?: ParallelInstruction[]; + /** Stage name of this computation. */ + stageName?: string; + /** System defined name for this computation. */ + systemName?: string; + } + interface StreamingComputationRanges { + /** The ID of the computation. */ + computationId?: string; + /** Data disk assignments for ranges from this computation. */ + rangeAssignments?: KeyRangeDataDiskAssignment[]; + } + interface StreamingComputationTask { + /** Contains ranges of a streaming computation this task should apply to. */ + computationRanges?: StreamingComputationRanges[]; + /** Describes the set of data disks this task should apply to. */ + dataDisks?: MountedDataDisk[]; + /** A type of streaming computation task. */ + taskType?: string; + } + interface StreamingConfigTask { + /** Set of computation configuration information. */ + streamingComputationConfigs?: StreamingComputationConfig[]; + /** Map from user step names to state families. */ + userStepToStateFamilyNameMap?: Record; + /** + * If present, the worker must use this endpoint to communicate with Windmill + * Service dispatchers, otherwise the worker must continue to use whatever + * endpoint it had been using. + */ + windmillServiceEndpoint?: string; + /** + * If present, the worker must use this port to communicate with Windmill + * Service dispatchers. Only applicable when windmill_service_endpoint is + * specified. + */ + windmillServicePort?: string; + } + interface StreamingSetupTask { + /** The user has requested drain. */ + drain?: boolean; + /** + * The TCP port on which the worker should listen for messages from + * other streaming computation workers. + */ + receiveWorkPort?: number; + /** The global topology of the streaming Dataflow job. */ + streamingComputationTopology?: TopologyConfig; + /** + * The TCP port used by the worker to communicate with the Dataflow + * worker harness. + */ + workerHarnessPort?: number; + } + interface StreamingSideInputLocation { + /** Identifies the state family where this side input is stored. */ + stateFamily?: string; + /** Identifies the particular side input within the streaming Dataflow job. */ + tag?: string; + } + interface StreamingStageLocation { + /** + * Identifies the particular stream within the streaming Dataflow + * job. + */ + streamId?: string; + } + interface StringList { + /** Elements of the list. */ + elements?: string[]; + } + interface StructuredMessage { + /** + * Idenfier for this message type. Used by external systems to + * internationalize or personalize message. + */ + messageKey?: string; + /** Human-readable version of message. */ + messageText?: string; + /** The structured data associated with this message. */ + parameters?: Parameter[]; + } + interface TaskRunnerSettings { + /** Whether to also send taskrunner log info to stderr. */ + alsologtostderr?: boolean; + /** The location on the worker for task-specific subdirectories. */ + baseTaskDir?: string; + /** + * The base URL for the taskrunner to use when accessing Google Cloud APIs. + * + * When workers access Google Cloud APIs, they logically do so via + * relative URLs. If this field is specified, it supplies the base + * URL to use for resolving these relative URLs. The normative + * algorithm used is defined by RFC 1808, "Relative Uniform Resource + * Locators". + * + * If not specified, the default value is "http://www.googleapis.com/" + */ + baseUrl?: string; + /** The file to store preprocessing commands in. */ + commandlinesFileName?: string; + /** Whether to continue taskrunner if an exception is hit. */ + continueOnException?: boolean; + /** The API version of endpoint, e.g. "v1b3" */ + dataflowApiVersion?: string; + /** The command to launch the worker harness. */ + harnessCommand?: string; + /** The suggested backend language. */ + languageHint?: string; + /** The directory on the VM to store logs. */ + logDir?: string; + /** + * Whether to send taskrunner log info to Google Compute Engine VM serial + * console. + */ + logToSerialconsole?: boolean; + /** + * Indicates where to put logs. If this is not specified, the logs + * will not be uploaded. + * + * The supported resource type is: + * + * Google Cloud Storage: + * storage.googleapis.com/{bucket}/{object} + * bucket.storage.googleapis.com/{object} + */ + logUploadLocation?: string; + /** + * The OAuth2 scopes to be requested by the taskrunner in order to + * access the Cloud Dataflow API. + */ + oauthScopes?: string[]; + /** The settings to pass to the parallel worker harness. */ + parallelWorkerSettings?: WorkerSettings; + /** The streaming worker main class name. */ + streamingWorkerMainClass?: string; + /** + * The UNIX group ID on the worker VM to use for tasks launched by + * taskrunner; e.g. "wheel". + */ + taskGroup?: string; + /** + * The UNIX user ID on the worker VM to use for tasks launched by + * taskrunner; e.g. "root". + */ + taskUser?: string; + /** + * The prefix of the resources the taskrunner should use for + * temporary storage. + * + * The supported resource type is: + * + * Google Cloud Storage: + * storage.googleapis.com/{bucket}/{object} + * bucket.storage.googleapis.com/{object} + */ + tempStoragePrefix?: string; + /** The ID string of the VM. */ + vmId?: string; + /** The file to store the workflow in. */ + workflowFileName?: string; + } + interface TemplateMetadata { + /** Optional. A description of the template. */ + description?: string; + /** Required. The name of the template. */ + name?: string; + /** The parameters for the template. */ + parameters?: ParameterMetadata[]; + } + interface TopologyConfig { + /** The computations associated with a streaming Dataflow job. */ + computations?: ComputationTopology[]; + /** The disks assigned to a streaming Dataflow job. */ + dataDiskAssignments?: DataDiskAssignment[]; + /** The size (in bits) of keys that will be assigned to source messages. */ + forwardingKeyBits?: number; + /** Version number for persistent state. */ + persistentStateVersion?: number; + /** Maps user stage names to stable computation names. */ + userStageToComputationNameMap?: Record; + } + interface TransformSummary { + /** Transform-specific display data. */ + displayData?: DisplayData[]; + /** SDK generated id of this transform instance. */ + id?: string; + /** User names for all collection inputs to this transform. */ + inputCollectionName?: string[]; + /** Type of transform. */ + kind?: string; + /** User provided name for this transform instance. */ + name?: string; + /** User names for all collection outputs to this transform. */ + outputCollectionName?: string[]; + } + interface WorkItem { + /** Work item-specific configuration as an opaque blob. */ + configuration?: string; + /** Identifies this WorkItem. */ + id?: string; + /** The initial index to use when reporting the status of the WorkItem. */ + initialReportIndex?: string; + /** Identifies the workflow job this WorkItem belongs to. */ + jobId?: string; + /** Time when the lease on this Work will expire. */ + leaseExpireTime?: string; + /** Additional information for MapTask WorkItems. */ + mapTask?: MapTask; + /** + * Any required packages that need to be fetched in order to execute + * this WorkItem. + */ + packages?: Package[]; + /** Identifies the cloud project this WorkItem belongs to. */ + projectId?: string; + /** Recommended reporting interval. */ + reportStatusInterval?: string; + /** Additional information for SeqMapTask WorkItems. */ + seqMapTask?: SeqMapTask; + /** Additional information for ShellTask WorkItems. */ + shellTask?: ShellTask; + /** Additional information for source operation WorkItems. */ + sourceOperationTask?: SourceOperationRequest; + /** Additional information for StreamingComputationTask WorkItems. */ + streamingComputationTask?: StreamingComputationTask; + /** Additional information for StreamingConfigTask WorkItems. */ + streamingConfigTask?: StreamingConfigTask; + /** Additional information for StreamingSetupTask WorkItems. */ + streamingSetupTask?: StreamingSetupTask; + } + interface WorkItemServiceState { + /** + * Other data returned by the service, specific to the particular + * worker harness. + */ + harnessData?: Record; + /** Time at which the current lease will expire. */ + leaseExpireTime?: string; + /** + * The short ids that workers should use in subsequent metric updates. + * Workers should strive to use short ids whenever possible, but it is ok + * to request the short_id again if a worker lost track of it + * (e.g. if the worker is recovering from a crash). + * NOTE: it is possible that the response may have short ids for a subset + * of the metrics. + */ + metricShortId?: MetricShortId[]; + /** + * The index value to use for the next report sent by the worker. + * Note: If the report call fails for whatever reason, the worker should + * reuse this index for subsequent report attempts. + */ + nextReportIndex?: string; + /** New recommended reporting interval. */ + reportStatusInterval?: string; + /** + * The progress point in the WorkItem where the Dataflow service + * suggests that the worker truncate the task. + */ + splitRequest?: ApproximateSplitRequest; + /** DEPRECATED in favor of split_request. */ + suggestedStopPoint?: ApproximateProgress; + /** Obsolete, always empty. */ + suggestedStopPosition?: Position; + } + interface WorkItemStatus { + /** True if the WorkItem was completed (successfully or unsuccessfully). */ + completed?: boolean; + /** Worker output counters for this WorkItem. */ + counterUpdates?: CounterUpdate[]; + /** See documentation of stop_position. */ + dynamicSourceSplit?: DynamicSourceSplit; + /** + * Specifies errors which occurred during processing. If errors are + * provided, and completed = true, then the WorkItem is considered + * to have failed. + */ + errors?: Status[]; + /** DEPRECATED in favor of counter_updates. */ + metricUpdates?: MetricUpdate[]; + /** DEPRECATED in favor of reported_progress. */ + progress?: ApproximateProgress; + /** + * The report index. When a WorkItem is leased, the lease will + * contain an initial report index. When a WorkItem's status is + * reported to the system, the report should be sent with + * that report index, and the response will contain the index the + * worker should use for the next report. Reports received with + * unexpected index values will be rejected by the service. + * + * In order to preserve idempotency, the worker should not alter the + * contents of a report, even if the worker must submit the same + * report multiple times before getting back a response. The worker + * should not submit a subsequent report until the response for the + * previous report had been received from the service. + */ + reportIndex?: string; + /** The worker's progress through this WorkItem. */ + reportedProgress?: ApproximateReportedProgress; + /** Amount of time the worker requests for its lease. */ + requestedLeaseDuration?: string; + /** DEPRECATED in favor of dynamic_source_split. */ + sourceFork?: SourceFork; + /** + * If the work item represented a SourceOperationRequest, and the work + * is completed, contains the result of the operation. + */ + sourceOperationResponse?: SourceOperationResponse; + /** + * A worker may split an active map task in two parts, "primary" and + * "residual", continuing to process the primary part and returning the + * residual part into the pool of available work. + * This event is called a "dynamic split" and is critical to the dynamic + * work rebalancing feature. The two obtained sub-tasks are called + * "parts" of the split. + * The parts, if concatenated, must represent the same input as would + * be read by the current task if the split did not happen. + * The exact way in which the original task is decomposed into the two + * parts is specified either as a position demarcating them + * (stop_position), or explicitly as two DerivedSources, if this + * task consumes a user-defined source type (dynamic_source_split). + * + * The "current" task is adjusted as a result of the split: after a task + * with range [A, B) sends a stop_position update at C, its range is + * considered to be [A, C), e.g.: + * * Progress should be interpreted relative to the new range, e.g. + * "75% completed" means "75% of [A, C) completed" + * * The worker should interpret proposed_stop_position relative to the + * new range, e.g. "split at 68%" should be interpreted as + * "split at 68% of [A, C)". + * * If the worker chooses to split again using stop_position, only + * stop_positions in [A, C) will be accepted. + * * Etc. + * dynamic_source_split has similar semantics: e.g., if a task with + * source S splits using dynamic_source_split into {P, R} + * (where P and R must be together equivalent to S), then subsequent + * progress and proposed_stop_position should be interpreted relative + * to P, and in a potential subsequent dynamic_source_split into {P', R'}, + * P' and R' must be together equivalent to P, etc. + */ + stopPosition?: Position; + /** Total time the worker spent being throttled by external systems. */ + totalThrottlerWaitTimeSeconds?: number; + /** Identifies the WorkItem. */ + workItemId?: string; + } + interface WorkerHealthReport { + /** + * The pods running on the worker. See: + * http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod + * + * This field is used by the worker to send the status of the indvidual + * containers running on each worker. + */ + pods?: Array>; + /** + * The interval at which the worker is sending health reports. + * The default value of 0 should be interpreted as the field is not being + * explicitly set by the worker. + */ + reportInterval?: string; + /** Whether the VM is healthy. */ + vmIsHealthy?: boolean; + /** The time the VM was booted. */ + vmStartupTime?: string; + } + interface WorkerHealthReportResponse { + /** + * A positive value indicates the worker should change its reporting interval + * to the specified value. + * + * The default value of zero means no change in report rate is requested by + * the server. + */ + reportInterval?: string; + } + interface WorkerMessage { + /** + * Labels are used to group WorkerMessages. + * For example, a worker_message about a particular container + * might have the labels: + * { "JOB_ID": "2015-04-22", + * "WORKER_ID": "wordcount-vm-2015…" + * "CONTAINER_TYPE": "worker", + * "CONTAINER_ID": "ac1234def"} + * Label tags typically correspond to Label enum values. However, for ease + * of development other strings can be used as tags. LABEL_UNSPECIFIED should + * not be used here. + */ + labels?: Record; + /** The timestamp of the worker_message. */ + time?: string; + /** The health of a worker. */ + workerHealthReport?: WorkerHealthReport; + /** A worker message code. */ + workerMessageCode?: WorkerMessageCode; + /** Resource metrics reported by workers. */ + workerMetrics?: ResourceUtilizationReport; + /** Shutdown notice by workers. */ + workerShutdownNotice?: WorkerShutdownNotice; + } + interface WorkerMessageCode { + /** + * The code is a string intended for consumption by a machine that identifies + * the type of message being sent. + * Examples: + * 1. "HARNESS_STARTED" might be used to indicate the worker harness has + * started. + * 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading + * a GCS file as part of the boot process of one of the worker containers. + * + * This is a string and not an enum to make it easy to add new codes without + * waiting for an API change. + */ + code?: string; + /** + * Parameters contains specific information about the code. + * + * This is a struct to allow parameters of different types. + * + * Examples: + * 1. For a "HARNESS_STARTED" message parameters might provide the name + * of the worker and additional data like timing information. + * 2. For a "GCS_DOWNLOAD_ERROR" parameters might contain fields listing + * the GCS objects being downloaded and fields containing errors. + * + * In general complex data structures should be avoided. If a worker + * needs to send a specific and complicated data structure then please + * consider defining a new proto and adding it to the data oneof in + * WorkerMessageResponse. + * + * Conventions: + * Parameters should only be used for information that isn't typically passed + * as a label. + * hostname and other worker identifiers should almost always be passed + * as labels since they will be included on most messages. + */ + parameters?: Record; + } + interface WorkerMessageResponse { + /** The service's response to a worker's health report. */ + workerHealthReportResponse?: WorkerHealthReportResponse; + /** Service's response to reporting worker metrics (currently empty). */ + workerMetricsResponse?: any; + /** Service's response to shutdown notice (currently empty). */ + workerShutdownNoticeResponse?: any; + } + interface WorkerPool { + /** Settings for autoscaling of this WorkerPool. */ + autoscalingSettings?: AutoscalingSettings; + /** Data disks that are used by a VM in this workflow. */ + dataDisks?: Disk[]; + /** + * The default package set to install. This allows the service to + * select a default set of packages which are useful to worker + * harnesses written in a particular language. + */ + defaultPackageSet?: string; + /** + * Size of root disk for VMs, in GB. If zero or unspecified, the service will + * attempt to choose a reasonable default. + */ + diskSizeGb?: number; + /** Fully qualified source image for disks. */ + diskSourceImage?: string; + /** + * Type of root disk for VMs. If empty or unspecified, the service will + * attempt to choose a reasonable default. + */ + diskType?: string; + /** Configuration for VM IPs. */ + ipConfiguration?: string; + /** + * The kind of the worker pool; currently only `harness` and `shuffle` + * are supported. + */ + kind?: string; + /** + * Machine type (e.g. "n1-standard-1"). If empty or unspecified, the + * service will attempt to choose a reasonable default. + */ + machineType?: string; + /** Metadata to set on the Google Compute Engine VMs. */ + metadata?: Record; + /** + * Network to which VMs will be assigned. If empty or unspecified, + * the service will use the network "default". + */ + network?: string; + /** + * The number of threads per worker harness. If empty or unspecified, the + * service will choose a number of threads (according to the number of cores + * on the selected machine type for batch, or 1 by convention for streaming). + */ + numThreadsPerWorker?: number; + /** + * Number of Google Compute Engine workers in this pool needed to + * execute the job. If zero or unspecified, the service will + * attempt to choose a reasonable default. + */ + numWorkers?: number; + /** + * The action to take on host maintenance, as defined by the Google + * Compute Engine API. + */ + onHostMaintenance?: string; + /** Packages to be installed on workers. */ + packages?: Package[]; + /** Extra arguments for this worker pool. */ + poolArgs?: Record; + /** + * Subnetwork to which VMs will be assigned, if desired. Expected to be of + * the form "regions/REGION/subnetworks/SUBNETWORK". + */ + subnetwork?: string; + /** + * Settings passed through to Google Compute Engine workers when + * using the standard Dataflow task runner. Users should ignore + * this field. + */ + taskrunnerSettings?: TaskRunnerSettings; + /** + * Sets the policy for determining when to turndown worker pool. + * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and + * `TEARDOWN_NEVER`. + * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether + * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down + * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn + * down. + * + * If the workers are not torn down by the service, they will + * continue to run and use Google Compute Engine VM resources in the + * user's project until they are explicitly terminated by the user. + * Because of this, Google recommends using the `TEARDOWN_ALWAYS` + * policy except for small, manually supervised test jobs. + * + * If unknown or unspecified, the service will attempt to choose a reasonable + * default. + */ + teardownPolicy?: string; + /** + * Required. Docker container image that executes the Cloud Dataflow worker + * harness, residing in Google Container Registry. + */ + workerHarnessContainerImage?: string; + /** + * Zone to run the worker pools in. If empty or unspecified, the service + * will attempt to choose a reasonable default. + */ + zone?: string; + } + interface WorkerSettings { + /** + * The base URL for accessing Google Cloud APIs. + * + * When workers access Google Cloud APIs, they logically do so via + * relative URLs. If this field is specified, it supplies the base + * URL to use for resolving these relative URLs. The normative + * algorithm used is defined by RFC 1808, "Relative Uniform Resource + * Locators". + * + * If not specified, the default value is "http://www.googleapis.com/" + */ + baseUrl?: string; + /** Whether to send work progress updates to the service. */ + reportingEnabled?: boolean; + /** + * The Cloud Dataflow service path relative to the root URL, for example, + * "dataflow/v1b3/projects". + */ + servicePath?: string; + /** + * The Shuffle service path relative to the root URL, for example, + * "shuffle/v1beta1". + */ + shuffleServicePath?: string; + /** + * The prefix of the resources the system should use for temporary + * storage. + * + * The supported resource type is: + * + * Google Cloud Storage: + * + * storage.googleapis.com/{bucket}/{object} + * bucket.storage.googleapis.com/{object} + */ + tempStoragePrefix?: string; + /** The ID of the worker running this pipeline. */ + workerId?: string; + } + interface WorkerShutdownNotice { + /** + * The reason for the worker shutdown. + * Current possible values are: + * "UNKNOWN": shutdown reason is unknown. + * "PREEMPTION": shutdown reason is preemption. + * Other possible reasons may be added in the future. + */ + reason?: string; + } + interface WriteInstruction { + /** The input. */ + input?: InstructionInput; + /** The sink to write to. */ + sink?: Sink; + } + interface DebugResource { + /** Get encoded debug configuration for component. Not cacheable. */ + getConfig(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job id. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Send encoded debug capture data for component. */ + sendCapture(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job id. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface MessagesResource { + /** Request the job status. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Return only messages with timestamps < end_time. The default is now + * (i.e. return up to the latest messages available). + */ + endTime?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job to get messages about. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the job specified by job_id. */ + location?: string; + /** Filter to only get messages with importance >= level */ + minimumImportance?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * If specified, determines the maximum number of messages to + * return. If unspecified, the service may choose an appropriate + * default, or may return an arbitrarily large number of results. + */ + pageSize?: number; + /** + * If supplied, this should be the value of next_page_token returned + * by an earlier call. This will cause the next page of results to + * be returned. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** A project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * If specified, return only messages with timestamps >= start_time. + * The default is the job creation time (i.e. beginning of messages). + */ + startTime?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface WorkItemsResource { + /** Leases a dataflow WorkItem to run. */ + lease(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifies the workflow job this worker belongs to. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project this worker belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Reports the status of dataflow WorkItems leased by a worker. */ + reportStatus(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job which the WorkItem is part of. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project which owns the WorkItem's job. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface JobsResource { + /** List the jobs of a project across all regions. */ + aggregated(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The kind of filter to use. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * If there are many jobs, limit response to at most this many. + * The actual number of jobs returned will be the lesser of max_responses + * and an unspecified server-defined limit. + */ + pageSize?: number; + /** + * Set this to the 'next_page_token' field of a previous response + * to request additional results in a long list. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project which owns the jobs. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Level of information requested in response. Default is `JOB_VIEW_SUMMARY`. */ + view?: string; + }): Request; + /** Creates a Cloud Dataflow job. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Deprecated. This field is now in the Job message. */ + replaceJobId?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** The level of information requested in response. */ + view?: string; + }): Request; + /** Gets the state of the specified Cloud Dataflow job. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** The level of information requested in response. */ + view?: string; + }): Request; + /** Request the job status. */ + getMetrics(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job to get messages for. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the job specified by job_id. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** A project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Return only metric data that has changed since this time. + * Default is to return all information about all metrics for the job. + */ + startTime?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** List the jobs of a project in a given region. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The kind of filter to use. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * If there are many jobs, limit response to at most this many. + * The actual number of jobs returned will be the lesser of max_responses + * and an unspecified server-defined limit. + */ + pageSize?: number; + /** + * Set this to the 'next_page_token' field of a previous response + * to request additional results in a long list. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project which owns the jobs. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Level of information requested in response. Default is `JOB_VIEW_SUMMARY`. */ + view?: string; + }): Request; + /** Updates the state of an existing Cloud Dataflow job. */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + debug: DebugResource; + messages: MessagesResource; + workItems: WorkItemsResource; + } + interface DebugResource { + /** Get encoded debug configuration for component. Not cacheable. */ + getConfig(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job id. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the job specified by job_id. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Send encoded debug capture data for component. */ + sendCapture(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job id. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the job specified by job_id. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + } + interface MessagesResource { + /** Request the job status. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * Return only messages with timestamps < end_time. The default is now + * (i.e. return up to the latest messages available). + */ + endTime?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job to get messages about. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the job specified by job_id. */ + location: string; + /** Filter to only get messages with importance >= level */ + minimumImportance?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * If specified, determines the maximum number of messages to + * return. If unspecified, the service may choose an appropriate + * default, or may return an arbitrarily large number of results. + */ + pageSize?: number; + /** + * If supplied, this should be the value of next_page_token returned + * by an earlier call. This will cause the next page of results to + * be returned. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** A project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * If specified, return only messages with timestamps >= start_time. + * The default is the job creation time (i.e. beginning of messages). + */ + startTime?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface WorkItemsResource { + /** Leases a dataflow WorkItem to run. */ + lease(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Identifies the workflow job this worker belongs to. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the WorkItem's job. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project this worker belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Reports the status of dataflow WorkItems leased by a worker. */ + reportStatus(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job which the WorkItem is part of. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the WorkItem's job. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project which owns the WorkItem's job. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface JobsResource { + /** Creates a Cloud Dataflow job. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Deprecated. This field is now in the Job message. */ + replaceJobId?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** The level of information requested in response. */ + view?: string; + }): Request; + /** Gets the state of the specified Cloud Dataflow job. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** The level of information requested in response. */ + view?: string; + }): Request; + /** Request the job status. */ + getMetrics(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job to get messages for. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the job specified by job_id. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** A project id. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Return only metric data that has changed since this time. + * Default is to return all information about all metrics for the job. + */ + startTime?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** List the jobs of a project in a given region. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The kind of filter to use. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * If there are many jobs, limit response to at most this many. + * The actual number of jobs returned will be the lesser of max_responses + * and an unspecified server-defined limit. + */ + pageSize?: number; + /** + * Set this to the 'next_page_token' field of a previous response + * to request additional results in a long list. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project which owns the jobs. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** Level of information requested in response. Default is `JOB_VIEW_SUMMARY`. */ + view?: string; + }): Request; + /** Updates the state of an existing Cloud Dataflow job. */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location that contains this job. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + debug: DebugResource; + messages: MessagesResource; + workItems: WorkItemsResource; + } + interface TemplatesResource { + /** Creates a Cloud Dataflow job from a template. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location to which to direct the request. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Get the template associated with a template. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Required. A Cloud Storage path to the template from which to + * create the job. + * Must be a valid Cloud Storage URL, beginning with `gs://`. + */ + gcsPath?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location to which to direct the request. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** The view to retrieve. Defaults to METADATA_ONLY. */ + view?: string; + }): Request; + /** Launch a template. */ + launch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Required. A Cloud Storage path to the template from which to create + * the job. + * Must be valid Cloud Storage URL, beginning with 'gs://'. + */ + gcsPath?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location to which to direct the request. */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * If true, the request is validated but not actually executed. + * Defaults to false. + */ + validateOnly?: boolean; + }): Request; + } + interface LocationsResource { + /** Send a worker_message to the service. */ + workerMessages(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location which contains the job */ + location: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project to send the WorkerMessages to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + jobs: JobsResource; + templates: TemplatesResource; + } + interface TemplatesResource { + /** Creates a Cloud Dataflow job from a template. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Get the template associated with a template. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Required. A Cloud Storage path to the template from which to + * create the job. + * Must be a valid Cloud Storage URL, beginning with `gs://`. + */ + gcsPath?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location to which to direct the request. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** The view to retrieve. Defaults to METADATA_ONLY. */ + view?: string; + }): Request; + /** Launch a template. */ + launch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Required. A Cloud Storage path to the template from which to create + * the job. + * Must be valid Cloud Storage URL, beginning with 'gs://'. + */ + gcsPath?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The location to which to direct the request. */ + location?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * If true, the request is validated but not actually executed. + * Defaults to false. + */ + validateOnly?: boolean; + }): Request; + } + interface ProjectsResource { + /** Send a worker_message to the service. */ + workerMessages(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project to send the WorkerMessages to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + jobs: JobsResource; + locations: LocationsResource; + templates: TemplatesResource; + } + } +} diff --git a/types/gapi.client.dataflow/readme.md b/types/gapi.client.dataflow/readme.md new file mode 100644 index 0000000000..d91dd9868b --- /dev/null +++ b/types/gapi.client.dataflow/readme.md @@ -0,0 +1,68 @@ +# TypeScript typings for Google Dataflow API v1b3 +Manages Google Cloud Dataflow projects on Google Cloud Platform. +For detailed description please check [documentation](https://cloud.google.com/dataflow). + +## Installing + +Install typings for Google Dataflow API: +``` +npm install @types/gapi.client.dataflow@v1b3 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('dataflow', 'v1b3', () => { + // now we can use gapi.client.dataflow + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View and manage your Google Compute Engine resources + 'https://www.googleapis.com/auth/compute', + + // View your Google Compute Engine resources + 'https://www.googleapis.com/auth/compute.readonly', + + // View your email address + 'https://www.googleapis.com/auth/userinfo.email', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Dataflow API resources: + +```typescript + +/* +Send a worker_message to the service. +*/ +await gapi.client.projects.workerMessages({ projectId: "projectId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.dataflow/tsconfig.json b/types/gapi.client.dataflow/tsconfig.json new file mode 100644 index 0000000000..08c1fced14 --- /dev/null +++ b/types/gapi.client.dataflow/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.dataflow-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.dataflow/tslint.json b/types/gapi.client.dataflow/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.dataflow/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.dataproc/gapi.client.dataproc-tests.ts b/types/gapi.client.dataproc/gapi.client.dataproc-tests.ts new file mode 100644 index 0000000000..b5408509e6 --- /dev/null +++ b/types/gapi.client.dataproc/gapi.client.dataproc-tests.ts @@ -0,0 +1,32 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('dataproc', 'v1', () => { + /** now we can use gapi.client.dataproc */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.dataproc/index.d.ts b/types/gapi.client.dataproc/index.d.ts new file mode 100644 index 0000000000..cc9f6fcb8f --- /dev/null +++ b/types/gapi.client.dataproc/index.d.ts @@ -0,0 +1,1225 @@ +// Type definitions for Google Google Cloud Dataproc API v1 1.0 +// Project: https://cloud.google.com/dataproc/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://dataproc.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Dataproc API v1 */ + function load(name: "dataproc", version: "v1"): PromiseLike; + function load(name: "dataproc", version: "v1", callback: () => any): void; + + const projects: dataproc.ProjectsResource; + + namespace dataproc { + interface AcceleratorConfig { + /** The number of the accelerator cards of this type exposed to this instance. */ + acceleratorCount?: number; + /** + * Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( + * /compute/docs/reference/beta/acceleratorTypes)Examples * + * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * + * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80 + */ + acceleratorTypeUri?: string; + } + interface Cluster { + /** Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused. */ + clusterName?: string; + /** Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster. */ + clusterUuid?: string; + /** Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated. */ + config?: ClusterConfig; + /** + * Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 + * (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 + * (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster. + */ + labels?: Record; + /** + * Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before + * final release. + */ + metrics?: ClusterMetrics; + /** Required. The Google Cloud Platform project ID that the cluster belongs to. */ + projectId?: string; + /** Output-only. Cluster status. */ + status?: ClusterStatus; + /** Output-only. The previous cluster status. */ + statusHistory?: ClusterStatus[]; + } + interface ClusterConfig { + /** + * Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc + * will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone + * where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you. + */ + configBucket?: string; + /** Required. The shared Google Compute Engine config settings for all instances in a cluster. */ + gceClusterConfig?: GceClusterConfig; + /** + * Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a + * node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): + * ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) + * if [[ "${ROLE}" == 'Master' ]]; then + * ... master specific actions ... + * else + * ... worker specific actions ... + * fi + */ + initializationActions?: NodeInitializationAction[]; + /** Optional. The Google Compute Engine config settings for the master instance in a cluster. */ + masterConfig?: InstanceGroupConfig; + /** Optional. The Google Compute Engine config settings for additional worker instances in a cluster. */ + secondaryWorkerConfig?: InstanceGroupConfig; + /** Optional. The config settings for software inside the cluster. */ + softwareConfig?: SoftwareConfig; + /** Optional. The Google Compute Engine config settings for worker instances in a cluster. */ + workerConfig?: InstanceGroupConfig; + } + interface ClusterMetrics { + /** The HDFS metrics. */ + hdfsMetrics?: Record; + /** The YARN metrics. */ + yarnMetrics?: Record; + } + interface ClusterOperationMetadata { + /** Output-only. Name of the cluster for the operation. */ + clusterName?: string; + /** Output-only. Cluster UUID for the operation. */ + clusterUuid?: string; + /** Output-only. Short description of operation. */ + description?: string; + /** Output-only. Labels associated with the operation */ + labels?: Record; + /** Output-only. The operation type. */ + operationType?: string; + /** Output-only. Current operation status. */ + status?: ClusterOperationStatus; + /** Output-only. The previous operation status. */ + statusHistory?: ClusterOperationStatus[]; + /** Output-only. Errors encountered during operation execution. */ + warnings?: string[]; + } + interface ClusterOperationStatus { + /** Output-only.A message containing any operation metadata details. */ + details?: string; + /** Output-only. A message containing the detailed operation state. */ + innerState?: string; + /** Output-only. A message containing the operation state. */ + state?: string; + /** Output-only. The time this state was entered. */ + stateStartTime?: string; + } + interface ClusterStatus { + /** Output-only. Optional details of cluster's state. */ + detail?: string; + /** Output-only. The cluster's state. */ + state?: string; + /** Output-only. Time when this state was entered. */ + stateStartTime?: string; + /** Output-only. Additional state information that includes status reported by the agent. */ + substate?: string; + } + interface DiagnoseClusterResults { + /** Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics. */ + outputUri?: string; + } + interface DiskConfig { + /** Optional. Size in GB of the boot disk (default is 500GB). */ + bootDiskSizeGb?: number; + /** + * Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS + * (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and + * the boot disk contains only basic config and installed binaries. + */ + numLocalSsds?: number; + } + interface GceClusterConfig { + /** + * Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, + * and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled + * networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses. + */ + internalIpOnly?: boolean; + /** + * The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata + * (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). + */ + metadata?: Record; + /** + * Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor + * subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks for + * more information).A full URL, partial URI, or short name are valid. Examples: + * https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default + * projects/[project_id]/regions/global/default + * default + */ + networkUri?: string; + /** + * Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions + * equivalent to the folloing IAM roles: + * roles/logging.logWriter + * roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: + * [account_id]@[project_id].iam.gserviceaccount.com + */ + serviceAccount?: string; + /** + * Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: + * https://www.googleapis.com/auth/cloud.useraccounts.readonly + * https://www.googleapis.com/auth/devstorage.read_write + * https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided: + * https://www.googleapis.com/auth/bigquery + * https://www.googleapis.com/auth/bigtable.admin.table + * https://www.googleapis.com/auth/bigtable.data + * https://www.googleapis.com/auth/devstorage.full_control + */ + serviceAccountScopes?: string[]; + /** + * Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or + * short name are valid. Examples: + * https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0 + * projects/[project_id]/regions/us-east1/sub0 + * sub0 + */ + subnetworkUri?: string; + /** The Google Compute Engine tags to add to all instances (see Tagging instances). */ + tags?: string[]; + /** + * Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the "global" region. If omitted in a + * non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be + * present.A full URL, partial URI, or short name are valid. Examples: + * https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone] + * projects/[project_id]/zones/[zone] + * us-central1-f + */ + zoneUri?: string; + } + interface HadoopJob { + /** + * Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, + * or .zip. + */ + archiveUris?: string[]; + /** + * Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a + * collision may occur that causes an incorrect job submission. + */ + args?: string[]; + /** + * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for + * naively parallel tasks. + */ + fileUris?: string[]; + /** Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks. */ + jarFileUris?: string[]; + /** Optional. The runtime log config for job execution. */ + loggingConfig?: LoggingConfig; + /** The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris. */ + mainClass?: string; + /** + * The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' + * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' + */ + mainJarFileUri?: string; + /** + * Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be + * overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code. + */ + properties?: Record; + } + interface HiveJob { + /** + * Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent + * parallel queries. + */ + continueOnFailure?: boolean; + /** Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. */ + jarFileUris?: string[]; + /** + * Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be + * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code. + */ + properties?: Record; + /** The HCFS URI of the script that contains Hive queries. */ + queryFileUri?: string; + /** A list of queries. */ + queryList?: QueryList; + /** Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name="value";). */ + scriptVariables?: Record; + } + interface InstanceGroupConfig { + /** + * Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be + * changed before final release. + */ + accelerators?: AcceleratorConfig[]; + /** Optional. Disk option config settings. */ + diskConfig?: DiskConfig; + /** Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version. */ + imageUri?: string; + /** + * Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user + * (recommended practice is to let Cloud Dataproc derive the name). + */ + instanceNames?: string[]; + /** Optional. Specifies that this instance group contains preemptible instances. */ + isPreemptible?: boolean; + /** + * Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: + * https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 + * projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 + * n1-standard-2 + */ + machineTypeUri?: string; + /** Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups. */ + managedGroupConfig?: ManagedGroupConfig; + /** Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. */ + numInstances?: number; + } + interface Job { + /** + * Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files + * may be placed in the same location as driver_output_uri. + */ + driverControlFilesUri?: string; + /** Output-only. A URI pointing to the location of the stdout of the job's driver program. */ + driverOutputResourceUri?: string; + /** Job is a Hadoop job. */ + hadoopJob?: HadoopJob; + /** Job is a Hive job. */ + hiveJob?: HiveJob; + /** + * Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 + * (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 + * (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job. + */ + labels?: Record; + /** Job is a Pig job. */ + pigJob?: PigJob; + /** Required. Job information, including how, when, and where to run the job. */ + placement?: JobPlacement; + /** Job is a Pyspark job. */ + pysparkJob?: PySparkJob; + /** + * Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not + * specified when a job is created, the server generates a job_id. + */ + reference?: JobReference; + /** Optional. Job scheduling configuration. */ + scheduling?: JobScheduling; + /** Job is a Spark job. */ + sparkJob?: SparkJob; + /** Job is a SparkSql job. */ + sparkSqlJob?: SparkSqlJob; + /** + * Output-only. The job status. Additional application-specific status information may be contained in the type_job and + * yarn_applications fields. + */ + status?: JobStatus; + /** Output-only. The previous job status. */ + statusHistory?: JobStatus[]; + /** + * Output-only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be + * changed before final release. + */ + yarnApplications?: YarnApplication[]; + } + interface JobPlacement { + /** Required. The name of the cluster where the job will be submitted. */ + clusterName?: string; + /** Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted. */ + clusterUuid?: string; + } + interface JobReference { + /** + * Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a + * means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). + * The maximum length is 100 characters. + */ + jobId?: string; + /** Required. The ID of the Google Cloud Platform project that the job belongs to. */ + projectId?: string; + } + interface JobScheduling { + /** + * Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported + * failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10. + */ + maxFailuresPerHour?: number; + } + interface JobStatus { + /** Output-only. Optional job state details, such as an error description if the state is ERROR. */ + details?: string; + /** Output-only. A state message specifying the overall job state. */ + state?: string; + /** Output-only. The time when this state was entered. */ + stateStartTime?: string; + /** Output-only. Additional state information, which includes status reported by the agent. */ + substate?: string; + } + interface ListClustersResponse { + /** Output-only. The clusters in the project. */ + clusters?: Cluster[]; + /** + * Output-only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the + * page_token in a subsequent ListClustersRequest. + */ + nextPageToken?: string; + } + interface ListJobsResponse { + /** Output-only. Jobs list. */ + jobs?: Job[]; + /** + * Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token + * in a subsequent ListJobsRequest. + */ + nextPageToken?: string; + } + interface ListOperationsResponse { + /** The standard List next-page token. */ + nextPageToken?: string; + /** A list of operations that matches the specified filter in the request. */ + operations?: Operation[]; + } + interface LoggingConfig { + /** + * The per-package log levels for the driver. This may include "root" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = + * INFO', 'org.apache = DEBUG' + */ + driverLogLevels?: Record; + } + interface ManagedGroupConfig { + /** Output-only. The name of the Instance Group Manager for this group. */ + instanceGroupManagerName?: string; + /** Output-only. The name of the Instance Template used for the Managed Instance Group. */ + instanceTemplateName?: string; + } + interface NodeInitializationAction { + /** Required. Google Cloud Storage URI of executable file. */ + executableFile?: string; + /** + * Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the + * executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. + */ + executionTimeout?: string; + } + interface Operation { + /** If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some + * services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should + * have the format of operations/some/unique/name. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is + * google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response + * should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred + * response type is TakeSnapshotResponse. + */ + response?: Record; + } + interface PigJob { + /** + * Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent + * parallel queries. + */ + continueOnFailure?: boolean; + /** Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. */ + jarFileUris?: string[]; + /** Optional. The runtime log config for job execution. */ + loggingConfig?: LoggingConfig; + /** + * Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be + * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code. + */ + properties?: Record; + /** The HCFS URI of the script that contains the Pig queries. */ + queryFileUri?: string; + /** A list of queries. */ + queryList?: QueryList; + /** Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]). */ + scriptVariables?: Record; + } + interface PySparkJob { + /** Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip. */ + archiveUris?: string[]; + /** + * Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur + * that causes an incorrect job submission. + */ + args?: string[]; + /** Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks. */ + fileUris?: string[]; + /** Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks. */ + jarFileUris?: string[]; + /** Optional. The runtime log config for job execution. */ + loggingConfig?: LoggingConfig; + /** Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file. */ + mainPythonFileUri?: string; + /** + * Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be + * overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. + */ + properties?: Record; + /** Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip. */ + pythonFileUris?: string[]; + } + interface QueryList { + /** + * Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating + * each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob: + * "hiveJob": { + * "queryList": { + * "queries": [ + * "query1", + * "query2", + * "query3;query4", + * ] + * } + * } + */ + queries?: string[]; + } + interface SoftwareConfig { + /** + * Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\.[0-9]+. If unspecified, it defaults to the latest + * version (see Cloud Dataproc Versioning). + */ + imageVersion?: string; + /** + * Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following + * are supported prefixes and their mappings: + * capacity-scheduler: capacity-scheduler.xml + * core: core-site.xml + * distcp: distcp-default.xml + * hdfs: hdfs-site.xml + * hive: hive-site.xml + * mapred: mapred-site.xml + * pig: pig.properties + * spark: spark-defaults.conf + * yarn: yarn-site.xmlFor more information, see Cluster properties. + */ + properties?: Record; + } + interface SparkJob { + /** + * Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, + * and .zip. + */ + archiveUris?: string[]; + /** + * Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur + * that causes an incorrect job submission. + */ + args?: string[]; + /** Optional. HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks. */ + fileUris?: string[]; + /** Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks. */ + jarFileUris?: string[]; + /** Optional. The runtime log config for job execution. */ + loggingConfig?: LoggingConfig; + /** The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris. */ + mainClass?: string; + /** The HCFS URI of the jar file that contains the main class. */ + mainJarFileUri?: string; + /** + * Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be + * overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. + */ + properties?: Record; + } + interface SparkSqlJob { + /** Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. */ + jarFileUris?: string[]; + /** Optional. The runtime log config for job execution. */ + loggingConfig?: LoggingConfig; + /** + * Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud + * Dataproc API may be overwritten. + */ + properties?: Record; + /** The HCFS URI of the script that contains SQL queries. */ + queryFileUri?: string; + /** A list of queries. */ + queryList?: QueryList; + /** Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name="value";). */ + scriptVariables?: Record; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ + details?: Array>; + /** + * 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; + } + interface SubmitJobRequest { + /** Required. The job resource. */ + job?: Job; + } + interface YarnApplication { + /** Required. The application name. */ + name?: string; + /** Required. The numerical progress of the application, from 1 to 100. */ + progress?: number; + /** Required. The application state. */ + state?: string; + /** + * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the + * internal hostname, and requires a proxy server for resolution and, possibly, access. + */ + trackingUrl?: string; + } + interface ClustersResource { + /** Creates a cluster in a project. */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the cluster belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes a cluster in a project. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Required. The cluster name. */ + clusterName: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the cluster belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation. */ + diagnose(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Required. The cluster name. */ + clusterName: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the cluster belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Gets the resource representation for a cluster in a project. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Required. The cluster name. */ + clusterName: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the cluster belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all regions/{region}/clusters in a project. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where + * field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of + * the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE + * contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; + * space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = + * staging AND labels.starred = * + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Optional. The standard List page size. */ + pageSize?: number; + /** Optional. The standard List page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the cluster belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates a cluster in a project. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Required. The cluster name. */ + clusterName: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project the cluster belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** + * Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the + * update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows: + * { + * "config":{ + * "workerConfig":{ + * "numInstances":"5" + * } + * } + * } + * Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be + * config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows: + * { + * "config":{ + * "secondaryWorkerConfig":{ + * "numInstances":"5" + * } + * } + * } + * Note: Currently, only the following fields can be updated:
+ * + * + *
MaskPurpose
labels Update labels
config.worker_config.num_instances Resize primary worker group
config.secondary_worker_config.num_instances Resize secondary worker group
+ */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface JobsResource { + /** Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get. */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Required. The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Required. The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets the resource representation for a job in a project. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Required. The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists regions/{region}/jobs in a project. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster. */ + clusterName?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where + * field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. + * Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE + * AND labels.env = staging AND labels.starred = * + */ + filter?: string; + /** Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs). */ + jobStateMatcher?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Optional. The number of results to return in each response. */ + pageSize?: number; + /** Optional. The page token, returned by a previous call, to request the next page of results. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates a job in a project. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Required. The job ID. */ + jobId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** + * Required. Specifies the path, relative to Job, of the field to update. For example, to update the labels of a Job the + * update_mask parameter would be specified as labels, and the PATCH request body would specify the new value. + * Note: Currently, labels is the only field that can be updated. + */ + updateMask?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Submits a job to a cluster. */ + submit(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Required. The ID of the Google Cloud Platform project that the job belongs to. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Required. The Cloud Dataproc region in which to handle the request. */ + region: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface OperationsResource { + /** + * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If + * the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check + * whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; + * instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be cancelled. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be deleted. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name + * binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API + * services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name + * includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection + * id. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation's parent resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface RegionsResource { + clusters: ClustersResource; + jobs: JobsResource; + operations: OperationsResource; + } + interface ProjectsResource { + regions: RegionsResource; + } + } +} diff --git a/types/gapi.client.dataproc/readme.md b/types/gapi.client.dataproc/readme.md new file mode 100644 index 0000000000..1688149759 --- /dev/null +++ b/types/gapi.client.dataproc/readme.md @@ -0,0 +1,54 @@ +# TypeScript typings for Google Cloud Dataproc API v1 +Manages Hadoop-based clusters and jobs on Google Cloud Platform. +For detailed description please check [documentation](https://cloud.google.com/dataproc/). + +## Installing + +Install typings for Google Cloud Dataproc API: +``` +npm install @types/gapi.client.dataproc@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('dataproc', 'v1', () => { + // now we can use gapi.client.dataproc + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Dataproc API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.dataproc/tsconfig.json b/types/gapi.client.dataproc/tsconfig.json new file mode 100644 index 0000000000..83a765706a --- /dev/null +++ b/types/gapi.client.dataproc/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.dataproc-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.dataproc/tslint.json b/types/gapi.client.dataproc/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.dataproc/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.datastore/gapi.client.datastore-tests.ts b/types/gapi.client.datastore/gapi.client.datastore-tests.ts new file mode 100644 index 0000000000..ce0840ae65 --- /dev/null +++ b/types/gapi.client.datastore/gapi.client.datastore-tests.ts @@ -0,0 +1,64 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('datastore', 'v1', () => { + /** now we can use gapi.client.datastore */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View and manage your Google Cloud Datastore data */ + 'https://www.googleapis.com/auth/datastore', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Allocates IDs for the given keys, which is useful for referencing an entity + * before it is inserted. + */ + await gapi.client.projects.allocateIds({ + projectId: "projectId", + }); + /** Begins a new transaction. */ + await gapi.client.projects.beginTransaction({ + projectId: "projectId", + }); + /** + * Commits a transaction, optionally creating, deleting or modifying some + * entities. + */ + await gapi.client.projects.commit({ + projectId: "projectId", + }); + /** Looks up entities by key. */ + await gapi.client.projects.lookup({ + projectId: "projectId", + }); + /** Rolls back a transaction. */ + await gapi.client.projects.rollback({ + projectId: "projectId", + }); + /** Queries for entities. */ + await gapi.client.projects.runQuery({ + projectId: "projectId", + }); + } +}); diff --git a/types/gapi.client.datastore/index.d.ts b/types/gapi.client.datastore/index.d.ts new file mode 100644 index 0000000000..83c124ce52 --- /dev/null +++ b/types/gapi.client.datastore/index.d.ts @@ -0,0 +1,1027 @@ +// Type definitions for Google Google Cloud Datastore API v1 1.0 +// Project: https://cloud.google.com/datastore/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://datastore.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Datastore API v1 */ + function load(name: "datastore", version: "v1"): PromiseLike; + function load(name: "datastore", version: "v1", callback: () => any): void; + + const projects: datastore.ProjectsResource; + + namespace datastore { + interface AllocateIdsRequest { + /** + * A list of keys with incomplete key paths for which to allocate IDs. + * No key may be reserved/read-only. + */ + keys?: Key[]; + } + interface AllocateIdsResponse { + /** + * The keys specified in the request (in the same order), each with + * its key path completed with a newly allocated ID. + */ + keys?: Key[]; + } + interface ArrayValue { + /** + * Values in the array. + * The order of this array may not be preserved if it contains a mix of + * indexed and unindexed values. + */ + values?: Value[]; + } + interface BeginTransactionRequest { + /** Options for a new transaction. */ + transactionOptions?: TransactionOptions; + } + interface BeginTransactionResponse { + /** The transaction identifier (always present). */ + transaction?: string; + } + interface CommitRequest { + /** The type of commit to perform. Defaults to `TRANSACTIONAL`. */ + mode?: string; + /** + * The mutations to perform. + * + * When mode is `TRANSACTIONAL`, mutations affecting a single entity are + * applied in order. The following sequences of mutations affecting a single + * entity are not permitted in a single `Commit` request: + * + * - `insert` followed by `insert` + * - `update` followed by `insert` + * - `upsert` followed by `insert` + * - `delete` followed by `update` + * + * When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single + * entity. + */ + mutations?: Mutation[]; + /** + * The identifier of the transaction associated with the commit. A + * transaction identifier is returned by a call to + * Datastore.BeginTransaction. + */ + transaction?: string; + } + interface CommitResponse { + /** + * The number of index entries updated during the commit, or zero if none were + * updated. + */ + indexUpdates?: number; + /** + * The result of performing the mutations. + * The i-th mutation result corresponds to the i-th mutation in the request. + */ + mutationResults?: MutationResult[]; + } + interface CompositeFilter { + /** + * The list of filters to combine. + * Must contain at least one filter. + */ + filters?: Filter[]; + /** The operator for combining multiple filters. */ + op?: string; + } + interface Entity { + /** + * The entity's key. + * + * An entity must have a key, unless otherwise documented (for example, + * an entity in `Value.entity_value` may have no key). + * An entity's kind is its key path's last element's kind, + * or null if it has no key. + */ + key?: Key; + /** + * The entity's properties. + * The map's keys are property names. + * A property name matching regex `__.*__` is reserved. + * A reserved property name is forbidden in certain documented contexts. + * The name must not contain more than 500 characters. + * The name cannot be `""`. + */ + properties?: Record; + } + interface EntityResult { + /** + * A cursor that points to the position after the result entity. + * Set only when the `EntityResult` is part of a `QueryResultBatch` message. + */ + cursor?: string; + /** The resulting entity. */ + entity?: Entity; + /** + * The version of the entity, a strictly positive number that monotonically + * increases with changes to the entity. + * + * This field is set for `FULL` entity + * results. + * + * For missing entities in `LookupResponse`, this + * is the version of the snapshot that was used to look up the entity, and it + * is always set except for eventually consistent reads. + */ + version?: string; + } + interface Filter { + /** A composite filter. */ + compositeFilter?: CompositeFilter; + /** A filter on a property. */ + propertyFilter?: PropertyFilter; + } + interface GoogleDatastoreAdminV1beta1CommonMetadata { + /** The time the operation ended, either successfully or otherwise. */ + endTime?: string; + /** + * The client-assigned labels which were provided when the operation was + * created. May also include additional labels. + */ + labels?: Record; + /** + * The type of the operation. Can be used as a filter in + * ListOperationsRequest. + */ + operationType?: string; + /** The time that work began on the operation. */ + startTime?: string; + /** The current state of the Operation. */ + state?: string; + } + interface GoogleDatastoreAdminV1beta1EntityFilter { + /** If empty, then this represents all kinds. */ + kinds?: string[]; + /** + * An empty list represents all namespaces. This is the preferred + * usage for projects that don't use namespaces. + * + * An empty string element represents the default namespace. This should be + * used if the project has data in non-default namespaces, but doesn't want to + * include them. + * Each namespace in this list must be unique. + */ + namespaceIds?: string[]; + } + interface GoogleDatastoreAdminV1beta1ExportEntitiesMetadata { + /** Metadata common to all Datastore Admin operations. */ + common?: GoogleDatastoreAdminV1beta1CommonMetadata; + /** Description of which entities are being exported. */ + entityFilter?: GoogleDatastoreAdminV1beta1EntityFilter; + /** + * Location for the export metadata and data files. This will be the same + * value as the + * google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix + * field. The final output location is provided in + * google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. + */ + outputUrlPrefix?: string; + /** An estimate of the number of bytes processed. */ + progressBytes?: GoogleDatastoreAdminV1beta1Progress; + /** An estimate of the number of entities processed. */ + progressEntities?: GoogleDatastoreAdminV1beta1Progress; + } + interface GoogleDatastoreAdminV1beta1ExportEntitiesResponse { + /** + * Location of the output metadata file. This can be used to begin an import + * into Cloud Datastore (this project or another project). See + * google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. + * Only present if the operation completed successfully. + */ + outputUrl?: string; + } + interface GoogleDatastoreAdminV1beta1ImportEntitiesMetadata { + /** Metadata common to all Datastore Admin operations. */ + common?: GoogleDatastoreAdminV1beta1CommonMetadata; + /** Description of which entities are being imported. */ + entityFilter?: GoogleDatastoreAdminV1beta1EntityFilter; + /** + * The location of the import metadata file. This will be the same value as + * the google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url + * field. + */ + inputUrl?: string; + /** An estimate of the number of bytes processed. */ + progressBytes?: GoogleDatastoreAdminV1beta1Progress; + /** An estimate of the number of entities processed. */ + progressEntities?: GoogleDatastoreAdminV1beta1Progress; + } + interface GoogleDatastoreAdminV1beta1Progress { + /** + * The amount of work that has been completed. Note that this may be greater + * than work_estimated. + */ + workCompleted?: string; + /** + * An estimate of how much work needs to be performed. May be zero if the + * work estimate is unavailable. + */ + workEstimated?: string; + } + interface GoogleLongrunningListOperationsResponse { + /** The standard List next-page token. */ + nextPageToken?: string; + /** A list of operations that matches the specified filter in the request. */ + operations?: GoogleLongrunningOperation[]; + } + interface GoogleLongrunningOperation { + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + */ + response?: Record; + } + interface GqlQuery { + /** + * When false, the query string must not contain any literals and instead must + * bind all values. For example, + * `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while + * `SELECT * FROM Kind WHERE a = @value` is. + */ + allowLiterals?: boolean; + /** + * For each non-reserved named binding site in the query string, there must be + * a named parameter with that name, but not necessarily the inverse. + * + * Key must match regex `A-Za-z_$*`, must not match regex + * `__.*__`, and must not be `""`. + */ + namedBindings?: Record; + /** + * Numbered binding site @1 references the first numbered parameter, + * effectively using 1-based indexing, rather than the usual 0. + * + * For each binding site numbered i in `query_string`, there must be an i-th + * numbered parameter. The inverse must also be true. + */ + positionalBindings?: GqlQueryParameter[]; + /** + * A string of the format described + * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). + */ + queryString?: string; + } + interface GqlQueryParameter { + /** + * A query cursor. Query cursors are returned in query + * result batches. + */ + cursor?: string; + /** A value parameter. */ + value?: Value; + } + interface Key { + /** + * Entities are partitioned into subsets, currently identified by a project + * ID and namespace ID. + * Queries are scoped to a single partition. + */ + partitionId?: PartitionId; + /** + * The entity path. + * An entity path consists of one or more elements composed of a kind and a + * string or numerical identifier, which identify entities. The first + * element identifies a _root entity_, the second element identifies + * a _child_ of the root entity, the third element identifies a child of the + * second entity, and so forth. The entities identified by all prefixes of + * the path are called the element's _ancestors_. + * + * An entity path is always fully complete: *all* of the entity's ancestors + * are required to be in the path along with the entity identifier itself. + * The only exception is that in some documented cases, the identifier in the + * last path element (for the entity) itself may be omitted. For example, + * the last path element of the key of `Mutation.insert` may have no + * identifier. + * + * A path can never be empty, and a path can have at most 100 elements. + */ + path?: PathElement[]; + } + interface KindExpression { + /** The name of the kind. */ + name?: string; + } + interface 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; + } + interface LookupRequest { + /** Keys of entities to look up. */ + keys?: Key[]; + /** The options for this lookup request. */ + readOptions?: ReadOptions; + } + interface LookupResponse { + /** + * A list of keys that were not looked up due to resource constraints. The + * order of results in this field is undefined and has no relation to the + * order of the keys in the input. + */ + deferred?: Key[]; + /** + * Entities found as `ResultType.FULL` entities. The order of results in this + * field is undefined and has no relation to the order of the keys in the + * input. + */ + found?: EntityResult[]; + /** + * Entities not found as `ResultType.KEY_ONLY` entities. The order of results + * in this field is undefined and has no relation to the order of the keys + * in the input. + */ + missing?: EntityResult[]; + } + interface Mutation { + /** + * The version of the entity that this mutation is being applied to. If this + * does not match the current version on the server, the mutation conflicts. + */ + baseVersion?: string; + /** + * The key of the entity to delete. The entity may or may not already exist. + * Must have a complete key path and must not be reserved/read-only. + */ + delete?: Key; + /** + * The entity to insert. The entity must not already exist. + * The entity key's final path element may be incomplete. + */ + insert?: Entity; + /** + * The entity to update. The entity must already exist. + * Must have a complete key path. + */ + update?: Entity; + /** + * The entity to upsert. The entity may or may not already exist. + * The entity key's final path element may be incomplete. + */ + upsert?: Entity; + } + interface MutationResult { + /** + * Whether a conflict was detected for this mutation. Always false when a + * conflict detection strategy field is not set in the mutation. + */ + conflictDetected?: boolean; + /** + * The automatically allocated key. + * Set only when the mutation allocated a key. + */ + key?: Key; + /** + * The version of the entity on the server after processing the mutation. If + * the mutation doesn't change anything on the server, then the version will + * be the version of the current entity or, if no entity is present, a version + * that is strictly greater than the version of any previous entity and less + * than the version of any possible future entity. + */ + version?: string; + } + interface PartitionId { + /** If not empty, the ID of the namespace to which the entities belong. */ + namespaceId?: string; + /** The ID of the project to which the entities belong. */ + projectId?: string; + } + interface PathElement { + /** + * The auto-allocated ID of the entity. + * Never equal to zero. Values less than zero are discouraged and may not + * be supported in the future. + */ + id?: string; + /** + * The kind of the entity. + * A kind matching regex `__.*__` is reserved/read-only. + * A kind must not contain more than 1500 bytes when UTF-8 encoded. + * Cannot be `""`. + */ + kind?: string; + /** + * The name of the entity. + * A name matching regex `__.*__` is reserved/read-only. + * A name must not be more than 1500 bytes when UTF-8 encoded. + * Cannot be `""`. + */ + name?: string; + } + interface Projection { + /** The property to project. */ + property?: PropertyReference; + } + interface PropertyFilter { + /** The operator to filter by. */ + op?: string; + /** The property to filter by. */ + property?: PropertyReference; + /** The value to compare the property to. */ + value?: Value; + } + interface PropertyOrder { + /** The direction to order by. Defaults to `ASCENDING`. */ + direction?: string; + /** The property to order by. */ + property?: PropertyReference; + } + interface PropertyReference { + /** + * The name of the property. + * If name includes "."s, it may be interpreted as a property name path. + */ + name?: string; + } + interface Query { + /** + * The properties to make distinct. The query results will contain the first + * result for each distinct combination of values for the given properties + * (if empty, all results are returned). + */ + distinctOn?: PropertyReference[]; + /** + * An ending point for the query results. Query cursors are + * returned in query result batches and + * [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). + */ + endCursor?: string; + /** The filter to apply. */ + filter?: Filter; + /** + * The kinds to query (if empty, returns entities of all kinds). + * Currently at most 1 kind may be specified. + */ + kind?: KindExpression[]; + /** + * The maximum number of results to return. Applies after all other + * constraints. Optional. + * Unspecified is interpreted as no limit. + * Must be >= 0 if specified. + */ + limit?: number; + /** + * The number of results to skip. Applies before limit, but after all other + * constraints. Optional. Must be >= 0 if specified. + */ + offset?: number; + /** The order to apply to the query results (if empty, order is unspecified). */ + order?: PropertyOrder[]; + /** The projection to return. Defaults to returning all properties. */ + projection?: Projection[]; + /** + * A starting point for the query results. Query cursors are + * returned in query result batches and + * [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). + */ + startCursor?: string; + } + interface QueryResultBatch { + /** A cursor that points to the position after the last result in the batch. */ + endCursor?: string; + /** The result type for every entity in `entity_results`. */ + entityResultType?: string; + /** The results for this batch. */ + entityResults?: EntityResult[]; + /** The state of the query after the current batch. */ + moreResults?: string; + /** + * A cursor that points to the position after the last skipped result. + * Will be set when `skipped_results` != 0. + */ + skippedCursor?: string; + /** The number of results skipped, typically because of an offset. */ + skippedResults?: number; + /** + * The version number of the snapshot this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * + * In a single transaction, subsequent query result batches for the same query + * can have a greater snapshot version number. Each batch's snapshot version + * is valid for all preceding batches. + * The value will be zero for eventually consistent queries. + */ + snapshotVersion?: string; + } + interface ReadOptions { + /** + * The non-transactional read consistency to use. + * Cannot be set to `STRONG` for global queries. + */ + readConsistency?: string; + /** + * The identifier of the transaction in which to read. A + * transaction identifier is returned by a call to + * Datastore.BeginTransaction. + */ + transaction?: string; + } + interface ReadWrite { + /** The transaction identifier of the transaction being retried. */ + previousTransaction?: string; + } + interface RollbackRequest { + /** + * The transaction identifier, returned by a call to + * Datastore.BeginTransaction. + */ + transaction?: string; + } + interface RunQueryRequest { + /** The GQL query to run. */ + gqlQuery?: GqlQuery; + /** + * Entities are partitioned into subsets, identified by a partition ID. + * Queries are scoped to a single partition. + * This partition ID is normalized with the standard default context + * partition ID. + */ + partitionId?: PartitionId; + /** The query to run. */ + query?: Query; + /** The options for this query. */ + readOptions?: ReadOptions; + } + interface RunQueryResponse { + /** A batch of query results (always present). */ + batch?: QueryResultBatch; + /** The parsed form of the `GqlQuery` from the request, if it was set. */ + query?: Query; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface TransactionOptions { + /** The transaction should only allow reads. */ + readOnly?: any; + /** The transaction should allow both reads and writes. */ + readWrite?: ReadWrite; + } + interface Value { + /** + * An array value. + * Cannot contain another array value. + * A `Value` instance that sets field `array_value` must not set fields + * `meaning` or `exclude_from_indexes`. + */ + arrayValue?: ArrayValue; + /** + * A blob value. + * May have at most 1,000,000 bytes. + * When `exclude_from_indexes` is false, may have at most 1500 bytes. + * In JSON requests, must be base64-encoded. + */ + blobValue?: string; + /** A boolean value. */ + booleanValue?: boolean; + /** A double value. */ + doubleValue?: number; + /** + * An entity value. + * + * - May have no key. + * - May have a key with an incomplete key path. + * - May have a reserved/read-only key. + */ + entityValue?: Entity; + /** + * If the value should be excluded from all indexes including those defined + * explicitly. + */ + excludeFromIndexes?: boolean; + /** A geo point value representing a point on the surface of Earth. */ + geoPointValue?: LatLng; + /** An integer value. */ + integerValue?: string; + /** A key value. */ + keyValue?: Key; + /** The `meaning` field should only be populated for backwards compatibility. */ + meaning?: number; + /** A null value. */ + nullValue?: string; + /** + * A UTF-8 encoded string value. + * When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. + * Otherwise, may be set to at least 1,000,000 bytes. + */ + stringValue?: string; + /** + * A timestamp value. + * When stored in the Datastore, precise only to microseconds; + * any additional precision is rounded down. + */ + timestampValue?: string; + } + interface OperationsResource { + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * Operations.GetOperation or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an Operation.error value with a google.rpc.Status.code of 1, + * corresponding to `Code.CANCELLED`. + */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be cancelled. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be deleted. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * NOTE: the `name` binding allows API services to override the binding + * to use different resource name schemes, such as `users/*/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/*}/operations"` to their service configuration. + * For backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding + * is the parent resource, without the operations collection id. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The standard list filter. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation's parent resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard list page size. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ProjectsResource { + /** + * Allocates IDs for the given keys, which is useful for referencing an entity + * before it is inserted. + */ + allocateIds(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the project against which to make the request. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Begins a new transaction. */ + beginTransaction(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the project against which to make the request. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Commits a transaction, optionally creating, deleting or modifying some + * entities. + */ + commit(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the project against which to make the request. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Looks up entities by key. */ + lookup(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the project against which to make the request. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Rolls back a transaction. */ + rollback(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the project against which to make the request. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Queries for entities. */ + runQuery(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The ID of the project against which to make the request. */ + projectId: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + operations: OperationsResource; + } + } +} diff --git a/types/gapi.client.datastore/readme.md b/types/gapi.client.datastore/readme.md new file mode 100644 index 0000000000..4a9a9bff5d --- /dev/null +++ b/types/gapi.client.datastore/readme.md @@ -0,0 +1,90 @@ +# TypeScript typings for Google Cloud Datastore API v1 +Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application. + +For detailed description please check [documentation](https://cloud.google.com/datastore/). + +## Installing + +Install typings for Google Cloud Datastore API: +``` +npm install @types/gapi.client.datastore@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('datastore', 'v1', () => { + // now we can use gapi.client.datastore + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View and manage your Google Cloud Datastore data + 'https://www.googleapis.com/auth/datastore', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Datastore API resources: + +```typescript + +/* +Allocates IDs for the given keys, which is useful for referencing an entity +before it is inserted. +*/ +await gapi.client.projects.allocateIds({ projectId: "projectId", }); + +/* +Begins a new transaction. +*/ +await gapi.client.projects.beginTransaction({ projectId: "projectId", }); + +/* +Commits a transaction, optionally creating, deleting or modifying some +entities. +*/ +await gapi.client.projects.commit({ projectId: "projectId", }); + +/* +Looks up entities by key. +*/ +await gapi.client.projects.lookup({ projectId: "projectId", }); + +/* +Rolls back a transaction. +*/ +await gapi.client.projects.rollback({ projectId: "projectId", }); + +/* +Queries for entities. +*/ +await gapi.client.projects.runQuery({ projectId: "projectId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.datastore/tsconfig.json b/types/gapi.client.datastore/tsconfig.json new file mode 100644 index 0000000000..a84cddd73f --- /dev/null +++ b/types/gapi.client.datastore/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.datastore-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.datastore/tslint.json b/types/gapi.client.datastore/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.datastore/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts b/types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts new file mode 100644 index 0000000000..e15cf3611e --- /dev/null +++ b/types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts @@ -0,0 +1,154 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('deploymentmanager', 'v2', () => { + /** now we can use gapi.client.deploymentmanager */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform.read-only', + /** View and manage your Google Cloud Platform management resources and deployment status information */ + 'https://www.googleapis.com/auth/ndev.cloudman', + /** View your Google Cloud Platform management resources and deployment status information */ + 'https://www.googleapis.com/auth/ndev.cloudman.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Cancels and removes the preview currently associated with the deployment. */ + await gapi.client.deployments.cancelPreview({ + deployment: "deployment", + project: "project", + }); + /** Deletes a deployment and all of the resources in the deployment. */ + await gapi.client.deployments.delete({ + deletePolicy: "deletePolicy", + deployment: "deployment", + project: "project", + }); + /** Gets information about a specific deployment. */ + await gapi.client.deployments.get({ + deployment: "deployment", + project: "project", + }); + /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ + await gapi.client.deployments.getIamPolicy({ + project: "project", + resource: "resource", + }); + /** Creates a deployment and all of the resources described by the deployment manifest. */ + await gapi.client.deployments.insert({ + preview: true, + project: "project", + }); + /** Lists all deployments for a given project. */ + await gapi.client.deployments.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics. */ + await gapi.client.deployments.patch({ + createPolicy: "createPolicy", + deletePolicy: "deletePolicy", + deployment: "deployment", + preview: true, + project: "project", + }); + /** Sets the access control policy on the specified resource. Replaces any existing policy. */ + await gapi.client.deployments.setIamPolicy({ + project: "project", + resource: "resource", + }); + /** Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. */ + await gapi.client.deployments.stop({ + deployment: "deployment", + project: "project", + }); + /** Returns permissions that a caller has on the specified resource. */ + await gapi.client.deployments.testIamPermissions({ + project: "project", + resource: "resource", + }); + /** Updates a deployment and all of the resources described by the deployment manifest. */ + await gapi.client.deployments.update({ + createPolicy: "createPolicy", + deletePolicy: "deletePolicy", + deployment: "deployment", + preview: true, + project: "project", + }); + /** Gets information about a specific manifest. */ + await gapi.client.manifests.get({ + deployment: "deployment", + manifest: "manifest", + project: "project", + }); + /** Lists all manifests for a given deployment. */ + await gapi.client.manifests.list({ + deployment: "deployment", + filter: "filter", + maxResults: 3, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Gets information about a specific operation. */ + await gapi.client.operations.get({ + operation: "operation", + project: "project", + }); + /** Lists all operations for a project. */ + await gapi.client.operations.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Gets information about a single resource. */ + await gapi.client.resources.get({ + deployment: "deployment", + project: "project", + resource: "resource", + }); + /** Lists all resources in a given deployment. */ + await gapi.client.resources.list({ + deployment: "deployment", + filter: "filter", + maxResults: 3, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + /** Lists all resource types for Deployment Manager. */ + await gapi.client.types.list({ + filter: "filter", + maxResults: 2, + orderBy: "orderBy", + pageToken: "pageToken", + project: "project", + }); + } +}); diff --git a/types/gapi.client.deploymentmanager/index.d.ts b/types/gapi.client.deploymentmanager/index.d.ts new file mode 100644 index 0000000000..2528111b57 --- /dev/null +++ b/types/gapi.client.deploymentmanager/index.d.ts @@ -0,0 +1,1175 @@ +// Type definitions for Google Google Cloud Deployment Manager API v2 2.0 +// Project: https://cloud.google.com/deployment-manager/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/deploymentmanager/v2/rest + +/// + +declare namespace gapi.client { + /** Load Google Cloud Deployment Manager API v2 */ + function load(name: "deploymentmanager", version: "v2"): PromiseLike; + function load(name: "deploymentmanager", version: "v2", callback: () => any): void; + + const deployments: deploymentmanager.DeploymentsResource; + + const manifests: deploymentmanager.ManifestsResource; + + const operations: deploymentmanager.OperationsResource; + + const resources: deploymentmanager.ResourcesResource; + + const types: deploymentmanager.TypesResource; + + namespace deploymentmanager { + interface AuditConfig { + /** The configuration for logging of each type of permission. */ + auditLogConfigs?: AuditLogConfig[]; + exemptedMembers?: string[]; + /** + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a + * special value that covers all services. + */ + service?: string; + } + interface AuditLogConfig { + /** Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. */ + exemptedMembers?: string[]; + /** The log type that this config enables. */ + logType?: string; + } + interface AuthorizationLoggingOptions { + /** The type of the permission that was checked. */ + permissionType?: string; + } + interface Binding { + /** + * The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, + * including their conditions, are examined independently. This field is GOOGLE_INTERNAL. + */ + condition?: Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: + * + * * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. + * + * * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. + * + * * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. + * + * + * + * * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. + * + * * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. + * + * + * + * * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[]; + /** Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */ + role?: string; + } + interface Condition { + /** Trusted attributes supplied by the IAM system. */ + iam?: string; + /** An operator to apply the subject with. */ + op?: string; + /** Trusted attributes discharged by the service. */ + svc?: string; + /** Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. */ + sys?: string; + /** DEPRECATED. Use 'values' instead. */ + value?: string; + /** The objects of the condition. This is mutually exclusive with 'value'. */ + values?: string[]; + } + interface ConfigFile { + /** The contents of the file. */ + content?: string; + } + interface Deployment { + /** An optional user-provided description of the deployment. */ + description?: string; + /** + * Provides a fingerprint to use in requests to modify a deployment, such as update(), stop(), and cancelPreview() requests. A fingerprint is a randomly + * generated value that must be provided with update(), stop(), and cancelPreview() requests to perform optimistic locking. This ensures optimistic + * concurrency so that only one request happens at a time. + * + * The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, + * perform a get() request to a deployment. + */ + fingerprint?: string; + /** Output only. Unique identifier for the resource; defined by the server. */ + id?: string; + /** Output only. Timestamp when the deployment was created, in RFC3339 text format . */ + insertTime?: string; + /** + * Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and + * must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long and must conform to + * the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)? + */ + labels?: DeploymentLabelEntry[]; + /** Output only. URL of the manifest representing the last manifest that was successfully deployed. */ + manifest?: string; + /** + * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be + * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string; + /** Output only. The Operation that most recently ran, or is currently running, on this deployment. */ + operation?: Operation; + /** Output only. Self link for the deployment. */ + selfLink?: string; + /** [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates. */ + target?: TargetConfiguration; + /** Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here. */ + update?: DeploymentUpdate; + } + interface DeploymentLabelEntry { + key?: string; + value?: string; + } + interface DeploymentUpdate { + /** Output only. An optional user-provided description of the deployment after the current update has been applied. */ + description?: string; + /** + * Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 + * characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long + * and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)? + */ + labels?: DeploymentUpdateLabelEntry[]; + /** Output only. URL of the manifest representing the update configuration of this deployment. */ + manifest?: string; + } + interface DeploymentUpdateLabelEntry { + key?: string; + value?: string; + } + interface DeploymentsCancelPreviewRequest { + /** + * Specifies a fingerprint for cancelPreview() requests. A fingerprint is a randomly generated value that must be provided in cancelPreview() requests to + * perform optimistic locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to + * make a new update request while another user attempts to cancel a preview, this would prevent one of the requests). + * + * The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint + * value, perform a get() request on the deployment. + */ + fingerprint?: string; + } + interface DeploymentsListResponse { + /** Output only. The deployments contained in this response. */ + deployments?: Deployment[]; + /** Output only. A token used to continue a truncated list request. */ + nextPageToken?: string; + } + interface DeploymentsStopRequest { + /** + * Specifies a fingerprint for stop() requests. A fingerprint is a randomly generated value that must be provided in stop() requests to perform optimistic + * locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update + * request while another user attempts to stop an ongoing update request, this would prevent a collision). + * + * The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint + * value, perform a get() request on the deployment. + */ + fingerprint?: string; + } + interface Expr { + /** An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */ + description?: string; + /** + * Textual representation of an expression in Common Expression Language syntax. + * + * The application context of the containing message determines which well-known feature set of CEL is supported. + */ + expression?: string; + /** An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */ + location?: string; + /** An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */ + title?: string; + } + interface ImportFile { + /** The contents of the file. */ + content?: string; + /** The name of the file. */ + name?: string; + } + interface LogConfig { + /** Cloud audit options. */ + cloudAudit?: LogConfigCloudAuditOptions; + /** Counter options. */ + counter?: LogConfigCounterOptions; + /** Data access options. */ + dataAccess?: LogConfigDataAccessOptions; + } + interface LogConfigCloudAuditOptions { + /** Information used by the Cloud Audit Logging pipeline. */ + authorizationLoggingOptions?: AuthorizationLoggingOptions; + /** The log_name to populate in the Cloud Audit Record. */ + logName?: string; + } + interface LogConfigCounterOptions { + /** The field value to attribute. */ + field?: string; + /** The metric to update. */ + metric?: string; + } + interface LogConfigDataAccessOptions { + /** Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now. */ + logMode?: string; + } + interface Manifest { + /** Output only. The YAML configuration for this manifest. */ + config?: ConfigFile; + /** Output only. The fully-expanded configuration file, including any templates and references. */ + expandedConfig?: string; + /** Output only. Unique identifier for the resource; defined by the server. */ + id?: string; + /** Output only. The imported files for this manifest. */ + imports?: ImportFile[]; + /** Output only. Timestamp when the manifest was created, in RFC3339 text format. */ + insertTime?: string; + /** Output only. The YAML layout for this manifest. */ + layout?: string; + /** + * Output only. + * + * The name of the manifest. + */ + name?: string; + /** Output only. Self link for the manifest. */ + selfLink?: string; + } + interface ManifestsListResponse { + /** Output only. Manifests contained in this list response. */ + manifests?: Manifest[]; + /** Output only. A token used to continue a truncated list request. */ + nextPageToken?: string; + } + interface Operation { + /** [Output Only] Reserved for future use. */ + clientOperationId?: string; + /** [Deprecated] This field is deprecated. */ + creationTimestamp?: string; + /** [Output Only] A textual description of the operation, which is set when the operation is created. */ + description?: string; + /** [Output Only] The time that this operation was completed. This value is in RFC3339 text format. */ + endTime?: string; + /** [Output Only] If errors are generated during processing of the operation, this field will be populated. */ + error?: { + /** [Output Only] The array of errors encountered while processing this operation. */ + errors?: Array<{ + /** [Output Only] The error type identifier for this error. */ + code?: string; + /** [Output Only] Indicates the field in the request that caused the error. This property is optional. */ + location?: string; + /** [Output Only] An optional, human-readable error message. */ + message?: string; + }>; + }; + /** [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. */ + httpErrorMessage?: string; + /** + * [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not + * found. + */ + httpErrorStatusCode?: number; + /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + id?: string; + /** [Output Only] The time that this operation was requested. This value is in RFC3339 text format. */ + insertTime?: string; + /** [Output Only] Type of the resource. Always compute#operation for Operation resources. */ + kind?: string; + /** [Output Only] Name of the resource. */ + name?: string; + /** [Output Only] The type of operation, such as insert, update, or delete, and so on. */ + operationType?: string; + /** + * [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of + * operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation + * progresses. + */ + progress?: number; + /** [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. */ + region?: string; + /** [Output Only] Server-defined URL for the resource. */ + selfLink?: string; + /** [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. */ + startTime?: string; + /** [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. */ + status?: string; + /** [Output Only] An optional textual description of the current status of the operation. */ + statusMessage?: string; + /** [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. */ + targetId?: string; + /** + * [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk + * that the snapshot was created from. + */ + targetLink?: string; + /** [Output Only] User who requested the operation, for example: user@example.com. */ + user?: string; + /** [Output Only] If warning messages are generated during processing of the operation, this field will be populated. */ + warnings?: Array<{ + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }>; + /** [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. */ + zone?: string; + } + interface OperationsListResponse { + /** Output only. A token used to continue a truncated list request. */ + nextPageToken?: string; + /** Output only. Operations contained in this list response. */ + operations?: Operation[]; + } + interface Policy { + /** Specifies cloud audit logging configuration for this policy. */ + auditConfigs?: AuditConfig[]; + /** Associates a list of `members` to a `role`. `bindings` with no members will result in an error. */ + bindings?: Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly + * suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is + * returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will + * be applied to the same version of the policy. + * + * If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. + */ + etag?: string; + iamOwned?: boolean; + /** + * If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any + * DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any + * ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no + * rule applies, permission is denied. + */ + rules?: Rule[]; + /** Version of the `Policy`. The default version is 0. */ + version?: number; + } + interface Resource { + /** The Access Control Policy set on this resource. */ + accessControl?: ResourceAccessControl; + /** Output only. The evaluated properties of the resource with references expanded. Returned as serialized YAML. */ + finalProperties?: string; + /** Output only. Unique identifier for the resource; defined by the server. */ + id?: string; + /** Output only. Timestamp when the resource was created or acquired, in RFC3339 text format . */ + insertTime?: string; + /** Output only. URL of the manifest representing the current configuration of this resource. */ + manifest?: string; + /** Output only. The name of the resource as it appears in the YAML config. */ + name?: string; + /** Output only. The current properties of the resource before any references have been filled in. Returned as serialized YAML. */ + properties?: string; + /** Output only. The type of the resource, for example compute.v1.instance, or cloudfunctions.v1beta1.function. */ + type?: string; + /** Output only. If Deployment Manager is currently updating or previewing an update to this resource, the updated configuration appears here. */ + update?: ResourceUpdate; + /** Output only. Timestamp when the resource was updated, in RFC3339 text format . */ + updateTime?: string; + /** Output only. The URL of the actual resource. */ + url?: string; + /** Output only. If warning messages are generated during processing of this resource, this field will be populated. */ + warnings?: Array<{ + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }>; + } + interface ResourceAccessControl { + /** The GCP IAM Policy to set on the resource. */ + gcpIamPolicy?: string; + } + interface ResourceUpdate { + /** The Access Control Policy to set on this resource after updating the resource itself. */ + accessControl?: ResourceAccessControl; + /** Output only. If errors are generated during update of the resource, this field will be populated. */ + error?: { + /** [Output Only] The array of errors encountered while processing this operation. */ + errors?: Array<{ + /** [Output Only] The error type identifier for this error. */ + code?: string; + /** [Output Only] Indicates the field in the request that caused the error. This property is optional. */ + location?: string; + /** [Output Only] An optional, human-readable error message. */ + message?: string; + }>; + }; + /** Output only. The expanded properties of the resource with reference values expanded. Returned as serialized YAML. */ + finalProperties?: string; + /** Output only. The intent of the resource: PREVIEW, UPDATE, or CANCEL. */ + intent?: string; + /** Output only. URL of the manifest representing the update configuration of this resource. */ + manifest?: string; + /** Output only. The set of updated properties for this resource, before references are expanded. Returned as serialized YAML. */ + properties?: string; + /** Output only. The state of the resource. */ + state?: string; + /** Output only. If warning messages are generated during processing of this resource, this field will be populated. */ + warnings?: Array<{ + /** [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. */ + code?: string; + /** + * [Output Only] Metadata about this warning in key: value format. For example: + * "data": [ { "key": "scope", "value": "zones/us-east1-d" } + */ + data?: Array<{ + /** + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for + * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and + * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled + * for IP forwarding). + */ + key?: string; + /** [Output Only] A warning data value corresponding to the key. */ + value?: string; + }>; + /** [Output Only] A human-readable description of the warning code. */ + message?: string; + }>; + } + interface ResourcesListResponse { + /** A token used to continue a truncated list request. */ + nextPageToken?: string; + /** Resources contained in this list response. */ + resources?: Resource[]; + } + interface Rule { + /** Required */ + action?: string; + /** Additional restrictions that must be met. All conditions must pass for the rule to match. */ + conditions?: Condition[]; + /** Human-readable description of the rule. */ + description?: string; + /** If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. */ + ins?: string[]; + /** The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. */ + logConfigs?: LogConfig[]; + /** If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. */ + notIns?: string[]; + /** + * A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., + * 'storage.buckets.*') matches all verbs. + */ + permissions?: string[]; + } + interface TargetConfiguration { + /** The configuration to use for this deployment. */ + config?: ConfigFile; + /** + * Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in + * order to use the file in a template. + */ + imports?: ImportFile[]; + } + interface TestPermissionsRequest { + /** The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. */ + permissions?: string[]; + } + interface TestPermissionsResponse { + /** A subset of `TestPermissionsRequest.permissions` that the caller is allowed. */ + permissions?: string[]; + } + interface Type { + /** Output only. Unique identifier for the resource; defined by the server. */ + id?: string; + /** Output only. Timestamp when the type was created, in RFC3339 text format. */ + insertTime?: string; + /** Name of the type. */ + name?: string; + /** Output only. The Operation that most recently ran, or is currently running, on this type. */ + operation?: Operation; + /** Output only. Self link for the type. */ + selfLink?: string; + } + interface TypesListResponse { + /** A token used to continue a truncated list request. */ + nextPageToken?: string; + /** Output only. A list of resource types supported by Deployment Manager. */ + types?: Type[]; + } + interface DeploymentsResource { + /** Cancels and removes the preview currently associated with the deployment. */ + cancelPreview(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a deployment and all of the resources in the deployment. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Sets the policy to use for deleting resources. */ + deletePolicy?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets information about a specific deployment. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ + getIamPolicy(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a deployment and all of the resources described by the deployment manifest. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * If set to true, creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what + * your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use + * the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must + * separately delete this deployment if you want to remove it. + */ + preview?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all deployments for a given project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Sets the policy to use for creating new resources. */ + createPolicy?: string; + /** Sets the policy to use for deleting resources. */ + deletePolicy?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This + * allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must + * provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request + * with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview + * and you must separately delete this deployment if you want to remove it. + */ + preview?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Sets the access control policy on the specified resource. Replaces any existing policy. */ + setIamPolicy(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. */ + stop(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns permissions that a caller has on the specified resource. */ + testIamPermissions(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a deployment and all of the resources described by the deployment manifest. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Sets the policy to use for creating new resources. */ + createPolicy?: string; + /** Sets the policy to use for deleting resources. */ + deletePolicy?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This + * allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must + * provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request + * with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview + * and you must separately delete this deployment if you want to remove it. + */ + preview?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ManifestsResource { + /** Gets information about a specific manifest. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the manifest for this request. */ + manifest: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all manifests for a given deployment. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface OperationsResource { + /** Gets information about a specific operation. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The name of the operation for this request. */ + operation: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all operations for a project. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ResourcesResource { + /** Gets information about a single resource. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The name of the resource for this request. */ + resource: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists all resources in a given deployment. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TypesResource { + /** Lists all resource types for Deployment Manager. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * + * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string + * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of + * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The + * literal value must match the entire field. + * + * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * + * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering + * on nested fields to take advantage of labels to organize and search for results based on label values. + * + * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq + * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a + * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation + * is returned first. + * + * Currently, only sorting by name or creationTimestamp desc is supported. + */ + orderBy?: string; + /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.deploymentmanager/readme.md b/types/gapi.client.deploymentmanager/readme.md new file mode 100644 index 0000000000..b14c3e91e7 --- /dev/null +++ b/types/gapi.client.deploymentmanager/readme.md @@ -0,0 +1,153 @@ +# TypeScript typings for Google Cloud Deployment Manager API v2 +Declares, configures, and deploys complex solutions on Google Cloud Platform. +For detailed description please check [documentation](https://cloud.google.com/deployment-manager/). + +## Installing + +Install typings for Google Cloud Deployment Manager API: +``` +npm install @types/gapi.client.deploymentmanager@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('deploymentmanager', 'v2', () => { + // now we can use gapi.client.deploymentmanager + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + + // View and manage your Google Cloud Platform management resources and deployment status information + 'https://www.googleapis.com/auth/ndev.cloudman', + + // View your Google Cloud Platform management resources and deployment status information + 'https://www.googleapis.com/auth/ndev.cloudman.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Deployment Manager API resources: + +```typescript + +/* +Cancels and removes the preview currently associated with the deployment. +*/ +await gapi.client.deployments.cancelPreview({ deployment: "deployment", project: "project", }); + +/* +Deletes a deployment and all of the resources in the deployment. +*/ +await gapi.client.deployments.delete({ deployment: "deployment", project: "project", }); + +/* +Gets information about a specific deployment. +*/ +await gapi.client.deployments.get({ deployment: "deployment", project: "project", }); + +/* +Gets the access control policy for a resource. May be empty if no such policy or resource exists. +*/ +await gapi.client.deployments.getIamPolicy({ project: "project", resource: "resource", }); + +/* +Creates a deployment and all of the resources described by the deployment manifest. +*/ +await gapi.client.deployments.insert({ project: "project", }); + +/* +Lists all deployments for a given project. +*/ +await gapi.client.deployments.list({ project: "project", }); + +/* +Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics. +*/ +await gapi.client.deployments.patch({ deployment: "deployment", project: "project", }); + +/* +Sets the access control policy on the specified resource. Replaces any existing policy. +*/ +await gapi.client.deployments.setIamPolicy({ project: "project", resource: "resource", }); + +/* +Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. +*/ +await gapi.client.deployments.stop({ deployment: "deployment", project: "project", }); + +/* +Returns permissions that a caller has on the specified resource. +*/ +await gapi.client.deployments.testIamPermissions({ project: "project", resource: "resource", }); + +/* +Updates a deployment and all of the resources described by the deployment manifest. +*/ +await gapi.client.deployments.update({ deployment: "deployment", project: "project", }); + +/* +Gets information about a specific manifest. +*/ +await gapi.client.manifests.get({ deployment: "deployment", manifest: "manifest", project: "project", }); + +/* +Lists all manifests for a given deployment. +*/ +await gapi.client.manifests.list({ deployment: "deployment", project: "project", }); + +/* +Gets information about a specific operation. +*/ +await gapi.client.operations.get({ operation: "operation", project: "project", }); + +/* +Lists all operations for a project. +*/ +await gapi.client.operations.list({ project: "project", }); + +/* +Gets information about a single resource. +*/ +await gapi.client.resources.get({ deployment: "deployment", project: "project", resource: "resource", }); + +/* +Lists all resources in a given deployment. +*/ +await gapi.client.resources.list({ deployment: "deployment", project: "project", }); + +/* +Lists all resource types for Deployment Manager. +*/ +await gapi.client.types.list({ project: "project", }); +``` \ No newline at end of file diff --git a/types/gapi.client.deploymentmanager/tsconfig.json b/types/gapi.client.deploymentmanager/tsconfig.json new file mode 100644 index 0000000000..76527cf87c --- /dev/null +++ b/types/gapi.client.deploymentmanager/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.deploymentmanager-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.deploymentmanager/tslint.json b/types/gapi.client.deploymentmanager/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.deploymentmanager/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.dfareporting/gapi.client.dfareporting-tests.ts b/types/gapi.client.dfareporting/gapi.client.dfareporting-tests.ts new file mode 100644 index 0000000000..eef00757ac --- /dev/null +++ b/types/gapi.client.dfareporting/gapi.client.dfareporting-tests.ts @@ -0,0 +1,1301 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('dfareporting', 'v2.8', () => { + /** now we can use gapi.client.dfareporting */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage DoubleClick Digital Marketing conversions */ + 'https://www.googleapis.com/auth/ddmconversions', + /** View and manage DoubleClick for Advertisers reports */ + 'https://www.googleapis.com/auth/dfareporting', + /** View and manage your DoubleClick Campaign Manager's (DCM) display ad campaigns */ + 'https://www.googleapis.com/auth/dfatrafficking', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Gets the account's active ad summary by account ID. */ + await gapi.client.accountActiveAdSummaries.get({ + profileId: "profileId", + summaryAccountId: "summaryAccountId", + }); + /** Gets one account permission group by ID. */ + await gapi.client.accountPermissionGroups.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves the list of account permission groups. */ + await gapi.client.accountPermissionGroups.list({ + profileId: "profileId", + }); + /** Gets one account permission by ID. */ + await gapi.client.accountPermissions.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves the list of account permissions. */ + await gapi.client.accountPermissions.list({ + profileId: "profileId", + }); + /** Gets one account user profile by ID. */ + await gapi.client.accountUserProfiles.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new account user profile. */ + await gapi.client.accountUserProfiles.insert({ + profileId: "profileId", + }); + /** Retrieves a list of account user profiles, possibly filtered. This method supports paging. */ + await gapi.client.accountUserProfiles.list({ + active: true, + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + subaccountId: "subaccountId", + userRoleId: "userRoleId", + }); + /** Updates an existing account user profile. This method supports patch semantics. */ + await gapi.client.accountUserProfiles.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing account user profile. */ + await gapi.client.accountUserProfiles.update({ + profileId: "profileId", + }); + /** Gets one account by ID. */ + await gapi.client.accounts.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves the list of accounts, possibly filtered. This method supports paging. */ + await gapi.client.accounts.list({ + active: true, + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing account. This method supports patch semantics. */ + await gapi.client.accounts.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing account. */ + await gapi.client.accounts.update({ + profileId: "profileId", + }); + /** Gets one ad by ID. */ + await gapi.client.ads.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new ad. */ + await gapi.client.ads.insert({ + profileId: "profileId", + }); + /** Retrieves a list of ads, possibly filtered. This method supports paging. */ + await gapi.client.ads.list({ + active: true, + advertiserId: "advertiserId", + archived: true, + audienceSegmentIds: "audienceSegmentIds", + campaignIds: "campaignIds", + compatibility: "compatibility", + creativeIds: "creativeIds", + creativeOptimizationConfigurationIds: "creativeOptimizationConfigurationIds", + dynamicClickTracker: true, + ids: "ids", + landingPageIds: "landingPageIds", + maxResults: 12, + overriddenEventTagId: "overriddenEventTagId", + pageToken: "pageToken", + placementIds: "placementIds", + profileId: "profileId", + remarketingListIds: "remarketingListIds", + searchString: "searchString", + sizeIds: "sizeIds", + sortField: "sortField", + sortOrder: "sortOrder", + sslCompliant: true, + sslRequired: true, + type: "type", + }); + /** Updates an existing ad. This method supports patch semantics. */ + await gapi.client.ads.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing ad. */ + await gapi.client.ads.update({ + profileId: "profileId", + }); + /** Deletes an existing advertiser group. */ + await gapi.client.advertiserGroups.delete({ + id: "id", + profileId: "profileId", + }); + /** Gets one advertiser group by ID. */ + await gapi.client.advertiserGroups.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new advertiser group. */ + await gapi.client.advertiserGroups.insert({ + profileId: "profileId", + }); + /** Retrieves a list of advertiser groups, possibly filtered. This method supports paging. */ + await gapi.client.advertiserGroups.list({ + ids: "ids", + maxResults: 2, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing advertiser group. This method supports patch semantics. */ + await gapi.client.advertiserGroups.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing advertiser group. */ + await gapi.client.advertiserGroups.update({ + profileId: "profileId", + }); + /** Gets one advertiser by ID. */ + await gapi.client.advertisers.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new advertiser. */ + await gapi.client.advertisers.insert({ + profileId: "profileId", + }); + /** Retrieves a list of advertisers, possibly filtered. This method supports paging. */ + await gapi.client.advertisers.list({ + advertiserGroupIds: "advertiserGroupIds", + floodlightConfigurationIds: "floodlightConfigurationIds", + ids: "ids", + includeAdvertisersWithoutGroupsOnly: true, + maxResults: 5, + onlyParent: true, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + status: "status", + subaccountId: "subaccountId", + }); + /** Updates an existing advertiser. This method supports patch semantics. */ + await gapi.client.advertisers.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing advertiser. */ + await gapi.client.advertisers.update({ + profileId: "profileId", + }); + /** Retrieves a list of browsers. */ + await gapi.client.browsers.list({ + profileId: "profileId", + }); + /** + * Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a + * default ad does not exist already. + */ + await gapi.client.campaignCreativeAssociations.insert({ + campaignId: "campaignId", + profileId: "profileId", + }); + /** Retrieves the list of creative IDs associated with the specified campaign. This method supports paging. */ + await gapi.client.campaignCreativeAssociations.list({ + campaignId: "campaignId", + maxResults: 2, + pageToken: "pageToken", + profileId: "profileId", + sortOrder: "sortOrder", + }); + /** Gets one campaign by ID. */ + await gapi.client.campaigns.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new campaign. */ + await gapi.client.campaigns.insert({ + defaultLandingPageName: "defaultLandingPageName", + defaultLandingPageUrl: "defaultLandingPageUrl", + profileId: "profileId", + }); + /** Retrieves a list of campaigns, possibly filtered. This method supports paging. */ + await gapi.client.campaigns.list({ + advertiserGroupIds: "advertiserGroupIds", + advertiserIds: "advertiserIds", + archived: true, + atLeastOneOptimizationActivity: true, + excludedIds: "excludedIds", + ids: "ids", + maxResults: 7, + overriddenEventTagId: "overriddenEventTagId", + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + subaccountId: "subaccountId", + }); + /** Updates an existing campaign. This method supports patch semantics. */ + await gapi.client.campaigns.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing campaign. */ + await gapi.client.campaigns.update({ + profileId: "profileId", + }); + /** Gets one change log by ID. */ + await gapi.client.changeLogs.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of change logs. This method supports paging. */ + await gapi.client.changeLogs.list({ + action: "action", + ids: "ids", + maxChangeTime: "maxChangeTime", + maxResults: 4, + minChangeTime: "minChangeTime", + objectIds: "objectIds", + objectType: "objectType", + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + userProfileIds: "userProfileIds", + }); + /** Retrieves a list of cities, possibly filtered. */ + await gapi.client.cities.list({ + countryDartIds: "countryDartIds", + dartIds: "dartIds", + namePrefix: "namePrefix", + profileId: "profileId", + regionDartIds: "regionDartIds", + }); + /** Gets one connection type by ID. */ + await gapi.client.connectionTypes.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of connection types. */ + await gapi.client.connectionTypes.list({ + profileId: "profileId", + }); + /** Deletes an existing content category. */ + await gapi.client.contentCategories.delete({ + id: "id", + profileId: "profileId", + }); + /** Gets one content category by ID. */ + await gapi.client.contentCategories.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new content category. */ + await gapi.client.contentCategories.insert({ + profileId: "profileId", + }); + /** Retrieves a list of content categories, possibly filtered. This method supports paging. */ + await gapi.client.contentCategories.list({ + ids: "ids", + maxResults: 2, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing content category. This method supports patch semantics. */ + await gapi.client.contentCategories.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing content category. */ + await gapi.client.contentCategories.update({ + profileId: "profileId", + }); + /** Inserts conversions. */ + await gapi.client.conversions.batchinsert({ + profileId: "profileId", + }); + /** Updates existing conversions. */ + await gapi.client.conversions.batchupdate({ + profileId: "profileId", + }); + /** Gets one country by ID. */ + await gapi.client.countries.get({ + dartId: "dartId", + profileId: "profileId", + }); + /** Retrieves a list of countries. */ + await gapi.client.countries.list({ + profileId: "profileId", + }); + /** Inserts a new creative asset. */ + await gapi.client.creativeAssets.insert({ + advertiserId: "advertiserId", + profileId: "profileId", + }); + /** Deletes an existing creative field value. */ + await gapi.client.creativeFieldValues.delete({ + creativeFieldId: "creativeFieldId", + id: "id", + profileId: "profileId", + }); + /** Gets one creative field value by ID. */ + await gapi.client.creativeFieldValues.get({ + creativeFieldId: "creativeFieldId", + id: "id", + profileId: "profileId", + }); + /** Inserts a new creative field value. */ + await gapi.client.creativeFieldValues.insert({ + creativeFieldId: "creativeFieldId", + profileId: "profileId", + }); + /** Retrieves a list of creative field values, possibly filtered. This method supports paging. */ + await gapi.client.creativeFieldValues.list({ + creativeFieldId: "creativeFieldId", + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing creative field value. This method supports patch semantics. */ + await gapi.client.creativeFieldValues.patch({ + creativeFieldId: "creativeFieldId", + id: "id", + profileId: "profileId", + }); + /** Updates an existing creative field value. */ + await gapi.client.creativeFieldValues.update({ + creativeFieldId: "creativeFieldId", + profileId: "profileId", + }); + /** Deletes an existing creative field. */ + await gapi.client.creativeFields.delete({ + id: "id", + profileId: "profileId", + }); + /** Gets one creative field by ID. */ + await gapi.client.creativeFields.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new creative field. */ + await gapi.client.creativeFields.insert({ + profileId: "profileId", + }); + /** Retrieves a list of creative fields, possibly filtered. This method supports paging. */ + await gapi.client.creativeFields.list({ + advertiserIds: "advertiserIds", + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing creative field. This method supports patch semantics. */ + await gapi.client.creativeFields.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing creative field. */ + await gapi.client.creativeFields.update({ + profileId: "profileId", + }); + /** Gets one creative group by ID. */ + await gapi.client.creativeGroups.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new creative group. */ + await gapi.client.creativeGroups.insert({ + profileId: "profileId", + }); + /** Retrieves a list of creative groups, possibly filtered. This method supports paging. */ + await gapi.client.creativeGroups.list({ + advertiserIds: "advertiserIds", + groupNumber: 2, + ids: "ids", + maxResults: 4, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing creative group. This method supports patch semantics. */ + await gapi.client.creativeGroups.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing creative group. */ + await gapi.client.creativeGroups.update({ + profileId: "profileId", + }); + /** Gets one creative by ID. */ + await gapi.client.creatives.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new creative. */ + await gapi.client.creatives.insert({ + profileId: "profileId", + }); + /** Retrieves a list of creatives, possibly filtered. This method supports paging. */ + await gapi.client.creatives.list({ + active: true, + advertiserId: "advertiserId", + archived: true, + campaignId: "campaignId", + companionCreativeIds: "companionCreativeIds", + creativeFieldIds: "creativeFieldIds", + ids: "ids", + maxResults: 8, + pageToken: "pageToken", + profileId: "profileId", + renderingIds: "renderingIds", + searchString: "searchString", + sizeIds: "sizeIds", + sortField: "sortField", + sortOrder: "sortOrder", + studioCreativeId: "studioCreativeId", + types: "types", + }); + /** Updates an existing creative. This method supports patch semantics. */ + await gapi.client.creatives.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing creative. */ + await gapi.client.creatives.update({ + profileId: "profileId", + }); + /** Retrieves list of report dimension values for a list of filters. */ + await gapi.client.dimensionValues.query({ + maxResults: 1, + pageToken: "pageToken", + profileId: "profileId", + }); + /** Gets one directory site contact by ID. */ + await gapi.client.directorySiteContacts.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of directory site contacts, possibly filtered. This method supports paging. */ + await gapi.client.directorySiteContacts.list({ + directorySiteIds: "directorySiteIds", + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Gets one directory site by ID. */ + await gapi.client.directorySites.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new directory site. */ + await gapi.client.directorySites.insert({ + profileId: "profileId", + }); + /** Retrieves a list of directory sites, possibly filtered. This method supports paging. */ + await gapi.client.directorySites.list({ + acceptsInStreamVideoPlacements: true, + acceptsInterstitialPlacements: true, + acceptsPublisherPaidPlacements: true, + active: true, + countryId: "countryId", + dfpNetworkCode: "dfpNetworkCode", + ids: "ids", + maxResults: 8, + pageToken: "pageToken", + parentId: "parentId", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Deletes an existing dynamic targeting key. */ + await gapi.client.dynamicTargetingKeys.delete({ + name: "name", + objectId: "objectId", + objectType: "objectType", + profileId: "profileId", + }); + /** + * Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or + * placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement. + */ + await gapi.client.dynamicTargetingKeys.insert({ + profileId: "profileId", + }); + /** Retrieves a list of dynamic targeting keys. */ + await gapi.client.dynamicTargetingKeys.list({ + advertiserId: "advertiserId", + names: "names", + objectId: "objectId", + objectType: "objectType", + profileId: "profileId", + }); + /** Deletes an existing event tag. */ + await gapi.client.eventTags.delete({ + id: "id", + profileId: "profileId", + }); + /** Gets one event tag by ID. */ + await gapi.client.eventTags.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new event tag. */ + await gapi.client.eventTags.insert({ + profileId: "profileId", + }); + /** Retrieves a list of event tags, possibly filtered. */ + await gapi.client.eventTags.list({ + adId: "adId", + advertiserId: "advertiserId", + campaignId: "campaignId", + definitionsOnly: true, + enabled: true, + eventTagTypes: "eventTagTypes", + ids: "ids", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing event tag. This method supports patch semantics. */ + await gapi.client.eventTags.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing event tag. */ + await gapi.client.eventTags.update({ + profileId: "profileId", + }); + /** Retrieves a report file by its report ID and file ID. This method supports media download. */ + await gapi.client.files.get({ + fileId: "fileId", + reportId: "reportId", + }); + /** Lists files for a user profile. */ + await gapi.client.files.list({ + maxResults: 1, + pageToken: "pageToken", + profileId: "profileId", + scope: "scope", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Deletes an existing floodlight activity. */ + await gapi.client.floodlightActivities.delete({ + id: "id", + profileId: "profileId", + }); + /** Generates a tag for a floodlight activity. */ + await gapi.client.floodlightActivities.generatetag({ + floodlightActivityId: "floodlightActivityId", + profileId: "profileId", + }); + /** Gets one floodlight activity by ID. */ + await gapi.client.floodlightActivities.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new floodlight activity. */ + await gapi.client.floodlightActivities.insert({ + profileId: "profileId", + }); + /** Retrieves a list of floodlight activities, possibly filtered. This method supports paging. */ + await gapi.client.floodlightActivities.list({ + advertiserId: "advertiserId", + floodlightActivityGroupIds: "floodlightActivityGroupIds", + floodlightActivityGroupName: "floodlightActivityGroupName", + floodlightActivityGroupTagString: "floodlightActivityGroupTagString", + floodlightActivityGroupType: "floodlightActivityGroupType", + floodlightConfigurationId: "floodlightConfigurationId", + ids: "ids", + maxResults: 8, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + tagString: "tagString", + }); + /** Updates an existing floodlight activity. This method supports patch semantics. */ + await gapi.client.floodlightActivities.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing floodlight activity. */ + await gapi.client.floodlightActivities.update({ + profileId: "profileId", + }); + /** Gets one floodlight activity group by ID. */ + await gapi.client.floodlightActivityGroups.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new floodlight activity group. */ + await gapi.client.floodlightActivityGroups.insert({ + profileId: "profileId", + }); + /** Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging. */ + await gapi.client.floodlightActivityGroups.list({ + advertiserId: "advertiserId", + floodlightConfigurationId: "floodlightConfigurationId", + ids: "ids", + maxResults: 4, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + type: "type", + }); + /** Updates an existing floodlight activity group. This method supports patch semantics. */ + await gapi.client.floodlightActivityGroups.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing floodlight activity group. */ + await gapi.client.floodlightActivityGroups.update({ + profileId: "profileId", + }); + /** Gets one floodlight configuration by ID. */ + await gapi.client.floodlightConfigurations.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of floodlight configurations, possibly filtered. */ + await gapi.client.floodlightConfigurations.list({ + ids: "ids", + profileId: "profileId", + }); + /** Updates an existing floodlight configuration. This method supports patch semantics. */ + await gapi.client.floodlightConfigurations.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing floodlight configuration. */ + await gapi.client.floodlightConfigurations.update({ + profileId: "profileId", + }); + /** Gets one inventory item by ID. */ + await gapi.client.inventoryItems.get({ + id: "id", + profileId: "profileId", + projectId: "projectId", + }); + /** Retrieves a list of inventory items, possibly filtered. This method supports paging. */ + await gapi.client.inventoryItems.list({ + ids: "ids", + inPlan: true, + maxResults: 3, + orderId: "orderId", + pageToken: "pageToken", + profileId: "profileId", + projectId: "projectId", + siteId: "siteId", + sortField: "sortField", + sortOrder: "sortOrder", + type: "type", + }); + /** Deletes an existing campaign landing page. */ + await gapi.client.landingPages.delete({ + campaignId: "campaignId", + id: "id", + profileId: "profileId", + }); + /** Gets one campaign landing page by ID. */ + await gapi.client.landingPages.get({ + campaignId: "campaignId", + id: "id", + profileId: "profileId", + }); + /** Inserts a new landing page for the specified campaign. */ + await gapi.client.landingPages.insert({ + campaignId: "campaignId", + profileId: "profileId", + }); + /** Retrieves the list of landing pages for the specified campaign. */ + await gapi.client.landingPages.list({ + campaignId: "campaignId", + profileId: "profileId", + }); + /** Updates an existing campaign landing page. This method supports patch semantics. */ + await gapi.client.landingPages.patch({ + campaignId: "campaignId", + id: "id", + profileId: "profileId", + }); + /** Updates an existing campaign landing page. */ + await gapi.client.landingPages.update({ + campaignId: "campaignId", + profileId: "profileId", + }); + /** Retrieves a list of languages. */ + await gapi.client.languages.list({ + profileId: "profileId", + }); + /** Retrieves a list of metros. */ + await gapi.client.metros.list({ + profileId: "profileId", + }); + /** Gets one mobile carrier by ID. */ + await gapi.client.mobileCarriers.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of mobile carriers. */ + await gapi.client.mobileCarriers.list({ + profileId: "profileId", + }); + /** Gets one operating system version by ID. */ + await gapi.client.operatingSystemVersions.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of operating system versions. */ + await gapi.client.operatingSystemVersions.list({ + profileId: "profileId", + }); + /** Gets one operating system by DART ID. */ + await gapi.client.operatingSystems.get({ + dartId: "dartId", + profileId: "profileId", + }); + /** Retrieves a list of operating systems. */ + await gapi.client.operatingSystems.list({ + profileId: "profileId", + }); + /** Gets one order document by ID. */ + await gapi.client.orderDocuments.get({ + id: "id", + profileId: "profileId", + projectId: "projectId", + }); + /** Retrieves a list of order documents, possibly filtered. This method supports paging. */ + await gapi.client.orderDocuments.list({ + approved: true, + ids: "ids", + maxResults: 3, + orderId: "orderId", + pageToken: "pageToken", + profileId: "profileId", + projectId: "projectId", + searchString: "searchString", + siteId: "siteId", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Gets one order by ID. */ + await gapi.client.orders.get({ + id: "id", + profileId: "profileId", + projectId: "projectId", + }); + /** Retrieves a list of orders, possibly filtered. This method supports paging. */ + await gapi.client.orders.list({ + ids: "ids", + maxResults: 2, + pageToken: "pageToken", + profileId: "profileId", + projectId: "projectId", + searchString: "searchString", + siteId: "siteId", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Gets one placement group by ID. */ + await gapi.client.placementGroups.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new placement group. */ + await gapi.client.placementGroups.insert({ + profileId: "profileId", + }); + /** Retrieves a list of placement groups, possibly filtered. This method supports paging. */ + await gapi.client.placementGroups.list({ + advertiserIds: "advertiserIds", + archived: true, + campaignIds: "campaignIds", + contentCategoryIds: "contentCategoryIds", + directorySiteIds: "directorySiteIds", + ids: "ids", + maxEndDate: "maxEndDate", + maxResults: 8, + maxStartDate: "maxStartDate", + minEndDate: "minEndDate", + minStartDate: "minStartDate", + pageToken: "pageToken", + placementGroupType: "placementGroupType", + placementStrategyIds: "placementStrategyIds", + pricingTypes: "pricingTypes", + profileId: "profileId", + searchString: "searchString", + siteIds: "siteIds", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing placement group. This method supports patch semantics. */ + await gapi.client.placementGroups.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing placement group. */ + await gapi.client.placementGroups.update({ + profileId: "profileId", + }); + /** Deletes an existing placement strategy. */ + await gapi.client.placementStrategies.delete({ + id: "id", + profileId: "profileId", + }); + /** Gets one placement strategy by ID. */ + await gapi.client.placementStrategies.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new placement strategy. */ + await gapi.client.placementStrategies.insert({ + profileId: "profileId", + }); + /** Retrieves a list of placement strategies, possibly filtered. This method supports paging. */ + await gapi.client.placementStrategies.list({ + ids: "ids", + maxResults: 2, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing placement strategy. This method supports patch semantics. */ + await gapi.client.placementStrategies.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing placement strategy. */ + await gapi.client.placementStrategies.update({ + profileId: "profileId", + }); + /** Generates tags for a placement. */ + await gapi.client.placements.generatetags({ + campaignId: "campaignId", + placementIds: "placementIds", + profileId: "profileId", + tagFormats: "tagFormats", + }); + /** Gets one placement by ID. */ + await gapi.client.placements.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new placement. */ + await gapi.client.placements.insert({ + profileId: "profileId", + }); + /** Retrieves a list of placements, possibly filtered. This method supports paging. */ + await gapi.client.placements.list({ + advertiserIds: "advertiserIds", + archived: true, + campaignIds: "campaignIds", + compatibilities: "compatibilities", + contentCategoryIds: "contentCategoryIds", + directorySiteIds: "directorySiteIds", + groupIds: "groupIds", + ids: "ids", + maxEndDate: "maxEndDate", + maxResults: 10, + maxStartDate: "maxStartDate", + minEndDate: "minEndDate", + minStartDate: "minStartDate", + pageToken: "pageToken", + paymentSource: "paymentSource", + placementStrategyIds: "placementStrategyIds", + pricingTypes: "pricingTypes", + profileId: "profileId", + searchString: "searchString", + siteIds: "siteIds", + sizeIds: "sizeIds", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing placement. This method supports patch semantics. */ + await gapi.client.placements.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing placement. */ + await gapi.client.placements.update({ + profileId: "profileId", + }); + /** Gets one platform type by ID. */ + await gapi.client.platformTypes.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of platform types. */ + await gapi.client.platformTypes.list({ + profileId: "profileId", + }); + /** Gets one postal code by ID. */ + await gapi.client.postalCodes.get({ + code: "code", + profileId: "profileId", + }); + /** Retrieves a list of postal codes. */ + await gapi.client.postalCodes.list({ + profileId: "profileId", + }); + /** Gets one project by ID. */ + await gapi.client.projects.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of projects, possibly filtered. This method supports paging. */ + await gapi.client.projects.list({ + advertiserIds: "advertiserIds", + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Retrieves a list of regions. */ + await gapi.client.regions.list({ + profileId: "profileId", + }); + /** Gets one remarketing list share by remarketing list ID. */ + await gapi.client.remarketingListShares.get({ + profileId: "profileId", + remarketingListId: "remarketingListId", + }); + /** Updates an existing remarketing list share. This method supports patch semantics. */ + await gapi.client.remarketingListShares.patch({ + profileId: "profileId", + remarketingListId: "remarketingListId", + }); + /** Updates an existing remarketing list share. */ + await gapi.client.remarketingListShares.update({ + profileId: "profileId", + }); + /** Gets one remarketing list by ID. */ + await gapi.client.remarketingLists.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new remarketing list. */ + await gapi.client.remarketingLists.insert({ + profileId: "profileId", + }); + /** Retrieves a list of remarketing lists, possibly filtered. This method supports paging. */ + await gapi.client.remarketingLists.list({ + active: true, + advertiserId: "advertiserId", + floodlightActivityId: "floodlightActivityId", + maxResults: 4, + name: "name", + pageToken: "pageToken", + profileId: "profileId", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing remarketing list. This method supports patch semantics. */ + await gapi.client.remarketingLists.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing remarketing list. */ + await gapi.client.remarketingLists.update({ + profileId: "profileId", + }); + /** Deletes a report by its ID. */ + await gapi.client.reports.delete({ + profileId: "profileId", + reportId: "reportId", + }); + /** Retrieves a report by its ID. */ + await gapi.client.reports.get({ + profileId: "profileId", + reportId: "reportId", + }); + /** Creates a report. */ + await gapi.client.reports.insert({ + profileId: "profileId", + }); + /** Retrieves list of reports. */ + await gapi.client.reports.list({ + maxResults: 1, + pageToken: "pageToken", + profileId: "profileId", + scope: "scope", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates a report. This method supports patch semantics. */ + await gapi.client.reports.patch({ + profileId: "profileId", + reportId: "reportId", + }); + /** Runs a report. */ + await gapi.client.reports.run({ + profileId: "profileId", + reportId: "reportId", + synchronous: true, + }); + /** Updates a report. */ + await gapi.client.reports.update({ + profileId: "profileId", + reportId: "reportId", + }); + /** Gets one site by ID. */ + await gapi.client.sites.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new site. */ + await gapi.client.sites.insert({ + profileId: "profileId", + }); + /** Retrieves a list of sites, possibly filtered. This method supports paging. */ + await gapi.client.sites.list({ + acceptsInStreamVideoPlacements: true, + acceptsInterstitialPlacements: true, + acceptsPublisherPaidPlacements: true, + adWordsSite: true, + approved: true, + campaignIds: "campaignIds", + directorySiteIds: "directorySiteIds", + ids: "ids", + maxResults: 9, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + subaccountId: "subaccountId", + unmappedSite: true, + }); + /** Updates an existing site. This method supports patch semantics. */ + await gapi.client.sites.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing site. */ + await gapi.client.sites.update({ + profileId: "profileId", + }); + /** Gets one size by ID. */ + await gapi.client.sizes.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new size. */ + await gapi.client.sizes.insert({ + profileId: "profileId", + }); + /** Retrieves a list of sizes, possibly filtered. */ + await gapi.client.sizes.list({ + height: 1, + iabStandard: true, + ids: "ids", + profileId: "profileId", + width: 5, + }); + /** Gets one subaccount by ID. */ + await gapi.client.subaccounts.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new subaccount. */ + await gapi.client.subaccounts.insert({ + profileId: "profileId", + }); + /** Gets a list of subaccounts, possibly filtered. This method supports paging. */ + await gapi.client.subaccounts.list({ + ids: "ids", + maxResults: 2, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing subaccount. This method supports patch semantics. */ + await gapi.client.subaccounts.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing subaccount. */ + await gapi.client.subaccounts.update({ + profileId: "profileId", + }); + /** Gets one remarketing list by ID. */ + await gapi.client.targetableRemarketingLists.get({ + id: "id", + profileId: "profileId", + }); + /** Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging. */ + await gapi.client.targetableRemarketingLists.list({ + active: true, + advertiserId: "advertiserId", + maxResults: 3, + name: "name", + pageToken: "pageToken", + profileId: "profileId", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Gets one targeting template by ID. */ + await gapi.client.targetingTemplates.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new targeting template. */ + await gapi.client.targetingTemplates.insert({ + profileId: "profileId", + }); + /** Retrieves a list of targeting templates, optionally filtered. This method supports paging. */ + await gapi.client.targetingTemplates.list({ + advertiserId: "advertiserId", + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + }); + /** Updates an existing targeting template. This method supports patch semantics. */ + await gapi.client.targetingTemplates.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing targeting template. */ + await gapi.client.targetingTemplates.update({ + profileId: "profileId", + }); + /** Gets one user profile by ID. */ + await gapi.client.userProfiles.get({ + profileId: "profileId", + }); + /** Retrieves list of user profiles for a user. */ + await gapi.client.userProfiles.list({ + }); + /** Gets one user role permission group by ID. */ + await gapi.client.userRolePermissionGroups.get({ + id: "id", + profileId: "profileId", + }); + /** Gets a list of all supported user role permission groups. */ + await gapi.client.userRolePermissionGroups.list({ + profileId: "profileId", + }); + /** Gets one user role permission by ID. */ + await gapi.client.userRolePermissions.get({ + id: "id", + profileId: "profileId", + }); + /** Gets a list of user role permissions, possibly filtered. */ + await gapi.client.userRolePermissions.list({ + ids: "ids", + profileId: "profileId", + }); + /** Deletes an existing user role. */ + await gapi.client.userRoles.delete({ + id: "id", + profileId: "profileId", + }); + /** Gets one user role by ID. */ + await gapi.client.userRoles.get({ + id: "id", + profileId: "profileId", + }); + /** Inserts a new user role. */ + await gapi.client.userRoles.insert({ + profileId: "profileId", + }); + /** Retrieves a list of user roles, possibly filtered. This method supports paging. */ + await gapi.client.userRoles.list({ + accountUserRoleOnly: true, + ids: "ids", + maxResults: 3, + pageToken: "pageToken", + profileId: "profileId", + searchString: "searchString", + sortField: "sortField", + sortOrder: "sortOrder", + subaccountId: "subaccountId", + }); + /** Updates an existing user role. This method supports patch semantics. */ + await gapi.client.userRoles.patch({ + id: "id", + profileId: "profileId", + }); + /** Updates an existing user role. */ + await gapi.client.userRoles.update({ + profileId: "profileId", + }); + /** Gets one video format by ID. */ + await gapi.client.videoFormats.get({ + id: 1, + profileId: "profileId", + }); + /** Lists available video formats. */ + await gapi.client.videoFormats.list({ + profileId: "profileId", + }); + } +}); diff --git a/types/gapi.client.dfareporting/index.d.ts b/types/gapi.client.dfareporting/index.d.ts new file mode 100644 index 0000000000..e8050193e4 --- /dev/null +++ b/types/gapi.client.dfareporting/index.d.ts @@ -0,0 +1,9850 @@ +// Type definitions for Google DCM/DFA Reporting And Trafficking API v2.8 2.8 +// Project: https://developers.google.com/doubleclick-advertisers/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/dfareporting/v2.8/rest + +/// + +declare namespace gapi.client { + /** Load DCM/DFA Reporting And Trafficking API v2.8 */ + function load(name: "dfareporting", version: "v2.8"): PromiseLike; + function load(name: "dfareporting", version: "v2.8", callback: () => any): void; + + const accountActiveAdSummaries: dfareporting.AccountActiveAdSummariesResource; + + const accountPermissionGroups: dfareporting.AccountPermissionGroupsResource; + + const accountPermissions: dfareporting.AccountPermissionsResource; + + const accountUserProfiles: dfareporting.AccountUserProfilesResource; + + const accounts: dfareporting.AccountsResource; + + const ads: dfareporting.AdsResource; + + const advertiserGroups: dfareporting.AdvertiserGroupsResource; + + const advertisers: dfareporting.AdvertisersResource; + + const browsers: dfareporting.BrowsersResource; + + const campaignCreativeAssociations: dfareporting.CampaignCreativeAssociationsResource; + + const campaigns: dfareporting.CampaignsResource; + + const changeLogs: dfareporting.ChangeLogsResource; + + const cities: dfareporting.CitiesResource; + + const connectionTypes: dfareporting.ConnectionTypesResource; + + const contentCategories: dfareporting.ContentCategoriesResource; + + const conversions: dfareporting.ConversionsResource; + + const countries: dfareporting.CountriesResource; + + const creativeAssets: dfareporting.CreativeAssetsResource; + + const creativeFieldValues: dfareporting.CreativeFieldValuesResource; + + const creativeFields: dfareporting.CreativeFieldsResource; + + const creativeGroups: dfareporting.CreativeGroupsResource; + + const creatives: dfareporting.CreativesResource; + + const dimensionValues: dfareporting.DimensionValuesResource; + + const directorySiteContacts: dfareporting.DirectorySiteContactsResource; + + const directorySites: dfareporting.DirectorySitesResource; + + const dynamicTargetingKeys: dfareporting.DynamicTargetingKeysResource; + + const eventTags: dfareporting.EventTagsResource; + + const files: dfareporting.FilesResource; + + const floodlightActivities: dfareporting.FloodlightActivitiesResource; + + const floodlightActivityGroups: dfareporting.FloodlightActivityGroupsResource; + + const floodlightConfigurations: dfareporting.FloodlightConfigurationsResource; + + const inventoryItems: dfareporting.InventoryItemsResource; + + const landingPages: dfareporting.LandingPagesResource; + + const languages: dfareporting.LanguagesResource; + + const metros: dfareporting.MetrosResource; + + const mobileCarriers: dfareporting.MobileCarriersResource; + + const operatingSystemVersions: dfareporting.OperatingSystemVersionsResource; + + const operatingSystems: dfareporting.OperatingSystemsResource; + + const orderDocuments: dfareporting.OrderDocumentsResource; + + const orders: dfareporting.OrdersResource; + + const placementGroups: dfareporting.PlacementGroupsResource; + + const placementStrategies: dfareporting.PlacementStrategiesResource; + + const placements: dfareporting.PlacementsResource; + + const platformTypes: dfareporting.PlatformTypesResource; + + const postalCodes: dfareporting.PostalCodesResource; + + const projects: dfareporting.ProjectsResource; + + const regions: dfareporting.RegionsResource; + + const remarketingListShares: dfareporting.RemarketingListSharesResource; + + const remarketingLists: dfareporting.RemarketingListsResource; + + const reports: dfareporting.ReportsResource; + + const sites: dfareporting.SitesResource; + + const sizes: dfareporting.SizesResource; + + const subaccounts: dfareporting.SubaccountsResource; + + const targetableRemarketingLists: dfareporting.TargetableRemarketingListsResource; + + const targetingTemplates: dfareporting.TargetingTemplatesResource; + + const userProfiles: dfareporting.UserProfilesResource; + + const userRolePermissionGroups: dfareporting.UserRolePermissionGroupsResource; + + const userRolePermissions: dfareporting.UserRolePermissionsResource; + + const userRoles: dfareporting.UserRolesResource; + + const videoFormats: dfareporting.VideoFormatsResource; + + namespace dfareporting { + interface Account { + /** Account permissions assigned to this account. */ + accountPermissionIds?: string[]; + /** Profile for this account. This is a read-only field that can be left blank. */ + accountProfile?: string; + /** Whether this account is active. */ + active?: boolean; + /** Maximum number of active ads allowed for this account. */ + activeAdsLimitTier?: string; + /** Whether to serve creatives with Active View tags. If disabled, viewability data will not be available for any impressions. */ + activeViewOptOut?: boolean; + /** User role permissions available to the user roles of this account. */ + availablePermissionIds?: string[]; + /** ID of the country associated with this account. */ + countryId?: string; + /** + * ID of currency associated with this account. This is a required field. + * Acceptable values are: + * - "1" for USD + * - "2" for GBP + * - "3" for ESP + * - "4" for SEK + * - "5" for CAD + * - "6" for JPY + * - "7" for DEM + * - "8" for AUD + * - "9" for FRF + * - "10" for ITL + * - "11" for DKK + * - "12" for NOK + * - "13" for FIM + * - "14" for ZAR + * - "15" for IEP + * - "16" for NLG + * - "17" for EUR + * - "18" for KRW + * - "19" for TWD + * - "20" for SGD + * - "21" for CNY + * - "22" for HKD + * - "23" for NZD + * - "24" for MYR + * - "25" for BRL + * - "26" for PTE + * - "27" for MXP + * - "28" for CLP + * - "29" for TRY + * - "30" for ARS + * - "31" for PEN + * - "32" for ILS + * - "33" for CHF + * - "34" for VEF + * - "35" for COP + * - "36" for GTQ + * - "37" for PLN + * - "39" for INR + * - "40" for THB + * - "41" for IDR + * - "42" for CZK + * - "43" for RON + * - "44" for HUF + * - "45" for RUB + * - "46" for AED + * - "47" for BGN + * - "48" for HRK + * - "49" for MXN + */ + currencyId?: string; + /** Default placement dimensions for this account. */ + defaultCreativeSizeId?: string; + /** Description of this account. */ + description?: string; + /** ID of this account. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#account". */ + kind?: string; + /** + * Locale of this account. + * Acceptable values are: + * - "cs" (Czech) + * - "de" (German) + * - "en" (English) + * - "en-GB" (English United Kingdom) + * - "es" (Spanish) + * - "fr" (French) + * - "it" (Italian) + * - "ja" (Japanese) + * - "ko" (Korean) + * - "pl" (Polish) + * - "pt-BR" (Portuguese Brazil) + * - "ru" (Russian) + * - "sv" (Swedish) + * - "tr" (Turkish) + * - "zh-CN" (Chinese Simplified) + * - "zh-TW" (Chinese Traditional) + */ + locale?: string; + /** Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1. */ + maximumImageSize?: string; + /** Name of this account. This is a required field, and must be less than 128 characters long and be globally unique. */ + name?: string; + /** Whether campaigns created in this account will be enabled for Nielsen OCR reach ratings by default. */ + nielsenOcrEnabled?: boolean; + /** Reporting configuration of this account. */ + reportsConfiguration?: ReportsConfiguration; + /** Share Path to Conversion reports with Twitter. */ + shareReportsWithTwitter?: boolean; + /** File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive. */ + teaserSizeLimit?: string; + } + interface AccountActiveAdSummary { + /** ID of the account. */ + accountId?: string; + /** Ads that have been activated for the account */ + activeAds?: string; + /** Maximum number of active ads allowed for the account. */ + activeAdsLimitTier?: string; + /** Ads that can be activated for the account. */ + availableAds?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountActiveAdSummary". */ + kind?: string; + } + interface AccountPermission { + /** + * Account profiles associated with this account permission. + * + * Possible values are: + * - "ACCOUNT_PROFILE_BASIC" + * - "ACCOUNT_PROFILE_STANDARD" + */ + accountProfiles?: string[]; + /** ID of this account permission. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermission". */ + kind?: string; + /** Administrative level required to enable this account permission. */ + level?: string; + /** Name of this account permission. */ + name?: string; + /** Permission group of this account permission. */ + permissionGroupId?: string; + } + interface AccountPermissionGroup { + /** ID of this account permission group. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroup". */ + kind?: string; + /** Name of this account permission group. */ + name?: string; + } + interface AccountPermissionGroupsListResponse { + /** Account permission group collection. */ + accountPermissionGroups?: AccountPermissionGroup[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroupsListResponse". */ + kind?: string; + } + interface AccountPermissionsListResponse { + /** Account permission collection. */ + accountPermissions?: AccountPermission[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionsListResponse". */ + kind?: string; + } + interface AccountUserProfile { + /** Account ID of the user profile. This is a read-only field that can be left blank. */ + accountId?: string; + /** Whether this user profile is active. This defaults to false, and must be set true on insert for the user profile to be usable. */ + active?: boolean; + /** Filter that describes which advertisers are visible to the user profile. */ + advertiserFilter?: ObjectFilter; + /** Filter that describes which campaigns are visible to the user profile. */ + campaignFilter?: ObjectFilter; + /** Comments for this user profile. */ + comments?: string; + /** Email of the user profile. The email addresss must be linked to a Google Account. This field is required on insertion and is read-only after insertion. */ + email?: string; + /** ID of the user profile. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountUserProfile". */ + kind?: string; + /** + * Locale of the user profile. This is a required field. + * Acceptable values are: + * - "cs" (Czech) + * - "de" (German) + * - "en" (English) + * - "en-GB" (English United Kingdom) + * - "es" (Spanish) + * - "fr" (French) + * - "it" (Italian) + * - "ja" (Japanese) + * - "ko" (Korean) + * - "pl" (Polish) + * - "pt-BR" (Portuguese Brazil) + * - "ru" (Russian) + * - "sv" (Swedish) + * - "tr" (Turkish) + * - "zh-CN" (Chinese Simplified) + * - "zh-TW" (Chinese Traditional) + */ + locale?: string; + /** + * Name of the user profile. This is a required field. Must be less than 64 characters long, must be globally unique, and cannot contain whitespace or any + * of the following characters: "&;"#%,". + */ + name?: string; + /** Filter that describes which sites are visible to the user profile. */ + siteFilter?: ObjectFilter; + /** Subaccount ID of the user profile. This is a read-only field that can be left blank. */ + subaccountId?: string; + /** Trafficker type of this user profile. */ + traffickerType?: string; + /** User type of the user profile. This is a read-only field that can be left blank. */ + userAccessType?: string; + /** Filter that describes which user roles are visible to the user profile. */ + userRoleFilter?: ObjectFilter; + /** User role ID of the user profile. This is a required field. */ + userRoleId?: string; + } + interface AccountUserProfilesListResponse { + /** Account user profile collection. */ + accountUserProfiles?: AccountUserProfile[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountUserProfilesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface AccountsListResponse { + /** Account collection. */ + accounts?: Account[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface Activities { + /** List of activity filters. The dimension values need to be all either of type "dfa:activity" or "dfa:activityGroup". */ + filters?: DimensionValue[]; + /** The kind of resource this is, in this case dfareporting#activities. */ + kind?: string; + /** List of names of floodlight activity metrics. */ + metricNames?: string[]; + } + interface Ad { + /** Account ID of this ad. This is a read-only field that can be left blank. */ + accountId?: string; + /** Whether this ad is active. When true, archived must be false. */ + active?: boolean; + /** Advertiser ID of this ad. This is a required field on insertion. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Whether this ad is archived. When true, active must be false. */ + archived?: boolean; + /** Audience segment ID that is being targeted for this ad. Applicable when type is AD_SERVING_STANDARD_AD. */ + audienceSegmentId?: string; + /** Campaign ID of this ad. This is a required field on insertion. */ + campaignId?: string; + /** Dimension value for the ID of the campaign. This is a read-only, auto-generated field. */ + campaignIdDimensionValue?: DimensionValue; + /** Click-through URL for this ad. This is a required field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER. */ + clickThroughUrl?: ClickThroughUrl; + /** Click-through URL suffix properties for this ad. Applies to the URL in the ad or (if overriding ad properties) the URL in the creative. */ + clickThroughUrlSuffixProperties?: ClickThroughUrlSuffixProperties; + /** Comments for this ad. */ + comments?: string; + /** + * Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to either rendering on desktop or on + * mobile devices or in mobile apps for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are only used for existing default ads. New + * mobile placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL and default ads created for those placements will be limited to those compatibility + * types. IN_STREAM_VIDEO refers to rendering in-stream video ads developed with the VAST standard. + */ + compatibility?: string; + /** Information about the creation of this ad. This is a read-only field. */ + createInfo?: LastModifiedInfo; + /** + * Creative group assignments for this ad. Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment per creative group number is allowed for + * a maximum of two assignments. + */ + creativeGroupAssignments?: CreativeGroupAssignment[]; + /** + * Creative rotation for this ad. Applicable when type is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or AD_SERVING_TRACKING. When type is + * AD_SERVING_DEFAULT_AD, this field should have exactly one creativeAssignment. + */ + creativeRotation?: CreativeRotation; + /** + * Time and day targeting information for this ad. This field must be left blank if the ad is using a targeting template. Applicable when type is + * AD_SERVING_STANDARD_AD. + */ + dayPartTargeting?: DayPartTargeting; + /** Default click-through event tag properties for this ad. */ + defaultClickThroughEventTagProperties?: DefaultClickThroughEventTagProperties; + /** + * Delivery schedule information for this ad. Applicable when type is AD_SERVING_STANDARD_AD or AD_SERVING_TRACKING. This field along with subfields + * priority and impressionRatio are required on insertion when type is AD_SERVING_STANDARD_AD. + */ + deliverySchedule?: DeliverySchedule; + /** + * Whether this ad is a dynamic click tracker. Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is read-only + * after insert. + */ + dynamicClickTracker?: boolean; + /** Date and time that this ad should stop serving. Must be later than the start time. This is a required field on insertion. */ + endTime?: string; + /** Event tag overrides for this ad. */ + eventTagOverrides?: EventTagOverride[]; + /** + * Geographical targeting information for this ad. This field must be left blank if the ad is using a targeting template. Applicable when type is + * AD_SERVING_STANDARD_AD. + */ + geoTargeting?: GeoTargeting; + /** ID of this ad. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this ad. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** + * Key-value targeting information for this ad. This field must be left blank if the ad is using a targeting template. Applicable when type is + * AD_SERVING_STANDARD_AD. + */ + keyValueTargetingExpression?: KeyValueTargetingExpression; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#ad". */ + kind?: string; + /** + * Language targeting information for this ad. This field must be left blank if the ad is using a targeting template. Applicable when type is + * AD_SERVING_STANDARD_AD. + */ + languageTargeting?: LanguageTargeting; + /** Information about the most recent modification of this ad. This is a read-only field. */ + lastModifiedInfo?: LastModifiedInfo; + /** Name of this ad. This is a required field and must be less than 256 characters long. */ + name?: string; + /** Placement assignments for this ad. */ + placementAssignments?: PlacementAssignment[]; + /** + * Remarketing list targeting expression for this ad. This field must be left blank if the ad is using a targeting template. Applicable when type is + * AD_SERVING_STANDARD_AD. + */ + remarketingListExpression?: ListTargetingExpression; + /** Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. */ + size?: Size; + /** Whether this ad is ssl compliant. This is a read-only field that is auto-generated when the ad is inserted or updated. */ + sslCompliant?: boolean; + /** Whether this ad requires ssl. This is a read-only field that is auto-generated when the ad is inserted or updated. */ + sslRequired?: boolean; + /** Date and time that this ad should start serving. If creating an ad, this field must be a time in the future. This is a required field on insertion. */ + startTime?: string; + /** Subaccount ID of this ad. This is a read-only field that can be left blank. */ + subaccountId?: string; + /** + * Targeting template ID, used to apply preconfigured targeting information to this ad. This cannot be set while any of dayPartTargeting, geoTargeting, + * keyValueTargetingExpression, languageTargeting, remarketingListExpression, or technologyTargeting are set. Applicable when type is + * AD_SERVING_STANDARD_AD. + */ + targetingTemplateId?: string; + /** + * Technology platform targeting information for this ad. This field must be left blank if the ad is using a targeting template. Applicable when type is + * AD_SERVING_STANDARD_AD. + */ + technologyTargeting?: TechnologyTargeting; + /** Type of ad. This is a required field on insertion. Note that default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource). */ + type?: string; + } + interface AdBlockingConfiguration { + /** Click-through URL used by brand-neutral ads. This is a required field when overrideClickThroughUrl is set to true. */ + clickThroughUrl?: string; + /** + * ID of a creative bundle to use for this campaign. If set, brand-neutral ads will select creatives from this bundle. Otherwise, a default transparent + * pixel will be used. + */ + creativeBundleId?: string; + /** + * Whether this campaign has enabled ad blocking. When true, ad blocking is enabled for placements in the campaign, but this may be overridden by site and + * placement settings. When false, ad blocking is disabled for all placements under the campaign, regardless of site and placement settings. + */ + enabled?: boolean; + /** + * Whether the brand-neutral ad's click-through URL comes from the campaign's creative bundle or the override URL. Must be set to true if ad blocking is + * enabled and no creative bundle is configured. + */ + overrideClickThroughUrl?: boolean; + } + interface AdSlot { + /** Comment for this ad slot. */ + comment?: string; + /** + * Ad slot compatibility. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop, mobile devices or in mobile apps for regular or + * interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads + * developed with the VAST standard. + */ + compatibility?: string; + /** Height of this ad slot. */ + height?: string; + /** ID of the placement from an external platform that is linked to this ad slot. */ + linkedPlacementId?: string; + /** Name of this ad slot. */ + name?: string; + /** Payment source type of this ad slot. */ + paymentSourceType?: string; + /** Primary ad slot of a roadblock inventory item. */ + primary?: boolean; + /** Width of this ad slot. */ + width?: string; + } + interface AdsListResponse { + /** Ad collection. */ + ads?: Ad[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#adsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface Advertiser { + /** Account ID of this advertiser.This is a read-only field that can be left blank. */ + accountId?: string; + /** + * ID of the advertiser group this advertiser belongs to. You can group advertisers for reporting purposes, allowing you to see aggregated information for + * all advertisers in each group. + */ + advertiserGroupId?: string; + /** Suffix added to click-through URL of ad creative associations under this advertiser. Must be less than 129 characters long. */ + clickThroughUrlSuffix?: string; + /** ID of the click-through event tag to apply by default to the landing pages of this advertiser's campaigns. */ + defaultClickThroughEventTagId?: string; + /** Default email address used in sender field for tag emails. */ + defaultEmail?: string; + /** + * Floodlight configuration ID of this advertiser. The floodlight configuration ID will be created automatically, so on insert this field should be left + * blank. This field can be set to another advertiser's floodlight configuration ID in order to share that advertiser's floodlight configuration with this + * advertiser, so long as: + * - This advertiser's original floodlight configuration is not already associated with floodlight activities or floodlight activity groups. + * - This advertiser's original floodlight configuration is not already shared with another advertiser. + */ + floodlightConfigurationId?: string; + /** Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. */ + floodlightConfigurationIdDimensionValue?: DimensionValue; + /** ID of this advertiser. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this advertiser. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiser". */ + kind?: string; + /** Name of this advertiser. This is a required field and must be less than 256 characters long and unique among advertisers of the same account. */ + name?: string; + /** + * Original floodlight configuration before any sharing occurred. Set the floodlightConfigurationId of this advertiser to + * originalFloodlightConfigurationId to unshare the advertiser's current floodlight configuration. You cannot unshare an advertiser's floodlight + * configuration if the shared configuration has activities associated with any campaign or placement. + */ + originalFloodlightConfigurationId?: string; + /** Status of this advertiser. */ + status?: string; + /** Subaccount ID of this advertiser.This is a read-only field that can be left blank. */ + subaccountId?: string; + /** Suspension status of this advertiser. */ + suspended?: boolean; + } + interface AdvertiserGroup { + /** Account ID of this advertiser group. This is a read-only field that can be left blank. */ + accountId?: string; + /** ID of this advertiser group. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiserGroup". */ + kind?: string; + /** + * Name of this advertiser group. This is a required field and must be less than 256 characters long and unique among advertiser groups of the same + * account. + */ + name?: string; + } + interface AdvertiserGroupsListResponse { + /** Advertiser group collection. */ + advertiserGroups?: AdvertiserGroup[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiserGroupsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface AdvertisersListResponse { + /** Advertiser collection. */ + advertisers?: Advertiser[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertisersListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface AudienceSegment { + /** + * Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment + * group. Acceptable values are 1 to 1000, inclusive. + */ + allocation?: number; + /** ID of this audience segment. This is a read-only, auto-generated field. */ + id?: string; + /** Name of this audience segment. This is a required field and must be less than 65 characters long. */ + name?: string; + } + interface AudienceSegmentGroup { + /** Audience segments assigned to this group. The number of segments must be between 2 and 100. */ + audienceSegments?: AudienceSegment[]; + /** ID of this audience segment group. This is a read-only, auto-generated field. */ + id?: string; + /** Name of this audience segment group. This is a required field and must be less than 65 characters long. */ + name?: string; + } + interface Browser { + /** ID referring to this grouping of browser and version numbers. This is the ID used for targeting. */ + browserVersionId?: string; + /** DART ID of this browser. This is the ID used when generating reports. */ + dartId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#browser". */ + kind?: string; + /** + * Major version number (leftmost number) of this browser. For example, for Chrome 5.0.376.86 beta, this field should be set to 5. An asterisk (*) may be + * used to target any version number, and a question mark (?) may be used to target cases where the version number cannot be identified. For example, + * Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where + * the ad server knows the browser is Firefox but can't tell which version it is. + */ + majorVersion?: string; + /** + * Minor version number (number after first dot on left) of this browser. For example, for Chrome 5.0.375.86 beta, this field should be set to 0. An + * asterisk (*) may be used to target any version number, and a question mark (?) may be used to target cases where the version number cannot be + * identified. For example, Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox + * ?.? targets cases where the ad server knows the browser is Firefox but can't tell which version it is. + */ + minorVersion?: string; + /** Name of this browser. */ + name?: string; + } + interface BrowsersListResponse { + /** Browser collection. */ + browsers?: Browser[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#browsersListResponse". */ + kind?: string; + } + interface Campaign { + /** Account ID of this campaign. This is a read-only field that can be left blank. */ + accountId?: string; + /** Ad blocking settings for this campaign. */ + adBlockingConfiguration?: AdBlockingConfiguration; + /** Additional creative optimization configurations for the campaign. */ + additionalCreativeOptimizationConfigurations?: CreativeOptimizationConfiguration[]; + /** Advertiser group ID of the associated advertiser. */ + advertiserGroupId?: string; + /** Advertiser ID of this campaign. This is a required field. */ + advertiserId?: string; + /** Dimension value for the advertiser ID of this campaign. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Whether this campaign has been archived. */ + archived?: boolean; + /** Audience segment groups assigned to this campaign. Cannot have more than 300 segment groups. */ + audienceSegmentGroups?: AudienceSegmentGroup[]; + /** Billing invoice code included in the DCM client billing invoices associated with the campaign. */ + billingInvoiceCode?: string; + /** Click-through URL suffix override properties for this campaign. */ + clickThroughUrlSuffixProperties?: ClickThroughUrlSuffixProperties; + /** Arbitrary comments about this campaign. Must be less than 256 characters long. */ + comment?: string; + /** Information about the creation of this campaign. This is a read-only field. */ + createInfo?: LastModifiedInfo; + /** List of creative group IDs that are assigned to the campaign. */ + creativeGroupIds?: string[]; + /** Creative optimization configuration for the campaign. */ + creativeOptimizationConfiguration?: CreativeOptimizationConfiguration; + /** Click-through event tag ID override properties for this campaign. */ + defaultClickThroughEventTagProperties?: DefaultClickThroughEventTagProperties; + /** + * Date on which the campaign will stop running. On insert, the end date must be today or a future date. The end date must be later than or be the same as + * the start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective campaign run date is just that day only, 6/25/2015. + * The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. This is a required field. + */ + endDate?: string; + /** Overrides that can be used to activate or deactivate advertiser event tags. */ + eventTagOverrides?: EventTagOverride[]; + /** External ID for this campaign. */ + externalId?: string; + /** ID of this campaign. This is a read-only auto-generated field. */ + id?: string; + /** Dimension value for the ID of this campaign. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaign". */ + kind?: string; + /** Information about the most recent modification of this campaign. This is a read-only field. */ + lastModifiedInfo?: LastModifiedInfo; + /** Lookback window settings for the campaign. */ + lookbackConfiguration?: LookbackConfiguration; + /** Name of this campaign. This is a required field and must be less than 256 characters long and unique among campaigns of the same advertiser. */ + name?: string; + /** Whether Nielsen reports are enabled for this campaign. */ + nielsenOcrEnabled?: boolean; + /** + * Date on which the campaign starts running. The start date can be any date. The hours, minutes, and seconds of the start date should not be set, as + * doing so will result in an error. This is a required field. + */ + startDate?: string; + /** Subaccount ID of this campaign. This is a read-only field that can be left blank. */ + subaccountId?: string; + /** Campaign trafficker contact emails. */ + traffickerEmails?: string[]; + } + interface CampaignCreativeAssociation { + /** ID of the creative associated with the campaign. This is a required field. */ + creativeId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignCreativeAssociation". */ + kind?: string; + } + interface CampaignCreativeAssociationsListResponse { + /** Campaign creative association collection */ + campaignCreativeAssociations?: CampaignCreativeAssociation[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignCreativeAssociationsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface CampaignsListResponse { + /** Campaign collection. */ + campaigns?: Campaign[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface ChangeLog { + /** Account ID of the modified object. */ + accountId?: string; + /** Action which caused the change. */ + action?: string; + /** Time when the object was modified. */ + changeTime?: string; + /** Field name of the object which changed. */ + fieldName?: string; + /** ID of this change log. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#changeLog". */ + kind?: string; + /** New value of the object field. */ + newValue?: string; + /** ID of the object of this change log. The object could be a campaign, placement, ad, or other type. */ + objectId?: string; + /** Object type of the change log. */ + objectType?: string; + /** Old value of the object field. */ + oldValue?: string; + /** Subaccount ID of the modified object. */ + subaccountId?: string; + /** + * Transaction ID of this change log. When a single API call results in many changes, each change will have a separate ID in the change log but will share + * the same transactionId. + */ + transactionId?: string; + /** ID of the user who modified the object. */ + userProfileId?: string; + /** User profile name of the user who modified the object. */ + userProfileName?: string; + } + interface ChangeLogsListResponse { + /** Change log collection. */ + changeLogs?: ChangeLog[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#changeLogsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface CitiesListResponse { + /** City collection. */ + cities?: City[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#citiesListResponse". */ + kind?: string; + } + interface City { + /** Country code of the country to which this city belongs. */ + countryCode?: string; + /** DART ID of the country to which this city belongs. */ + countryDartId?: string; + /** DART ID of this city. This is the ID used for targeting and generating reports. */ + dartId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#city". */ + kind?: string; + /** Metro region code of the metro region (DMA) to which this city belongs. */ + metroCode?: string; + /** ID of the metro region (DMA) to which this city belongs. */ + metroDmaId?: string; + /** Name of this city. */ + name?: string; + /** Region code of the region to which this city belongs. */ + regionCode?: string; + /** DART ID of the region to which this city belongs. */ + regionDartId?: string; + } + interface ClickTag { + /** + * Advertiser event name associated with the click tag. This field is used by DISPLAY_IMAGE_GALLERY and HTML5_BANNER creatives. Applicable to DISPLAY when + * the primary asset type is not HTML_IMAGE. + */ + eventName?: string; + /** + * Parameter name for the specified click tag. For DISPLAY_IMAGE_GALLERY creative assets, this field must match the value of the creative asset's + * creativeAssetId.name field. + */ + name?: string; + /** Parameter value for the specified click tag. This field contains a click-through url. */ + value?: string; + } + interface ClickThroughUrl { + /** + * Read-only convenience field representing the actual URL that will be used for this click-through. The URL is computed as follows: + * - If defaultLandingPage is enabled then the campaign's default landing page URL is assigned to this field. + * - If defaultLandingPage is not enabled and a landingPageId is specified then that landing page's URL is assigned to this field. + * - If neither of the above cases apply, then the customClickThroughUrl is assigned to this field. + */ + computedClickThroughUrl?: string; + /** Custom click-through URL. Applicable if the defaultLandingPage field is set to false and the landingPageId field is left unset. */ + customClickThroughUrl?: string; + /** Whether the campaign default landing page is used. */ + defaultLandingPage?: boolean; + /** ID of the landing page for the click-through URL. Applicable if the defaultLandingPage field is set to false. */ + landingPageId?: string; + } + interface ClickThroughUrlSuffixProperties { + /** Click-through URL suffix to apply to all ads in this entity's scope. Must be less than 128 characters long. */ + clickThroughUrlSuffix?: string; + /** Whether this entity should override the inherited click-through URL suffix with its own defined value. */ + overrideInheritedSuffix?: boolean; + } + interface CompanionClickThroughOverride { + /** Click-through URL of this companion click-through override. */ + clickThroughUrl?: ClickThroughUrl; + /** ID of the creative for this companion click-through override. */ + creativeId?: string; + } + interface CompanionSetting { + /** Whether companions are disabled for this placement. */ + companionsDisabled?: boolean; + /** Whitelist of companion sizes to be served to this placement. Set this list to null or empty to serve all companion sizes. */ + enabledSizes?: Size[]; + /** Whether to serve only static images as companions. */ + imageOnly?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#companionSetting". */ + kind?: string; + } + interface CompatibleFields { + /** Contains items that are compatible to be selected for a report of type "CROSS_DIMENSION_REACH". */ + crossDimensionReachReportCompatibleFields?: CrossDimensionReachReportCompatibleFields; + /** Contains items that are compatible to be selected for a report of type "FLOODLIGHT". */ + floodlightReportCompatibleFields?: FloodlightReportCompatibleFields; + /** The kind of resource this is, in this case dfareporting#compatibleFields. */ + kind?: string; + /** Contains items that are compatible to be selected for a report of type "PATH_TO_CONVERSION". */ + pathToConversionReportCompatibleFields?: PathToConversionReportCompatibleFields; + /** Contains items that are compatible to be selected for a report of type "REACH". */ + reachReportCompatibleFields?: ReachReportCompatibleFields; + /** Contains items that are compatible to be selected for a report of type "STANDARD". */ + reportCompatibleFields?: ReportCompatibleFields; + } + interface ConnectionType { + /** ID of this connection type. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#connectionType". */ + kind?: string; + /** Name of this connection type. */ + name?: string; + } + interface ConnectionTypesListResponse { + /** Collection of connection types such as broadband and mobile. */ + connectionTypes?: ConnectionType[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#connectionTypesListResponse". */ + kind?: string; + } + interface ContentCategoriesListResponse { + /** Content category collection. */ + contentCategories?: ContentCategory[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#contentCategoriesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface ContentCategory { + /** Account ID of this content category. This is a read-only field that can be left blank. */ + accountId?: string; + /** ID of this content category. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#contentCategory". */ + kind?: string; + /** + * Name of this content category. This is a required field and must be less than 256 characters long and unique among content categories of the same + * account. + */ + name?: string; + } + interface Conversion { + /** Whether the conversion was directed toward children. */ + childDirectedTreatment?: boolean; + /** Custom floodlight variables. */ + customVariables?: CustomFloodlightVariable[]; + /** + * The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with + * encryptedUserIdCandidates[], mobileDeviceId and gclid. This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a required field. + */ + encryptedUserId?: string; + /** + * A list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If + * no such user ID is found then the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. When set, encryptionInfo should also be specified. This + * field may only be used when calling batchinsert; it is not supported by batchupdate. This field is mutually exclusive with encryptedUserId, + * mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId or gclid is a required field. + */ + encryptedUserIdCandidates?: string[]; + /** Floodlight Activity ID of this conversion. This is a required field. */ + floodlightActivityId?: string; + /** Floodlight Configuration ID of this conversion. This is a required field. */ + floodlightConfigurationId?: string; + /** + * The Google click ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserId or + * encryptedUserIdCandidates[] or mobileDeviceId is a required field. + */ + gclid?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". */ + kind?: string; + /** Whether Limit Ad Tracking is enabled. When set to true, the conversion will be used for reporting but not targeting. This will prevent remarketing. */ + limitAdTracking?: boolean; + /** + * The mobile device ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and gclid. This or encryptedUserId or + * encryptedUserIdCandidates[] or gclid is a required field. + */ + mobileDeviceId?: string; + /** The ordinal of the conversion. Use this field to control how conversions of the same user and day are de-duplicated. This is a required field. */ + ordinal?: string; + /** The quantity of the conversion. */ + quantity?: string; + /** The timestamp of conversion, in Unix epoch micros. This is a required field. */ + timestampMicros?: string; + /** The value of the conversion. */ + value?: number; + } + interface ConversionError { + /** The error code. */ + code?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionError". */ + kind?: string; + /** A description of the error. */ + message?: string; + } + interface ConversionStatus { + /** The original conversion that was inserted or updated. */ + conversion?: Conversion; + /** A list of errors related to this conversion. */ + errors?: ConversionError[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionStatus". */ + kind?: string; + } + interface ConversionsBatchInsertRequest { + /** The set of conversions to insert. */ + conversions?: Conversion[]; + /** + * Describes how encryptedUserId or encryptedUserIdCandidates[] is encrypted. This is a required field if encryptedUserId or encryptedUserIdCandidates[] + * is used. + */ + encryptionInfo?: EncryptionInfo; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchInsertRequest". */ + kind?: string; + } + interface ConversionsBatchInsertResponse { + /** Indicates that some or all conversions failed to insert. */ + hasFailures?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchInsertResponse". */ + kind?: string; + /** The insert status of each conversion. Statuses are returned in the same order that conversions are inserted. */ + status?: ConversionStatus[]; + } + interface ConversionsBatchUpdateRequest { + /** The set of conversions to update. */ + conversions?: Conversion[]; + /** Describes how encryptedUserId is encrypted. This is a required field if encryptedUserId is used. */ + encryptionInfo?: EncryptionInfo; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchUpdateRequest". */ + kind?: string; + } + interface ConversionsBatchUpdateResponse { + /** Indicates that some or all conversions failed to update. */ + hasFailures?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchUpdateResponse". */ + kind?: string; + /** The update status of each conversion. Statuses are returned in the same order that conversions are updated. */ + status?: ConversionStatus[]; + } + interface CountriesListResponse { + /** Country collection. */ + countries?: Country[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#countriesListResponse". */ + kind?: string; + } + interface Country { + /** Country code. */ + countryCode?: string; + /** DART ID of this country. This is the ID used for targeting and generating reports. */ + dartId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#country". */ + kind?: string; + /** Name of this country. */ + name?: string; + /** Whether ad serving supports secure servers in this country. */ + sslEnabled?: boolean; + } + interface Creative { + /** Account ID of this creative. This field, if left unset, will be auto-generated for both insert and update operations. Applicable to all creative types. */ + accountId?: string; + /** Whether the creative is active. Applicable to all creative types. */ + active?: boolean; + /** Ad parameters user for VPAID creative. This is a read-only field. Applicable to the following creative types: all VPAID. */ + adParameters?: string; + /** + * Keywords for a Rich Media creative. Keywords let you customize the creative settings of a Rich Media ad running on your site without having to contact + * the advertiser. You can use keywords to dynamically change the look or functionality of a creative. Applicable to the following creative types: all + * RICH_MEDIA, and all VPAID. + */ + adTagKeys?: string[]; + /** Advertiser ID of this creative. This is a required field. Applicable to all creative types. */ + advertiserId?: string; + /** + * Whether script access is allowed for this creative. This is a read-only and deprecated field which will automatically be set to true on update. + * Applicable to the following creative types: FLASH_INPAGE. + */ + allowScriptAccess?: boolean; + /** Whether the creative is archived. Applicable to all creative types. */ + archived?: boolean; + /** Type of artwork used for the creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. */ + artworkType?: string; + /** Source application where creative was authored. Presently, only DBM authored creatives will have this field set. Applicable to all creative types. */ + authoringSource?: string; + /** Authoring tool for HTML5 banner creatives. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. */ + authoringTool?: string; + /** Whether images are automatically advanced for image gallery creatives. Applicable to the following creative types: DISPLAY_IMAGE_GALLERY. */ + autoAdvanceImages?: boolean; + /** + * The 6-character HTML color code, beginning with #, for the background of the window area where the Flash file is displayed. Default is white. + * Applicable to the following creative types: FLASH_INPAGE. + */ + backgroundColor?: string; + /** + * Click-through URL for backup image. Applicable to the following creative types: FLASH_INPAGE and HTML5_BANNER. Applicable to DISPLAY when the primary + * asset type is not HTML_IMAGE. + */ + backupImageClickThroughUrl?: string; + /** + * List of feature dependencies that will cause a backup image to be served if the browser that serves the ad does not support them. Feature dependencies + * are features that a browser must be able to support in order to render your HTML5 creative asset correctly. This field is initially auto-generated to + * contain all features detected by DCM for all the assets of this creative and can then be modified by the client. To reset this field, copy over all the + * creativeAssets' detected features. Applicable to the following creative types: HTML5_BANNER. Applicable to DISPLAY when the primary asset type is not + * HTML_IMAGE. + */ + backupImageFeatures?: string[]; + /** Reporting label used for HTML5 banner backup image. Applicable to the following creative types: DISPLAY when the primary asset type is not HTML_IMAGE. */ + backupImageReportingLabel?: string; + /** + * Target window for backup image. Applicable to the following creative types: FLASH_INPAGE and HTML5_BANNER. Applicable to DISPLAY when the primary asset + * type is not HTML_IMAGE. + */ + backupImageTargetWindow?: TargetWindow; + /** + * Click tags of the creative. For DISPLAY, FLASH_INPAGE, and HTML5_BANNER creatives, this is a subset of detected click tags for the assets associated + * with this creative. After creating a flash asset, detected click tags will be returned in the creativeAssetMetadata. When inserting the creative, + * populate the creative clickTags field using the creativeAssetMetadata.clickTags field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly one + * entry in this list for each image creative asset. A click tag is matched with a corresponding creative asset by matching the clickTag.name field with + * the creativeAsset.assetIdentifier.name field. Applicable to the following creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable + * to DISPLAY when the primary asset type is not HTML_IMAGE. + */ + clickTags?: ClickTag[]; + /** Industry standard ID assigned to creative for reach and frequency. Applicable to INSTREAM_VIDEO_REDIRECT creatives. */ + commercialId?: string; + /** + * List of companion creatives assigned to an in-Stream videocreative. Acceptable values include IDs of existing flash and image creatives. Applicable to + * the following creative types: all VPAID and all INSTREAM_VIDEO with dynamicAssetSelection set to false. + */ + companionCreatives?: string[]; + /** + * Compatibilities associated with this creative. This is a read-only field. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on + * mobile devices or in mobile apps for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. Only + * pre-existing creatives may have these compatibilities since new creatives will either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead. + * IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. Applicable to all creative types. + * + * Acceptable values are: + * - "APP" + * - "APP_INTERSTITIAL" + * - "IN_STREAM_VIDEO" + * - "DISPLAY" + * - "DISPLAY_INTERSTITIAL" + */ + compatibility?: string[]; + /** + * Whether Flash assets associated with the creative need to be automatically converted to HTML5. This flag is enabled by default and users can choose to + * disable it if they don't want the system to generate and use HTML5 asset for this creative. Applicable to the following creative type: FLASH_INPAGE. + * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. + */ + convertFlashToHtml5?: boolean; + /** + * List of counter events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only and auto-generated from clickTags. + * Applicable to the following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. + */ + counterCustomEvents?: CreativeCustomEvent[]; + /** Required if dynamicAssetSelection is true. */ + creativeAssetSelection?: CreativeAssetSelection; + /** Assets associated with a creative. Applicable to all but the following creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT */ + creativeAssets?: CreativeAsset[]; + /** Creative field assignments for this creative. Applicable to all creative types. */ + creativeFieldAssignments?: CreativeFieldAssignment[]; + /** + * Custom key-values for a Rich Media creative. Key-values let you customize the creative settings of a Rich Media ad running on your site without having + * to contact the advertiser. You can use key-values to dynamically change the look or functionality of a creative. Applicable to the following creative + * types: all RICH_MEDIA, and all VPAID. + */ + customKeyValues?: string[]; + /** + * Set this to true to enable the use of rules to target individual assets in this creative. When set to true creativeAssetSelection must be set. This + * also controls asset-level companions. When this is true, companion creatives should be assigned to creative assets. Learn more. Applicable to + * INSTREAM_VIDEO creatives. + */ + dynamicAssetSelection?: boolean; + /** + * List of exit events configured for the creative. For DISPLAY and DISPLAY_IMAGE_GALLERY creatives, these are read-only and auto-generated from + * clickTags, For DISPLAY, an event is also created from the backupImageReportingLabel. Applicable to the following creative types: DISPLAY_IMAGE_GALLERY, + * all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. + */ + exitCustomEvents?: CreativeCustomEvent[]; + /** + * OpenWindow FSCommand of this creative. This lets the SWF file communicate with either Flash Player or the program hosting Flash Player, such as a web + * browser. This is only triggered if allowScriptAccess field is true. Applicable to the following creative types: FLASH_INPAGE. + */ + fsCommand?: FsCommand; + /** + * HTML code for the creative. This is a required field when applicable. This field is ignored if htmlCodeLocked is true. Applicable to the following + * creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA. + */ + htmlCode?: string; + /** + * Whether HTML code is DCM-generated or manually entered. Set to true to ignore changes to htmlCode. Applicable to the following creative types: + * FLASH_INPAGE and HTML5_BANNER. + */ + htmlCodeLocked?: boolean; + /** ID of this creative. This is a read-only, auto-generated field. Applicable to all creative types. */ + id?: string; + /** Dimension value for the ID of this creative. This is a read-only field. Applicable to all creative types. */ + idDimensionValue?: DimensionValue; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creative". */ + kind?: string; + /** Creative last modification information. This is a read-only field. Applicable to all creative types. */ + lastModifiedInfo?: LastModifiedInfo; + /** + * Latest Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative + * types: all RICH_MEDIA, and all VPAID. + */ + latestTraffickedCreativeId?: string; + /** Name of the creative. This is a required field and must be less than 256 characters long. Applicable to all creative types. */ + name?: string; + /** Override CSS value for rich media creatives. Applicable to the following creative types: all RICH_MEDIA. */ + overrideCss?: string; + /** Amount of time to play the video before counting a view. Applicable to the following creative types: all INSTREAM_VIDEO. */ + progressOffset?: VideoOffset; + /** + * URL of hosted image or hosted video or another ad tag. For INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video redirect URL. The standard for + * a VAST (Video Ad Serving Template) ad response allows for a redirect link to another VAST 2.0 or 3.0 call. This is a required field when applicable. + * Applicable to the following creative types: DISPLAY_REDIRECT, INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT + */ + redirectUrl?: string; + /** ID of current rendering version. This is a read-only field. Applicable to all creative types. */ + renderingId?: string; + /** Dimension value for the rendering ID of this creative. This is a read-only field. Applicable to all creative types. */ + renderingIdDimensionValue?: DimensionValue; + /** + * The minimum required Flash plugin version for this creative. For example, 11.2.202.235. This is a read-only field. Applicable to the following creative + * types: all RICH_MEDIA, and all VPAID. + */ + requiredFlashPluginVersion?: string; + /** + * The internal Flash version for this creative as calculated by DoubleClick Studio. This is a read-only field. Applicable to the following creative + * types: FLASH_INPAGE all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. + */ + requiredFlashVersion?: number; + /** + * Size associated with this creative. When inserting or updating a creative either the size ID field or size width and height fields can be used. This is + * a required field when applicable; however for IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a primary asset of type HTML_IMAGE, if left + * blank, this field will be automatically set using the actual size of the associated image assets. Applicable to the following creative types: DISPLAY, + * DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. + */ + size?: Size; + /** Amount of time to play the video before the skip button appears. Applicable to the following creative types: all INSTREAM_VIDEO. */ + skipOffset?: VideoOffset; + /** Whether the user can choose to skip the creative. Applicable to the following creative types: all INSTREAM_VIDEO and all VPAID. */ + skippable?: boolean; + /** Whether the creative is SSL-compliant. This is a read-only field. Applicable to all creative types. */ + sslCompliant?: boolean; + /** Whether creative should be treated as SSL compliant even if the system scan shows it's not. Applicable to all creative types. */ + sslOverride?: boolean; + /** + * Studio advertiser ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all + * RICH_MEDIA, and all VPAID. + */ + studioAdvertiserId?: string; + /** + * Studio creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all + * RICH_MEDIA, and all VPAID. + */ + studioCreativeId?: string; + /** + * Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: + * all RICH_MEDIA, and all VPAID. + */ + studioTraffickedCreativeId?: string; + /** + * Subaccount ID of this creative. This field, if left unset, will be auto-generated for both insert and update operations. Applicable to all creative + * types. + */ + subaccountId?: string; + /** Third-party URL used to record backup image impressions. Applicable to the following creative types: all RICH_MEDIA. */ + thirdPartyBackupImageImpressionsUrl?: string; + /** Third-party URL used to record rich media impressions. Applicable to the following creative types: all RICH_MEDIA. */ + thirdPartyRichMediaImpressionsUrl?: string; + /** Third-party URLs for tracking in-stream video creative events. Applicable to the following creative types: all INSTREAM_VIDEO and all VPAID. */ + thirdPartyUrls?: ThirdPartyTrackingUrl[]; + /** + * List of timer events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these are read-only and auto-generated from clickTags. + * Applicable to the following creative types: DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary asset is not + * HTML_IMAGE. + */ + timerCustomEvents?: CreativeCustomEvent[]; + /** Combined size of all creative assets. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. */ + totalFileSize?: string; + /** + * Type of this creative. This is a required field. Applicable to all creative types. + * + * Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for existing creatives. New creatives should use DISPLAY as a replacement for these types. + */ + type?: string; + /** A Universal Ad ID as per the VAST 4.0 spec. Applicable to the following creative types: INSTREAM_VIDEO and VPAID. */ + universalAdId?: UniversalAdId; + /** + * The version number helps you keep track of multiple versions of your creative in your reports. The version number will always be auto-generated during + * insert operations to start at 1. For tracking creatives the version cannot be incremented and will always remain at 1. For all other creative types the + * version can be incremented only by 1 during update operations. In addition, the version will be automatically incremented by 1 when undergoing Rich + * Media creative merging. Applicable to all creative types. + */ + version?: number; + /** Description of the video ad. Applicable to the following creative types: all INSTREAM_VIDEO and all VPAID. */ + videoDescription?: string; + /** + * Creative video duration in seconds. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all + * VPAID. + */ + videoDuration?: number; + } + interface CreativeAsset { + /** + * Whether ActionScript3 is enabled for the flash asset. This is a read-only field. Applicable to the following creative type: FLASH_INPAGE. Applicable to + * DISPLAY when the primary asset type is not HTML_IMAGE. + */ + actionScript3?: boolean; + /** + * Whether the video asset is active. This is a read-only field for VPAID_NON_LINEAR_VIDEO assets. Applicable to the following creative types: + * INSTREAM_VIDEO and all VPAID. + */ + active?: boolean; + /** + * Possible alignments for an asset. This is a read-only field. Applicable to the following creative types: + * RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL. + */ + alignment?: string; + /** Artwork type of rich media creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. */ + artworkType?: string; + /** + * Identifier of this asset. This is the same identifier returned during creative asset insert operation. This is a required field. Applicable to all but + * the following creative types: all REDIRECT and TRACKING_TEXT. + */ + assetIdentifier?: CreativeAssetId; + /** Exit event configured for the backup image. Applicable to the following creative types: all RICH_MEDIA. */ + backupImageExit?: CreativeCustomEvent; + /** Detected bit-rate for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. */ + bitRate?: number; + /** Rich media child asset type. This is a read-only field. Applicable to the following creative types: all VPAID. */ + childAssetType?: string; + /** + * Size of an asset when collapsed. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. Additionally, + * applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. + */ + collapsedSize?: Size; + /** + * List of companion creatives assigned to an in-stream video creative asset. Acceptable values include IDs of existing flash and image creatives. + * Applicable to INSTREAM_VIDEO creative type with dynamicAssetSelection set to true. + */ + companionCreativeIds?: string[]; + /** + * Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or + * equal to 0. + */ + customStartTimeValue?: number; + /** + * List of feature dependencies for the creative asset that are detected by DCM. Feature dependencies are features that a browser must be able to support + * in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. Applicable to the following creative types: HTML5_BANNER. + * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. + */ + detectedFeatures?: string[]; + /** Type of rich media asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. */ + displayType?: string; + /** + * Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must + * be greater than or equal to 1. + */ + duration?: number; + /** Duration type for which an asset will be displayed. Applicable to the following creative types: all RICH_MEDIA. */ + durationType?: string; + /** Detected expanded dimension for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. */ + expandedDimension?: Size; + /** + * File size associated with this creative asset. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and + * TRACKING_TEXT. + */ + fileSize?: string; + /** + * Flash version of the asset. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE, all RICH_MEDIA, and all VPAID. + * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. + */ + flashVersion?: number; + /** Whether to hide Flash objects flag for an asset. Applicable to the following creative types: all RICH_MEDIA. */ + hideFlashObjects?: boolean; + /** Whether to hide selection boxes flag for an asset. Applicable to the following creative types: all RICH_MEDIA. */ + hideSelectionBoxes?: boolean; + /** Whether the asset is horizontally locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. */ + horizontallyLocked?: boolean; + /** + * Numeric ID of this creative asset. This is a required field and should not be modified. Applicable to all but the following creative types: all + * REDIRECT and TRACKING_TEXT. + */ + id?: string; + /** Dimension value for the ID of the asset. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Detected MIME type for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. */ + mimeType?: string; + /** + * Offset position for an asset in collapsed mode. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. + * Additionally, only applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. + */ + offset?: OffsetPosition; + /** Whether the backup asset is original or changed by the user in DCM. Applicable to the following creative types: all RICH_MEDIA. */ + originalBackup?: boolean; + /** Offset position for an asset. Applicable to the following creative types: all RICH_MEDIA. */ + position?: OffsetPosition; + /** Offset left unit for an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. */ + positionLeftUnit?: string; + /** + * Offset top unit for an asset. This is a read-only field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following creative + * types: all RICH_MEDIA. + */ + positionTopUnit?: string; + /** Progressive URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. */ + progressiveServingUrl?: string; + /** + * Whether the asset pushes down other content. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable when the asset + * offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. + */ + pushdown?: boolean; + /** + * Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset + * pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. + * Acceptable values are 0 to 9.99, inclusive. + */ + pushdownDuration?: number; + /** + * Role of the asset in relation to creative. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. This is a required + * field. + * PRIMARY applies to DISPLAY, FLASH_INPAGE, HTML5_BANNER, IMAGE, DISPLAY_IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple primary assets), and + * all VPAID creatives. + * BACKUP_IMAGE applies to FLASH_INPAGE, HTML5_BANNER, all RICH_MEDIA, and all VPAID creatives. Applicable to DISPLAY when the primary asset type is not + * HTML_IMAGE. + * ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE creatives. + * OTHER refers to assets from sources other than DCM, such as Studio uploaded assets, applicable to all RICH_MEDIA and all VPAID creatives. + * PARENT_VIDEO refers to videos uploaded by the user in DCM and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO creatives. + * TRANSCODED_VIDEO refers to videos transcoded by DCM from PARENT_VIDEO assets and is applicable to INSTREAM_VIDEO and VPAID_LINEAR_VIDEO creatives. + * ALTERNATE_VIDEO refers to the DCM representation of child asset videos from Studio, and is applicable to VPAID_LINEAR_VIDEO creatives. These cannot be + * added or removed within DCM. + * For VPAID_LINEAR_VIDEO creatives, PARENT_VIDEO, TRANSCODED_VIDEO and ALTERNATE_VIDEO assets that are marked active serve as backup in case the VPAID + * creative cannot be served. Only PARENT_VIDEO assets can be added or removed for an INSTREAM_VIDEO or VPAID_LINEAR_VIDEO creative. + */ + role?: string; + /** + * Size associated with this creative asset. This is a required field when applicable; however for IMAGE and FLASH_INPAGE, creatives if left blank, this + * field will be automatically set using the actual size of the associated image asset. Applicable to the following creative types: DISPLAY_IMAGE_GALLERY, + * FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. + */ + size?: Size; + /** Whether the asset is SSL-compliant. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. */ + sslCompliant?: boolean; + /** Initial wait time type before making the asset visible. Applicable to the following creative types: all RICH_MEDIA. */ + startTimeType?: string; + /** Streaming URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. */ + streamingServingUrl?: string; + /** Whether the asset is transparent. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable to HTML5 assets. */ + transparency?: boolean; + /** Whether the asset is vertically locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. */ + verticallyLocked?: boolean; + /** Detected video duration for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. */ + videoDuration?: number; + /** + * Window mode options for flash assets. Applicable to the following creative types: FLASH_INPAGE, RICH_MEDIA_DISPLAY_EXPANDING, RICH_MEDIA_IM_EXPAND, + * RICH_MEDIA_DISPLAY_BANNER, and RICH_MEDIA_INPAGE_FLOATING. + */ + windowMode?: string; + /** + * zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT + * one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive. + */ + zIndex?: number; + /** File name of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. */ + zipFilename?: string; + /** Size of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. */ + zipFilesize?: string; + } + interface CreativeAssetId { + /** + * Name of the creative asset. This is a required field while inserting an asset. After insertion, this assetIdentifier is used to identify the uploaded + * asset. Characters in the name must be alphanumeric or one of the following: ".-_ ". Spaces are allowed. + */ + name?: string; + /** Type of asset to upload. This is a required field. FLASH and IMAGE are no longer supported for new uploads. All image assets should use HTML_IMAGE. */ + type?: string; + } + interface CreativeAssetMetadata { + /** ID of the creative asset. This is a required field. */ + assetIdentifier?: CreativeAssetId; + /** List of detected click tags for assets. This is a read-only auto-generated field. */ + clickTags?: ClickTag[]; + /** + * List of feature dependencies for the creative asset that are detected by DCM. Feature dependencies are features that a browser must be able to support + * in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. + */ + detectedFeatures?: string[]; + /** Numeric ID of the asset. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the numeric ID of the asset. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeAssetMetadata". */ + kind?: string; + /** + * Rules validated during code generation that generated a warning. This is a read-only, auto-generated field. + * + * Possible values are: + * - "ADMOB_REFERENCED" + * - "ASSET_FORMAT_UNSUPPORTED_DCM" + * - "ASSET_INVALID" + * - "CLICK_TAG_HARD_CODED" + * - "CLICK_TAG_INVALID" + * - "CLICK_TAG_IN_GWD" + * - "CLICK_TAG_MISSING" + * - "CLICK_TAG_MORE_THAN_ONE" + * - "CLICK_TAG_NON_TOP_LEVEL" + * - "COMPONENT_UNSUPPORTED_DCM" + * - "ENABLER_UNSUPPORTED_METHOD_DCM" + * - "EXTERNAL_FILE_REFERENCED" + * - "FILE_DETAIL_EMPTY" + * - "FILE_TYPE_INVALID" + * - "GWD_PROPERTIES_INVALID" + * - "HTML5_FEATURE_UNSUPPORTED" + * - "LINKED_FILE_NOT_FOUND" + * - "MAX_FLASH_VERSION_11" + * - "MRAID_REFERENCED" + * - "NOT_SSL_COMPLIANT" + * - "ORPHANED_ASSET" + * - "PRIMARY_HTML_MISSING" + * - "SVG_INVALID" + * - "ZIP_INVALID" + */ + warnedValidationRules?: string[]; + } + interface CreativeAssetSelection { + /** + * A creativeAssets[].id. This should refer to one of the parent assets in this creative, and will be served if none of the rules match. This is a + * required field. + */ + defaultAssetId?: string; + /** + * Rules determine which asset will be served to a viewer. Rules will be evaluated in the order in which they are stored in this list. This list must + * contain at least one rule. Applicable to INSTREAM_VIDEO creatives. + */ + rules?: Rule[]; + } + interface CreativeAssignment { + /** Whether this creative assignment is active. When true, the creative will be included in the ad's rotation. */ + active?: boolean; + /** + * Whether applicable event tags should fire when this creative assignment is rendered. If this value is unset when the ad is inserted or updated, it will + * default to true for all creative types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO. + */ + applyEventTags?: boolean; + /** Click-through URL of the creative assignment. */ + clickThroughUrl?: ClickThroughUrl; + /** Companion creative overrides for this creative assignment. Applicable to video ads. */ + companionCreativeOverrides?: CompanionClickThroughOverride[]; + /** Creative group assignments for this creative assignment. Only one assignment per creative group number is allowed for a maximum of two assignments. */ + creativeGroupAssignments?: CreativeGroupAssignment[]; + /** ID of the creative to be assigned. This is a required field. */ + creativeId?: string; + /** Dimension value for the ID of the creative. This is a read-only, auto-generated field. */ + creativeIdDimensionValue?: DimensionValue; + /** Date and time that the assigned creative should stop serving. Must be later than the start time. */ + endTime?: string; + /** + * Rich media exit overrides for this creative assignment. + * Applicable when the creative type is any of the following: + * - DISPLAY + * - RICH_MEDIA_INPAGE + * - RICH_MEDIA_INPAGE_FLOATING + * - RICH_MEDIA_IM_EXPAND + * - RICH_MEDIA_EXPANDING + * - RICH_MEDIA_INTERSTITIAL_FLOAT + * - RICH_MEDIA_MOBILE_IN_APP + * - RICH_MEDIA_MULTI_FLOATING + * - RICH_MEDIA_PEEL_DOWN + * - VPAID_LINEAR + * - VPAID_NON_LINEAR + */ + richMediaExitOverrides?: RichMediaExitOverride[]; + /** + * Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, + * inclusive. + */ + sequence?: number; + /** Whether the creative to be assigned is SSL-compliant. This is a read-only field that is auto-generated when the ad is inserted or updated. */ + sslCompliant?: boolean; + /** Date and time that the assigned creative should start serving. */ + startTime?: string; + /** Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1. */ + weight?: number; + } + interface CreativeCustomEvent { + /** Unique ID of this event used by DDM Reporting and Data Transfer. This is a read-only field. */ + advertiserCustomEventId?: string; + /** User-entered name for the event. */ + advertiserCustomEventName?: string; + /** Type of the event. This is a read-only field. */ + advertiserCustomEventType?: string; + /** Artwork label column, used to link events in DCM back to events in Studio. This is a required field and should not be modified after insertion. */ + artworkLabel?: string; + /** Artwork type used by the creative.This is a read-only field. */ + artworkType?: string; + /** Exit URL of the event. This field is used only for exit events. */ + exitUrl?: string; + /** ID of this event. This is a required field and should not be modified after insertion. */ + id?: string; + /** Properties for rich media popup windows. This field is used only for exit events. */ + popupWindowProperties?: PopupWindowProperties; + /** Target type used by the event. */ + targetType?: string; + /** Video reporting ID, used to differentiate multiple videos in a single creative. This is a read-only field. */ + videoReportingId?: string; + } + interface CreativeField { + /** Account ID of this creative field. This is a read-only field that can be left blank. */ + accountId?: string; + /** Advertiser ID of this creative field. This is a required field on insertion. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** ID of this creative field. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeField". */ + kind?: string; + /** + * Name of this creative field. This is a required field and must be less than 256 characters long and unique among creative fields of the same + * advertiser. + */ + name?: string; + /** Subaccount ID of this creative field. This is a read-only field that can be left blank. */ + subaccountId?: string; + } + interface CreativeFieldAssignment { + /** ID of the creative field. */ + creativeFieldId?: string; + /** ID of the creative field value. */ + creativeFieldValueId?: string; + } + interface CreativeFieldValue { + /** ID of this creative field value. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldValue". */ + kind?: string; + /** Value of this creative field value. It needs to be less than 256 characters in length and unique per creative field. */ + value?: string; + } + interface CreativeFieldValuesListResponse { + /** Creative field value collection. */ + creativeFieldValues?: CreativeFieldValue[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldValuesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface CreativeFieldsListResponse { + /** Creative field collection. */ + creativeFields?: CreativeField[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface CreativeGroup { + /** Account ID of this creative group. This is a read-only field that can be left blank. */ + accountId?: string; + /** Advertiser ID of this creative group. This is a required field on insertion. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** + * Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on + * insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive. + */ + groupNumber?: number; + /** ID of this creative group. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeGroup". */ + kind?: string; + /** + * Name of this creative group. This is a required field and must be less than 256 characters long and unique among creative groups of the same + * advertiser. + */ + name?: string; + /** Subaccount ID of this creative group. This is a read-only field that can be left blank. */ + subaccountId?: string; + } + interface CreativeGroupAssignment { + /** ID of the creative group to be assigned. */ + creativeGroupId?: string; + /** Creative group number of the creative group assignment. */ + creativeGroupNumber?: string; + } + interface CreativeGroupsListResponse { + /** Creative group collection. */ + creativeGroups?: CreativeGroup[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeGroupsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface CreativeOptimizationConfiguration { + /** ID of this creative optimization config. This field is auto-generated when the campaign is inserted or updated. It can be null for existing campaigns. */ + id?: string; + /** Name of this creative optimization config. This is a required field and must be less than 129 characters long. */ + name?: string; + /** List of optimization activities associated with this configuration. */ + optimizationActivitys?: OptimizationActivity[]; + /** Optimization model for this configuration. */ + optimizationModel?: string; + } + interface CreativeRotation { + /** Creative assignments in this creative rotation. */ + creativeAssignments?: CreativeAssignment[]; + /** + * Creative optimization configuration that is used by this ad. It should refer to one of the existing optimization configurations in the ad's campaign. + * If it is unset or set to 0, then the campaign's default optimization configuration will be used for this ad. + */ + creativeOptimizationConfigurationId?: string; + /** Type of creative rotation. Can be used to specify whether to use sequential or random rotation. */ + type?: string; + /** Strategy for calculating weights. Used with CREATIVE_ROTATION_TYPE_RANDOM. */ + weightCalculationStrategy?: string; + } + interface CreativeSettings { + /** Header text for iFrames for this site. Must be less than or equal to 2000 characters long. */ + iFrameFooter?: string; + /** Header text for iFrames for this site. Must be less than or equal to 2000 characters long. */ + iFrameHeader?: string; + } + interface CreativesListResponse { + /** Creative collection. */ + creatives?: Creative[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface CrossDimensionReachReportCompatibleFields { + /** Dimensions which are compatible to be selected in the "breakdown" section of the report. */ + breakdown?: Dimension[]; + /** Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. */ + dimensionFilters?: Dimension[]; + /** The kind of resource this is, in this case dfareporting#crossDimensionReachReportCompatibleFields. */ + kind?: string; + /** Metrics which are compatible to be selected in the "metricNames" section of the report. */ + metrics?: Metric[]; + /** Metrics which are compatible to be selected in the "overlapMetricNames" section of the report. */ + overlapMetrics?: Metric[]; + } + interface CustomFloodlightVariable { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". */ + kind?: string; + /** The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. */ + type?: string; + /** The value of the custom floodlight variable. The length of string must not exceed 50 characters. */ + value?: string; + } + interface CustomRichMediaEvents { + /** List of custom rich media event IDs. Dimension values must be all of type dfa:richMediaEventTypeIdAndName. */ + filteredEventIds?: DimensionValue[]; + /** The kind of resource this is, in this case dfareporting#customRichMediaEvents. */ + kind?: string; + } + interface DateRange { + /** The end date of the date range, inclusive. A string of the format: "yyyy-MM-dd". */ + endDate?: string; + /** The kind of resource this is, in this case dfareporting#dateRange. */ + kind?: string; + /** The date range relative to the date of when the report is run. */ + relativeDateRange?: string; + /** The start date of the date range, inclusive. A string of the format: "yyyy-MM-dd". */ + startDate?: string; + } + interface DayPartTargeting { + /** + * Days of the week when the ad will serve. + * + * Acceptable values are: + * - "SUNDAY" + * - "MONDAY" + * - "TUESDAY" + * - "WEDNESDAY" + * - "THURSDAY" + * - "FRIDAY" + * - "SATURDAY" + */ + daysOfWeek?: string[]; + /** + * Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the + * ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm + * (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive. + */ + hoursOfDay?: number[]; + /** Whether or not to use the user's local time. If false, the America/New York time zone applies. */ + userLocalTime?: boolean; + } + interface DefaultClickThroughEventTagProperties { + /** ID of the click-through event tag to apply to all ads in this entity's scope. */ + defaultClickThroughEventTagId?: string; + /** Whether this entity should override the inherited default click-through event tag with its own defined value. */ + overrideInheritedEventTag?: boolean; + } + interface DeliverySchedule { + /** Limit on the number of times an individual user can be served the ad within a specified period of time. */ + frequencyCap?: FrequencyCap; + /** + * Whether or not hard cutoff is enabled. If true, the ad will not serve after the end date and time. Otherwise the ad will continue to be served until it + * has reached its delivery goals. + */ + hardCutoff?: boolean; + /** + * Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of + * 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive. + */ + impressionRatio?: string; + /** Serving priority of an ad, with respect to other ads. The lower the priority number, the greater the priority with which it is served. */ + priority?: string; + } + interface DfpSettings { + /** DFP network code for this directory site. */ + dfpNetworkCode?: string; + /** DFP network name for this directory site. */ + dfpNetworkName?: string; + /** Whether this directory site accepts programmatic placements. */ + programmaticPlacementAccepted?: boolean; + /** Whether this directory site accepts publisher-paid tags. */ + pubPaidPlacementAccepted?: boolean; + /** Whether this directory site is available only via DoubleClick Publisher Portal. */ + publisherPortalOnly?: boolean; + } + interface Dimension { + /** The kind of resource this is, in this case dfareporting#dimension. */ + kind?: string; + /** The dimension name, e.g. dfa:advertiser */ + name?: string; + } + interface DimensionFilter { + /** The name of the dimension to filter. */ + dimensionName?: string; + /** The kind of resource this is, in this case dfareporting#dimensionFilter. */ + kind?: string; + /** The value of the dimension to filter. */ + value?: string; + } + interface DimensionValue { + /** The name of the dimension. */ + dimensionName?: string; + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The ID associated with the value if available. */ + id?: string; + /** The kind of resource this is, in this case dfareporting#dimensionValue. */ + kind?: string; + /** + * Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a + * placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') + * allow a matchType other than EXACT. + */ + matchType?: string; + /** The value of the dimension. */ + value?: string; + } + interface DimensionValueList { + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The dimension values returned in this response. */ + items?: DimensionValue[]; + /** The kind of list this is, in this case dfareporting#dimensionValueList. */ + kind?: string; + /** + * Continuation token used to page through dimension values. To retrieve the next page of results, set the next request's "pageToken" to the value of this + * field. The page token is only valid for a limited amount of time and should not be persisted. + */ + nextPageToken?: string; + } + interface DimensionValueRequest { + /** The name of the dimension for which values should be requested. */ + dimensionName?: string; + /** The end date of the date range for which to retrieve dimension values. A string of the format "yyyy-MM-dd". */ + endDate?: string; + /** The list of filters by which to filter values. The filters are ANDed. */ + filters?: DimensionFilter[]; + /** The kind of request this is, in this case dfareporting#dimensionValueRequest. */ + kind?: string; + /** The start date of the date range for which to retrieve dimension values. A string of the format "yyyy-MM-dd". */ + startDate?: string; + } + interface DirectorySite { + /** Whether this directory site is active. */ + active?: boolean; + /** Directory site contacts. */ + contactAssignments?: DirectorySiteContactAssignment[]; + /** Country ID of this directory site. This is a read-only field. */ + countryId?: string; + /** + * Currency ID of this directory site. This is a read-only field. + * Possible values are: + * - "1" for USD + * - "2" for GBP + * - "3" for ESP + * - "4" for SEK + * - "5" for CAD + * - "6" for JPY + * - "7" for DEM + * - "8" for AUD + * - "9" for FRF + * - "10" for ITL + * - "11" for DKK + * - "12" for NOK + * - "13" for FIM + * - "14" for ZAR + * - "15" for IEP + * - "16" for NLG + * - "17" for EUR + * - "18" for KRW + * - "19" for TWD + * - "20" for SGD + * - "21" for CNY + * - "22" for HKD + * - "23" for NZD + * - "24" for MYR + * - "25" for BRL + * - "26" for PTE + * - "27" for MXP + * - "28" for CLP + * - "29" for TRY + * - "30" for ARS + * - "31" for PEN + * - "32" for ILS + * - "33" for CHF + * - "34" for VEF + * - "35" for COP + * - "36" for GTQ + * - "37" for PLN + * - "39" for INR + * - "40" for THB + * - "41" for IDR + * - "42" for CZK + * - "43" for RON + * - "44" for HUF + * - "45" for RUB + * - "46" for AED + * - "47" for BGN + * - "48" for HRK + * - "49" for MXN + */ + currencyId?: string; + /** Description of this directory site. This is a read-only field. */ + description?: string; + /** ID of this directory site. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this directory site. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** + * Tag types for regular placements. + * + * Acceptable values are: + * - "STANDARD" + * - "IFRAME_JAVASCRIPT_INPAGE" + * - "INTERNAL_REDIRECT_INPAGE" + * - "JAVASCRIPT_INPAGE" + */ + inpageTagFormats?: string[]; + /** + * Tag types for interstitial placements. + * + * Acceptable values are: + * - "IFRAME_JAVASCRIPT_INTERSTITIAL" + * - "INTERNAL_REDIRECT_INTERSTITIAL" + * - "JAVASCRIPT_INTERSTITIAL" + */ + interstitialTagFormats?: string[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite". */ + kind?: string; + /** Name of this directory site. */ + name?: string; + /** Parent directory site ID. */ + parentId?: string; + /** Directory site settings. */ + settings?: DirectorySiteSettings; + /** URL of this directory site. */ + url?: string; + } + interface DirectorySiteContact { + /** Address of this directory site contact. */ + address?: string; + /** Email address of this directory site contact. */ + email?: string; + /** First name of this directory site contact. */ + firstName?: string; + /** ID of this directory site contact. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySiteContact". */ + kind?: string; + /** Last name of this directory site contact. */ + lastName?: string; + /** Phone number of this directory site contact. */ + phone?: string; + /** Directory site contact role. */ + role?: string; + /** Title or designation of this directory site contact. */ + title?: string; + /** Directory site contact type. */ + type?: string; + } + interface DirectorySiteContactAssignment { + /** ID of this directory site contact. This is a read-only, auto-generated field. */ + contactId?: string; + /** + * Visibility of this directory site contact assignment. When set to PUBLIC this contact assignment is visible to all account and agency users; when set + * to PRIVATE it is visible only to the site. + */ + visibility?: string; + } + interface DirectorySiteContactsListResponse { + /** Directory site contact collection */ + directorySiteContacts?: DirectorySiteContact[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySiteContactsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface DirectorySiteSettings { + /** Whether this directory site has disabled active view creatives. */ + activeViewOptOut?: boolean; + /** Directory site DFP settings. */ + dfpSettings?: DfpSettings; + /** Whether this site accepts in-stream video ads. */ + instreamVideoPlacementAccepted?: boolean; + /** Whether this site accepts interstitial ads. */ + interstitialPlacementAccepted?: boolean; + /** Whether this directory site has disabled Nielsen OCR reach ratings. */ + nielsenOcrOptOut?: boolean; + /** Whether this directory site has disabled generation of Verification ins tags. */ + verificationTagOptOut?: boolean; + /** Whether this directory site has disabled active view for in-stream video creatives. This is a read-only field. */ + videoActiveViewOptOut?: boolean; + } + interface DirectorySitesListResponse { + /** Directory site collection. */ + directorySites?: DirectorySite[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySitesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface DynamicTargetingKey { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#dynamicTargetingKey". */ + kind?: string; + /** + * Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long and cannot contain commas. All characters are + * converted to lowercase. + */ + name?: string; + /** ID of the object of this dynamic targeting key. This is a required field. */ + objectId?: string; + /** Type of the object of this dynamic targeting key. This is a required field. */ + objectType?: string; + } + interface DynamicTargetingKeysListResponse { + /** Dynamic targeting key collection. */ + dynamicTargetingKeys?: DynamicTargetingKey[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#dynamicTargetingKeysListResponse". */ + kind?: string; + } + interface EncryptionInfo { + /** The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer. */ + encryptionEntityId?: string; + /** The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer. */ + encryptionEntityType?: string; + /** Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer. */ + encryptionSource?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#encryptionInfo". */ + kind?: string; + } + interface EventTag { + /** Account ID of this event tag. This is a read-only field that can be left blank. */ + accountId?: string; + /** Advertiser ID of this event tag. This field or the campaignId field is required on insertion. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Campaign ID of this event tag. This field or the advertiserId field is required on insertion. */ + campaignId?: string; + /** Dimension value for the ID of the campaign. This is a read-only, auto-generated field. */ + campaignIdDimensionValue?: DimensionValue; + /** Whether this event tag should be automatically enabled for all of the advertiser's campaigns and ads. */ + enabledByDefault?: boolean; + /** + * Whether to remove this event tag from ads that are trafficked through DoubleClick Bid Manager to Ad Exchange. This may be useful if the event tag uses + * a pixel that is unapproved for Ad Exchange bids on one or more networks, such as the Google Display Network. + */ + excludeFromAdxRequests?: boolean; + /** ID of this event tag. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#eventTag". */ + kind?: string; + /** Name of this event tag. This is a required field and must be less than 256 characters long. */ + name?: string; + /** Site filter type for this event tag. If no type is specified then the event tag will be applied to all sites. */ + siteFilterType?: string; + /** Filter list of site IDs associated with this event tag. The siteFilterType determines whether this is a whitelist or blacklist filter. */ + siteIds?: string[]; + /** Whether this tag is SSL-compliant or not. This is a read-only field. */ + sslCompliant?: boolean; + /** Status of this event tag. Must be ENABLED for this event tag to fire. This is a required field. */ + status?: string; + /** Subaccount ID of this event tag. This is a read-only field that can be left blank. */ + subaccountId?: string; + /** + * Event tag type. Can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either + * impression or click tracking. This is a required field. + */ + type?: string; + /** + * Payload URL for this event tag. The URL on a click-through event tag should have a landing page URL appended to the end of it. This field is required + * on insertion. + */ + url?: string; + /** + * Number of times the landing page URL should be URL-escaped before being appended to the click-through event tag URL. Only applies to click-through + * event tags as specified by the event tag type. + */ + urlEscapeLevels?: number; + } + interface EventTagOverride { + /** Whether this override is enabled. */ + enabled?: boolean; + /** ID of this event tag override. This is a read-only, auto-generated field. */ + id?: string; + } + interface EventTagsListResponse { + /** Event tag collection. */ + eventTags?: EventTag[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#eventTagsListResponse". */ + kind?: string; + } + interface File { + /** The date range for which the file has report data. The date range will always be the absolute date range for which the report is run. */ + dateRange?: DateRange; + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The filename of the file. */ + fileName?: string; + /** The output format of the report. Only available once the file is available. */ + format?: string; + /** The unique ID of this report file. */ + id?: string; + /** The kind of resource this is, in this case dfareporting#file. */ + kind?: string; + /** The timestamp in milliseconds since epoch when this file was last modified. */ + lastModifiedTime?: string; + /** The ID of the report this file was generated from. */ + reportId?: string; + /** The status of the report file. */ + status?: string; + /** The URLs where the completed report file can be downloaded. */ + urls?: { + /** The URL for downloading the report data through the API. */ + apiUrl?: string; + /** The URL for downloading the report data through a browser. */ + browserUrl?: string; + }; + } + interface FileList { + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The files returned in this response. */ + items?: File[]; + /** The kind of list this is, in this case dfareporting#fileList. */ + kind?: string; + /** + * Continuation token used to page through files. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The + * page token is only valid for a limited amount of time and should not be persisted. + */ + nextPageToken?: string; + } + interface Flight { + /** Inventory item flight end date. */ + endDate?: string; + /** Rate or cost of this flight. */ + rateOrCost?: string; + /** Inventory item flight start date. */ + startDate?: string; + /** Units of this flight. */ + units?: string; + } + interface FloodlightActivitiesGenerateTagResponse { + /** Generated tag for this floodlight activity. */ + floodlightActivityTag?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivitiesGenerateTagResponse". */ + kind?: string; + } + interface FloodlightActivitiesListResponse { + /** Floodlight activity collection. */ + floodlightActivities?: FloodlightActivity[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivitiesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface FloodlightActivity { + /** Account ID of this floodlight activity. This is a read-only field that can be left blank. */ + accountId?: string; + /** + * Advertiser ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's advertiser or + * the existing activity's advertiser. + */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** + * Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is + * STANDARD_COUNTING or UNIQUE_COUNTING. + */ + cacheBustingType?: string; + /** Counting method for conversions for this floodlight activity. This is a required field. */ + countingMethod?: string; + /** Dynamic floodlight tags. */ + defaultTags?: FloodlightActivityDynamicTag[]; + /** URL where this tag will be deployed. If specified, must be less than 256 characters long. */ + expectedUrl?: string; + /** Floodlight activity group ID of this floodlight activity. This is a required field. */ + floodlightActivityGroupId?: string; + /** Name of the associated floodlight activity group. This is a read-only field. */ + floodlightActivityGroupName?: string; + /** Tag string of the associated floodlight activity group. This is a read-only field. */ + floodlightActivityGroupTagString?: string; + /** Type of the associated floodlight activity group. This is a read-only field. */ + floodlightActivityGroupType?: string; + /** + * Floodlight configuration ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's + * floodlight configuration or from the existing activity's floodlight configuration. + */ + floodlightConfigurationId?: string; + /** Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. */ + floodlightConfigurationIdDimensionValue?: DimensionValue; + /** Whether this activity is archived. */ + hidden?: boolean; + /** ID of this floodlight activity. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this floodlight activity. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Whether the image tag is enabled for this activity. */ + imageTagEnabled?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivity". */ + kind?: string; + /** Name of this floodlight activity. This is a required field. Must be less than 129 characters long and cannot contain quotes. */ + name?: string; + /** General notes or implementation instructions for the tag. */ + notes?: string; + /** Publisher dynamic floodlight tags. */ + publisherTags?: FloodlightActivityPublisherDynamicTag[]; + /** Whether this tag should use SSL. */ + secure?: boolean; + /** Whether the floodlight activity is SSL-compliant. This is a read-only field, its value detected by the system from the floodlight tags. */ + sslCompliant?: boolean; + /** Whether this floodlight activity must be SSL-compliant. */ + sslRequired?: boolean; + /** Subaccount ID of this floodlight activity. This is a read-only field that can be left blank. */ + subaccountId?: string; + /** Tag format type for the floodlight activity. If left blank, the tag format will default to HTML. */ + tagFormat?: string; + /** + * Value of the cat= paramter in the floodlight tag, which the ad servers use to identify the activity. This is optional: if empty, a new tag string will + * be generated for you. This string must be 1 to 8 characters long, with valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also be + * unique among activities of the same activity group. This field is read-only after insertion. + */ + tagString?: string; + /** + * List of the user-defined variables used by this conversion tag. These map to the "u[1-100]=" in the tags. Each of these can have a user defined type. + * Acceptable values are U1 to U100, inclusive. + */ + userDefinedVariableTypes?: string[]; + } + interface FloodlightActivityDynamicTag { + /** ID of this dynamic tag. This is a read-only, auto-generated field. */ + id?: string; + /** Name of this tag. */ + name?: string; + /** Tag code. */ + tag?: string; + } + interface FloodlightActivityGroup { + /** Account ID of this floodlight activity group. This is a read-only field that can be left blank. */ + accountId?: string; + /** + * Advertiser ID of this floodlight activity group. If this field is left blank, the value will be copied over either from the floodlight configuration's + * advertiser or from the existing activity group's advertiser. + */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Floodlight configuration ID of this floodlight activity group. This is a required field. */ + floodlightConfigurationId?: string; + /** Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. */ + floodlightConfigurationIdDimensionValue?: DimensionValue; + /** ID of this floodlight activity group. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this floodlight activity group. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivityGroup". */ + kind?: string; + /** Name of this floodlight activity group. This is a required field. Must be less than 65 characters long and cannot contain quotes. */ + name?: string; + /** Subaccount ID of this floodlight activity group. This is a read-only field that can be left blank. */ + subaccountId?: string; + /** + * Value of the type= parameter in the floodlight tag, which the ad servers use to identify the activity group that the activity belongs to. This is + * optional: if empty, a new tag string will be generated for you. This string must be 1 to 8 characters long, with valid characters being + * [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among activity groups of the same floodlight configuration. This field is read-only after + * insertion. + */ + tagString?: string; + /** Type of the floodlight activity group. This is a required field that is read-only after insertion. */ + type?: string; + } + interface FloodlightActivityGroupsListResponse { + /** Floodlight activity group collection. */ + floodlightActivityGroups?: FloodlightActivityGroup[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivityGroupsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface FloodlightActivityPublisherDynamicTag { + /** Whether this tag is applicable only for click-throughs. */ + clickThrough?: boolean; + /** + * Directory site ID of this dynamic tag. This is a write-only field that can be used as an alternative to the siteId field. When this resource is + * retrieved, only the siteId field will be populated. + */ + directorySiteId?: string; + /** Dynamic floodlight tag. */ + dynamicTag?: FloodlightActivityDynamicTag; + /** Site ID of this dynamic tag. */ + siteId?: string; + /** Dimension value for the ID of the site. This is a read-only, auto-generated field. */ + siteIdDimensionValue?: DimensionValue; + /** Whether this tag is applicable only for view-throughs. */ + viewThrough?: boolean; + } + interface FloodlightConfiguration { + /** Account ID of this floodlight configuration. This is a read-only field that can be left blank. */ + accountId?: string; + /** Advertiser ID of the parent advertiser of this floodlight configuration. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Whether advertiser data is shared with Google Analytics. */ + analyticsDataSharingEnabled?: boolean; + /** + * Whether the exposure-to-conversion report is enabled. This report shows detailed pathway information on up to 10 of the most recent ad exposures seen + * by a user before converting. + */ + exposureToConversionEnabled?: boolean; + /** Day that will be counted as the first day of the week in reports. This is a required field. */ + firstDayOfWeek?: string; + /** ID of this floodlight configuration. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this floodlight configuration. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Whether in-app attribution tracking is enabled. */ + inAppAttributionTrackingEnabled?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightConfiguration". */ + kind?: string; + /** Lookback window settings for this floodlight configuration. */ + lookbackConfiguration?: LookbackConfiguration; + /** Types of attribution options for natural search conversions. */ + naturalSearchConversionAttributionOption?: string; + /** Settings for DCM Omniture integration. */ + omnitureSettings?: OmnitureSettings; + /** Subaccount ID of this floodlight configuration. This is a read-only field that can be left blank. */ + subaccountId?: string; + /** Configuration settings for dynamic and image floodlight tags. */ + tagSettings?: TagSettings; + /** List of third-party authentication tokens enabled for this configuration. */ + thirdPartyAuthenticationTokens?: ThirdPartyAuthenticationToken[]; + /** List of user defined variables enabled for this configuration. */ + userDefinedVariableConfigurations?: UserDefinedVariableConfiguration[]; + } + interface FloodlightConfigurationsListResponse { + /** Floodlight configuration collection. */ + floodlightConfigurations?: FloodlightConfiguration[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightConfigurationsListResponse". */ + kind?: string; + } + interface FloodlightReportCompatibleFields { + /** Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. */ + dimensionFilters?: Dimension[]; + /** Dimensions which are compatible to be selected in the "dimensions" section of the report. */ + dimensions?: Dimension[]; + /** The kind of resource this is, in this case dfareporting#floodlightReportCompatibleFields. */ + kind?: string; + /** Metrics which are compatible to be selected in the "metricNames" section of the report. */ + metrics?: Metric[]; + } + interface FrequencyCap { + /** Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive. */ + duration?: string; + /** Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive. */ + impressions?: string; + } + interface FsCommand { + /** Distance from the left of the browser.Applicable when positionOption is DISTANCE_FROM_TOP_LEFT_CORNER. */ + left?: number; + /** Position in the browser where the window will open. */ + positionOption?: string; + /** Distance from the top of the browser. Applicable when positionOption is DISTANCE_FROM_TOP_LEFT_CORNER. */ + top?: number; + /** Height of the window. */ + windowHeight?: number; + /** Width of the window. */ + windowWidth?: number; + } + interface GeoTargeting { + /** + * Cities to be targeted. For each city only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If + * targeting a city, do not target or exclude the country of the city, and do not target the metro or region of the city. + */ + cities?: City[]; + /** + * Countries to be targeted or excluded from targeting, depending on the setting of the excludeCountries field. For each country only dartId is required. + * The other fields are populated automatically when the ad is inserted or updated. If targeting or excluding a country, do not target regions, cities, + * metros, or postal codes in the same country. + */ + countries?: Country[]; + /** + * Whether or not to exclude the countries in the countries field from targeting. If false, the countries field refers to countries which will be targeted + * by the ad. + */ + excludeCountries?: boolean; + /** + * Metros to be targeted. For each metro only dmaId is required. The other fields are populated automatically when the ad is inserted or updated. If + * targeting a metro, do not target or exclude the country of the metro. + */ + metros?: Metro[]; + /** + * Postal codes to be targeted. For each postal code only id is required. The other fields are populated automatically when the ad is inserted or updated. + * If targeting a postal code, do not target or exclude the country of the postal code. + */ + postalCodes?: PostalCode[]; + /** + * Regions to be targeted. For each region only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If + * targeting a region, do not target or exclude the country of the region. + */ + regions?: Region[]; + } + interface InventoryItem { + /** Account ID of this inventory item. */ + accountId?: string; + /** + * Ad slots of this inventory item. If this inventory item represents a standalone placement, there will be exactly one ad slot. If this inventory item + * represents a placement group, there will be more than one ad slot, each representing one child placement in that placement group. + */ + adSlots?: AdSlot[]; + /** Advertiser ID of this inventory item. */ + advertiserId?: string; + /** Content category ID of this inventory item. */ + contentCategoryId?: string; + /** Estimated click-through rate of this inventory item. */ + estimatedClickThroughRate?: string; + /** Estimated conversion rate of this inventory item. */ + estimatedConversionRate?: string; + /** ID of this inventory item. */ + id?: string; + /** Whether this inventory item is in plan. */ + inPlan?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#inventoryItem". */ + kind?: string; + /** Information about the most recent modification of this inventory item. */ + lastModifiedInfo?: LastModifiedInfo; + /** + * Name of this inventory item. For standalone inventory items, this is the same name as that of its only ad slot. For group inventory items, this can + * differ from the name of any of its ad slots. + */ + name?: string; + /** Negotiation channel ID of this inventory item. */ + negotiationChannelId?: string; + /** Order ID of this inventory item. */ + orderId?: string; + /** Placement strategy ID of this inventory item. */ + placementStrategyId?: string; + /** Pricing of this inventory item. */ + pricing?: Pricing; + /** Project ID of this inventory item. */ + projectId?: string; + /** RFP ID of this inventory item. */ + rfpId?: string; + /** ID of the site this inventory item is associated with. */ + siteId?: string; + /** Subaccount ID of this inventory item. */ + subaccountId?: string; + /** Type of inventory item. */ + type?: string; + } + interface InventoryItemsListResponse { + /** Inventory item collection */ + inventoryItems?: InventoryItem[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#inventoryItemsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + } + interface KeyValueTargetingExpression { + /** Keyword expression being targeted by the ad. */ + expression?: string; + } + interface LandingPage { + /** + * Whether or not this landing page will be assigned to any ads or creatives that do not have a landing page assigned explicitly. Only one default landing + * page is allowed per campaign. + */ + default?: boolean; + /** ID of this landing page. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#landingPage". */ + kind?: string; + /** + * Name of this landing page. This is a required field. It must be less than 256 characters long, and must be unique among landing pages of the same + * campaign. + */ + name?: string; + /** URL of this landing page. This is a required field. */ + url?: string; + } + interface LandingPagesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#landingPagesListResponse". */ + kind?: string; + /** Landing page collection */ + landingPages?: LandingPage[]; + } + interface Language { + /** Language ID of this language. This is the ID used for targeting and generating reports. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#language". */ + kind?: string; + /** + * Format of language code is an ISO 639 two-letter language code optionally followed by an underscore followed by an ISO 3166 code. Examples are "en" for + * English or "zh_CN" for Simplified Chinese. + */ + languageCode?: string; + /** Name of this language. */ + name?: string; + } + interface LanguageTargeting { + /** + * Languages that this ad targets. For each language only languageId is required. The other fields are populated automatically when the ad is inserted or + * updated. + */ + languages?: Language[]; + } + interface LanguagesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#languagesListResponse". */ + kind?: string; + /** Language collection. */ + languages?: Language[]; + } + interface LastModifiedInfo { + /** Timestamp of the last change in milliseconds since epoch. */ + time?: string; + } + interface ListPopulationClause { + /** Terms of this list population clause. Each clause is made up of list population terms representing constraints and are joined by ORs. */ + terms?: ListPopulationTerm[]; + } + interface ListPopulationRule { + /** Floodlight activity ID associated with this rule. This field can be left blank. */ + floodlightActivityId?: string; + /** Name of floodlight activity associated with this rule. This is a read-only, auto-generated field. */ + floodlightActivityName?: string; + /** + * Clauses that make up this list population rule. Clauses are joined by ANDs, and the clauses themselves are made up of list population terms which are + * joined by ORs. + */ + listPopulationClauses?: ListPopulationClause[]; + } + interface ListPopulationTerm { + /** + * Will be true if the term should check if the user is in the list and false if the term should check if the user is not in the list. This field is only + * relevant when type is set to LIST_MEMBERSHIP_TERM. False by default. + */ + contains?: boolean; + /** + * Whether to negate the comparison result of this term during rule evaluation. This field is only relevant when type is left unset or set to + * CUSTOM_VARIABLE_TERM or REFERRER_TERM. + */ + negation?: boolean; + /** Comparison operator of this term. This field is only relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. */ + operator?: string; + /** ID of the list in question. This field is only relevant when type is set to LIST_MEMBERSHIP_TERM. */ + remarketingListId?: string; + /** + * List population term type determines the applicable fields in this object. If left unset or set to CUSTOM_VARIABLE_TERM, then variableName, + * variableFriendlyName, operator, value, and negation are applicable. If set to LIST_MEMBERSHIP_TERM then remarketingListId and contains are applicable. + * If set to REFERRER_TERM then operator, value, and negation are applicable. + */ + type?: string; + /** Literal to compare the variable to. This field is only relevant when type is left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. */ + value?: string; + /** + * Friendly name of this term's variable. This is a read-only, auto-generated field. This field is only relevant when type is left unset or set to + * CUSTOM_VARIABLE_TERM. + */ + variableFriendlyName?: string; + /** + * Name of the variable (U1, U2, etc.) being compared in this term. This field is only relevant when type is set to null, CUSTOM_VARIABLE_TERM or + * REFERRER_TERM. + */ + variableName?: string; + } + interface ListTargetingExpression { + /** Expression describing which lists are being targeted by the ad. */ + expression?: string; + } + interface LookbackConfiguration { + /** + * Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering + * events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, + * inclusive. + */ + clickDuration?: number; + /** + * Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering + * events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, + * inclusive. + */ + postImpressionActivitiesDuration?: number; + } + interface Metric { + /** The kind of resource this is, in this case dfareporting#metric. */ + kind?: string; + /** The metric name, e.g. dfa:impressions */ + name?: string; + } + interface Metro { + /** Country code of the country to which this metro region belongs. */ + countryCode?: string; + /** DART ID of the country to which this metro region belongs. */ + countryDartId?: string; + /** DART ID of this metro region. */ + dartId?: string; + /** DMA ID of this metro region. This is the ID used for targeting and generating reports, and is equivalent to metro_code. */ + dmaId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#metro". */ + kind?: string; + /** Metro code of this metro region. This is equivalent to dma_id. */ + metroCode?: string; + /** Name of this metro region. */ + name?: string; + } + interface MetrosListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#metrosListResponse". */ + kind?: string; + /** Metro collection. */ + metros?: Metro[]; + } + interface MobileCarrier { + /** Country code of the country to which this mobile carrier belongs. */ + countryCode?: string; + /** DART ID of the country to which this mobile carrier belongs. */ + countryDartId?: string; + /** ID of this mobile carrier. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#mobileCarrier". */ + kind?: string; + /** Name of this mobile carrier. */ + name?: string; + } + interface MobileCarriersListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#mobileCarriersListResponse". */ + kind?: string; + /** Mobile carrier collection. */ + mobileCarriers?: MobileCarrier[]; + } + interface ObjectFilter { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#objectFilter". */ + kind?: string; + /** Applicable when status is ASSIGNED. The user has access to objects with these object IDs. */ + objectIds?: string[]; + /** + * Status of the filter. NONE means the user has access to none of the objects. ALL means the user has access to all objects. ASSIGNED means the user has + * access to the objects with IDs in the objectIds list. + */ + status?: string; + } + interface OffsetPosition { + /** Offset distance from left side of an asset or a window. */ + left?: number; + /** Offset distance from top side of an asset or a window. */ + top?: number; + } + interface OmnitureSettings { + /** Whether placement cost data will be sent to Omniture. This property can be enabled only if omnitureIntegrationEnabled is true. */ + omnitureCostDataEnabled?: boolean; + /** Whether Omniture integration is enabled. This property can be enabled only when the "Advanced Ad Serving" account setting is enabled. */ + omnitureIntegrationEnabled?: boolean; + } + interface OperatingSystem { + /** DART ID of this operating system. This is the ID used for targeting. */ + dartId?: string; + /** Whether this operating system is for desktop. */ + desktop?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystem". */ + kind?: string; + /** Whether this operating system is for mobile. */ + mobile?: boolean; + /** Name of this operating system. */ + name?: string; + } + interface OperatingSystemVersion { + /** ID of this operating system version. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemVersion". */ + kind?: string; + /** Major version (leftmost number) of this operating system version. */ + majorVersion?: string; + /** Minor version (number after the first dot) of this operating system version. */ + minorVersion?: string; + /** Name of this operating system version. */ + name?: string; + /** Operating system of this operating system version. */ + operatingSystem?: OperatingSystem; + } + interface OperatingSystemVersionsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemVersionsListResponse". */ + kind?: string; + /** Operating system version collection. */ + operatingSystemVersions?: OperatingSystemVersion[]; + } + interface OperatingSystemsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemsListResponse". */ + kind?: string; + /** Operating system collection. */ + operatingSystems?: OperatingSystem[]; + } + interface OptimizationActivity { + /** Floodlight activity ID of this optimization activity. This is a required field. */ + floodlightActivityId?: string; + /** Dimension value for the ID of the floodlight activity. This is a read-only, auto-generated field. */ + floodlightActivityIdDimensionValue?: DimensionValue; + /** + * Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization + * activities. Value must be greater than or equal to 1. + */ + weight?: number; + } + interface Order { + /** Account ID of this order. */ + accountId?: string; + /** Advertiser ID of this order. */ + advertiserId?: string; + /** IDs for users that have to approve documents created for this order. */ + approverUserProfileIds?: string[]; + /** Buyer invoice ID associated with this order. */ + buyerInvoiceId?: string; + /** Name of the buyer organization. */ + buyerOrganizationName?: string; + /** Comments in this order. */ + comments?: string; + /** Contacts for this order. */ + contacts?: OrderContact[]; + /** ID of this order. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#order". */ + kind?: string; + /** Information about the most recent modification of this order. */ + lastModifiedInfo?: LastModifiedInfo; + /** Name of this order. */ + name?: string; + /** Notes of this order. */ + notes?: string; + /** ID of the terms and conditions template used in this order. */ + planningTermId?: string; + /** Project ID of this order. */ + projectId?: string; + /** Seller order ID associated with this order. */ + sellerOrderId?: string; + /** Name of the seller organization. */ + sellerOrganizationName?: string; + /** Site IDs this order is associated with. */ + siteId?: string[]; + /** Free-form site names this order is associated with. */ + siteNames?: string[]; + /** Subaccount ID of this order. */ + subaccountId?: string; + /** Terms and conditions of this order. */ + termsAndConditions?: string; + } + interface OrderContact { + /** + * Free-form information about this contact. It could be any information related to this contact in addition to type, title, name, and signature user + * profile ID. + */ + contactInfo?: string; + /** Name of this contact. */ + contactName?: string; + /** Title of this contact. */ + contactTitle?: string; + /** Type of this contact. */ + contactType?: string; + /** ID of the user profile containing the signature that will be embedded into order documents. */ + signatureUserProfileId?: string; + } + interface OrderDocument { + /** Account ID of this order document. */ + accountId?: string; + /** Advertiser ID of this order document. */ + advertiserId?: string; + /** + * The amended order document ID of this order document. An order document can be created by optionally amending another order document so that the change + * history can be preserved. + */ + amendedOrderDocumentId?: string; + /** IDs of users who have approved this order document. */ + approvedByUserProfileIds?: string[]; + /** Whether this order document is cancelled. */ + cancelled?: boolean; + /** Information about the creation of this order document. */ + createdInfo?: LastModifiedInfo; + /** Effective date of this order document. */ + effectiveDate?: string; + /** ID of this order document. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#orderDocument". */ + kind?: string; + /** List of email addresses that received the last sent document. */ + lastSentRecipients?: string[]; + /** Timestamp of the last email sent with this order document. */ + lastSentTime?: string; + /** ID of the order from which this order document is created. */ + orderId?: string; + /** Project ID of this order document. */ + projectId?: string; + /** Whether this order document has been signed. */ + signed?: boolean; + /** Subaccount ID of this order document. */ + subaccountId?: string; + /** Title of this order document. */ + title?: string; + /** Type of this order document */ + type?: string; + } + interface OrderDocumentsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#orderDocumentsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Order document collection */ + orderDocuments?: OrderDocument[]; + } + interface OrdersListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#ordersListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Order collection. */ + orders?: Order[]; + } + interface PathToConversionReportCompatibleFields { + /** Conversion dimensions which are compatible to be selected in the "conversionDimensions" section of the report. */ + conversionDimensions?: Dimension[]; + /** Custom floodlight variables which are compatible to be selected in the "customFloodlightVariables" section of the report. */ + customFloodlightVariables?: Dimension[]; + /** The kind of resource this is, in this case dfareporting#pathToConversionReportCompatibleFields. */ + kind?: string; + /** Metrics which are compatible to be selected in the "metricNames" section of the report. */ + metrics?: Metric[]; + /** Per-interaction dimensions which are compatible to be selected in the "perInteractionDimensions" section of the report. */ + perInteractionDimensions?: Dimension[]; + } + interface Placement { + /** Account ID of this placement. This field can be left blank. */ + accountId?: string; + /** + * Whether this placement opts out of ad blocking. When true, ad blocking is disabled for this placement. When false, the campaign and site settings take + * effect. + */ + adBlockingOptOut?: boolean; + /** Advertiser ID of this placement. This field can be left blank. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Whether this placement is archived. */ + archived?: boolean; + /** Campaign ID of this placement. This field is a required field on insertion. */ + campaignId?: string; + /** Dimension value for the ID of the campaign. This is a read-only, auto-generated field. */ + campaignIdDimensionValue?: DimensionValue; + /** Comments for this placement. */ + comment?: string; + /** + * Placement compatibility. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices or in mobile apps for regular or + * interstitial ads respectively. APP and APP_INTERSTITIAL are no longer allowed for new placement insertions. Instead, use DISPLAY or + * DISPLAY_INTERSTITIAL. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. + */ + compatibility?: string; + /** ID of the content category assigned to this placement. */ + contentCategoryId?: string; + /** Information about the creation of this placement. This is a read-only field. */ + createInfo?: LastModifiedInfo; + /** + * Directory site ID of this placement. On insert, you must set either this field or the siteId field to specify the site associated with this placement. + * This is a required field that is read-only after insertion. + */ + directorySiteId?: string; + /** Dimension value for the ID of the directory site. This is a read-only, auto-generated field. */ + directorySiteIdDimensionValue?: DimensionValue; + /** External ID for this placement. */ + externalId?: string; + /** ID of this placement. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this placement. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Key name of this placement. This is a read-only, auto-generated field. */ + keyName?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#placement". */ + kind?: string; + /** Information about the most recent modification of this placement. This is a read-only field. */ + lastModifiedInfo?: LastModifiedInfo; + /** Lookback window settings for this placement. */ + lookbackConfiguration?: LookbackConfiguration; + /** Name of this placement.This is a required field and must be less than 256 characters long. */ + name?: string; + /** Whether payment was approved for this placement. This is a read-only field relevant only to publisher-paid placements. */ + paymentApproved?: boolean; + /** Payment source for this placement. This is a required field that is read-only after insertion. */ + paymentSource?: string; + /** ID of this placement's group, if applicable. */ + placementGroupId?: string; + /** Dimension value for the ID of the placement group. This is a read-only, auto-generated field. */ + placementGroupIdDimensionValue?: DimensionValue; + /** ID of the placement strategy assigned to this placement. */ + placementStrategyId?: string; + /** Pricing schedule of this placement. This field is required on insertion, specifically subfields startDate, endDate and pricingType. */ + pricingSchedule?: PricingSchedule; + /** + * Whether this placement is the primary placement of a roadblock (placement group). You cannot change this field from true to false. Setting this field + * to true will automatically set the primary field on the original primary placement of the roadblock to false, and it will automatically set the + * roadblock's primaryPlacementId field to the ID of this placement. + */ + primary?: boolean; + /** Information about the last publisher update. This is a read-only field. */ + publisherUpdateInfo?: LastModifiedInfo; + /** + * Site ID associated with this placement. On insert, you must set either this field or the directorySiteId field to specify the site associated with this + * placement. This is a required field that is read-only after insertion. + */ + siteId?: string; + /** Dimension value for the ID of the site. This is a read-only, auto-generated field. */ + siteIdDimensionValue?: DimensionValue; + /** Size associated with this placement. When inserting or updating a placement, only the size ID field is used. This field is required on insertion. */ + size?: Size; + /** Whether creatives assigned to this placement must be SSL-compliant. */ + sslRequired?: boolean; + /** Third-party placement status. */ + status?: string; + /** Subaccount ID of this placement. This field can be left blank. */ + subaccountId?: string; + /** + * Tag formats to generate for this placement. This field is required on insertion. + * Acceptable values are: + * - "PLACEMENT_TAG_STANDARD" + * - "PLACEMENT_TAG_IFRAME_JAVASCRIPT" + * - "PLACEMENT_TAG_IFRAME_ILAYER" + * - "PLACEMENT_TAG_INTERNAL_REDIRECT" + * - "PLACEMENT_TAG_JAVASCRIPT" + * - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT" + * - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT" + * - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" + * - "PLACEMENT_TAG_CLICK_COMMANDS" + * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" + * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3" + * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4" + * - "PLACEMENT_TAG_TRACKING" + * - "PLACEMENT_TAG_TRACKING_IFRAME" + * - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" + */ + tagFormats?: string[]; + /** Tag settings for this placement. */ + tagSetting?: TagSetting; + /** + * Whether Verification and ActiveView are disabled for in-stream video creatives for this placement. The same setting videoActiveViewOptOut exists on the + * site level -- the opt out occurs if either of these settings are true. These settings are distinct from DirectorySites.settings.activeViewOptOut or + * Sites.siteSettings.activeViewOptOut which only apply to display ads. However, Accounts.activeViewOptOut opts out both video traffic, as well as display + * ads, from Verification and ActiveView. + */ + videoActiveViewOptOut?: boolean; + /** A collection of settings which affect video creatives served through this placement. Applicable to placements with IN_STREAM_VIDEO compatibility. */ + videoSettings?: VideoSettings; + /** + * VPAID adapter setting for this placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to this + * placement. + * + * Note: Flash is no longer supported. This field now defaults to HTML5 when the following values are provided: FLASH, BOTH. + */ + vpaidAdapterChoice?: string; + } + interface PlacementAssignment { + /** Whether this placement assignment is active. When true, the placement will be included in the ad's rotation. */ + active?: boolean; + /** ID of the placement to be assigned. This is a required field. */ + placementId?: string; + /** Dimension value for the ID of the placement. This is a read-only, auto-generated field. */ + placementIdDimensionValue?: DimensionValue; + /** Whether the placement to be assigned requires SSL. This is a read-only field that is auto-generated when the ad is inserted or updated. */ + sslRequired?: boolean; + } + interface PlacementGroup { + /** Account ID of this placement group. This is a read-only field that can be left blank. */ + accountId?: string; + /** Advertiser ID of this placement group. This is a required field on insertion. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Whether this placement group is archived. */ + archived?: boolean; + /** Campaign ID of this placement group. This field is required on insertion. */ + campaignId?: string; + /** Dimension value for the ID of the campaign. This is a read-only, auto-generated field. */ + campaignIdDimensionValue?: DimensionValue; + /** IDs of placements which are assigned to this placement group. This is a read-only, auto-generated field. */ + childPlacementIds?: string[]; + /** Comments for this placement group. */ + comment?: string; + /** ID of the content category assigned to this placement group. */ + contentCategoryId?: string; + /** Information about the creation of this placement group. This is a read-only field. */ + createInfo?: LastModifiedInfo; + /** + * Directory site ID associated with this placement group. On insert, you must set either this field or the site_id field to specify the site associated + * with this placement group. This is a required field that is read-only after insertion. + */ + directorySiteId?: string; + /** Dimension value for the ID of the directory site. This is a read-only, auto-generated field. */ + directorySiteIdDimensionValue?: DimensionValue; + /** External ID for this placement. */ + externalId?: string; + /** ID of this placement group. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this placement group. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementGroup". */ + kind?: string; + /** Information about the most recent modification of this placement group. This is a read-only field. */ + lastModifiedInfo?: LastModifiedInfo; + /** Name of this placement group. This is a required field and must be less than 256 characters long. */ + name?: string; + /** + * Type of this placement group. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group + * of placements that not only acts as a single pricing point, but also assumes that all the tags in it will be served at the same time. A roadblock + * requires one of its assigned placements to be marked as primary for reporting. This field is required on insertion. + */ + placementGroupType?: string; + /** ID of the placement strategy assigned to this placement group. */ + placementStrategyId?: string; + /** Pricing schedule of this placement group. This field is required on insertion. */ + pricingSchedule?: PricingSchedule; + /** + * ID of the primary placement, used to calculate the media cost of a roadblock (placement group). Modifying this field will automatically modify the + * primary field on all affected roadblock child placements. + */ + primaryPlacementId?: string; + /** Dimension value for the ID of the primary placement. This is a read-only, auto-generated field. */ + primaryPlacementIdDimensionValue?: DimensionValue; + /** + * Site ID associated with this placement group. On insert, you must set either this field or the directorySiteId field to specify the site associated + * with this placement group. This is a required field that is read-only after insertion. + */ + siteId?: string; + /** Dimension value for the ID of the site. This is a read-only, auto-generated field. */ + siteIdDimensionValue?: DimensionValue; + /** Subaccount ID of this placement group. This is a read-only field that can be left blank. */ + subaccountId?: string; + } + interface PlacementGroupsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementGroupsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Placement group collection. */ + placementGroups?: PlacementGroup[]; + } + interface PlacementStrategiesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementStrategiesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Placement strategy collection. */ + placementStrategies?: PlacementStrategy[]; + } + interface PlacementStrategy { + /** Account ID of this placement strategy.This is a read-only field that can be left blank. */ + accountId?: string; + /** ID of this placement strategy. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementStrategy". */ + kind?: string; + /** + * Name of this placement strategy. This is a required field. It must be less than 256 characters long and unique among placement strategies of the same + * account. + */ + name?: string; + } + interface PlacementTag { + /** Placement ID */ + placementId?: string; + /** Tags generated for this placement. */ + tagDatas?: TagData[]; + } + interface PlacementsGenerateTagsResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementsGenerateTagsResponse". */ + kind?: string; + /** Set of generated tags for the specified placements. */ + placementTags?: PlacementTag[]; + } + interface PlacementsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Placement collection. */ + placements?: Placement[]; + } + interface PlatformType { + /** ID of this platform type. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#platformType". */ + kind?: string; + /** Name of this platform type. */ + name?: string; + } + interface PlatformTypesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#platformTypesListResponse". */ + kind?: string; + /** Platform type collection. */ + platformTypes?: PlatformType[]; + } + interface PopupWindowProperties { + /** Popup dimension for a creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID */ + dimension?: Size; + /** Upper-left corner coordinates of the popup window. Applicable if positionType is COORDINATES. */ + offset?: OffsetPosition; + /** Popup window position either centered or at specific coordinate. */ + positionType?: string; + /** Whether to display the browser address bar. */ + showAddressBar?: boolean; + /** Whether to display the browser menu bar. */ + showMenuBar?: boolean; + /** Whether to display the browser scroll bar. */ + showScrollBar?: boolean; + /** Whether to display the browser status bar. */ + showStatusBar?: boolean; + /** Whether to display the browser tool bar. */ + showToolBar?: boolean; + /** Title of popup window. */ + title?: string; + } + interface PostalCode { + /** Postal code. This is equivalent to the id field. */ + code?: string; + /** Country code of the country to which this postal code belongs. */ + countryCode?: string; + /** DART ID of the country to which this postal code belongs. */ + countryDartId?: string; + /** ID of this postal code. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#postalCode". */ + kind?: string; + } + interface PostalCodesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#postalCodesListResponse". */ + kind?: string; + /** Postal code collection. */ + postalCodes?: PostalCode[]; + } + interface Pricing { + /** Cap cost type of this inventory item. */ + capCostType?: string; + /** End date of this inventory item. */ + endDate?: string; + /** Flights of this inventory item. A flight (a.k.a. pricing period) represents the inventory item pricing information for a specific period of time. */ + flights?: Flight[]; + /** + * Group type of this inventory item if it represents a placement group. Is null otherwise. There are two type of placement groups: + * PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of inventory items that acts as a single pricing point for a group of tags. + * PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory items that not only acts as a single pricing point, but also assumes that all the tags + * in it will be served at the same time. A roadblock requires one of its assigned inventory items to be marked as primary. + */ + groupType?: string; + /** Pricing type of this inventory item. */ + pricingType?: string; + /** Start date of this inventory item. */ + startDate?: string; + } + interface PricingSchedule { + /** Placement cap cost option. */ + capCostOption?: string; + /** Whether cap costs are ignored by ad serving. */ + disregardOverdelivery?: boolean; + /** + * Placement end date. This date must be later than, or the same day as, the placement start date, but not later than the campaign end date. If, for + * example, you set 6/25/2015 as both the start and end dates, the effective placement date is just that day only, 6/25/2015. The hours, minutes, and + * seconds of the end date should not be set, as doing so will result in an error. This field is required on insertion. + */ + endDate?: string; + /** Whether this placement is flighted. If true, pricing periods will be computed automatically. */ + flighted?: boolean; + /** Floodlight activity ID associated with this placement. This field should be set when placement pricing type is set to PRICING_TYPE_CPA. */ + floodlightActivityId?: string; + /** Pricing periods for this placement. */ + pricingPeriods?: PricingSchedulePricingPeriod[]; + /** Placement pricing type. This field is required on insertion. */ + pricingType?: string; + /** + * Placement start date. This date must be later than, or the same day as, the campaign start date. The hours, minutes, and seconds of the start date + * should not be set, as doing so will result in an error. This field is required on insertion. + */ + startDate?: string; + /** Testing start date of this placement. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. */ + testingStartDate?: string; + } + interface PricingSchedulePricingPeriod { + /** + * Pricing period end date. This date must be later than, or the same day as, the pricing period start date, but not later than the placement end date. + * The period end date can be the same date as the period start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective + * pricing period date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an + * error. + */ + endDate?: string; + /** Comments for this pricing period. */ + pricingComment?: string; + /** Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive. */ + rateOrCostNanos?: string; + /** + * Pricing period start date. This date must be later than, or the same day as, the placement start date. The hours, minutes, and seconds of the start + * date should not be set, as doing so will result in an error. + */ + startDate?: string; + /** Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive. */ + units?: string; + } + interface Project { + /** Account ID of this project. */ + accountId?: string; + /** Advertiser ID of this project. */ + advertiserId?: string; + /** Audience age group of this project. */ + audienceAgeGroup?: string; + /** Audience gender of this project. */ + audienceGender?: string; + /** + * Budget of this project in the currency specified by the current account. The value stored in this field represents only the non-fractional amount. For + * example, for USD, the smallest value that can be represented by this field is 1 US dollar. + */ + budget?: string; + /** Client billing code of this project. */ + clientBillingCode?: string; + /** Name of the project client. */ + clientName?: string; + /** End date of the project. */ + endDate?: string; + /** ID of this project. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#project". */ + kind?: string; + /** Information about the most recent modification of this project. */ + lastModifiedInfo?: LastModifiedInfo; + /** Name of this project. */ + name?: string; + /** Overview of this project. */ + overview?: string; + /** Start date of the project. */ + startDate?: string; + /** Subaccount ID of this project. */ + subaccountId?: string; + /** Number of clicks that the advertiser is targeting. */ + targetClicks?: string; + /** Number of conversions that the advertiser is targeting. */ + targetConversions?: string; + /** CPA that the advertiser is targeting. */ + targetCpaNanos?: string; + /** CPC that the advertiser is targeting. */ + targetCpcNanos?: string; + /** vCPM from Active View that the advertiser is targeting. */ + targetCpmActiveViewNanos?: string; + /** CPM that the advertiser is targeting. */ + targetCpmNanos?: string; + /** Number of impressions that the advertiser is targeting. */ + targetImpressions?: string; + } + interface ProjectsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#projectsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Project collection. */ + projects?: Project[]; + } + interface ReachReportCompatibleFields { + /** Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. */ + dimensionFilters?: Dimension[]; + /** Dimensions which are compatible to be selected in the "dimensions" section of the report. */ + dimensions?: Dimension[]; + /** The kind of resource this is, in this case dfareporting#reachReportCompatibleFields. */ + kind?: string; + /** Metrics which are compatible to be selected in the "metricNames" section of the report. */ + metrics?: Metric[]; + /** Metrics which are compatible to be selected as activity metrics to pivot on in the "activities" section of the report. */ + pivotedActivityMetrics?: Metric[]; + /** Metrics which are compatible to be selected in the "reachByFrequencyMetricNames" section of the report. */ + reachByFrequencyMetrics?: Metric[]; + } + interface Recipient { + /** The delivery type for the recipient. */ + deliveryType?: string; + /** The email address of the recipient. */ + email?: string; + /** The kind of resource this is, in this case dfareporting#recipient. */ + kind?: string; + } + interface Region { + /** Country code of the country to which this region belongs. */ + countryCode?: string; + /** DART ID of the country to which this region belongs. */ + countryDartId?: string; + /** DART ID of this region. */ + dartId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#region". */ + kind?: string; + /** Name of this region. */ + name?: string; + /** Region code. */ + regionCode?: string; + } + interface RegionsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#regionsListResponse". */ + kind?: string; + /** Region collection. */ + regions?: Region[]; + } + interface RemarketingList { + /** Account ID of this remarketing list. This is a read-only, auto-generated field that is only returned in GET requests. */ + accountId?: string; + /** Whether this remarketing list is active. */ + active?: boolean; + /** Dimension value for the advertiser ID that owns this remarketing list. This is a required field. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Remarketing list description. */ + description?: string; + /** Remarketing list ID. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#remarketingList". */ + kind?: string; + /** Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive. */ + lifeSpan?: string; + /** Rule used to populate the remarketing list with users. */ + listPopulationRule?: ListPopulationRule; + /** Number of users currently in the list. This is a read-only field. */ + listSize?: string; + /** Product from which this remarketing list was originated. */ + listSource?: string; + /** Name of the remarketing list. This is a required field. Must be no greater than 128 characters long. */ + name?: string; + /** Subaccount ID of this remarketing list. This is a read-only, auto-generated field that is only returned in GET requests. */ + subaccountId?: string; + } + interface RemarketingListShare { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#remarketingListShare". */ + kind?: string; + /** Remarketing list ID. This is a read-only, auto-generated field. */ + remarketingListId?: string; + /** Accounts that the remarketing list is shared with. */ + sharedAccountIds?: string[]; + /** Advertisers that the remarketing list is shared with. */ + sharedAdvertiserIds?: string[]; + } + interface RemarketingListsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#remarketingListsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Remarketing list collection. */ + remarketingLists?: RemarketingList[]; + } + interface Report { + /** The account ID to which this report belongs. */ + accountId?: string; + /** The report criteria for a report of type "STANDARD". */ + criteria?: { + /** Activity group. */ + activities?: Activities; + /** Custom Rich Media Events group. */ + customRichMediaEvents?: CustomRichMediaEvents; + /** The date range for which this report should be run. */ + dateRange?: DateRange; + /** + * The list of filters on which dimensions are filtered. + * Filters for different dimensions are ANDed, filters for the same dimension are grouped together and ORed. + */ + dimensionFilters?: DimensionValue[]; + /** The list of standard dimensions the report should include. */ + dimensions?: SortedDimension[]; + /** The list of names of metrics the report should include. */ + metricNames?: string[]; + }; + /** The report criteria for a report of type "CROSS_DIMENSION_REACH". */ + crossDimensionReachCriteria?: { + /** The list of dimensions the report should include. */ + breakdown?: SortedDimension[]; + /** The date range this report should be run for. */ + dateRange?: DateRange; + /** The dimension option. */ + dimension?: string; + /** The list of filters on which dimensions are filtered. */ + dimensionFilters?: DimensionValue[]; + /** The list of names of metrics the report should include. */ + metricNames?: string[]; + /** The list of names of overlap metrics the report should include. */ + overlapMetricNames?: string[]; + /** Whether the report is pivoted or not. Defaults to true. */ + pivoted?: boolean; + }; + /** The report's email delivery settings. */ + delivery?: { + /** Whether the report should be emailed to the report owner. */ + emailOwner?: boolean; + /** The type of delivery for the owner to receive, if enabled. */ + emailOwnerDeliveryType?: string; + /** The message to be sent with each email. */ + message?: string; + /** The list of recipients to which to email the report. */ + recipients?: Recipient[]; + }; + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The filename used when generating report files for this report. */ + fileName?: string; + /** The report criteria for a report of type "FLOODLIGHT". */ + floodlightCriteria?: { + /** The list of custom rich media events to include. */ + customRichMediaEvents?: DimensionValue[]; + /** The date range this report should be run for. */ + dateRange?: DateRange; + /** + * The list of filters on which dimensions are filtered. + * Filters for different dimensions are ANDed, filters for the same dimension are grouped together and ORed. + */ + dimensionFilters?: DimensionValue[]; + /** The list of dimensions the report should include. */ + dimensions?: SortedDimension[]; + /** + * The floodlight ID for which to show data in this report. All advertisers associated with that ID will automatically be added. The dimension of the + * value needs to be 'dfa:floodlightConfigId'. + */ + floodlightConfigId?: DimensionValue; + /** The list of names of metrics the report should include. */ + metricNames?: string[]; + /** The properties of the report. */ + reportProperties?: { + /** Include conversions that have no cookie, but do have an exposure path. */ + includeAttributedIPConversions?: boolean; + /** + * Include conversions of users with a DoubleClick cookie but without an exposure. That means the user did not click or see an ad from the advertiser + * within the Floodlight group, or that the interaction happened outside the lookback window. + */ + includeUnattributedCookieConversions?: boolean; + /** + * Include conversions that have no associated cookies and no exposures. It’s therefore impossible to know how the user was exposed to your ads during the + * lookback window prior to a conversion. + */ + includeUnattributedIPConversions?: boolean; + }; + }; + /** + * The output format of the report. If not specified, default format is "CSV". Note that the actual format in the completed report file might differ if + * for instance the report's size exceeds the format's capabilities. "CSV" will then be the fallback format. + */ + format?: string; + /** The unique ID identifying this report resource. */ + id?: string; + /** The kind of resource this is, in this case dfareporting#report. */ + kind?: string; + /** The timestamp (in milliseconds since epoch) of when this report was last modified. */ + lastModifiedTime?: string; + /** The name of the report. */ + name?: string; + /** The user profile id of the owner of this report. */ + ownerProfileId?: string; + /** The report criteria for a report of type "PATH_TO_CONVERSION". */ + pathToConversionCriteria?: { + /** The list of 'dfa:activity' values to filter on. */ + activityFilters?: DimensionValue[]; + /** The list of conversion dimensions the report should include. */ + conversionDimensions?: SortedDimension[]; + /** The list of custom floodlight variables the report should include. */ + customFloodlightVariables?: SortedDimension[]; + /** The list of custom rich media events to include. */ + customRichMediaEvents?: DimensionValue[]; + /** The date range this report should be run for. */ + dateRange?: DateRange; + /** + * The floodlight ID for which to show data in this report. All advertisers associated with that ID will automatically be added. The dimension of the + * value needs to be 'dfa:floodlightConfigId'. + */ + floodlightConfigId?: DimensionValue; + /** The list of names of metrics the report should include. */ + metricNames?: string[]; + /** The list of per interaction dimensions the report should include. */ + perInteractionDimensions?: SortedDimension[]; + /** The properties of the report. */ + reportProperties?: { + /** + * DFA checks to see if a click interaction occurred within the specified period of time before a conversion. By default the value is pulled from + * Floodlight or you can manually enter a custom value. Valid values: 1-90. + */ + clicksLookbackWindow?: number; + /** + * DFA checks to see if an impression interaction occurred within the specified period of time before a conversion. By default the value is pulled from + * Floodlight or you can manually enter a custom value. Valid values: 1-90. + */ + impressionsLookbackWindow?: number; + /** Deprecated: has no effect. */ + includeAttributedIPConversions?: boolean; + /** + * Include conversions of users with a DoubleClick cookie but without an exposure. That means the user did not click or see an ad from the advertiser + * within the Floodlight group, or that the interaction happened outside the lookback window. + */ + includeUnattributedCookieConversions?: boolean; + /** + * Include conversions that have no associated cookies and no exposures. It’s therefore impossible to know how the user was exposed to your ads during the + * lookback window prior to a conversion. + */ + includeUnattributedIPConversions?: boolean; + /** + * The maximum number of click interactions to include in the report. Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 + * impressions). If another advertiser in your network is paying for E2C, you can have up to 5 total exposures per report. + */ + maximumClickInteractions?: number; + /** + * The maximum number of click interactions to include in the report. Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 + * impressions). If another advertiser in your network is paying for E2C, you can have up to 5 total exposures per report. + */ + maximumImpressionInteractions?: number; + /** The maximum amount of time that can take place between interactions (clicks or impressions) by the same user. Valid values: 1-90. */ + maximumInteractionGap?: number; + /** Enable pivoting on interaction path. */ + pivotOnInteractionPath?: boolean; + }; + }; + /** The report criteria for a report of type "REACH". */ + reachCriteria?: { + /** Activity group. */ + activities?: Activities; + /** Custom Rich Media Events group. */ + customRichMediaEvents?: CustomRichMediaEvents; + /** The date range this report should be run for. */ + dateRange?: DateRange; + /** + * The list of filters on which dimensions are filtered. + * Filters for different dimensions are ANDed, filters for the same dimension are grouped together and ORed. + */ + dimensionFilters?: DimensionValue[]; + /** The list of dimensions the report should include. */ + dimensions?: SortedDimension[]; + /** + * Whether to enable all reach dimension combinations in the report. Defaults to false. If enabled, the date range of the report should be within the last + * three months. + */ + enableAllDimensionCombinations?: boolean; + /** The list of names of metrics the report should include. */ + metricNames?: string[]; + /** The list of names of Reach By Frequency metrics the report should include. */ + reachByFrequencyMetricNames?: string[]; + }; + /** The report's schedule. Can only be set if the report's 'dateRange' is a relative date range and the relative date range is not "TODAY". */ + schedule?: { + /** Whether the schedule is active or not. Must be set to either true or false. */ + active?: boolean; + /** Defines every how many days, weeks or months the report should be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY". */ + every?: number; + /** The expiration date when the scheduled report stops running. */ + expirationDate?: string; + /** + * The interval for which the report is repeated. Note: + * - "DAILY" also requires field "every" to be set. + * - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be set. + * - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be set. + */ + repeats?: string; + /** List of week days "WEEKLY" on which scheduled reports should run. */ + repeatsOnWeekDays?: string[]; + /** + * Enum to define for "MONTHLY" scheduled reports whether reports should be repeated on the same day of the month as "startDate" or the same day of the + * week of the month. + * Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02), "DAY_OF_MONTH" would run subsequent reports on the 2nd of every Month, and + * "WEEK_OF_MONTH" would run subsequent reports on the first Monday of the month. + */ + runsOnDayOfMonth?: string; + /** Start date of date range for which scheduled reports should be run. */ + startDate?: string; + }; + /** The subaccount ID to which this report belongs if applicable. */ + subAccountId?: string; + /** The type of the report. */ + type?: string; + } + interface ReportCompatibleFields { + /** Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. */ + dimensionFilters?: Dimension[]; + /** Dimensions which are compatible to be selected in the "dimensions" section of the report. */ + dimensions?: Dimension[]; + /** The kind of resource this is, in this case dfareporting#reportCompatibleFields. */ + kind?: string; + /** Metrics which are compatible to be selected in the "metricNames" section of the report. */ + metrics?: Metric[]; + /** Metrics which are compatible to be selected as activity metrics to pivot on in the "activities" section of the report. */ + pivotedActivityMetrics?: Metric[]; + } + interface ReportList { + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The reports returned in this response. */ + items?: Report[]; + /** The kind of list this is, in this case dfareporting#reportList. */ + kind?: string; + /** + * Continuation token used to page through reports. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. + * The page token is only valid for a limited amount of time and should not be persisted. + */ + nextPageToken?: string; + } + interface ReportsConfiguration { + /** + * Whether the exposure to conversion report is enabled. This report shows detailed pathway information on up to 10 of the most recent ad exposures seen + * by a user before converting. + */ + exposureToConversionEnabled?: boolean; + /** Default lookback windows for new advertisers in this account. */ + lookbackConfiguration?: LookbackConfiguration; + /** + * Report generation time zone ID of this account. This is a required field that can only be changed by a superuser. + * Acceptable values are: + * + * - "1" for "America/New_York" + * - "2" for "Europe/London" + * - "3" for "Europe/Paris" + * - "4" for "Africa/Johannesburg" + * - "5" for "Asia/Jerusalem" + * - "6" for "Asia/Shanghai" + * - "7" for "Asia/Hong_Kong" + * - "8" for "Asia/Tokyo" + * - "9" for "Australia/Sydney" + * - "10" for "Asia/Dubai" + * - "11" for "America/Los_Angeles" + * - "12" for "Pacific/Auckland" + * - "13" for "America/Sao_Paulo" + */ + reportGenerationTimeZoneId?: string; + } + interface RichMediaExitOverride { + /** Click-through URL of this rich media exit override. Applicable if the enabled field is set to true. */ + clickThroughUrl?: ClickThroughUrl; + /** Whether to use the clickThroughUrl. If false, the creative-level exit will be used. */ + enabled?: boolean; + /** ID for the override to refer to a specific exit in the creative. */ + exitId?: string; + } + interface Rule { + /** A creativeAssets[].id. This should refer to one of the parent assets in this creative. This is a required field. */ + assetId?: string; + /** A user-friendly name for this rule. This is a required field. */ + name?: string; + /** + * A targeting template ID. The targeting from the targeting template will be used to determine whether this asset should be served. This is a required + * field. + */ + targetingTemplateId?: string; + } + interface Site { + /** Account ID of this site. This is a read-only field that can be left blank. */ + accountId?: string; + /** Whether this site is approved. */ + approved?: boolean; + /** Directory site associated with this site. This is a required field that is read-only after insertion. */ + directorySiteId?: string; + /** Dimension value for the ID of the directory site. This is a read-only, auto-generated field. */ + directorySiteIdDimensionValue?: DimensionValue; + /** ID of this site. This is a read-only, auto-generated field. */ + id?: string; + /** Dimension value for the ID of this site. This is a read-only, auto-generated field. */ + idDimensionValue?: DimensionValue; + /** Key name of this site. This is a read-only, auto-generated field. */ + keyName?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#site". */ + kind?: string; + /** + * Name of this site.This is a required field. Must be less than 128 characters long. If this site is under a subaccount, the name must be unique among + * sites of the same subaccount. Otherwise, this site is a top-level site, and the name must be unique among top-level sites of the same account. + */ + name?: string; + /** Site contacts. */ + siteContacts?: SiteContact[]; + /** Site-wide settings. */ + siteSettings?: SiteSettings; + /** Subaccount ID of this site. This is a read-only field that can be left blank. */ + subaccountId?: string; + } + interface SiteContact { + /** Address of this site contact. */ + address?: string; + /** Site contact type. */ + contactType?: string; + /** Email address of this site contact. This is a required field. */ + email?: string; + /** First name of this site contact. */ + firstName?: string; + /** ID of this site contact. This is a read-only, auto-generated field. */ + id?: string; + /** Last name of this site contact. */ + lastName?: string; + /** Primary phone number of this site contact. */ + phone?: string; + /** Title or designation of this site contact. */ + title?: string; + } + interface SiteSettings { + /** Whether active view creatives are disabled for this site. */ + activeViewOptOut?: boolean; + /** + * Whether this site opts out of ad blocking. When true, ad blocking is disabled for all placements under the site, regardless of the individual placement + * settings. When false, the campaign and placement settings take effect. + */ + adBlockingOptOut?: boolean; + /** Site-wide creative settings. */ + creativeSettings?: CreativeSettings; + /** Whether new cookies are disabled for this site. */ + disableNewCookie?: boolean; + /** Lookback window settings for this site. */ + lookbackConfiguration?: LookbackConfiguration; + /** Configuration settings for dynamic and image floodlight tags. */ + tagSetting?: TagSetting; + /** + * Whether Verification and ActiveView for in-stream video creatives are disabled by default for new placements created under this site. This value will + * be used to populate the placement.videoActiveViewOptOut field, when no value is specified for the new placement. + */ + videoActiveViewOptOutTemplate?: boolean; + /** + * Default VPAID adapter setting for new placements created under this site. This value will be used to populate the placements.vpaidAdapterChoice field, + * when no value is specified for the new placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned + * to the placement. The publisher's specifications will typically determine this setting. For VPAID creatives, the adapter format will match the VPAID + * format (HTML5 VPAID creatives use the HTML5 adapter). + * + * Note: Flash is no longer supported. This field now defaults to HTML5 when the following values are provided: FLASH, BOTH. + */ + vpaidAdapterChoiceTemplate?: string; + } + interface SitesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#sitesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Site collection. */ + sites?: Site[]; + } + interface Size { + /** Height of this size. Acceptable values are 0 to 32767, inclusive. */ + height?: number; + /** IAB standard size. This is a read-only, auto-generated field. */ + iab?: boolean; + /** ID of this size. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#size". */ + kind?: string; + /** Width of this size. Acceptable values are 0 to 32767, inclusive. */ + width?: number; + } + interface SizesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#sizesListResponse". */ + kind?: string; + /** Size collection. */ + sizes?: Size[]; + } + interface SkippableSetting { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#skippableSetting". */ + kind?: string; + /** Amount of time to play videos served to this placement before counting a view. Applicable when skippable is true. */ + progressOffset?: VideoOffset; + /** Amount of time to play videos served to this placement before the skip button should appear. Applicable when skippable is true. */ + skipOffset?: VideoOffset; + /** Whether the user can skip creatives served to this placement. */ + skippable?: boolean; + } + interface SortedDimension { + /** The kind of resource this is, in this case dfareporting#sortedDimension. */ + kind?: string; + /** The name of the dimension. */ + name?: string; + /** An optional sort order for the dimension column. */ + sortOrder?: string; + } + interface Subaccount { + /** ID of the account that contains this subaccount. This is a read-only field that can be left blank. */ + accountId?: string; + /** IDs of the available user role permissions for this subaccount. */ + availablePermissionIds?: string[]; + /** ID of this subaccount. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccount". */ + kind?: string; + /** Name of this subaccount. This is a required field. Must be less than 128 characters long and be unique among subaccounts of the same account. */ + name?: string; + } + interface SubaccountsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccountsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Subaccount collection. */ + subaccounts?: Subaccount[]; + } + interface TagData { + /** Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. */ + adId?: string; + /** Tag string to record a click. */ + clickTag?: string; + /** Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. */ + creativeId?: string; + /** TagData tag format of this tag. */ + format?: string; + /** Tag string for serving an ad. */ + impressionTag?: string; + } + interface TagSetting { + /** + * Additional key-values to be included in tags. Each key-value pair must be of the form key=value, and pairs must be separated by a semicolon (;). Keys + * and values must not contain commas. For example, id=2;color=red is a valid value for this field. + */ + additionalKeyValues?: string; + /** Whether static landing page URLs should be included in the tags. This setting applies only to placements. */ + includeClickThroughUrls?: boolean; + /** Whether click-tracking string should be included in the tags. */ + includeClickTracking?: boolean; + /** + * Option specifying how keywords are embedded in ad tags. This setting can be used to specify whether keyword placeholders are inserted in placement tags + * for this site. Publishers can then add keywords to those placeholders. + */ + keywordOption?: string; + } + interface TagSettings { + /** Whether dynamic floodlight tags are enabled. */ + dynamicTagEnabled?: boolean; + /** Whether image tags are enabled. */ + imageTagEnabled?: boolean; + } + interface TargetWindow { + /** User-entered value. */ + customHtml?: string; + /** Type of browser window for which the backup image of the flash creative can be displayed. */ + targetWindowOption?: string; + } + interface TargetableRemarketingList { + /** Account ID of this remarketing list. This is a read-only, auto-generated field that is only returned in GET requests. */ + accountId?: string; + /** Whether this targetable remarketing list is active. */ + active?: boolean; + /** Dimension value for the advertiser ID that owns this targetable remarketing list. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. */ + advertiserIdDimensionValue?: DimensionValue; + /** Targetable remarketing list description. */ + description?: string; + /** Targetable remarketing list ID. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#targetableRemarketingList". */ + kind?: string; + /** Number of days that a user should remain in the targetable remarketing list without an impression. */ + lifeSpan?: string; + /** Number of users currently in the list. This is a read-only field. */ + listSize?: string; + /** Product from which this targetable remarketing list was originated. */ + listSource?: string; + /** Name of the targetable remarketing list. Is no greater than 128 characters long. */ + name?: string; + /** Subaccount ID of this remarketing list. This is a read-only, auto-generated field that is only returned in GET requests. */ + subaccountId?: string; + } + interface TargetableRemarketingListsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#targetableRemarketingListsListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Targetable remarketing list collection. */ + targetableRemarketingLists?: TargetableRemarketingList[]; + } + interface TargetingTemplate { + /** Account ID of this targeting template. This field, if left unset, will be auto-generated on insert and is read-only after insert. */ + accountId?: string; + /** Advertiser ID of this targeting template. This is a required field on insert and is read-only after insert. */ + advertiserId?: string; + /** Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. */ + advertiserIdDimensionValue?: DimensionValue; + /** Time and day targeting criteria. */ + dayPartTargeting?: DayPartTargeting; + /** Geographical targeting criteria. */ + geoTargeting?: GeoTargeting; + /** ID of this targeting template. This is a read-only, auto-generated field. */ + id?: string; + /** Key-value targeting criteria. */ + keyValueTargetingExpression?: KeyValueTargetingExpression; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#targetingTemplate". */ + kind?: string; + /** Language targeting criteria. */ + languageTargeting?: LanguageTargeting; + /** Remarketing list targeting criteria. */ + listTargetingExpression?: ListTargetingExpression; + /** Name of this targeting template. This field is required. It must be less than 256 characters long and unique within an advertiser. */ + name?: string; + /** Subaccount ID of this targeting template. This field, if left unset, will be auto-generated on insert and is read-only after insert. */ + subaccountId?: string; + /** Technology platform targeting criteria. */ + technologyTargeting?: TechnologyTargeting; + } + interface TargetingTemplatesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#targetingTemplatesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** Targeting template collection. */ + targetingTemplates?: TargetingTemplate[]; + } + interface TechnologyTargeting { + /** + * Browsers that this ad targets. For each browser either set browserVersionId or dartId along with the version numbers. If both are specified, only + * browserVersionId will be used. The other fields are populated automatically when the ad is inserted or updated. + */ + browsers?: Browser[]; + /** + * Connection types that this ad targets. For each connection type only id is required. The other fields are populated automatically when the ad is + * inserted or updated. + */ + connectionTypes?: ConnectionType[]; + /** + * Mobile carriers that this ad targets. For each mobile carrier only id is required, and the other fields are populated automatically when the ad is + * inserted or updated. If targeting a mobile carrier, do not set targeting for any zip codes. + */ + mobileCarriers?: MobileCarrier[]; + /** + * Operating system versions that this ad targets. To target all versions, use operatingSystems. For each operating system version, only id is required. + * The other fields are populated automatically when the ad is inserted or updated. If targeting an operating system version, do not set targeting for the + * corresponding operating system in operatingSystems. + */ + operatingSystemVersions?: OperatingSystemVersion[]; + /** + * Operating systems that this ad targets. To target specific versions, use operatingSystemVersions. For each operating system only dartId is required. + * The other fields are populated automatically when the ad is inserted or updated. If targeting an operating system, do not set targeting for operating + * system versions for the same operating system. + */ + operatingSystems?: OperatingSystem[]; + /** + * Platform types that this ad targets. For example, desktop, mobile, or tablet. For each platform type, only id is required, and the other fields are + * populated automatically when the ad is inserted or updated. + */ + platformTypes?: PlatformType[]; + } + interface ThirdPartyAuthenticationToken { + /** Name of the third-party authentication token. */ + name?: string; + /** Value of the third-party authentication token. This is a read-only, auto-generated field. */ + value?: string; + } + interface ThirdPartyTrackingUrl { + /** Third-party URL type for in-stream video creatives. */ + thirdPartyUrlType?: string; + /** URL for the specified third-party URL type. */ + url?: string; + } + interface TranscodeSetting { + /** Whitelist of video formats to be served to this placement. Set this list to null or empty to serve all video formats. */ + enabledVideoFormats?: number[]; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#transcodeSetting". */ + kind?: string; + } + interface UniversalAdId { + /** Registry used for the Ad ID value. */ + registry?: string; + /** + * ID value for this creative. Only alphanumeric characters and the following symbols are valid: "_/\-". Maximum length is 64 characters. Read only when + * registry is DCM. + */ + value?: string; + } + interface UserDefinedVariableConfiguration { + /** Data type for the variable. This is a required field. */ + dataType?: string; + /** + * User-friendly name for the variable which will appear in reports. This is a required field, must be less than 64 characters long, and cannot contain + * the following characters: ""<>". + */ + reportName?: string; + /** Variable name in the tag. This is a required field. */ + variableType?: string; + } + interface UserProfile { + /** The account ID to which this profile belongs. */ + accountId?: string; + /** The account name this profile belongs to. */ + accountName?: string; + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The kind of resource this is, in this case dfareporting#userProfile. */ + kind?: string; + /** The unique ID of the user profile. */ + profileId?: string; + /** The sub account ID this profile belongs to if applicable. */ + subAccountId?: string; + /** The sub account name this profile belongs to if applicable. */ + subAccountName?: string; + /** The user name. */ + userName?: string; + } + interface UserProfileList { + /** The eTag of this response for caching purposes. */ + etag?: string; + /** The user profiles returned in this response. */ + items?: UserProfile[]; + /** The kind of list this is, in this case dfareporting#userProfileList. */ + kind?: string; + } + interface UserRole { + /** Account ID of this user role. This is a read-only field that can be left blank. */ + accountId?: string; + /** + * Whether this is a default user role. Default user roles are created by the system for the account/subaccount and cannot be modified or deleted. Each + * default user role comes with a basic set of preassigned permissions. + */ + defaultUserRole?: boolean; + /** ID of this user role. This is a read-only, auto-generated field. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRole". */ + kind?: string; + /** + * Name of this user role. This is a required field. Must be less than 256 characters long. If this user role is under a subaccount, the name must be + * unique among sites of the same subaccount. Otherwise, this user role is a top-level user role, and the name must be unique among top-level user roles + * of the same account. + */ + name?: string; + /** ID of the user role that this user role is based on or copied from. This is a required field. */ + parentUserRoleId?: string; + /** List of permissions associated with this user role. */ + permissions?: UserRolePermission[]; + /** Subaccount ID of this user role. This is a read-only field that can be left blank. */ + subaccountId?: string; + } + interface UserRolePermission { + /** Levels of availability for a user role permission. */ + availability?: string; + /** ID of this user role permission. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermission". */ + kind?: string; + /** Name of this user role permission. */ + name?: string; + /** ID of the permission group that this user role permission belongs to. */ + permissionGroupId?: string; + } + interface UserRolePermissionGroup { + /** ID of this user role permission. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionGroup". */ + kind?: string; + /** Name of this user role permission group. */ + name?: string; + } + interface UserRolePermissionGroupsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionGroupsListResponse". */ + kind?: string; + /** User role permission group collection. */ + userRolePermissionGroups?: UserRolePermissionGroup[]; + } + interface UserRolePermissionsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionsListResponse". */ + kind?: string; + /** User role permission collection. */ + userRolePermissions?: UserRolePermission[]; + } + interface UserRolesListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolesListResponse". */ + kind?: string; + /** Pagination token to be used for the next list operation. */ + nextPageToken?: string; + /** User role collection. */ + userRoles?: UserRole[]; + } + interface VideoFormat { + /** File type of the video format. */ + fileType?: string; + /** ID of the video format. */ + id?: number; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#videoFormat". */ + kind?: string; + /** The resolution of this video format. */ + resolution?: Size; + /** The target bit rate of this video format. */ + targetBitRate?: number; + } + interface VideoFormatsListResponse { + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#videoFormatsListResponse". */ + kind?: string; + /** Video format collection. */ + videoFormats?: VideoFormat[]; + } + interface VideoOffset { + /** Duration, as a percentage of video duration. Do not set when offsetSeconds is set. Acceptable values are 0 to 100, inclusive. */ + offsetPercentage?: number; + /** Duration, in seconds. Do not set when offsetPercentage is set. Acceptable values are 0 to 86399, inclusive. */ + offsetSeconds?: number; + } + interface VideoSettings { + /** Settings for the companion creatives of video creatives served to this placement. */ + companionSettings?: CompanionSetting; + /** Identifies what kind of resource this is. Value: the fixed string "dfareporting#videoSettings". */ + kind?: string; + /** + * Settings for the skippability of video creatives served to this placement. If this object is provided, the creative-level skippable settings will be + * overridden. + */ + skippableSettings?: SkippableSetting; + /** + * Settings for the transcodes of video creatives served to this placement. If this object is provided, the creative-level transcode settings will be + * overridden. + */ + transcodeSettings?: TranscodeSetting; + } + interface AccountActiveAdSummariesResource { + /** Gets the account's active ad summary by account ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Account ID. */ + summaryAccountId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountPermissionGroupsResource { + /** Gets one account permission group by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Account permission group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of account permission groups. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountPermissionsResource { + /** Gets one account permission by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Account permission ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of account permissions. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountUserProfilesResource { + /** Gets one account user profile by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** User profile ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new account user profile. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of account user profiles, possibly filtered. This method supports paging. */ + list(request: { + /** Select only active user profiles. */ + active?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only user profiles with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "user profile*2015" will return objects with names like + * "user profile June 2015", "user profile April 2015", or simply "user profile 2015". Most of the searches also add wildcards implicitly at the start and + * the end of the search string. For example, a search string of "user profile" will match objects with name "my user profile", "user profile 2015", or + * simply "user profile". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only user profiles with the specified subaccount ID. */ + subaccountId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Select only user profiles with the specified user role ID. */ + userRoleId?: string; + }): Request; + /** Updates an existing account user profile. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** User profile ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing account user profile. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AccountsResource { + /** Gets one account by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Account ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of accounts, possibly filtered. This method supports paging. */ + list(request: { + /** Select only active accounts. Don't set this field to select both active and non-active accounts. */ + active?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only accounts with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "account*2015" will return objects with names like "account June + * 2015", "account April 2015", or simply "account 2015". Most of the searches also add wildcards implicitly at the start and the end of the search + * string. For example, a search string of "account" will match objects with name "my account", "account 2015", or simply "account". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing account. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Account ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing account. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdsResource { + /** Gets one ad by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Ad ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new ad. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of ads, possibly filtered. This method supports paging. */ + list(request: { + /** Select only active ads. */ + active?: boolean; + /** Select only ads with this advertiser ID. */ + advertiserId?: string; + /** Data format for the response. */ + alt?: string; + /** Select only archived ads. */ + archived?: boolean; + /** Select only ads with these audience segment IDs. */ + audienceSegmentIds?: string; + /** Select only ads with these campaign IDs. */ + campaignIds?: string; + /** + * Select default ads with the specified compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering + * either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. + * IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard. + */ + compatibility?: string; + /** Select only ads with these creative IDs assigned. */ + creativeIds?: string; + /** Select only ads with these creative optimization configuration IDs. */ + creativeOptimizationConfigurationIds?: string; + /** + * Select only dynamic click trackers. Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, select static + * click trackers. Leave unset to select both. + */ + dynamicClickTracker?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only ads with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Select only ads with these landing page IDs. */ + landingPageIds?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Select only ads with this event tag override ID. */ + overriddenEventTagId?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Select only ads with these placement IDs assigned. */ + placementIds?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Select only ads whose list targeting expression use these remarketing list IDs. */ + remarketingListIds?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "ad*2015" will return objects with names like "ad June 2015", "ad + * April 2015", or simply "ad 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a + * search string of "ad" will match objects with name "my ad", "ad 2015", or simply "ad". + */ + searchString?: string; + /** Select only ads with these size IDs. */ + sizeIds?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only ads that are SSL-compliant. */ + sslCompliant?: boolean; + /** Select only ads that require SSL. */ + sslRequired?: boolean; + /** Select only ads with these types. */ + type?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing ad. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Ad ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing ad. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdvertiserGroupsResource { + /** Deletes an existing advertiser group. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Advertiser group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one advertiser group by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Advertiser group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new advertiser group. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of advertiser groups, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only advertiser groups with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser + * group June 2015", "advertiser group April 2015", or simply "advertiser group 2015". Most of the searches also add wildcards implicitly at the start and + * the end of the search string. For example, a search string of "advertisergroup" will match objects with name "my advertisergroup", "advertisergroup + * 2015", or simply "advertisergroup". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing advertiser group. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Advertiser group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing advertiser group. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface AdvertisersResource { + /** Gets one advertiser by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Advertiser ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new advertiser. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of advertisers, possibly filtered. This method supports paging. */ + list(request: { + /** Select only advertisers with these advertiser group IDs. */ + advertiserGroupIds?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only advertisers with these floodlight configuration IDs. */ + floodlightConfigurationIds?: string; + /** Select only advertisers with these IDs. */ + ids?: string; + /** Select only advertisers which do not belong to any advertiser group. */ + includeAdvertisersWithoutGroupsOnly?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Select only advertisers which use another advertiser's floodlight configuration. */ + onlyParent?: boolean; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser + * June 2015", "advertiser April 2015", or simply "advertiser 2015". Most of the searches also add wildcards implicitly at the start and the end of the + * search string. For example, a search string of "advertiser" will match objects with name "my advertiser", "advertiser 2015", or simply "advertiser". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only advertisers with the specified status. */ + status?: string; + /** Select only advertisers with these subaccount IDs. */ + subaccountId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing advertiser. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Advertiser ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing advertiser. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface BrowsersResource { + /** Retrieves a list of browsers. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CampaignCreativeAssociationsResource { + /** + * Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a + * default ad does not exist already. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Campaign ID in this association. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of creative IDs associated with the specified campaign. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Campaign ID in this association. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CampaignsResource { + /** Gets one campaign by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Campaign ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new campaign. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Default landing page name for this new campaign. Must be less than 256 characters long. */ + defaultLandingPageName: string; + /** Default landing page URL for this new campaign. */ + defaultLandingPageUrl: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of campaigns, possibly filtered. This method supports paging. */ + list(request: { + /** Select only campaigns whose advertisers belong to these advertiser groups. */ + advertiserGroupIds?: string; + /** Select only campaigns that belong to these advertisers. */ + advertiserIds?: string; + /** Data format for the response. */ + alt?: string; + /** Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns. */ + archived?: boolean; + /** Select only campaigns that have at least one optimization activity. */ + atLeastOneOptimizationActivity?: boolean; + /** Exclude campaigns with these IDs. */ + excludedIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only campaigns with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Select only campaigns that have overridden this event tag ID. */ + overriddenEventTagId?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns with names like "campaign + * June 2015", "campaign April 2015", or simply "campaign 2015". Most of the searches also add wildcards implicitly at the start and the end of the search + * string. For example, a search string of "campaign" will match campaigns with name "my campaign", "campaign 2015", or simply "campaign". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only campaigns that belong to this subaccount. */ + subaccountId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing campaign. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Campaign ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing campaign. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ChangeLogsResource { + /** Gets one change log by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Change log ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of change logs. This method supports paging. */ + list(request: { + /** Select only change logs with the specified action. */ + action?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only change logs with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Select only change logs whose change time is before the specified maxChangeTime.The time should be formatted as an RFC3339 date/time string. For + * example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, + * month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. + */ + maxChangeTime?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** + * Select only change logs whose change time is before the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For + * example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, + * month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. + */ + minChangeTime?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Select only change logs with these object IDs. */ + objectIds?: string; + /** Select only change logs with the specified object type. */ + objectType?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Select only change logs whose object ID, user name, old or new values match the search string. */ + searchString?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Select only change logs with these user profile IDs. */ + userProfileIds?: string; + }): Request; + } + interface CitiesResource { + /** Retrieves a list of cities, possibly filtered. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Select only cities from these countries. */ + countryDartIds?: string; + /** Select only cities with these DART IDs. */ + dartIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Select only cities with names starting with this prefix. */ + namePrefix?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Select only cities from these regions. */ + regionDartIds?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ConnectionTypesResource { + /** Gets one connection type by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Connection type ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of connection types. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ContentCategoriesResource { + /** Deletes an existing content category. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Content category ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one content category by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Content category ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new content category. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of content categories, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only content categories with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "contentcategory*2015" will return objects with names like + * "contentcategory June 2015", "contentcategory April 2015", or simply "contentcategory 2015". Most of the searches also add wildcards implicitly at the + * start and the end of the search string. For example, a search string of "contentcategory" will match objects with name "my contentcategory", + * "contentcategory 2015", or simply "contentcategory". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing content category. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Content category ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing content category. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ConversionsResource { + /** Inserts conversions. */ + batchinsert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates existing conversions. */ + batchupdate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CountriesResource { + /** Gets one country by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Country DART ID. */ + dartId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of countries. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CreativeAssetsResource { + /** Inserts a new creative asset. */ + insert(request: { + /** Advertiser ID of this creative. This is a required field. */ + advertiserId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CreativeFieldValuesResource { + /** Deletes an existing creative field value. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Creative field ID for this creative field value. */ + creativeFieldId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative Field Value ID */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one creative field value by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Creative field ID for this creative field value. */ + creativeFieldId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative Field Value ID */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new creative field value. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Creative field ID for this creative field value. */ + creativeFieldId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of creative field values, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Creative field ID for this creative field value. */ + creativeFieldId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only creative field values with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed. */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative field value. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Creative field ID for this creative field value. */ + creativeFieldId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative Field Value ID */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative field value. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Creative field ID for this creative field value. */ + creativeFieldId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CreativeFieldsResource { + /** Deletes an existing creative field. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative Field ID */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one creative field by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative Field ID */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new creative field. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of creative fields, possibly filtered. This method supports paging. */ + list(request: { + /** Select only creative fields that belong to these advertisers. */ + advertiserIds?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only creative fields with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for creative fields by name or ID. Wildcards (*) are allowed. For example, "creativefield*2015" will return creative fields with names + * like "creativefield June 2015", "creativefield April 2015", or simply "creativefield 2015". Most of the searches also add wild-cards implicitly at the + * start and the end of the search string. For example, a search string of "creativefield" will match creative fields with the name "my creativefield", + * "creativefield 2015", or simply "creativefield". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative field. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative Field ID */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative field. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CreativeGroupsResource { + /** Gets one creative group by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new creative group. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of creative groups, possibly filtered. This method supports paging. */ + list(request: { + /** Select only creative groups that belong to these advertisers. */ + advertiserIds?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only creative groups that belong to this subgroup. */ + groupNumber?: number; + /** Select only creative groups with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for creative groups by name or ID. Wildcards (*) are allowed. For example, "creativegroup*2015" will return creative groups with names + * like "creativegroup June 2015", "creativegroup April 2015", or simply "creativegroup 2015". Most of the searches also add wild-cards implicitly at the + * start and the end of the search string. For example, a search string of "creativegroup" will match creative groups with the name "my creativegroup", + * "creativegroup 2015", or simply "creativegroup". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative group. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative group. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CreativesResource { + /** Gets one creative by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new creative. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of creatives, possibly filtered. This method supports paging. */ + list(request: { + /** Select only active creatives. Leave blank to select active and inactive creatives. */ + active?: boolean; + /** Select only creatives with this advertiser ID. */ + advertiserId?: string; + /** Data format for the response. */ + alt?: string; + /** Select only archived creatives. Leave blank to select archived and unarchived creatives. */ + archived?: boolean; + /** Select only creatives with this campaign ID. */ + campaignId?: string; + /** Select only in-stream video creatives with these companion IDs. */ + companionCreativeIds?: string; + /** Select only creatives with these creative field IDs. */ + creativeFieldIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only creatives with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Select only creatives with these rendering IDs. */ + renderingIds?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "creative*2015" will return objects with names like "creative June + * 2015", "creative April 2015", or simply "creative 2015". Most of the searches also add wildcards implicitly at the start and the end of the search + * string. For example, a search string of "creative" will match objects with name "my creative", "creative 2015", or simply "creative". + */ + searchString?: string; + /** Select only creatives with these size IDs. */ + sizeIds?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only creatives corresponding to this Studio creative ID. */ + studioCreativeId?: string; + /** Select only creatives with these creative types. */ + types?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Creative ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing creative. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DimensionValuesResource { + /** Retrieves list of report dimension values for a list of filters. */ + query(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DirectorySiteContactsResource { + /** Gets one directory site contact by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Directory site contact ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of directory site contacts, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Select only directory site contacts with these directory site IDs. This is a required field. */ + directorySiteIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only directory site contacts with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "directory site contact*2015" will return objects with names + * like "directory site contact June 2015", "directory site contact April 2015", or simply "directory site contact 2015". Most of the searches also add + * wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site contact" will match objects with + * name "my directory site contact", "directory site contact 2015", or simply "directory site contact". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DirectorySitesResource { + /** Gets one directory site by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Directory site ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new directory site. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of directory sites, possibly filtered. This method supports paging. */ + list(request: { + /** This search filter is no longer supported and will have no effect on the results returned. */ + acceptsInStreamVideoPlacements?: boolean; + /** This search filter is no longer supported and will have no effect on the results returned. */ + acceptsInterstitialPlacements?: boolean; + /** Select only directory sites that accept publisher paid placements. This field can be left blank. */ + acceptsPublisherPaidPlacements?: boolean; + /** Select only active directory sites. Leave blank to retrieve both active and inactive directory sites. */ + active?: boolean; + /** Data format for the response. */ + alt?: string; + /** Select only directory sites with this country ID. */ + countryId?: string; + /** Select only directory sites with this DFP network code. */ + dfpNetworkCode?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only directory sites with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Select only directory sites with this parent ID. */ + parentId?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like + * "directory site June 2015", "directory site April 2015", or simply "directory site 2015". Most of the searches also add wildcards implicitly at the + * start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory + * site 2015" or simply, "directory site". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DynamicTargetingKeysResource { + /** Deletes an existing dynamic targeting key. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long and cannot contain commas. All characters are + * converted to lowercase. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** ID of the object of this dynamic targeting key. This is a required field. */ + objectId: string; + /** Type of the object of this dynamic targeting key. This is a required field. */ + objectType: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or + * placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement. + */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of dynamic targeting keys. */ + list(request: { + /** Select only dynamic targeting keys whose object has this advertiser ID. */ + advertiserId?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Select only dynamic targeting keys exactly matching these names. */ + names?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Select only dynamic targeting keys with this object ID. */ + objectId?: string; + /** Select only dynamic targeting keys with this object type. */ + objectType?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface EventTagsResource { + /** Deletes an existing event tag. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Event tag ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one event tag by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Event tag ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new event tag. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of event tags, possibly filtered. */ + list(request: { + /** Select only event tags that belong to this ad. */ + adId?: string; + /** Select only event tags that belong to this advertiser. */ + advertiserId?: string; + /** Data format for the response. */ + alt?: string; + /** Select only event tags that belong to this campaign. */ + campaignId?: string; + /** + * Examine only the specified campaign or advertiser's event tags for matching selector criteria. When set to false, the parent advertiser and parent + * campaign of the specified ad or campaign is examined as well. In addition, when set to false, the status field is examined as well, along with the + * enabledByDefault field. This parameter can not be set to true when adId is specified as ads do not define their own even tags. + */ + definitionsOnly?: boolean; + /** + * Select only enabled event tags. What is considered enabled or disabled depends on the definitionsOnly parameter. When definitionsOnly is set to true, + * only the specified advertiser or campaign's event tags' enabledByDefault field is examined. When definitionsOnly is set to false, the specified ad or + * specified campaign's parent advertiser's or parent campaign's event tags' enabledByDefault and status fields are examined as well. + */ + enabled?: boolean; + /** + * Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party + * JavaScript URL, or a third-party click-through URL for either impression or click tracking. + */ + eventTagTypes?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only event tags with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "eventtag*2015" will return objects with names like "eventtag June + * 2015", "eventtag April 2015", or simply "eventtag 2015". Most of the searches also add wildcards implicitly at the start and the end of the search + * string. For example, a search string of "eventtag" will match objects with name "my eventtag", "eventtag 2015", or simply "eventtag". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing event tag. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Event tag ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing event tag. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface FilesResource { + /** Retrieves a report file by its report ID and file ID. This method supports media download. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the report file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the report. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists files for a user profile. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The scope that defines which results are returned. */ + scope?: string; + /** The field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface FloodlightActivitiesResource { + /** Deletes an existing floodlight activity. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight activity ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Generates a tag for a floodlight activity. */ + generatetag(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight activity ID for which we want to generate a tag. */ + floodlightActivityId?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one floodlight activity by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight activity ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new floodlight activity. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of floodlight activities, possibly filtered. This method supports paging. */ + list(request: { + /** + * Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty + * result. + */ + advertiserId?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only floodlight activities with the specified floodlight activity group IDs. */ + floodlightActivityGroupIds?: string; + /** Select only floodlight activities with the specified floodlight activity group name. */ + floodlightActivityGroupName?: string; + /** Select only floodlight activities with the specified floodlight activity group tag string. */ + floodlightActivityGroupTagString?: string; + /** Select only floodlight activities with the specified floodlight activity group type. */ + floodlightActivityGroupType?: string; + /** + * Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId + * for a non-empty result. + */ + floodlightConfigurationId?: string; + /** Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivity*2015" will return objects with names like + * "floodlightactivity June 2015", "floodlightactivity April 2015", or simply "floodlightactivity 2015". Most of the searches also add wildcards + * implicitly at the start and the end of the search string. For example, a search string of "floodlightactivity" will match objects with name "my + * floodlightactivity activity", "floodlightactivity 2015", or simply "floodlightactivity". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only floodlight activities with the specified tag string. */ + tagString?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing floodlight activity. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight activity ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing floodlight activity. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface FloodlightActivityGroupsResource { + /** Gets one floodlight activity group by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight activity Group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new floodlight activity group. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging. */ + list(request: { + /** + * Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty + * result. + */ + advertiserId?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId + * for a non-empty result. + */ + floodlightConfigurationId?: string; + /** Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like + * "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup 2015". Most of the searches also add + * wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with + * name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply "floodlightactivitygroup". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only floodlight activity groups with the specified floodlight activity group type. */ + type?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing floodlight activity group. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight activity Group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing floodlight activity group. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface FloodlightConfigurationsResource { + /** Gets one floodlight configuration by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight configuration ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of floodlight configurations, possibly filtered. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing floodlight configuration. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Floodlight configuration ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing floodlight configuration. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface InventoryItemsResource { + /** Gets one inventory item by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Inventory item ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** Project ID for order documents. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of inventory items, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only inventory items with these IDs. */ + ids?: string; + /** Select only inventory items that are in plan. */ + inPlan?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Select only inventory items that belong to specified orders. */ + orderId?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** Project ID for order documents. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Select only inventory items that are associated with these sites. */ + siteId?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only inventory items with this type. */ + type?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface LandingPagesResource { + /** Deletes an existing campaign landing page. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Landing page campaign ID. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Landing page ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one campaign landing page by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Landing page campaign ID. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Landing page ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new landing page for the specified campaign. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Landing page campaign ID. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves the list of landing pages for the specified campaign. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Landing page campaign ID. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing campaign landing page. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Landing page campaign ID. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Landing page ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing campaign landing page. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Landing page campaign ID. */ + campaignId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface LanguagesResource { + /** Retrieves a list of languages. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MetrosResource { + /** Retrieves a list of metros. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface MobileCarriersResource { + /** Gets one mobile carrier by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Mobile carrier ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of mobile carriers. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface OperatingSystemVersionsResource { + /** Gets one operating system version by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Operating system version ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of operating system versions. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface OperatingSystemsResource { + /** Gets one operating system by DART ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Operating system DART ID. */ + dartId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of operating systems. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface OrderDocumentsResource { + /** Gets one order document by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Order document ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** Project ID for order documents. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of order documents, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Select only order documents that have been approved by at least one user. */ + approved?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only order documents with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Select only order documents for specified orders. */ + orderId?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** Project ID for order documents. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for order documents by name or ID. Wildcards (*) are allowed. For example, "orderdocument*2015" will return order documents with names + * like "orderdocument June 2015", "orderdocument April 2015", or simply "orderdocument 2015". Most of the searches also add wildcards implicitly at the + * start and the end of the search string. For example, a search string of "orderdocument" will match order documents with name "my orderdocument", + * "orderdocument 2015", or simply "orderdocument". + */ + searchString?: string; + /** Select only order documents that are associated with these sites. */ + siteId?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface OrdersResource { + /** Gets one order by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Order ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** Project ID for orders. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of orders, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only orders with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** Project ID for orders. */ + projectId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for orders by name or ID. Wildcards (*) are allowed. For example, "order*2015" will return orders with names like "order June 2015", + * "order April 2015", or simply "order 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For + * example, a search string of "order" will match orders with name "my order", "order 2015", or simply "order". + */ + searchString?: string; + /** Select only orders that are associated with these site IDs. */ + siteId?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PlacementGroupsResource { + /** Gets one placement group by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Placement group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new placement group. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of placement groups, possibly filtered. This method supports paging. */ + list(request: { + /** Select only placement groups that belong to these advertisers. */ + advertiserIds?: string; + /** Data format for the response. */ + alt?: string; + /** Select only archived placements. Don't set this field to select both archived and non-archived placements. */ + archived?: boolean; + /** Select only placement groups that belong to these campaigns. */ + campaignIds?: string; + /** Select only placement groups that are associated with these content categories. */ + contentCategoryIds?: string; + /** Select only placement groups that are associated with these directory sites. */ + directorySiteIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only placement groups with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as "yyyy-MM-dd". */ + maxEndDate?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as "yyyy-MM-dd". */ + maxStartDate?: string; + /** Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as "yyyy-MM-dd". */ + minEndDate?: string; + /** Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as "yyyy-MM-dd". */ + minStartDate?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** + * Select only placement groups belonging with this group type. A package is a simple group of placements that acts as a single pricing point for a group + * of tags. A roadblock is a group of placements that not only acts as a single pricing point but also assumes that all the tags in it will be served at + * the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting. + */ + placementGroupType?: string; + /** Select only placement groups that are associated with these placement strategies. */ + placementStrategyIds?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Select only placement groups with these pricing types. */ + pricingTypes?: string; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for placement groups by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placement groups with names + * like "placement group June 2015", "placement group May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the + * start and the end of the search string. For example, a search string of "placementgroup" will match placement groups with name "my placementgroup", + * "placementgroup 2015", or simply "placementgroup". + */ + searchString?: string; + /** Select only placement groups that are associated with these sites. */ + siteIds?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing placement group. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Placement group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing placement group. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PlacementStrategiesResource { + /** Deletes an existing placement strategy. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Placement strategy ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one placement strategy by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Placement strategy ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new placement strategy. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of placement strategies, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only placement strategies with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "placementstrategy*2015" will return objects with names like + * "placementstrategy June 2015", "placementstrategy April 2015", or simply "placementstrategy 2015". Most of the searches also add wildcards implicitly + * at the start and the end of the search string. For example, a search string of "placementstrategy" will match objects with name "my placementstrategy", + * "placementstrategy 2015", or simply "placementstrategy". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing placement strategy. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Placement strategy ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing placement strategy. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PlacementsResource { + /** Generates tags for a placement. */ + generatetags(request: { + /** Data format for the response. */ + alt?: string; + /** Generate placements belonging to this campaign. This is a required field. */ + campaignId?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Generate tags for these placements. */ + placementIds?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Tag formats to generate for these placements. + * + * Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements. + */ + tagFormats?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one placement by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Placement ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new placement. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of placements, possibly filtered. This method supports paging. */ + list(request: { + /** Select only placements that belong to these advertisers. */ + advertiserIds?: string; + /** Data format for the response. */ + alt?: string; + /** Select only archived placements. Don't set this field to select both archived and non-archived placements. */ + archived?: boolean; + /** Select only placements that belong to these campaigns. */ + campaignIds?: string; + /** + * Select only placements that are associated with these compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on + * mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to + * rendering in in-stream video ads developed with the VAST standard. + */ + compatibilities?: string; + /** Select only placements that are associated with these content categories. */ + contentCategoryIds?: string; + /** Select only placements that are associated with these directory sites. */ + directorySiteIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only placements that belong to these placement groups. */ + groupIds?: string; + /** Select only placements with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Select only placements or placement groups whose end date is on or before the specified maxEndDate. The date should be formatted as "yyyy-MM-dd". */ + maxEndDate?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** Select only placements or placement groups whose start date is on or before the specified maxStartDate. The date should be formatted as "yyyy-MM-dd". */ + maxStartDate?: string; + /** Select only placements or placement groups whose end date is on or after the specified minEndDate. The date should be formatted as "yyyy-MM-dd". */ + minEndDate?: string; + /** Select only placements or placement groups whose start date is on or after the specified minStartDate. The date should be formatted as "yyyy-MM-dd". */ + minStartDate?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Select only placements with this payment source. */ + paymentSource?: string; + /** Select only placements that are associated with these placement strategies. */ + placementStrategyIds?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Select only placements with these pricing types. */ + pricingTypes?: string; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for placements by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placements with names like + * "placement June 2015", "placement May 2015", or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end + * of the search string. For example, a search string of "placement" will match placements with name "my placement", "placement 2015", or simply + * "placement". + */ + searchString?: string; + /** Select only placements that are associated with these sites. */ + siteIds?: string; + /** Select only placements that are associated with these sizes. */ + sizeIds?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing placement. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Placement ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing placement. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PlatformTypesResource { + /** Gets one platform type by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Platform type ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of platform types. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PostalCodesResource { + /** Gets one postal code by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Postal code ID. */ + code: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of postal codes. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProjectsResource { + /** Gets one project by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Project ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of projects, possibly filtered. This method supports paging. */ + list(request: { + /** Select only projects with these advertiser IDs. */ + advertiserIds?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only projects with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for projects by name or ID. Wildcards (*) are allowed. For example, "project*2015" will return projects with names like "project June + * 2015", "project April 2015", or simply "project 2015". Most of the searches also add wildcards implicitly at the start and the end of the search + * string. For example, a search string of "project" will match projects with name "my project", "project 2015", or simply "project". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RegionsResource { + /** Retrieves a list of regions. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RemarketingListSharesResource { + /** Gets one remarketing list share by remarketing list ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Remarketing list ID. */ + remarketingListId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing remarketing list share. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Remarketing list ID. */ + remarketingListId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing remarketing list share. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RemarketingListsResource { + /** Gets one remarketing list by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Remarketing list ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new remarketing list. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of remarketing lists, possibly filtered. This method supports paging. */ + list(request: { + /** Select only active or only inactive remarketing lists. */ + active?: boolean; + /** Select only remarketing lists owned by this advertiser. */ + advertiserId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only remarketing lists that have this floodlight activity ID. */ + floodlightActivityId?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "remarketing list*2015" will return objects with names like + * "remarketing list June 2015", "remarketing list April 2015", or simply "remarketing list 2015". Most of the searches also add wildcards implicitly at + * the start and the end of the search string. For example, a search string of "remarketing list" will match objects with name "my remarketing list", + * "remarketing list 2015", or simply "remarketing list". + */ + name?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing remarketing list. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Remarketing list ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing remarketing list. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CompatibleFieldsResource { + /** + * Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input + * report and user permissions. + */ + query(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface FilesResource { + /** Retrieves a report file. This method supports media download. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the report file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the report. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists files for a report. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the parent report. */ + reportId: string; + /** The field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** Deletes a report by its ID. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the report. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a report by its ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the report. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a report. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves list of reports. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The value of the nextToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The scope that defines which results are returned. */ + scope?: string; + /** The field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a report. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the report. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Runs a report. */ + run(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the report. */ + reportId: string; + /** If set and true, tries to run the report synchronously. */ + synchronous?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a report. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The DFA user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the report. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + compatibleFields: CompatibleFieldsResource; + files: FilesResource; + } + interface SitesResource { + /** Gets one site by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Site ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new site. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of sites, possibly filtered. This method supports paging. */ + list(request: { + /** This search filter is no longer supported and will have no effect on the results returned. */ + acceptsInStreamVideoPlacements?: boolean; + /** This search filter is no longer supported and will have no effect on the results returned. */ + acceptsInterstitialPlacements?: boolean; + /** Select only sites that accept publisher paid placements. */ + acceptsPublisherPaidPlacements?: boolean; + /** Select only AdWords sites. */ + adWordsSite?: boolean; + /** Data format for the response. */ + alt?: string; + /** Select only approved sites. */ + approved?: boolean; + /** Select only sites with these campaign IDs. */ + campaignIds?: string; + /** Select only sites with these directory site IDs. */ + directorySiteIds?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only sites with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. For example, "site*2015" will return objects with names like "site June + * 2015", "site April 2015", or simply "site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For + * example, a search string of "site" will match objects with name "my site", "site 2015", or simply "site". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only sites with this subaccount ID. */ + subaccountId?: string; + /** Select only sites that have not been mapped to a directory site. */ + unmappedSite?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing site. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Site ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing site. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SizesResource { + /** Gets one size by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Size ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new size. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of sizes, possibly filtered. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only sizes with this height. */ + height?: number; + /** Select only IAB standard sizes. */ + iabStandard?: boolean; + /** Select only sizes with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** Select only sizes with this width. */ + width?: number; + }): Request; + } + interface SubaccountsResource { + /** Gets one subaccount by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Subaccount ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new subaccount. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a list of subaccounts, possibly filtered. This method supports paging. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only subaccounts with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "subaccount*2015" will return objects with names like "subaccount + * June 2015", "subaccount April 2015", or simply "subaccount 2015". Most of the searches also add wildcards implicitly at the start and the end of the + * search string. For example, a search string of "subaccount" will match objects with name "my subaccount", "subaccount 2015", or simply "subaccount". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing subaccount. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Subaccount ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing subaccount. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetableRemarketingListsResource { + /** Gets one remarketing list by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Remarketing list ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging. */ + list(request: { + /** Select only active or only inactive targetable remarketing lists. */ + active?: boolean; + /** Select only targetable remarketing lists targetable by these advertisers. */ + advertiserId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "remarketing list*2015" will return objects with names like + * "remarketing list June 2015", "remarketing list April 2015", or simply "remarketing list 2015". Most of the searches also add wildcards implicitly at + * the start and the end of the search string. For example, a search string of "remarketing list" will match objects with name "my remarketing list", + * "remarketing list 2015", or simply "remarketing list". + */ + name?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TargetingTemplatesResource { + /** Gets one targeting template by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Targeting template ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new targeting template. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of targeting templates, optionally filtered. This method supports paging. */ + list(request: { + /** Select only targeting templates with this advertiser ID. */ + advertiserId?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only targeting templates with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "template*2015" will return objects with names like "template June + * 2015", "template April 2015", or simply "template 2015". Most of the searches also add wildcards implicitly at the start and the end of the search + * string. For example, a search string of "template" will match objects with name "my template", "template 2015", or simply "template". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing targeting template. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Targeting template ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing targeting template. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UserProfilesResource { + /** Gets one user profile by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The user profile ID. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves list of user profiles for a user. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UserRolePermissionGroupsResource { + /** Gets one user role permission group by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** User role permission group ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a list of all supported user role permission groups. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UserRolePermissionsResource { + /** Gets one user role permission by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** User role permission ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a list of user role permissions, possibly filtered. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only user role permissions with these IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UserRolesResource { + /** Deletes an existing user role. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** User role ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets one user role by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** User role ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a new user role. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of user roles, possibly filtered. This method supports paging. */ + list(request: { + /** Select only account level user roles not associated with any specific subaccount. */ + accountUserRoleOnly?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Select only user roles with the specified IDs. */ + ids?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Value of the nextPageToken from the previous result page. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "userrole*2015" will return objects with names like "userrole June + * 2015", "userrole April 2015", or simply "userrole 2015". Most of the searches also add wildcards implicitly at the start and the end of the search + * string. For example, a search string of "userrole" will match objects with name "my userrole", "userrole 2015", or simply "userrole". + */ + searchString?: string; + /** Field by which to sort the list. */ + sortField?: string; + /** Order of sorted results. */ + sortOrder?: string; + /** Select only user roles that belong to this subaccount. */ + subaccountId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing user role. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** User role ID. */ + id: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing user role. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface VideoFormatsResource { + /** Gets one video format by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Video format ID. */ + id: number; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists available video formats. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** User profile ID associated with this request. */ + profileId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.dfareporting/readme.md b/types/gapi.client.dfareporting/readme.md new file mode 100644 index 0000000000..2a210805c5 --- /dev/null +++ b/types/gapi.client.dfareporting/readme.md @@ -0,0 +1,1070 @@ +# TypeScript typings for DCM/DFA Reporting And Trafficking API v2.8 +Manages your DoubleClick Campaign Manager ad campaigns and reports. +For detailed description please check [documentation](https://developers.google.com/doubleclick-advertisers/). + +## Installing + +Install typings for DCM/DFA Reporting And Trafficking API: +``` +npm install @types/gapi.client.dfareporting@v2.8 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('dfareporting', 'v2.8', () => { + // now we can use gapi.client.dfareporting + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // Manage DoubleClick Digital Marketing conversions + 'https://www.googleapis.com/auth/ddmconversions', + + // View and manage DoubleClick for Advertisers reports + 'https://www.googleapis.com/auth/dfareporting', + + // View and manage your DoubleClick Campaign Manager's (DCM) display ad campaigns + 'https://www.googleapis.com/auth/dfatrafficking', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use DCM/DFA Reporting And Trafficking API resources: + +```typescript + +/* +Gets the account's active ad summary by account ID. +*/ +await gapi.client.accountActiveAdSummaries.get({ profileId: "profileId", summaryAccountId: "summaryAccountId", }); + +/* +Gets one account permission group by ID. +*/ +await gapi.client.accountPermissionGroups.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves the list of account permission groups. +*/ +await gapi.client.accountPermissionGroups.list({ profileId: "profileId", }); + +/* +Gets one account permission by ID. +*/ +await gapi.client.accountPermissions.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves the list of account permissions. +*/ +await gapi.client.accountPermissions.list({ profileId: "profileId", }); + +/* +Gets one account user profile by ID. +*/ +await gapi.client.accountUserProfiles.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new account user profile. +*/ +await gapi.client.accountUserProfiles.insert({ profileId: "profileId", }); + +/* +Retrieves a list of account user profiles, possibly filtered. This method supports paging. +*/ +await gapi.client.accountUserProfiles.list({ profileId: "profileId", }); + +/* +Updates an existing account user profile. This method supports patch semantics. +*/ +await gapi.client.accountUserProfiles.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing account user profile. +*/ +await gapi.client.accountUserProfiles.update({ profileId: "profileId", }); + +/* +Gets one account by ID. +*/ +await gapi.client.accounts.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves the list of accounts, possibly filtered. This method supports paging. +*/ +await gapi.client.accounts.list({ profileId: "profileId", }); + +/* +Updates an existing account. This method supports patch semantics. +*/ +await gapi.client.accounts.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing account. +*/ +await gapi.client.accounts.update({ profileId: "profileId", }); + +/* +Gets one ad by ID. +*/ +await gapi.client.ads.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new ad. +*/ +await gapi.client.ads.insert({ profileId: "profileId", }); + +/* +Retrieves a list of ads, possibly filtered. This method supports paging. +*/ +await gapi.client.ads.list({ profileId: "profileId", }); + +/* +Updates an existing ad. This method supports patch semantics. +*/ +await gapi.client.ads.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing ad. +*/ +await gapi.client.ads.update({ profileId: "profileId", }); + +/* +Deletes an existing advertiser group. +*/ +await gapi.client.advertiserGroups.delete({ id: "id", profileId: "profileId", }); + +/* +Gets one advertiser group by ID. +*/ +await gapi.client.advertiserGroups.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new advertiser group. +*/ +await gapi.client.advertiserGroups.insert({ profileId: "profileId", }); + +/* +Retrieves a list of advertiser groups, possibly filtered. This method supports paging. +*/ +await gapi.client.advertiserGroups.list({ profileId: "profileId", }); + +/* +Updates an existing advertiser group. This method supports patch semantics. +*/ +await gapi.client.advertiserGroups.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing advertiser group. +*/ +await gapi.client.advertiserGroups.update({ profileId: "profileId", }); + +/* +Gets one advertiser by ID. +*/ +await gapi.client.advertisers.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new advertiser. +*/ +await gapi.client.advertisers.insert({ profileId: "profileId", }); + +/* +Retrieves a list of advertisers, possibly filtered. This method supports paging. +*/ +await gapi.client.advertisers.list({ profileId: "profileId", }); + +/* +Updates an existing advertiser. This method supports patch semantics. +*/ +await gapi.client.advertisers.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing advertiser. +*/ +await gapi.client.advertisers.update({ profileId: "profileId", }); + +/* +Retrieves a list of browsers. +*/ +await gapi.client.browsers.list({ profileId: "profileId", }); + +/* +Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already. +*/ +await gapi.client.campaignCreativeAssociations.insert({ campaignId: "campaignId", profileId: "profileId", }); + +/* +Retrieves the list of creative IDs associated with the specified campaign. This method supports paging. +*/ +await gapi.client.campaignCreativeAssociations.list({ campaignId: "campaignId", profileId: "profileId", }); + +/* +Gets one campaign by ID. +*/ +await gapi.client.campaigns.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new campaign. +*/ +await gapi.client.campaigns.insert({ defaultLandingPageName: "defaultLandingPageName", defaultLandingPageUrl: "defaultLandingPageUrl", profileId: "profileId", }); + +/* +Retrieves a list of campaigns, possibly filtered. This method supports paging. +*/ +await gapi.client.campaigns.list({ profileId: "profileId", }); + +/* +Updates an existing campaign. This method supports patch semantics. +*/ +await gapi.client.campaigns.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing campaign. +*/ +await gapi.client.campaigns.update({ profileId: "profileId", }); + +/* +Gets one change log by ID. +*/ +await gapi.client.changeLogs.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of change logs. This method supports paging. +*/ +await gapi.client.changeLogs.list({ profileId: "profileId", }); + +/* +Retrieves a list of cities, possibly filtered. +*/ +await gapi.client.cities.list({ profileId: "profileId", }); + +/* +Gets one connection type by ID. +*/ +await gapi.client.connectionTypes.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of connection types. +*/ +await gapi.client.connectionTypes.list({ profileId: "profileId", }); + +/* +Deletes an existing content category. +*/ +await gapi.client.contentCategories.delete({ id: "id", profileId: "profileId", }); + +/* +Gets one content category by ID. +*/ +await gapi.client.contentCategories.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new content category. +*/ +await gapi.client.contentCategories.insert({ profileId: "profileId", }); + +/* +Retrieves a list of content categories, possibly filtered. This method supports paging. +*/ +await gapi.client.contentCategories.list({ profileId: "profileId", }); + +/* +Updates an existing content category. This method supports patch semantics. +*/ +await gapi.client.contentCategories.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing content category. +*/ +await gapi.client.contentCategories.update({ profileId: "profileId", }); + +/* +Inserts conversions. +*/ +await gapi.client.conversions.batchinsert({ profileId: "profileId", }); + +/* +Updates existing conversions. +*/ +await gapi.client.conversions.batchupdate({ profileId: "profileId", }); + +/* +Gets one country by ID. +*/ +await gapi.client.countries.get({ dartId: "dartId", profileId: "profileId", }); + +/* +Retrieves a list of countries. +*/ +await gapi.client.countries.list({ profileId: "profileId", }); + +/* +Inserts a new creative asset. +*/ +await gapi.client.creativeAssets.insert({ advertiserId: "advertiserId", profileId: "profileId", }); + +/* +Deletes an existing creative field value. +*/ +await gapi.client.creativeFieldValues.delete({ creativeFieldId: "creativeFieldId", id: "id", profileId: "profileId", }); + +/* +Gets one creative field value by ID. +*/ +await gapi.client.creativeFieldValues.get({ creativeFieldId: "creativeFieldId", id: "id", profileId: "profileId", }); + +/* +Inserts a new creative field value. +*/ +await gapi.client.creativeFieldValues.insert({ creativeFieldId: "creativeFieldId", profileId: "profileId", }); + +/* +Retrieves a list of creative field values, possibly filtered. This method supports paging. +*/ +await gapi.client.creativeFieldValues.list({ creativeFieldId: "creativeFieldId", profileId: "profileId", }); + +/* +Updates an existing creative field value. This method supports patch semantics. +*/ +await gapi.client.creativeFieldValues.patch({ creativeFieldId: "creativeFieldId", id: "id", profileId: "profileId", }); + +/* +Updates an existing creative field value. +*/ +await gapi.client.creativeFieldValues.update({ creativeFieldId: "creativeFieldId", profileId: "profileId", }); + +/* +Deletes an existing creative field. +*/ +await gapi.client.creativeFields.delete({ id: "id", profileId: "profileId", }); + +/* +Gets one creative field by ID. +*/ +await gapi.client.creativeFields.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new creative field. +*/ +await gapi.client.creativeFields.insert({ profileId: "profileId", }); + +/* +Retrieves a list of creative fields, possibly filtered. This method supports paging. +*/ +await gapi.client.creativeFields.list({ profileId: "profileId", }); + +/* +Updates an existing creative field. This method supports patch semantics. +*/ +await gapi.client.creativeFields.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing creative field. +*/ +await gapi.client.creativeFields.update({ profileId: "profileId", }); + +/* +Gets one creative group by ID. +*/ +await gapi.client.creativeGroups.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new creative group. +*/ +await gapi.client.creativeGroups.insert({ profileId: "profileId", }); + +/* +Retrieves a list of creative groups, possibly filtered. This method supports paging. +*/ +await gapi.client.creativeGroups.list({ profileId: "profileId", }); + +/* +Updates an existing creative group. This method supports patch semantics. +*/ +await gapi.client.creativeGroups.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing creative group. +*/ +await gapi.client.creativeGroups.update({ profileId: "profileId", }); + +/* +Gets one creative by ID. +*/ +await gapi.client.creatives.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new creative. +*/ +await gapi.client.creatives.insert({ profileId: "profileId", }); + +/* +Retrieves a list of creatives, possibly filtered. This method supports paging. +*/ +await gapi.client.creatives.list({ profileId: "profileId", }); + +/* +Updates an existing creative. This method supports patch semantics. +*/ +await gapi.client.creatives.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing creative. +*/ +await gapi.client.creatives.update({ profileId: "profileId", }); + +/* +Retrieves list of report dimension values for a list of filters. +*/ +await gapi.client.dimensionValues.query({ profileId: "profileId", }); + +/* +Gets one directory site contact by ID. +*/ +await gapi.client.directorySiteContacts.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of directory site contacts, possibly filtered. This method supports paging. +*/ +await gapi.client.directorySiteContacts.list({ profileId: "profileId", }); + +/* +Gets one directory site by ID. +*/ +await gapi.client.directorySites.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new directory site. +*/ +await gapi.client.directorySites.insert({ profileId: "profileId", }); + +/* +Retrieves a list of directory sites, possibly filtered. This method supports paging. +*/ +await gapi.client.directorySites.list({ profileId: "profileId", }); + +/* +Deletes an existing dynamic targeting key. +*/ +await gapi.client.dynamicTargetingKeys.delete({ name: "name", objectId: "objectId", objectType: "objectType", profileId: "profileId", }); + +/* +Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement. +*/ +await gapi.client.dynamicTargetingKeys.insert({ profileId: "profileId", }); + +/* +Retrieves a list of dynamic targeting keys. +*/ +await gapi.client.dynamicTargetingKeys.list({ profileId: "profileId", }); + +/* +Deletes an existing event tag. +*/ +await gapi.client.eventTags.delete({ id: "id", profileId: "profileId", }); + +/* +Gets one event tag by ID. +*/ +await gapi.client.eventTags.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new event tag. +*/ +await gapi.client.eventTags.insert({ profileId: "profileId", }); + +/* +Retrieves a list of event tags, possibly filtered. +*/ +await gapi.client.eventTags.list({ profileId: "profileId", }); + +/* +Updates an existing event tag. This method supports patch semantics. +*/ +await gapi.client.eventTags.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing event tag. +*/ +await gapi.client.eventTags.update({ profileId: "profileId", }); + +/* +Retrieves a report file by its report ID and file ID. This method supports media download. +*/ +await gapi.client.files.get({ fileId: "fileId", reportId: "reportId", }); + +/* +Lists files for a user profile. +*/ +await gapi.client.files.list({ profileId: "profileId", }); + +/* +Deletes an existing floodlight activity. +*/ +await gapi.client.floodlightActivities.delete({ id: "id", profileId: "profileId", }); + +/* +Generates a tag for a floodlight activity. +*/ +await gapi.client.floodlightActivities.generatetag({ profileId: "profileId", }); + +/* +Gets one floodlight activity by ID. +*/ +await gapi.client.floodlightActivities.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new floodlight activity. +*/ +await gapi.client.floodlightActivities.insert({ profileId: "profileId", }); + +/* +Retrieves a list of floodlight activities, possibly filtered. This method supports paging. +*/ +await gapi.client.floodlightActivities.list({ profileId: "profileId", }); + +/* +Updates an existing floodlight activity. This method supports patch semantics. +*/ +await gapi.client.floodlightActivities.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing floodlight activity. +*/ +await gapi.client.floodlightActivities.update({ profileId: "profileId", }); + +/* +Gets one floodlight activity group by ID. +*/ +await gapi.client.floodlightActivityGroups.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new floodlight activity group. +*/ +await gapi.client.floodlightActivityGroups.insert({ profileId: "profileId", }); + +/* +Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging. +*/ +await gapi.client.floodlightActivityGroups.list({ profileId: "profileId", }); + +/* +Updates an existing floodlight activity group. This method supports patch semantics. +*/ +await gapi.client.floodlightActivityGroups.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing floodlight activity group. +*/ +await gapi.client.floodlightActivityGroups.update({ profileId: "profileId", }); + +/* +Gets one floodlight configuration by ID. +*/ +await gapi.client.floodlightConfigurations.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of floodlight configurations, possibly filtered. +*/ +await gapi.client.floodlightConfigurations.list({ profileId: "profileId", }); + +/* +Updates an existing floodlight configuration. This method supports patch semantics. +*/ +await gapi.client.floodlightConfigurations.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing floodlight configuration. +*/ +await gapi.client.floodlightConfigurations.update({ profileId: "profileId", }); + +/* +Gets one inventory item by ID. +*/ +await gapi.client.inventoryItems.get({ id: "id", profileId: "profileId", projectId: "projectId", }); + +/* +Retrieves a list of inventory items, possibly filtered. This method supports paging. +*/ +await gapi.client.inventoryItems.list({ profileId: "profileId", projectId: "projectId", }); + +/* +Deletes an existing campaign landing page. +*/ +await gapi.client.landingPages.delete({ campaignId: "campaignId", id: "id", profileId: "profileId", }); + +/* +Gets one campaign landing page by ID. +*/ +await gapi.client.landingPages.get({ campaignId: "campaignId", id: "id", profileId: "profileId", }); + +/* +Inserts a new landing page for the specified campaign. +*/ +await gapi.client.landingPages.insert({ campaignId: "campaignId", profileId: "profileId", }); + +/* +Retrieves the list of landing pages for the specified campaign. +*/ +await gapi.client.landingPages.list({ campaignId: "campaignId", profileId: "profileId", }); + +/* +Updates an existing campaign landing page. This method supports patch semantics. +*/ +await gapi.client.landingPages.patch({ campaignId: "campaignId", id: "id", profileId: "profileId", }); + +/* +Updates an existing campaign landing page. +*/ +await gapi.client.landingPages.update({ campaignId: "campaignId", profileId: "profileId", }); + +/* +Retrieves a list of languages. +*/ +await gapi.client.languages.list({ profileId: "profileId", }); + +/* +Retrieves a list of metros. +*/ +await gapi.client.metros.list({ profileId: "profileId", }); + +/* +Gets one mobile carrier by ID. +*/ +await gapi.client.mobileCarriers.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of mobile carriers. +*/ +await gapi.client.mobileCarriers.list({ profileId: "profileId", }); + +/* +Gets one operating system version by ID. +*/ +await gapi.client.operatingSystemVersions.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of operating system versions. +*/ +await gapi.client.operatingSystemVersions.list({ profileId: "profileId", }); + +/* +Gets one operating system by DART ID. +*/ +await gapi.client.operatingSystems.get({ dartId: "dartId", profileId: "profileId", }); + +/* +Retrieves a list of operating systems. +*/ +await gapi.client.operatingSystems.list({ profileId: "profileId", }); + +/* +Gets one order document by ID. +*/ +await gapi.client.orderDocuments.get({ id: "id", profileId: "profileId", projectId: "projectId", }); + +/* +Retrieves a list of order documents, possibly filtered. This method supports paging. +*/ +await gapi.client.orderDocuments.list({ profileId: "profileId", projectId: "projectId", }); + +/* +Gets one order by ID. +*/ +await gapi.client.orders.get({ id: "id", profileId: "profileId", projectId: "projectId", }); + +/* +Retrieves a list of orders, possibly filtered. This method supports paging. +*/ +await gapi.client.orders.list({ profileId: "profileId", projectId: "projectId", }); + +/* +Gets one placement group by ID. +*/ +await gapi.client.placementGroups.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new placement group. +*/ +await gapi.client.placementGroups.insert({ profileId: "profileId", }); + +/* +Retrieves a list of placement groups, possibly filtered. This method supports paging. +*/ +await gapi.client.placementGroups.list({ profileId: "profileId", }); + +/* +Updates an existing placement group. This method supports patch semantics. +*/ +await gapi.client.placementGroups.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing placement group. +*/ +await gapi.client.placementGroups.update({ profileId: "profileId", }); + +/* +Deletes an existing placement strategy. +*/ +await gapi.client.placementStrategies.delete({ id: "id", profileId: "profileId", }); + +/* +Gets one placement strategy by ID. +*/ +await gapi.client.placementStrategies.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new placement strategy. +*/ +await gapi.client.placementStrategies.insert({ profileId: "profileId", }); + +/* +Retrieves a list of placement strategies, possibly filtered. This method supports paging. +*/ +await gapi.client.placementStrategies.list({ profileId: "profileId", }); + +/* +Updates an existing placement strategy. This method supports patch semantics. +*/ +await gapi.client.placementStrategies.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing placement strategy. +*/ +await gapi.client.placementStrategies.update({ profileId: "profileId", }); + +/* +Generates tags for a placement. +*/ +await gapi.client.placements.generatetags({ profileId: "profileId", }); + +/* +Gets one placement by ID. +*/ +await gapi.client.placements.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new placement. +*/ +await gapi.client.placements.insert({ profileId: "profileId", }); + +/* +Retrieves a list of placements, possibly filtered. This method supports paging. +*/ +await gapi.client.placements.list({ profileId: "profileId", }); + +/* +Updates an existing placement. This method supports patch semantics. +*/ +await gapi.client.placements.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing placement. +*/ +await gapi.client.placements.update({ profileId: "profileId", }); + +/* +Gets one platform type by ID. +*/ +await gapi.client.platformTypes.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of platform types. +*/ +await gapi.client.platformTypes.list({ profileId: "profileId", }); + +/* +Gets one postal code by ID. +*/ +await gapi.client.postalCodes.get({ code: "code", profileId: "profileId", }); + +/* +Retrieves a list of postal codes. +*/ +await gapi.client.postalCodes.list({ profileId: "profileId", }); + +/* +Gets one project by ID. +*/ +await gapi.client.projects.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of projects, possibly filtered. This method supports paging. +*/ +await gapi.client.projects.list({ profileId: "profileId", }); + +/* +Retrieves a list of regions. +*/ +await gapi.client.regions.list({ profileId: "profileId", }); + +/* +Gets one remarketing list share by remarketing list ID. +*/ +await gapi.client.remarketingListShares.get({ profileId: "profileId", remarketingListId: "remarketingListId", }); + +/* +Updates an existing remarketing list share. This method supports patch semantics. +*/ +await gapi.client.remarketingListShares.patch({ profileId: "profileId", remarketingListId: "remarketingListId", }); + +/* +Updates an existing remarketing list share. +*/ +await gapi.client.remarketingListShares.update({ profileId: "profileId", }); + +/* +Gets one remarketing list by ID. +*/ +await gapi.client.remarketingLists.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new remarketing list. +*/ +await gapi.client.remarketingLists.insert({ profileId: "profileId", }); + +/* +Retrieves a list of remarketing lists, possibly filtered. This method supports paging. +*/ +await gapi.client.remarketingLists.list({ advertiserId: "advertiserId", profileId: "profileId", }); + +/* +Updates an existing remarketing list. This method supports patch semantics. +*/ +await gapi.client.remarketingLists.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing remarketing list. +*/ +await gapi.client.remarketingLists.update({ profileId: "profileId", }); + +/* +Deletes a report by its ID. +*/ +await gapi.client.reports.delete({ profileId: "profileId", reportId: "reportId", }); + +/* +Retrieves a report by its ID. +*/ +await gapi.client.reports.get({ profileId: "profileId", reportId: "reportId", }); + +/* +Creates a report. +*/ +await gapi.client.reports.insert({ profileId: "profileId", }); + +/* +Retrieves list of reports. +*/ +await gapi.client.reports.list({ profileId: "profileId", }); + +/* +Updates a report. This method supports patch semantics. +*/ +await gapi.client.reports.patch({ profileId: "profileId", reportId: "reportId", }); + +/* +Runs a report. +*/ +await gapi.client.reports.run({ profileId: "profileId", reportId: "reportId", }); + +/* +Updates a report. +*/ +await gapi.client.reports.update({ profileId: "profileId", reportId: "reportId", }); + +/* +Gets one site by ID. +*/ +await gapi.client.sites.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new site. +*/ +await gapi.client.sites.insert({ profileId: "profileId", }); + +/* +Retrieves a list of sites, possibly filtered. This method supports paging. +*/ +await gapi.client.sites.list({ profileId: "profileId", }); + +/* +Updates an existing site. This method supports patch semantics. +*/ +await gapi.client.sites.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing site. +*/ +await gapi.client.sites.update({ profileId: "profileId", }); + +/* +Gets one size by ID. +*/ +await gapi.client.sizes.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new size. +*/ +await gapi.client.sizes.insert({ profileId: "profileId", }); + +/* +Retrieves a list of sizes, possibly filtered. +*/ +await gapi.client.sizes.list({ profileId: "profileId", }); + +/* +Gets one subaccount by ID. +*/ +await gapi.client.subaccounts.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new subaccount. +*/ +await gapi.client.subaccounts.insert({ profileId: "profileId", }); + +/* +Gets a list of subaccounts, possibly filtered. This method supports paging. +*/ +await gapi.client.subaccounts.list({ profileId: "profileId", }); + +/* +Updates an existing subaccount. This method supports patch semantics. +*/ +await gapi.client.subaccounts.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing subaccount. +*/ +await gapi.client.subaccounts.update({ profileId: "profileId", }); + +/* +Gets one remarketing list by ID. +*/ +await gapi.client.targetableRemarketingLists.get({ id: "id", profileId: "profileId", }); + +/* +Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging. +*/ +await gapi.client.targetableRemarketingLists.list({ advertiserId: "advertiserId", profileId: "profileId", }); + +/* +Gets one targeting template by ID. +*/ +await gapi.client.targetingTemplates.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new targeting template. +*/ +await gapi.client.targetingTemplates.insert({ profileId: "profileId", }); + +/* +Retrieves a list of targeting templates, optionally filtered. This method supports paging. +*/ +await gapi.client.targetingTemplates.list({ profileId: "profileId", }); + +/* +Updates an existing targeting template. This method supports patch semantics. +*/ +await gapi.client.targetingTemplates.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing targeting template. +*/ +await gapi.client.targetingTemplates.update({ profileId: "profileId", }); + +/* +Gets one user profile by ID. +*/ +await gapi.client.userProfiles.get({ profileId: "profileId", }); + +/* +Retrieves list of user profiles for a user. +*/ +await gapi.client.userProfiles.list({ }); + +/* +Gets one user role permission group by ID. +*/ +await gapi.client.userRolePermissionGroups.get({ id: "id", profileId: "profileId", }); + +/* +Gets a list of all supported user role permission groups. +*/ +await gapi.client.userRolePermissionGroups.list({ profileId: "profileId", }); + +/* +Gets one user role permission by ID. +*/ +await gapi.client.userRolePermissions.get({ id: "id", profileId: "profileId", }); + +/* +Gets a list of user role permissions, possibly filtered. +*/ +await gapi.client.userRolePermissions.list({ profileId: "profileId", }); + +/* +Deletes an existing user role. +*/ +await gapi.client.userRoles.delete({ id: "id", profileId: "profileId", }); + +/* +Gets one user role by ID. +*/ +await gapi.client.userRoles.get({ id: "id", profileId: "profileId", }); + +/* +Inserts a new user role. +*/ +await gapi.client.userRoles.insert({ profileId: "profileId", }); + +/* +Retrieves a list of user roles, possibly filtered. This method supports paging. +*/ +await gapi.client.userRoles.list({ profileId: "profileId", }); + +/* +Updates an existing user role. This method supports patch semantics. +*/ +await gapi.client.userRoles.patch({ id: "id", profileId: "profileId", }); + +/* +Updates an existing user role. +*/ +await gapi.client.userRoles.update({ profileId: "profileId", }); + +/* +Gets one video format by ID. +*/ +await gapi.client.videoFormats.get({ id: 1, profileId: "profileId", }); + +/* +Lists available video formats. +*/ +await gapi.client.videoFormats.list({ profileId: "profileId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.dfareporting/tsconfig.json b/types/gapi.client.dfareporting/tsconfig.json new file mode 100644 index 0000000000..78bcd11678 --- /dev/null +++ b/types/gapi.client.dfareporting/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.dfareporting-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.dfareporting/tslint.json b/types/gapi.client.dfareporting/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.dfareporting/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.discovery/gapi.client.discovery-tests.ts b/types/gapi.client.discovery/gapi.client.discovery-tests.ts new file mode 100644 index 0000000000..c1dab1700b --- /dev/null +++ b/types/gapi.client.discovery/gapi.client.discovery-tests.ts @@ -0,0 +1,26 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('discovery', 'v1', () => { + /** now we can use gapi.client.discovery */ + + run(); + }); + + async function run() { + /** Retrieve the description of a particular version of an api. */ + await gapi.client.apis.getRest({ + api: "api", + version: "version", + }); + /** Retrieve the list of APIs supported at this endpoint. */ + await gapi.client.apis.list({ + name: "name", + preferred: true, + }); + } +}); diff --git a/types/gapi.client.discovery/index.d.ts b/types/gapi.client.discovery/index.d.ts new file mode 100644 index 0000000000..570928f44f --- /dev/null +++ b/types/gapi.client.discovery/index.d.ts @@ -0,0 +1,322 @@ +// Type definitions for Google APIs Discovery Service v1 1.0 +// Project: https://developers.google.com/discovery/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/discovery/v1/rest + +/// + +declare namespace gapi.client { + /** Load APIs Discovery Service v1 */ + function load(name: "discovery", version: "v1"): PromiseLike; + function load(name: "discovery", version: "v1", callback: () => any): void; + + const apis: discovery.ApisResource; + + namespace discovery { + interface DirectoryList { + /** Indicate the version of the Discovery API used to generate this doc. */ + discoveryVersion?: string; + /** The individual directory entries. One entry per api/version pair. */ + items?: Array<{ + /** The description of this API. */ + description?: string; + /** A link to the discovery document. */ + discoveryLink?: string; + /** The URL for the discovery REST document. */ + discoveryRestUrl?: string; + /** A link to human readable documentation for the API. */ + documentationLink?: string; + /** Links to 16x16 and 32x32 icons representing the API. */ + icons?: { + /** The URL of the 16x16 icon. */ + x16?: string; + /** The URL of the 32x32 icon. */ + x32?: string; + }; + /** The id of this API. */ + id?: string; + /** The kind for this response. */ + kind?: string; + /** Labels for the status of this API, such as labs or deprecated. */ + labels?: string[]; + /** The name of the API. */ + name?: string; + /** True if this version is the preferred version to use. */ + preferred?: boolean; + /** The title of this API. */ + title?: string; + /** The version of the API. */ + version?: string; + }>; + /** The kind for this response. */ + kind?: string; + } + interface JsonSchema { + /** A reference to another schema. The value of this property is the "id" of another schema. */ + $ref?: string; + /** If this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object. */ + additionalProperties?: JsonSchema; + /** Additional information about this property. */ + annotations?: { + /** A list of methods for which this property is required on requests. */ + required?: string[]; + }; + /** The default value of this property (if one exists). */ + default?: string; + /** A description of this object. */ + description?: string; + /** Values this parameter may take (if it is an enum). */ + enum?: string[]; + /** The descriptions for the enums. Each position maps to the corresponding value in the "enum" array. */ + enumDescriptions?: string[]; + /** + * An additional regular expression or key that helps constrain the value. For more details see: + * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23 + */ + format?: string; + /** Unique identifier for this schema. */ + id?: string; + /** If this is a schema for an array, this property is the schema for each element in the array. */ + items?: JsonSchema; + /** Whether this parameter goes in the query or the path for REST requests. */ + location?: string; + /** The maximum value of this parameter. */ + maximum?: string; + /** The minimum value of this parameter. */ + minimum?: string; + /** The regular expression this parameter must conform to. Uses Java 6 regex format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html */ + pattern?: string; + /** If this is a schema for an object, list the schema for each property of this object. */ + properties?: Record; + /** + * The value is read-only, generated by the service. The value cannot be modified by the client. If the value is included in a POST, PUT, or PATCH + * request, it is ignored by the service. + */ + readOnly?: boolean; + /** Whether this parameter may appear multiple times. */ + repeated?: boolean; + /** Whether the parameter is required. */ + required?: boolean; + /** The value type for this schema. A list of values can be found here: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 */ + type?: string; + /** + * In a variant data type, the value of one property is used to determine how to interpret the entire entity. Its value must exist in a map of + * descriminant values to schema names. + */ + variant?: { + /** The name of the type discriminant property. */ + discriminant?: string; + /** The map of discriminant value to schema to use for parsing.. */ + map?: Array<{ + $ref?: string; + type_value?: string; + }>; + }; + } + interface RestDescription { + /** Authentication information. */ + auth?: { + /** OAuth 2.0 authentication information. */ + oauth2?: { + /** Available OAuth 2.0 scopes. */ + scopes?: Record; + }; + }; + /** [DEPRECATED] The base path for REST requests. */ + basePath?: string; + /** [DEPRECATED] The base URL for REST requests. */ + baseUrl?: string; + /** The path for REST batch requests. */ + batchPath?: string; + /** Indicates how the API name should be capitalized and split into various parts. Useful for generating pretty class names. */ + canonicalName?: string; + /** The description of this API. */ + description?: string; + /** Indicate the version of the Discovery API used to generate this doc. */ + discoveryVersion?: string; + /** A link to human readable documentation for the API. */ + documentationLink?: string; + /** The ETag for this response. */ + etag?: string; + /** Enable exponential backoff for suitable methods in the generated clients. */ + exponentialBackoffDefault?: boolean; + /** A list of supported features for this API. */ + features?: string[]; + /** Links to 16x16 and 32x32 icons representing the API. */ + icons?: { + /** The URL of the 16x16 icon. */ + x16?: string; + /** The URL of the 32x32 icon. */ + x32?: string; + }; + /** The ID of this API. */ + id?: string; + /** The kind for this response. */ + kind?: string; + /** Labels for the status of this API, such as labs or deprecated. */ + labels?: string[]; + /** API-level methods for this API. */ + methods?: Record; + /** The name of this API. */ + name?: string; + /** + * The domain of the owner of this API. Together with the ownerName and a packagePath values, this can be used to generate a library for this API which + * would have a unique fully qualified name. + */ + ownerDomain?: string; + /** The name of the owner of this API. See ownerDomain. */ + ownerName?: string; + /** The package of the owner of this API. See ownerDomain. */ + packagePath?: string; + /** Common parameters that apply across all apis. */ + parameters?: Record; + /** The protocol described by this document. */ + protocol?: string; + /** The resources in this API. */ + resources?: Record; + /** The version of this API. */ + revision?: string; + /** The root URL under which all API services live. */ + rootUrl?: string; + /** The schemas for this API. */ + schemas?: Record; + /** The base path for all REST requests. */ + servicePath?: string; + /** The title of this API. */ + title?: string; + /** The version of this API. */ + version?: string; + version_module?: boolean; + } + interface RestMethod { + /** Description of this method. */ + description?: string; + /** Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header. */ + etagRequired?: boolean; + /** HTTP method used by this method. */ + httpMethod?: string; + /** A unique ID for this method. This property can be used to match methods between different versions of Discovery. */ + id?: string; + /** Media upload parameters. */ + mediaUpload?: { + /** MIME Media Ranges for acceptable media uploads to this method. */ + accept?: string[]; + /** Maximum size of a media upload, such as "1MB", "2GB" or "3TB". */ + maxSize?: string; + /** Supported upload protocols. */ + protocols?: { + /** Supports the Resumable Media Upload protocol. */ + resumable?: { + /** True if this endpoint supports uploading multipart media. */ + multipart?: boolean; + /** The URI path to be used for upload. Should be used in conjunction with the basePath property at the api-level. */ + path?: string; + }; + /** Supports uploading as a single HTTP request. */ + simple?: { + /** True if this endpoint supports upload multipart media. */ + multipart?: boolean; + /** The URI path to be used for upload. Should be used in conjunction with the basePath property at the api-level. */ + path?: string; + }; + }; + }; + /** + * Ordered list of required parameters, serves as a hint to clients on how to structure their method signatures. The array is ordered such that the + * "most-significant" parameter appears first. + */ + parameterOrder?: string[]; + /** Details for all parameters in this method. */ + parameters?: Record; + /** The URI path of this REST method. Should be used in conjunction with the basePath property at the api-level. */ + path?: string; + /** The schema for the request. */ + request?: { + /** Schema ID for the request schema. */ + $ref?: string; + /** parameter name. */ + parameterName?: string; + }; + /** The schema for the response. */ + response?: { + /** Schema ID for the response schema. */ + $ref?: string; + }; + /** OAuth 2.0 scopes applicable to this method. */ + scopes?: string[]; + /** Whether this method supports media downloads. */ + supportsMediaDownload?: boolean; + /** Whether this method supports media uploads. */ + supportsMediaUpload?: boolean; + /** Whether this method supports subscriptions. */ + supportsSubscription?: boolean; + /** Indicates that downloads from this method should use the download service URL (i.e. "/download"). Only applies if the method supports media download. */ + useMediaDownloadService?: boolean; + } + interface RestResource { + /** Methods on this resource. */ + methods?: Record; + /** Sub-resources on this resource. */ + resources?: Record; + } + interface ApisResource { + /** Retrieve the description of a particular version of an api. */ + getRest(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the API. */ + api: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + /** The version of the API. */ + version: string; + }): Request; + /** Retrieve the list of APIs supported at this endpoint. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Only include APIs with the given name. */ + name?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Return only the preferred version of an API. */ + preferred?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.discovery/readme.md b/types/gapi.client.discovery/readme.md new file mode 100644 index 0000000000..6ac616bdea --- /dev/null +++ b/types/gapi.client.discovery/readme.md @@ -0,0 +1,45 @@ +# TypeScript typings for APIs Discovery Service v1 +Provides information about other Google APIs, such as what APIs are available, the resource, and method details for each API. +For detailed description please check [documentation](https://developers.google.com/discovery/). + +## Installing + +Install typings for APIs Discovery Service: +``` +npm install @types/gapi.client.discovery@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('discovery', 'v1', () => { + // now we can use gapi.client.discovery + // ... +}); +``` + + + +After that you can use APIs Discovery Service resources: + +```typescript + +/* +Retrieve the description of a particular version of an api. +*/ +await gapi.client.apis.getRest({ api: "api", version: "version", }); + +/* +Retrieve the list of APIs supported at this endpoint. +*/ +await gapi.client.apis.list({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.discovery/tsconfig.json b/types/gapi.client.discovery/tsconfig.json new file mode 100644 index 0000000000..b597d1b278 --- /dev/null +++ b/types/gapi.client.discovery/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.discovery-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.discovery/tslint.json b/types/gapi.client.discovery/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.discovery/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.dlp/gapi.client.dlp-tests.ts b/types/gapi.client.dlp/gapi.client.dlp-tests.ts new file mode 100644 index 0000000000..87fe123a67 --- /dev/null +++ b/types/gapi.client.dlp/gapi.client.dlp-tests.ts @@ -0,0 +1,60 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('dlp', 'v2beta1', () => { + /** now we can use gapi.client.dlp */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * De-identifies potentially sensitive info from a list of strings. + * This method has limits on input size and output size. + */ + await gapi.client.content.deidentify({ + }); + /** + * Finds potentially sensitive info in a list of strings. + * This method has limits on input size, processing time, and output size. + */ + await gapi.client.content.inspect({ + }); + /** + * Redacts potentially sensitive info from a list of strings. + * This method has limits on input size, processing time, and output size. + */ + await gapi.client.content.redact({ + }); + /** + * Schedules a job to compute risk analysis metrics over content in a Google + * Cloud Platform repository. + */ + await gapi.client.dataSource.analyze({ + }); + /** Returns the list of root categories of sensitive information. */ + await gapi.client.rootCategories.list({ + languageCode: "languageCode", + }); + } +}); diff --git a/types/gapi.client.dlp/index.d.ts b/types/gapi.client.dlp/index.d.ts new file mode 100644 index 0000000000..29839bac80 --- /dev/null +++ b/types/gapi.client.dlp/index.d.ts @@ -0,0 +1,1612 @@ +// Type definitions for Google DLP API v2beta1 2.0 +// Project: https://cloud.google.com/dlp/docs/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://dlp.googleapis.com/$discovery/rest?version=v2beta1 + +/// + +declare namespace gapi.client { + /** Load DLP API v2beta1 */ + function load(name: "dlp", version: "v2beta1"): PromiseLike; + function load(name: "dlp", version: "v2beta1", callback: () => any): void; + + const content: dlp.ContentResource; + + const dataSource: dlp.DataSourceResource; + + const inspect: dlp.InspectResource; + + const riskAnalysis: dlp.RiskAnalysisResource; + + const rootCategories: dlp.RootCategoriesResource; + + namespace dlp { + interface GoogleLongrunningListOperationsResponse { + /** The standard List next-page token. */ + nextPageToken?: string; + /** A list of operations that matches the specified filter in the request. */ + operations?: GoogleLongrunningOperation[]; + } + interface GoogleLongrunningOperation { + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: GoogleRpcStatus; + /** + * This field will contain an InspectOperationMetadata object for `inspect.operations.create` or a RiskAnalysisOperationMetadata object for + * `dataSource.analyze`. This will always be returned with the Operation. + */ + metadata?: Record; + /** The server-assigned name. The `name` should have the format of `inspect/operations/`. */ + name?: string; + /** + * This field will contain an InspectOperationResult object for `inspect.operations.create` or a RiskAnalysisOperationResult object for + * `dataSource.analyze`. + */ + response?: Record; + } + interface GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest { + /** Privacy metric to compute. */ + privacyMetric?: GooglePrivacyDlpV2beta1PrivacyMetric; + /** Input dataset to compute metrics over. */ + sourceTable?: GooglePrivacyDlpV2beta1BigQueryTable; + } + interface GooglePrivacyDlpV2beta1BigQueryOptions { + /** + * References to fields uniquely identifying rows within the table. + * Nested fields in the format, like `person.birthdate.year`, are allowed. + */ + identifyingFields?: GooglePrivacyDlpV2beta1FieldId[]; + /** Complete BigQuery table reference. */ + tableReference?: GooglePrivacyDlpV2beta1BigQueryTable; + } + interface GooglePrivacyDlpV2beta1BigQueryTable { + /** Dataset ID of the table. */ + datasetId?: string; + /** + * The Google Cloud Platform project ID of the project containing the table. + * If omitted, project ID is inferred from the API call. + */ + projectId?: string; + /** Name of the table. */ + tableId?: string; + } + interface GooglePrivacyDlpV2beta1Bucket { + /** Upper bound of the range, exclusive; type must match min. */ + max?: GooglePrivacyDlpV2beta1Value; + /** + * Lower bound of the range, inclusive. Type should be the same as max if + * used. + */ + min?: GooglePrivacyDlpV2beta1Value; + /** + * Replacement value for this bucket. If not provided + * the default behavior will be to hyphenate the min-max range. + */ + replacementValue?: GooglePrivacyDlpV2beta1Value; + } + interface GooglePrivacyDlpV2beta1BucketingConfig { + buckets?: GooglePrivacyDlpV2beta1Bucket[]; + } + interface GooglePrivacyDlpV2beta1CategoricalStatsConfig { + /** + * Field to compute categorical stats on. All column types are + * supported except for arrays and structs. However, it may be more + * informative to use NumericalStats when the field type is supported, + * depending on the data. + */ + field?: GooglePrivacyDlpV2beta1FieldId; + } + interface GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket { + /** Total number of records in this bucket. */ + bucketSize?: string; + /** + * Sample of value frequencies in this bucket. The total number of + * values returned per bucket is capped at 20. + */ + bucketValues?: GooglePrivacyDlpV2beta1ValueFrequency[]; + /** Lower bound on the value frequency of the values in this bucket. */ + valueFrequencyLowerBound?: string; + /** Upper bound on the value frequency of the values in this bucket. */ + valueFrequencyUpperBound?: string; + } + interface GooglePrivacyDlpV2beta1CategoricalStatsResult { + /** Histogram of value frequencies in the column. */ + valueFrequencyHistogramBuckets?: GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket[]; + } + interface GooglePrivacyDlpV2beta1CategoryDescription { + /** Human readable form of the category name. */ + displayName?: string; + /** Internal name of the category. */ + name?: string; + } + interface GooglePrivacyDlpV2beta1CharacterMaskConfig { + /** + * When masking a string, items in this list will be skipped when replacing. + * For example, if your string is 555-555-5555 and you ask us to skip `-` and + * mask 5 chars with * we would produce ***-*55-5555. + */ + charactersToIgnore?: GooglePrivacyDlpV2beta1CharsToIgnore[]; + /** + * Character to mask the sensitive values—for example, "*" for an + * alphabetic string such as name, or "0" for a numeric string such as ZIP + * code or credit card number. String must have length 1. If not supplied, we + * will default to "*" for strings, 0 for digits. + */ + maskingCharacter?: string; + /** + * Number of characters to mask. If not set, all matching chars will be + * masked. Skipped characters do not count towards this tally. + */ + numberToMask?: number; + /** + * Mask characters in reverse order. For example, if `masking_character` is + * '0', number_to_mask is 14, and `reverse_order` is false, then + * 1234-5678-9012-3456 -> 00000000000000-3456 + * If `masking_character` is '*', `number_to_mask` is 3, and `reverse_order` + * is true, then 12345 -> 12*** + */ + reverseOrder?: boolean; + } + interface GooglePrivacyDlpV2beta1CharsToIgnore { + charactersToSkip?: string; + commonCharactersToIgnore?: string; + } + interface GooglePrivacyDlpV2beta1CloudStorageKey { + /** Path to the file. */ + filePath?: string; + /** Byte offset of the referenced data in the file. */ + startOffset?: string; + } + interface GooglePrivacyDlpV2beta1CloudStorageOptions { + fileSet?: GooglePrivacyDlpV2beta1FileSet; + } + interface GooglePrivacyDlpV2beta1CloudStoragePath { + /** The url, in the format of `gs://bucket/`. */ + path?: string; + } + interface GooglePrivacyDlpV2beta1Color { + /** The amount of blue in the color as a value in the interval [0, 1]. */ + blue?: number; + /** The amount of green in the color as a value in the interval [0, 1]. */ + green?: number; + /** The amount of red in the color as a value in the interval [0, 1]. */ + red?: number; + } + interface GooglePrivacyDlpV2beta1Condition { + /** Field within the record this condition is evaluated against. [required] */ + field?: GooglePrivacyDlpV2beta1FieldId; + /** Operator used to compare the field or info type to the value. [required] */ + operator?: string; + /** Value to compare against. [Required, except for `EXISTS` tests.] */ + value?: GooglePrivacyDlpV2beta1Value; + } + interface GooglePrivacyDlpV2beta1Conditions { + conditions?: GooglePrivacyDlpV2beta1Condition[]; + } + interface GooglePrivacyDlpV2beta1ContentItem { + /** Content data to inspect or redact. */ + data?: string; + /** Structured content for inspection. */ + table?: GooglePrivacyDlpV2beta1Table; + /** + * Type of the content, as defined in Content-Type HTTP header. + * Supported types are: all "text" types, octet streams, PNG images, + * JPEG images. + */ + type?: string; + /** String data to inspect or redact. */ + value?: string; + } + interface GooglePrivacyDlpV2beta1CreateInspectOperationRequest { + /** Configuration for the inspector. */ + inspectConfig?: GooglePrivacyDlpV2beta1InspectConfig; + /** Additional configuration settings for long running operations. */ + operationConfig?: GooglePrivacyDlpV2beta1OperationConfig; + /** Optional location to store findings. */ + outputConfig?: GooglePrivacyDlpV2beta1OutputStorageConfig; + /** Specification of the data set to process. */ + storageConfig?: GooglePrivacyDlpV2beta1StorageConfig; + } + interface GooglePrivacyDlpV2beta1CryptoHashConfig { + /** The key used by the hash function. */ + cryptoKey?: GooglePrivacyDlpV2beta1CryptoKey; + } + interface GooglePrivacyDlpV2beta1CryptoKey { + kmsWrapped?: GooglePrivacyDlpV2beta1KmsWrappedCryptoKey; + transient?: GooglePrivacyDlpV2beta1TransientCryptoKey; + unwrapped?: GooglePrivacyDlpV2beta1UnwrappedCryptoKey; + } + interface GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig { + commonAlphabet?: string; + /** + * A context may be used for higher security since the same + * identifier in two different contexts likely will be given a distinct + * surrogate. The principle is that the likeliness is inversely related + * to the ratio of the number of distinct identifiers per context over the + * number of possible surrogates: As long as this ratio is small, the + * likehood is large. + * + * If the context is not set, a default tweak will be used. + * If the context is set but: + * + * 1. there is no record present when transforming a given value or + * 1. the field is not present when transforming a given value, + * + * a default tweak will be used. + * + * Note that case (1) is expected when an `InfoTypeTransformation` is + * applied to both structured and non-structured `ContentItem`s. + * Currently, the referenced field may be of value type integer or string. + * + * The tweak is constructed as a sequence of bytes in big endian byte order + * such that: + * + * - a 64 bit integer is encoded followed by a single byte of value 1 + * - a string is encoded in UTF-8 format followed by a single byte of value 2 + * + * This is also known as the 'tweak', as in tweakable encryption. + */ + context?: GooglePrivacyDlpV2beta1FieldId; + /** The key used by the encryption algorithm. [required] */ + cryptoKey?: GooglePrivacyDlpV2beta1CryptoKey; + /** + * This is supported by mapping these to the alphanumeric characters + * that the FFX mode natively supports. This happens before/after + * encryption/decryption. + * Each character listed must appear only once. + * Number of characters must be in the range [2, 62]. + * This must be encoded as ASCII. + * The order of characters does not matter. + */ + customAlphabet?: string; + /** The native way to select the alphabet. Must be in the range [2, 62]. */ + radix?: number; + } + interface GooglePrivacyDlpV2beta1DatastoreKey { + /** Datastore entity key. */ + entityKey?: GooglePrivacyDlpV2beta1Key; + } + interface GooglePrivacyDlpV2beta1DatastoreOptions { + /** The kind to process. */ + kind?: GooglePrivacyDlpV2beta1KindExpression; + /** + * A partition ID identifies a grouping of entities. The grouping is always + * by project and namespace, however the namespace ID may be empty. + */ + partitionId?: GooglePrivacyDlpV2beta1PartitionId; + /** + * Properties to scan. If none are specified, all properties will be scanned + * by default. + */ + projection?: GooglePrivacyDlpV2beta1Projection[]; + } + interface GooglePrivacyDlpV2beta1DeidentificationSummary { + /** Transformations applied to the dataset. */ + transformationSummaries?: GooglePrivacyDlpV2beta1TransformationSummary[]; + /** Total size in bytes that were transformed in some way. */ + transformedBytes?: string; + } + interface GooglePrivacyDlpV2beta1DeidentifyConfig { + /** + * Treat the dataset as free-form text and apply the same free text + * transformation everywhere. + */ + infoTypeTransformations?: GooglePrivacyDlpV2beta1InfoTypeTransformations; + /** + * Treat the dataset as structured. Transformations can be applied to + * specific locations within structured datasets, such as transforming + * a column within a table. + */ + recordTransformations?: GooglePrivacyDlpV2beta1RecordTransformations; + } + interface GooglePrivacyDlpV2beta1DeidentifyContentRequest { + /** Configuration for the de-identification of the list of content items. */ + deidentifyConfig?: GooglePrivacyDlpV2beta1DeidentifyConfig; + /** Configuration for the inspector. */ + inspectConfig?: GooglePrivacyDlpV2beta1InspectConfig; + /** + * The list of items to inspect. Up to 100 are allowed per request. + * All items will be treated as text/*. + */ + items?: GooglePrivacyDlpV2beta1ContentItem[]; + } + interface GooglePrivacyDlpV2beta1DeidentifyContentResponse { + items?: GooglePrivacyDlpV2beta1ContentItem[]; + /** A review of the transformations that took place for each item. */ + summaries?: GooglePrivacyDlpV2beta1DeidentificationSummary[]; + } + interface GooglePrivacyDlpV2beta1EntityId { + /** Composite key indicating which field contains the entity identifier. */ + field?: GooglePrivacyDlpV2beta1FieldId; + } + interface GooglePrivacyDlpV2beta1Expressions { + conditions?: GooglePrivacyDlpV2beta1Conditions; + /** + * The operator to apply to the result of conditions. Default and currently + * only supported value is `AND`. + */ + logicalOperator?: string; + } + interface GooglePrivacyDlpV2beta1FieldId { + /** Name describing the field. */ + columnName?: string; + } + interface GooglePrivacyDlpV2beta1FieldTransformation { + /** + * Only apply the transformation if the condition evaluates to true for the + * given `RecordCondition`. The conditions are allowed to reference fields + * that are not used in the actual transformation. [optional] + * + * Example Use Cases: + * + * - Apply a different bucket transformation to an age column if the zip code + * column for the same record is within a specific range. + * - Redact a field if the date of birth field is greater than 85. + */ + condition?: GooglePrivacyDlpV2beta1RecordCondition; + /** Input field(s) to apply the transformation to. [required] */ + fields?: GooglePrivacyDlpV2beta1FieldId[]; + /** + * Treat the contents of the field as free text, and selectively + * transform content that matches an `InfoType`. + */ + infoTypeTransformations?: GooglePrivacyDlpV2beta1InfoTypeTransformations; + /** Apply the transformation to the entire field. */ + primitiveTransformation?: GooglePrivacyDlpV2beta1PrimitiveTransformation; + } + interface GooglePrivacyDlpV2beta1FileSet { + /** + * The url, in the format `gs:///`. Trailing wildcard in the + * path is allowed. + */ + url?: string; + } + interface GooglePrivacyDlpV2beta1Finding { + /** Timestamp when finding was detected. */ + createTime?: string; + /** The specific type of info the string might be. */ + infoType?: GooglePrivacyDlpV2beta1InfoType; + /** Estimate of how likely it is that the info_type is correct. */ + likelihood?: string; + /** Location of the info found. */ + location?: GooglePrivacyDlpV2beta1Location; + /** The specific string that may be potentially sensitive info. */ + quote?: string; + } + interface GooglePrivacyDlpV2beta1FixedSizeBucketingConfig { + /** + * Size of each bucket (except for minimum and maximum buckets). So if + * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the + * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, + * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. [Required]. + */ + bucketSize?: number; + /** + * Lower bound value of buckets. All values less than `lower_bound` are + * grouped together into a single bucket; for example if `lower_bound` = 10, + * then all values less than 10 are replaced with the value “-10”. [Required]. + */ + lowerBound?: GooglePrivacyDlpV2beta1Value; + /** + * Upper bound value of buckets. All values greater than upper_bound are + * grouped together into a single bucket; for example if `upper_bound` = 89, + * then all values greater than 89 are replaced with the value “89+”. + * [Required]. + */ + upperBound?: GooglePrivacyDlpV2beta1Value; + } + interface GooglePrivacyDlpV2beta1ImageLocation { + /** Height of the bounding box in pixels. */ + height?: number; + /** Left coordinate of the bounding box. (0,0) is upper left. */ + left?: number; + /** Top coordinate of the bounding box. (0,0) is upper left. */ + top?: number; + /** Width of the bounding box in pixels. */ + width?: number; + } + interface GooglePrivacyDlpV2beta1ImageRedactionConfig { + /** + * Only one per info_type should be provided per request. If not + * specified, and redact_all_text is false, the DLP API will redact all + * text that it matches against all info_types that are found, but not + * specified in another ImageRedactionConfig. + */ + infoType?: GooglePrivacyDlpV2beta1InfoType; + /** + * If true, all text found in the image, regardless whether it matches an + * info_type, is redacted. + */ + redactAllText?: boolean; + /** + * The color to use when redacting content from an image. If not specified, + * the default is black. + */ + redactionColor?: GooglePrivacyDlpV2beta1Color; + } + interface GooglePrivacyDlpV2beta1InfoType { + /** Name of the information type. */ + name?: string; + } + interface GooglePrivacyDlpV2beta1InfoTypeDescription { + /** List of categories this infoType belongs to. */ + categories?: GooglePrivacyDlpV2beta1CategoryDescription[]; + /** Human readable form of the infoType name. */ + displayName?: string; + /** Internal name of the infoType. */ + name?: string; + } + interface GooglePrivacyDlpV2beta1InfoTypeLimit { + /** + * Type of information the findings limit applies to. Only one limit per + * info_type should be provided. If InfoTypeLimit does not have an + * info_type, the DLP API applies the limit against all info_types that are + * found but not specified in another InfoTypeLimit. + */ + infoType?: GooglePrivacyDlpV2beta1InfoType; + /** Max findings limit for the given infoType. */ + maxFindings?: number; + } + interface GooglePrivacyDlpV2beta1InfoTypeStatistics { + /** Number of findings for this info type. */ + count?: string; + /** The type of finding this stat is for. */ + infoType?: GooglePrivacyDlpV2beta1InfoType; + } + interface GooglePrivacyDlpV2beta1InfoTypeTransformation { + /** + * Info types to apply the transformation to. Empty list will match all + * available info types for this transformation. + */ + infoTypes?: GooglePrivacyDlpV2beta1InfoType[]; + /** Primitive transformation to apply to the info type. [required] */ + primitiveTransformation?: GooglePrivacyDlpV2beta1PrimitiveTransformation; + } + interface GooglePrivacyDlpV2beta1InfoTypeTransformations { + /** + * Transformation for each info type. Cannot specify more than one + * for a given info type. [required] + */ + transformations?: GooglePrivacyDlpV2beta1InfoTypeTransformation[]; + } + interface GooglePrivacyDlpV2beta1InspectConfig { + /** When true, excludes type information of the findings. */ + excludeTypes?: boolean; + /** + * When true, a contextual quote from the data that triggered a finding is + * included in the response; see Finding.quote. + */ + includeQuote?: boolean; + /** Configuration of findings limit given for specified info types. */ + infoTypeLimits?: GooglePrivacyDlpV2beta1InfoTypeLimit[]; + /** + * Restricts what info_types to look for. The values must correspond to + * InfoType values returned by ListInfoTypes or found in documentation. + * Empty info_types runs all enabled detectors. + */ + infoTypes?: GooglePrivacyDlpV2beta1InfoType[]; + /** Limits the number of findings per content item or long running operation. */ + maxFindings?: number; + /** Only returns findings equal or above this threshold. */ + minLikelihood?: string; + } + interface GooglePrivacyDlpV2beta1InspectContentRequest { + /** Configuration for the inspector. */ + inspectConfig?: GooglePrivacyDlpV2beta1InspectConfig; + /** + * The list of items to inspect. Items in a single request are + * considered "related" unless inspect_config.independent_inputs is true. + * Up to 100 are allowed per request. + */ + items?: GooglePrivacyDlpV2beta1ContentItem[]; + } + interface GooglePrivacyDlpV2beta1InspectContentResponse { + /** + * Each content_item from the request has a result in this list, in the + * same order as the request. + */ + results?: GooglePrivacyDlpV2beta1InspectResult[]; + } + interface GooglePrivacyDlpV2beta1InspectOperationMetadata { + /** The time which this request was started. */ + createTime?: string; + infoTypeStats?: GooglePrivacyDlpV2beta1InfoTypeStatistics[]; + /** Total size in bytes that were processed. */ + processedBytes?: string; + /** The inspect config used to create the Operation. */ + requestInspectConfig?: GooglePrivacyDlpV2beta1InspectConfig; + /** Optional location to store findings. */ + requestOutputConfig?: GooglePrivacyDlpV2beta1OutputStorageConfig; + /** The storage config used to create the Operation. */ + requestStorageConfig?: GooglePrivacyDlpV2beta1StorageConfig; + /** Estimate of the number of bytes to process. */ + totalEstimatedBytes?: string; + } + interface GooglePrivacyDlpV2beta1InspectOperationResult { + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `inspect/results/{id}`. + */ + name?: string; + } + interface GooglePrivacyDlpV2beta1InspectResult { + /** List of findings for an item. */ + findings?: GooglePrivacyDlpV2beta1Finding[]; + /** + * If true, then this item might have more findings than were returned, + * and the findings returned are an arbitrary subset of all findings. + * The findings list might be truncated because the input items were too + * large, or because the server reached the maximum amount of resources + * allowed for a single API call. For best results, divide the input into + * smaller batches. + */ + findingsTruncated?: boolean; + } + interface GooglePrivacyDlpV2beta1KAnonymityConfig { + /** + * Optional message indicating that each distinct `EntityId` should not + * contribute to the k-anonymity count more than once per equivalence class. + */ + entityId?: GooglePrivacyDlpV2beta1EntityId; + /** + * Set of fields to compute k-anonymity over. When multiple fields are + * specified, they are considered a single composite key. Structs and + * repeated data types are not supported; however, nested fields are + * supported so long as they are not structs themselves or nested within + * a repeated field. + */ + quasiIds?: GooglePrivacyDlpV2beta1FieldId[]; + } + interface GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass { + /** + * Size of the equivalence class, for example number of rows with the + * above set of values. + */ + equivalenceClassSize?: string; + /** + * Set of values defining the equivalence class. One value per + * quasi-identifier column in the original KAnonymity metric message. + * The order is always the same as the original request. + */ + quasiIdsValues?: GooglePrivacyDlpV2beta1Value[]; + } + interface GooglePrivacyDlpV2beta1KAnonymityHistogramBucket { + /** Total number of records in this bucket. */ + bucketSize?: string; + /** + * Sample of equivalence classes in this bucket. The total number of + * classes returned per bucket is capped at 20. + */ + bucketValues?: GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass[]; + /** Lower bound on the size of the equivalence classes in this bucket. */ + equivalenceClassSizeLowerBound?: string; + /** Upper bound on the size of the equivalence classes in this bucket. */ + equivalenceClassSizeUpperBound?: string; + } + interface GooglePrivacyDlpV2beta1KAnonymityResult { + /** Histogram of k-anonymity equivalence classes. */ + equivalenceClassHistogramBuckets?: GooglePrivacyDlpV2beta1KAnonymityHistogramBucket[]; + } + interface GooglePrivacyDlpV2beta1Key { + /** + * Entities are partitioned into subsets, currently identified by a project + * ID and namespace ID. + * Queries are scoped to a single partition. + */ + partitionId?: GooglePrivacyDlpV2beta1PartitionId; + /** + * The entity path. + * An entity path consists of one or more elements composed of a kind and a + * string or numerical identifier, which identify entities. The first + * element identifies a _root entity_, the second element identifies + * a _child_ of the root entity, the third element identifies a child of the + * second entity, and so forth. The entities identified by all prefixes of + * the path are called the element's _ancestors_. + * + * A path can never be empty, and a path can have at most 100 elements. + */ + path?: GooglePrivacyDlpV2beta1PathElement[]; + } + interface GooglePrivacyDlpV2beta1KindExpression { + /** The name of the kind. */ + name?: string; + } + interface GooglePrivacyDlpV2beta1KmsWrappedCryptoKey { + /** The resource name of the KMS CryptoKey to use for unwrapping. [required] */ + cryptoKeyName?: string; + /** The wrapped data crypto key. [required] */ + wrappedKey?: string; + } + interface GooglePrivacyDlpV2beta1LDiversityConfig { + /** + * Set of quasi-identifiers indicating how equivalence classes are + * defined for the l-diversity computation. When multiple fields are + * specified, they are considered a single composite key. + */ + quasiIds?: GooglePrivacyDlpV2beta1FieldId[]; + /** Sensitive field for computing the l-value. */ + sensitiveAttribute?: GooglePrivacyDlpV2beta1FieldId; + } + interface GooglePrivacyDlpV2beta1LDiversityEquivalenceClass { + /** Size of the k-anonymity equivalence class. */ + equivalenceClassSize?: string; + /** Number of distinct sensitive values in this equivalence class. */ + numDistinctSensitiveValues?: string; + /** + * Quasi-identifier values defining the k-anonymity equivalence + * class. The order is always the same as the original request. + */ + quasiIdsValues?: GooglePrivacyDlpV2beta1Value[]; + /** Estimated frequencies of top sensitive values. */ + topSensitiveValues?: GooglePrivacyDlpV2beta1ValueFrequency[]; + } + interface GooglePrivacyDlpV2beta1LDiversityHistogramBucket { + /** Total number of records in this bucket. */ + bucketSize?: string; + /** + * Sample of equivalence classes in this bucket. The total number of + * classes returned per bucket is capped at 20. + */ + bucketValues?: GooglePrivacyDlpV2beta1LDiversityEquivalenceClass[]; + /** + * Lower bound on the sensitive value frequencies of the equivalence + * classes in this bucket. + */ + sensitiveValueFrequencyLowerBound?: string; + /** + * Upper bound on the sensitive value frequencies of the equivalence + * classes in this bucket. + */ + sensitiveValueFrequencyUpperBound?: string; + } + interface GooglePrivacyDlpV2beta1LDiversityResult { + /** Histogram of l-diversity equivalence class sensitive value frequencies. */ + sensitiveValueFrequencyHistogramBuckets?: GooglePrivacyDlpV2beta1LDiversityHistogramBucket[]; + } + interface GooglePrivacyDlpV2beta1ListInfoTypesResponse { + /** Set of sensitive info types belonging to a category. */ + infoTypes?: GooglePrivacyDlpV2beta1InfoTypeDescription[]; + } + interface GooglePrivacyDlpV2beta1ListInspectFindingsResponse { + /** + * If not empty, indicates that there may be more results that match the + * request; this value should be passed in a new `ListInspectFindingsRequest`. + */ + nextPageToken?: string; + /** The results. */ + result?: GooglePrivacyDlpV2beta1InspectResult; + } + interface GooglePrivacyDlpV2beta1ListRootCategoriesResponse { + /** List of all into type categories supported by the API. */ + categories?: GooglePrivacyDlpV2beta1CategoryDescription[]; + } + interface GooglePrivacyDlpV2beta1Location { + /** Zero-based byte offsets within a content item. */ + byteRange?: GooglePrivacyDlpV2beta1Range; + /** + * Character offsets within a content item, included when content type + * is a text. Default charset assumed to be UTF-8. + */ + codepointRange?: GooglePrivacyDlpV2beta1Range; + /** Field id of the field containing the finding. */ + fieldId?: GooglePrivacyDlpV2beta1FieldId; + /** Location within an image's pixels. */ + imageBoxes?: GooglePrivacyDlpV2beta1ImageLocation[]; + /** Key of the finding. */ + recordKey?: GooglePrivacyDlpV2beta1RecordKey; + /** Location within a `ContentItem.Table`. */ + tableLocation?: GooglePrivacyDlpV2beta1TableLocation; + } + interface GooglePrivacyDlpV2beta1NumericalStatsConfig { + /** + * Field to compute numerical stats on. Supported types are + * integer, float, date, datetime, timestamp, time. + */ + field?: GooglePrivacyDlpV2beta1FieldId; + } + interface GooglePrivacyDlpV2beta1NumericalStatsResult { + /** Maximum value appearing in the column. */ + maxValue?: GooglePrivacyDlpV2beta1Value; + /** Minimum value appearing in the column. */ + minValue?: GooglePrivacyDlpV2beta1Value; + /** + * List of 99 values that partition the set of field values into 100 equal + * sized buckets. + */ + quantileValues?: GooglePrivacyDlpV2beta1Value[]; + } + interface GooglePrivacyDlpV2beta1OperationConfig { + /** Max number of findings per file, Datastore entity, or database row. */ + maxItemFindings?: string; + } + interface GooglePrivacyDlpV2beta1OutputStorageConfig { + /** + * The path to a Google Cloud Storage location to store output. + * The bucket must already exist and + * the Google APIs service account for DLP must have write permission to + * write to the given bucket. + * Results are split over multiple csv files with each file name matching + * the pattern "[operation_id]_[count].csv", for example + * `3094877188788974909_1.csv`. The `operation_id` matches the + * identifier for the Operation, and the `count` is a counter used for + * tracking the number of files written. + * + * The CSV file(s) contain the following columns regardless of storage type + * scanned: + * - id + * - info_type + * - likelihood + * - byte size of finding + * - quote + * - timestamp + * + * For Cloud Storage the next columns are: + * + * - file_path + * - start_offset + * + * For Cloud Datastore the next columns are: + * + * - project_id + * - namespace_id + * - path + * - column_name + * - offset + * + * For BigQuery the next columns are: + * + * - row_number + * - project_id + * - dataset_id + * - table_id + */ + storagePath?: GooglePrivacyDlpV2beta1CloudStoragePath; + /** Store findings in a new table in the dataset. */ + table?: GooglePrivacyDlpV2beta1BigQueryTable; + } + interface GooglePrivacyDlpV2beta1PartitionId { + /** If not empty, the ID of the namespace to which the entities belong. */ + namespaceId?: string; + /** The ID of the project to which the entities belong. */ + projectId?: string; + } + interface GooglePrivacyDlpV2beta1PathElement { + /** + * The auto-allocated ID of the entity. + * Never equal to zero. Values less than zero are discouraged and may not + * be supported in the future. + */ + id?: string; + /** + * The kind of the entity. + * A kind matching regex `__.*__` is reserved/read-only. + * A kind must not contain more than 1500 bytes when UTF-8 encoded. + * Cannot be `""`. + */ + kind?: string; + /** + * The name of the entity. + * A name matching regex `__.*__` is reserved/read-only. + * A name must not be more than 1500 bytes when UTF-8 encoded. + * Cannot be `""`. + */ + name?: string; + } + interface GooglePrivacyDlpV2beta1PrimitiveTransformation { + bucketingConfig?: GooglePrivacyDlpV2beta1BucketingConfig; + characterMaskConfig?: GooglePrivacyDlpV2beta1CharacterMaskConfig; + cryptoHashConfig?: GooglePrivacyDlpV2beta1CryptoHashConfig; + cryptoReplaceFfxFpeConfig?: GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig; + fixedSizeBucketingConfig?: GooglePrivacyDlpV2beta1FixedSizeBucketingConfig; + redactConfig?: any; + replaceConfig?: GooglePrivacyDlpV2beta1ReplaceValueConfig; + replaceWithInfoTypeConfig?: any; + timePartConfig?: GooglePrivacyDlpV2beta1TimePartConfig; + } + interface GooglePrivacyDlpV2beta1PrivacyMetric { + categoricalStatsConfig?: GooglePrivacyDlpV2beta1CategoricalStatsConfig; + kAnonymityConfig?: GooglePrivacyDlpV2beta1KAnonymityConfig; + lDiversityConfig?: GooglePrivacyDlpV2beta1LDiversityConfig; + numericalStatsConfig?: GooglePrivacyDlpV2beta1NumericalStatsConfig; + } + interface GooglePrivacyDlpV2beta1Projection { + /** The property to project. */ + property?: GooglePrivacyDlpV2beta1PropertyReference; + } + interface GooglePrivacyDlpV2beta1PropertyReference { + /** + * The name of the property. + * If name includes "."s, it may be interpreted as a property name path. + */ + name?: string; + } + interface GooglePrivacyDlpV2beta1Range { + /** Index of the last character of the range (exclusive). */ + end?: string; + /** Index of the first character of the range (inclusive). */ + start?: string; + } + interface GooglePrivacyDlpV2beta1RecordCondition { + expressions?: GooglePrivacyDlpV2beta1Expressions; + } + interface GooglePrivacyDlpV2beta1RecordKey { + cloudStorageKey?: GooglePrivacyDlpV2beta1CloudStorageKey; + datastoreKey?: GooglePrivacyDlpV2beta1DatastoreKey; + } + interface GooglePrivacyDlpV2beta1RecordSuppression { + condition?: GooglePrivacyDlpV2beta1RecordCondition; + } + interface GooglePrivacyDlpV2beta1RecordTransformations { + /** Transform the record by applying various field transformations. */ + fieldTransformations?: GooglePrivacyDlpV2beta1FieldTransformation[]; + /** + * Configuration defining which records get suppressed entirely. Records that + * match any suppression rule are omitted from the output [optional]. + */ + recordSuppressions?: GooglePrivacyDlpV2beta1RecordSuppression[]; + } + interface GooglePrivacyDlpV2beta1RedactContentRequest { + /** The configuration for specifying what content to redact from images. */ + imageRedactionConfigs?: GooglePrivacyDlpV2beta1ImageRedactionConfig[]; + /** Configuration for the inspector. */ + inspectConfig?: GooglePrivacyDlpV2beta1InspectConfig; + /** The list of items to inspect. Up to 100 are allowed per request. */ + items?: GooglePrivacyDlpV2beta1ContentItem[]; + /** + * The strings to replace findings text findings with. Must specify at least + * one of these or one ImageRedactionConfig if redacting images. + */ + replaceConfigs?: GooglePrivacyDlpV2beta1ReplaceConfig[]; + } + interface GooglePrivacyDlpV2beta1RedactContentResponse { + /** The redacted content. */ + items?: GooglePrivacyDlpV2beta1ContentItem[]; + } + interface GooglePrivacyDlpV2beta1ReplaceConfig { + /** + * Type of information to replace. Only one ReplaceConfig per info_type + * should be provided. If ReplaceConfig does not have an info_type, the DLP + * API matches it against all info_types that are found but not specified in + * another ReplaceConfig. + */ + infoType?: GooglePrivacyDlpV2beta1InfoType; + /** Content replacing sensitive information of given type. Max 256 chars. */ + replaceWith?: string; + } + interface GooglePrivacyDlpV2beta1ReplaceValueConfig { + /** Value to replace it with. */ + newValue?: GooglePrivacyDlpV2beta1Value; + } + interface GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata { + /** The time which this request was started. */ + createTime?: string; + /** Privacy metric to compute. */ + requestedPrivacyMetric?: GooglePrivacyDlpV2beta1PrivacyMetric; + /** Input dataset to compute metrics over. */ + requestedSourceTable?: GooglePrivacyDlpV2beta1BigQueryTable; + } + interface GooglePrivacyDlpV2beta1RiskAnalysisOperationResult { + categoricalStatsResult?: GooglePrivacyDlpV2beta1CategoricalStatsResult; + kAnonymityResult?: GooglePrivacyDlpV2beta1KAnonymityResult; + lDiversityResult?: GooglePrivacyDlpV2beta1LDiversityResult; + numericalStatsResult?: GooglePrivacyDlpV2beta1NumericalStatsResult; + } + interface GooglePrivacyDlpV2beta1Row { + values?: GooglePrivacyDlpV2beta1Value[]; + } + interface GooglePrivacyDlpV2beta1StorageConfig { + /** BigQuery options specification. */ + bigQueryOptions?: GooglePrivacyDlpV2beta1BigQueryOptions; + /** Google Cloud Storage options specification. */ + cloudStorageOptions?: GooglePrivacyDlpV2beta1CloudStorageOptions; + /** Google Cloud Datastore options specification. */ + datastoreOptions?: GooglePrivacyDlpV2beta1DatastoreOptions; + } + interface GooglePrivacyDlpV2beta1SummaryResult { + code?: string; + count?: string; + /** + * A place for warnings or errors to show up if a transformation didn't + * work as expected. + */ + details?: string; + } + interface GooglePrivacyDlpV2beta1Table { + headers?: GooglePrivacyDlpV2beta1FieldId[]; + rows?: GooglePrivacyDlpV2beta1Row[]; + } + interface GooglePrivacyDlpV2beta1TableLocation { + /** The zero-based index of the row where the finding is located. */ + rowIndex?: string; + } + interface GooglePrivacyDlpV2beta1TimePartConfig { + partToExtract?: string; + } + interface GooglePrivacyDlpV2beta1TransformationSummary { + /** Set if the transformation was limited to a specific FieldId. */ + field?: GooglePrivacyDlpV2beta1FieldId; + /** + * The field transformation that was applied. This list will contain + * multiple only in the case of errors. + */ + fieldTransformations?: GooglePrivacyDlpV2beta1FieldTransformation[]; + /** Set if the transformation was limited to a specific info_type. */ + infoType?: GooglePrivacyDlpV2beta1InfoType; + /** The specific suppression option these stats apply to. */ + recordSuppress?: GooglePrivacyDlpV2beta1RecordSuppression; + results?: GooglePrivacyDlpV2beta1SummaryResult[]; + /** The specific transformation these stats apply to. */ + transformation?: GooglePrivacyDlpV2beta1PrimitiveTransformation; + } + interface GooglePrivacyDlpV2beta1TransientCryptoKey { + /** + * Name of the key. [required] + * This is an arbitrary string used to differentiate different keys. + * A unique key is generated per name: two separate `TransientCryptoKey` + * protos share the same generated key if their names are the same. + * When the data crypto key is generated, this name is not used in any way + * (repeating the api call will result in a different key being generated). + */ + name?: string; + } + interface GooglePrivacyDlpV2beta1UnwrappedCryptoKey { + /** The AES 128/192/256 bit key. [required] */ + key?: string; + } + interface GooglePrivacyDlpV2beta1Value { + booleanValue?: boolean; + dateValue?: GoogleTypeDate; + floatValue?: number; + integerValue?: string; + stringValue?: string; + timeValue?: GoogleTypeTimeOfDay; + timestampValue?: string; + } + interface GooglePrivacyDlpV2beta1ValueFrequency { + /** How many times the value is contained in the field. */ + count?: string; + /** A value contained in the field in question. */ + value?: GooglePrivacyDlpV2beta1Value; + } + interface GoogleRpcStatus { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface GoogleTypeDate { + /** + * 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. */ + month?: number; + /** + * Year of date. Must be from 1 to 9999, or 0 if specifying a date without + * a year. + */ + year?: number; + } + interface GoogleTypeTimeOfDay { + /** + * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + * to allow the value "24:00:00" for scenarios like business closing time. + */ + hours?: number; + /** Minutes of hour of day. Must be from 0 to 59. */ + minutes?: number; + /** Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. */ + nanos?: number; + /** + * Seconds of minutes of the time. Must normally be from 0 to 59. An API may + * allow the value 60 if it allows leap-seconds. + */ + seconds?: number; + } + interface ContentResource { + /** + * De-identifies potentially sensitive info from a list of strings. + * This method has limits on input size and output size. + */ + deidentify(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Finds potentially sensitive info in a list of strings. + * This method has limits on input size, processing time, and output size. + */ + inspect(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Redacts potentially sensitive info from a list of strings. + * This method has limits on input size, processing time, and output size. + */ + redact(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DataSourceResource { + /** + * Schedules a job to compute risk analysis metrics over content in a Google + * Cloud Platform repository. + */ + analyze(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface OperationsResource { + /** Cancels an operation. Use the `inspect.operations.get` to check whether the cancellation succeeded or the operation completed despite cancellation. */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be cancelled. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Schedules a job scanning content in a Google Cloud Platform data + * repository. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** This method is not supported and the server returns `UNIMPLEMENTED`. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be deleted. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Fetches the list of long running operations. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filters by `done`. That is, `done=true` or `done=false`. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation's parent resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The list page size. The maximum allowed value is 256 and the default is 100. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface FindingsResource { + /** Returns list of results for given inspect operation result set id. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Restricts findings to items that match. Supports info_type and likelihood. + * + * Examples: + * + * - info_type=EMAIL_ADDRESS + * - info_type=PHONE_NUMBER,EMAIL_ADDRESS + * - likelihood=VERY_LIKELY + * - likelihood=VERY_LIKELY,LIKELY + * - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Identifier of the results set returned as metadata of + * the longrunning operation created by a call to InspectDataSource. + * Should be in the format of `inspect/results/{id}`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Maximum number of results to return. + * If 0, the implementation selects a reasonable value. + */ + pageSize?: number; + /** + * The value returned by the last `ListInspectFindingsResponse`; indicates + * that this is a continuation of a prior `ListInspectFindings` call, and that + * the system should return the next page of data. + */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ResultsResource { + findings: FindingsResource; + } + interface InspectResource { + operations: OperationsResource; + results: ResultsResource; + } + interface OperationsResource { + /** Cancels an operation. Use the `inspect.operations.get` to check whether the cancellation succeeded or the operation completed despite cancellation. */ + cancel(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be cancelled. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** This method is not supported and the server returns `UNIMPLEMENTED`. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource to be deleted. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Fetches the list of long running operations. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Filters by `done`. That is, `done=true` or `done=false`. */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name of the operation's parent resource. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The list page size. The maximum allowed value is 256 and the default is 100. */ + pageSize?: number; + /** The standard list page token. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface RiskAnalysisResource { + operations: OperationsResource; + } + interface InfoTypesResource { + /** Returns sensitive information types for given category. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Category name as returned by ListRootCategories. */ + category: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Optional BCP-47 language code for localized info type friendly + * names. If omitted, or if localized strings are not available, + * en-US strings will be returned. + */ + languageCode?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface RootCategoriesResource { + /** Returns the list of root categories of sensitive information. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Optional language code for localized friendly category names. + * If omitted or if localized strings are not available, + * en-US strings will be returned. + */ + languageCode?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + infoTypes: InfoTypesResource; + } + } +} diff --git a/types/gapi.client.dlp/readme.md b/types/gapi.client.dlp/readme.md new file mode 100644 index 0000000000..8a9a52d069 --- /dev/null +++ b/types/gapi.client.dlp/readme.md @@ -0,0 +1,83 @@ +# TypeScript typings for DLP API v2beta1 +The Google Data Loss Prevention API provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories. +For detailed description please check [documentation](https://cloud.google.com/dlp/docs/). + +## Installing + +Install typings for DLP API: +``` +npm install @types/gapi.client.dlp@v2beta1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('dlp', 'v2beta1', () => { + // now we can use gapi.client.dlp + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use DLP API resources: + +```typescript + +/* +De-identifies potentially sensitive info from a list of strings. +This method has limits on input size and output size. +*/ +await gapi.client.content.deidentify({ }); + +/* +Finds potentially sensitive info in a list of strings. +This method has limits on input size, processing time, and output size. +*/ +await gapi.client.content.inspect({ }); + +/* +Redacts potentially sensitive info from a list of strings. +This method has limits on input size, processing time, and output size. +*/ +await gapi.client.content.redact({ }); + +/* +Schedules a job to compute risk analysis metrics over content in a Google +Cloud Platform repository. +*/ +await gapi.client.dataSource.analyze({ }); + +/* +Returns the list of root categories of sensitive information. +*/ +await gapi.client.rootCategories.list({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.dlp/tsconfig.json b/types/gapi.client.dlp/tsconfig.json new file mode 100644 index 0000000000..b7ab822674 --- /dev/null +++ b/types/gapi.client.dlp/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.dlp-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.dlp/tslint.json b/types/gapi.client.dlp/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.dlp/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.dns/gapi.client.dns-tests.ts b/types/gapi.client.dns/gapi.client.dns-tests.ts new file mode 100644 index 0000000000..16164e4e41 --- /dev/null +++ b/types/gapi.client.dns/gapi.client.dns-tests.ts @@ -0,0 +1,92 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('dns', 'v1', () => { + /** now we can use gapi.client.dns */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform.read-only', + /** View your DNS records hosted by Google Cloud DNS */ + 'https://www.googleapis.com/auth/ndev.clouddns.readonly', + /** View and manage your DNS records hosted by Google Cloud DNS */ + 'https://www.googleapis.com/auth/ndev.clouddns.readwrite', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Atomically update the ResourceRecordSet collection. */ + await gapi.client.changes.create({ + managedZone: "managedZone", + project: "project", + }); + /** Fetch the representation of an existing Change. */ + await gapi.client.changes.get({ + changeId: "changeId", + managedZone: "managedZone", + project: "project", + }); + /** Enumerate Changes to a ResourceRecordSet collection. */ + await gapi.client.changes.list({ + managedZone: "managedZone", + maxResults: 2, + pageToken: "pageToken", + project: "project", + sortBy: "sortBy", + sortOrder: "sortOrder", + }); + /** Create a new ManagedZone. */ + await gapi.client.managedZones.create({ + project: "project", + }); + /** Delete a previously created ManagedZone. */ + await gapi.client.managedZones.delete({ + managedZone: "managedZone", + project: "project", + }); + /** Fetch the representation of an existing ManagedZone. */ + await gapi.client.managedZones.get({ + managedZone: "managedZone", + project: "project", + }); + /** Enumerate ManagedZones that have been created but not yet deleted. */ + await gapi.client.managedZones.list({ + dnsName: "dnsName", + maxResults: 2, + pageToken: "pageToken", + project: "project", + }); + /** Fetch the representation of an existing Project. */ + await gapi.client.projects.get({ + project: "project", + }); + /** Enumerate ResourceRecordSets that have been created but not yet deleted. */ + await gapi.client.resourceRecordSets.list({ + managedZone: "managedZone", + maxResults: 2, + name: "name", + pageToken: "pageToken", + project: "project", + type: "type", + }); + } +}); diff --git a/types/gapi.client.dns/index.d.ts b/types/gapi.client.dns/index.d.ts new file mode 100644 index 0000000000..c97f2c0240 --- /dev/null +++ b/types/gapi.client.dns/index.d.ts @@ -0,0 +1,392 @@ +// Type definitions for Google Google Cloud DNS API v1 1.0 +// Project: https://developers.google.com/cloud-dns +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/dns/v1/rest + +/// + +declare namespace gapi.client { + /** Load Google Cloud DNS API v1 */ + function load(name: "dns", version: "v1"): PromiseLike; + function load(name: "dns", version: "v1", callback: () => any): void; + + const changes: dns.ChangesResource; + + const managedZones: dns.ManagedZonesResource; + + const projects: dns.ProjectsResource; + + const resourceRecordSets: dns.ResourceRecordSetsResource; + + namespace dns { + interface Change { + /** Which ResourceRecordSets to add? */ + additions?: ResourceRecordSet[]; + /** Which ResourceRecordSets to remove? Must match existing data exactly. */ + deletions?: ResourceRecordSet[]; + /** Unique identifier for the resource; defined by the server (output only). */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dns#change". */ + kind?: string; + /** The time that this operation was started by the server (output only). This is in RFC3339 text format. */ + startTime?: string; + /** Status of the operation (output only). */ + status?: string; + } + interface ChangesListResponse { + /** The requested changes. */ + changes?: Change[]; + /** Type of resource. */ + kind?: string; + /** + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another + * list request using this value as your pagination token. + * + * In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change + * between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to + * retrieve a "snapshot" of collections larger than the maximum page size. + */ + nextPageToken?: string; + } + interface ManagedZone { + /** The time that this resource was created on the server. This is in RFC3339 text format. Output only. */ + creationTime?: string; + /** A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function. */ + description?: string; + /** The DNS name of this managed zone, for instance "example.com.". */ + dnsName?: string; + /** Unique identifier for the resource; defined by the server (output only) */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dns#managedZone". */ + kind?: string; + /** + * User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a + * letter or digit, and only contain lowercase letters, digits or dashes. + */ + name?: string; + /** + * Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most + * users will leave this field unset. + */ + nameServerSet?: string; + /** Delegate your managed_zone to these virtual name servers; defined by the server (output only) */ + nameServers?: string[]; + } + interface ManagedZonesListResponse { + /** Type of resource. */ + kind?: string; + /** The managed zone resources. */ + managedZones?: ManagedZone[]; + /** + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another + * list request using this value as your page token. + * + * In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change + * between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to + * retrieve a consistent snapshot of a collection larger than the maximum page size. + */ + nextPageToken?: string; + } + interface Project { + /** User assigned unique identifier for the resource (output only). */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "dns#project". */ + kind?: string; + /** Unique numeric identifier for the resource; defined by the server (output only). */ + number?: string; + /** Quotas assigned to this project (output only). */ + quota?: Quota; + } + interface Quota { + /** Identifies what kind of resource this is. Value: the fixed string "dns#quota". */ + kind?: string; + /** Maximum allowed number of managed zones in the project. */ + managedZones?: number; + /** Maximum allowed number of ResourceRecords per ResourceRecordSet. */ + resourceRecordsPerRrset?: number; + /** Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest. */ + rrsetAdditionsPerChange?: number; + /** Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest. */ + rrsetDeletionsPerChange?: number; + /** Maximum allowed number of ResourceRecordSets per zone in the project. */ + rrsetsPerManagedZone?: number; + /** Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes. */ + totalRrdataSizePerChange?: number; + } + interface ResourceRecordSet { + /** Identifies what kind of resource this is. Value: the fixed string "dns#resourceRecordSet". */ + kind?: string; + /** For example, www.example.com. */ + name?: string; + /** As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). */ + rrdatas?: string[]; + /** Number of seconds that this ResourceRecordSet can be cached by resolvers. */ + ttl?: number; + /** The identifier of a supported record type, for example, A, AAAA, MX, TXT, and so on. */ + type?: string; + } + interface ResourceRecordSetsListResponse { + /** Type of resource. */ + kind?: string; + /** + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another + * list request using this value as your pagination token. + * + * In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change + * between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to + * retrieve a consistent snapshot of a collection larger than the maximum page size. + */ + nextPageToken?: string; + /** The resource record set resources. */ + rrsets?: ResourceRecordSet[]; + } + interface ChangesResource { + /** Atomically update the ResourceRecordSet collection. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Identifies the managed zone addressed by this request. Can be the managed zone name or id. */ + managedZone: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Fetch the representation of an existing Change. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. */ + changeId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Identifies the managed zone addressed by this request. Can be the managed zone name or id. */ + managedZone: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Enumerate Changes to a ResourceRecordSet collection. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Identifies the managed zone addressed by this request. Can be the managed zone name or id. */ + managedZone: string; + /** Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Sorting criterion. The only supported value is change sequence. */ + sortBy?: string; + /** Sorting order direction: 'ascending' or 'descending'. */ + sortOrder?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ManagedZonesResource { + /** Create a new ManagedZone. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Delete a previously created ManagedZone. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Identifies the managed zone addressed by this request. Can be the managed zone name or id. */ + managedZone: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Fetch the representation of an existing ManagedZone. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Identifies the managed zone addressed by this request. Can be the managed zone name or id. */ + managedZone: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Enumerate ManagedZones that have been created but not yet deleted. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Restricts the list to return only zones with this domain name. */ + dnsName?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ProjectsResource { + /** Fetch the representation of an existing Project. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ResourceRecordSetsResource { + /** Enumerate ResourceRecordSets that have been created but not yet deleted. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Identifies the managed zone addressed by this request. Can be the managed zone name or id. */ + managedZone: string; + /** Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. */ + maxResults?: number; + /** Restricts the list to return only records with this fully qualified domain name. */ + name?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Identifies the project addressed by this request. */ + project: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Restricts the list to return only records of this type. If present, the "name" parameter must also be present. */ + type?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.dns/readme.md b/types/gapi.client.dns/readme.md new file mode 100644 index 0000000000..2f7171937e --- /dev/null +++ b/types/gapi.client.dns/readme.md @@ -0,0 +1,108 @@ +# TypeScript typings for Google Cloud DNS API v1 +Configures and serves authoritative DNS records. +For detailed description please check [documentation](https://developers.google.com/cloud-dns). + +## Installing + +Install typings for Google Cloud DNS API: +``` +npm install @types/gapi.client.dns@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('dns', 'v1', () => { + // now we can use gapi.client.dns + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + + // View your DNS records hosted by Google Cloud DNS + 'https://www.googleapis.com/auth/ndev.clouddns.readonly', + + // View and manage your DNS records hosted by Google Cloud DNS + 'https://www.googleapis.com/auth/ndev.clouddns.readwrite', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud DNS API resources: + +```typescript + +/* +Atomically update the ResourceRecordSet collection. +*/ +await gapi.client.changes.create({ managedZone: "managedZone", project: "project", }); + +/* +Fetch the representation of an existing Change. +*/ +await gapi.client.changes.get({ changeId: "changeId", managedZone: "managedZone", project: "project", }); + +/* +Enumerate Changes to a ResourceRecordSet collection. +*/ +await gapi.client.changes.list({ managedZone: "managedZone", project: "project", }); + +/* +Create a new ManagedZone. +*/ +await gapi.client.managedZones.create({ project: "project", }); + +/* +Delete a previously created ManagedZone. +*/ +await gapi.client.managedZones.delete({ managedZone: "managedZone", project: "project", }); + +/* +Fetch the representation of an existing ManagedZone. +*/ +await gapi.client.managedZones.get({ managedZone: "managedZone", project: "project", }); + +/* +Enumerate ManagedZones that have been created but not yet deleted. +*/ +await gapi.client.managedZones.list({ project: "project", }); + +/* +Fetch the representation of an existing Project. +*/ +await gapi.client.projects.get({ project: "project", }); + +/* +Enumerate ResourceRecordSets that have been created but not yet deleted. +*/ +await gapi.client.resourceRecordSets.list({ managedZone: "managedZone", project: "project", }); +``` \ No newline at end of file diff --git a/types/gapi.client.dns/tsconfig.json b/types/gapi.client.dns/tsconfig.json new file mode 100644 index 0000000000..93f3858c6c --- /dev/null +++ b/types/gapi.client.dns/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.dns-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.dns/tslint.json b/types/gapi.client.dns/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.dns/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.doubleclickbidmanager/gapi.client.doubleclickbidmanager-tests.ts b/types/gapi.client.doubleclickbidmanager/gapi.client.doubleclickbidmanager-tests.ts new file mode 100644 index 0000000000..85dbaea986 --- /dev/null +++ b/types/gapi.client.doubleclickbidmanager/gapi.client.doubleclickbidmanager-tests.ts @@ -0,0 +1,63 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('doubleclickbidmanager', 'v1', () => { + /** now we can use gapi.client.doubleclickbidmanager */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your reports in DoubleClick Bid Manager */ + 'https://www.googleapis.com/auth/doubleclickbidmanager', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Retrieves line items in CSV format. */ + await gapi.client.lineitems.downloadlineitems({ + }); + /** Uploads line items in CSV format. */ + await gapi.client.lineitems.uploadlineitems({ + }); + /** Creates a query. */ + await gapi.client.queries.createquery({ + }); + /** Deletes a stored query as well as the associated stored reports. */ + await gapi.client.queries.deletequery({ + queryId: "queryId", + }); + /** Retrieves a stored query. */ + await gapi.client.queries.getquery({ + queryId: "queryId", + }); + /** Retrieves stored queries. */ + await gapi.client.queries.listqueries({ + }); + /** Runs a stored query to generate a report. */ + await gapi.client.queries.runquery({ + queryId: "queryId", + }); + /** Retrieves stored reports. */ + await gapi.client.reports.listreports({ + queryId: "queryId", + }); + /** Retrieves entities in SDF format. */ + await gapi.client.sdf.download({ + }); + } +}); diff --git a/types/gapi.client.doubleclickbidmanager/index.d.ts b/types/gapi.client.doubleclickbidmanager/index.d.ts new file mode 100644 index 0000000000..13274ff247 --- /dev/null +++ b/types/gapi.client.doubleclickbidmanager/index.d.ts @@ -0,0 +1,435 @@ +// Type definitions for Google DoubleClick Bid Manager API v1 1.0 +// Project: https://developers.google.com/bid-manager/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/doubleclickbidmanager/v1/rest + +/// + +declare namespace gapi.client { + /** Load DoubleClick Bid Manager API v1 */ + function load(name: "doubleclickbidmanager", version: "v1"): PromiseLike; + function load(name: "doubleclickbidmanager", version: "v1", callback: () => any): void; + + const lineitems: doubleclickbidmanager.LineitemsResource; + + const queries: doubleclickbidmanager.QueriesResource; + + const reports: doubleclickbidmanager.ReportsResource; + + const sdf: doubleclickbidmanager.SdfResource; + + namespace doubleclickbidmanager { + interface DownloadLineItemsRequest { + /** File specification (column names, types, order) in which the line items will be returned. Default to EWF. */ + fileSpec?: string; + /** Ids of the specified filter type used to filter line items to fetch. If omitted, all the line items will be returned. */ + filterIds?: string[]; + /** Filter type used to filter line items to fetch. */ + filterType?: string; + /** Format in which the line items will be returned. Default to CSV. */ + format?: string; + } + interface DownloadLineItemsResponse { + /** Retrieved line items in CSV format. For more information about file formats, see Entity Write File Format. */ + lineItems?: string; + } + interface DownloadRequest { + /** File types that will be returned. */ + fileTypes?: string[]; + /** + * The IDs of the specified filter type. This is used to filter entities to fetch. At least one ID must be specified. Only one ID is allowed for the + * ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter types, all IDs must be from the same Advertiser. + */ + filterIds?: string[]; + /** Filter type used to filter line items to fetch. */ + filterType?: string; + /** SDF Version (column names, types, order) in which the entities will be returned. Default to 3. */ + version?: string; + } + interface DownloadResponse { + /** Retrieved ad groups in SDF format. */ + adGroups?: string; + /** Retrieved ads in SDF format. */ + ads?: string; + /** Retrieved insertion orders in SDF format. */ + insertionOrders?: string; + /** Retrieved line items in SDF format. */ + lineItems?: string; + } + interface FilterPair { + /** Filter type. */ + type?: string; + /** Filter value. */ + value?: string; + } + interface ListQueriesResponse { + /** Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listQueriesResponse". */ + kind?: string; + /** Retrieved queries. */ + queries?: Query[]; + } + interface ListReportsResponse { + /** Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listReportsResponse". */ + kind?: string; + /** Retrieved reports. */ + reports?: Report[]; + } + interface Parameters { + /** Filters used to match traffic data in your report. */ + filters?: FilterPair[]; + /** Data is grouped by the filters listed in this field. */ + groupBys?: string[]; + /** Whether to include data from Invite Media. */ + includeInviteData?: boolean; + /** Metrics to include as columns in your report. */ + metrics?: string[]; + /** Report type. */ + type?: string; + } + interface Query { + /** Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#query". */ + kind?: string; + /** Query metadata. */ + metadata?: QueryMetadata; + /** Query parameters. */ + params?: Parameters; + /** Query ID. */ + queryId?: string; + /** + * The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored + * otherwise. + */ + reportDataEndTimeMs?: string; + /** + * The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored + * otherwise. + */ + reportDataStartTimeMs?: string; + /** Information on how often and when to run a query. */ + schedule?: QuerySchedule; + /** Canonical timezone code for report data time. Defaults to America/New_York. */ + timezoneCode?: string; + } + interface QueryMetadata { + /** Range of report data. */ + dataRange?: string; + /** Format of the generated report. */ + format?: string; + /** The path to the location in Google Cloud Storage where the latest report is stored. */ + googleCloudStoragePathForLatestReport?: string; + /** The path in Google Drive for the latest report. */ + googleDrivePathForLatestReport?: string; + /** The time when the latest report started to run. */ + latestReportRunTimeMs?: string; + /** + * Locale of the generated reports. Valid values are cs CZECH de GERMAN en ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH pt-BR + * BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk UKRAINIAN zh-CN CHINA_CHINESE zh-TW TAIWAN_CHINESE + * + * An locale string not in the list above will generate reports in English. + */ + locale?: string; + /** Number of reports that have been generated for the query. */ + reportCount?: number; + /** Whether the latest report is currently running. */ + running?: boolean; + /** Whether to send an email notification when a report is ready. Default to false. */ + sendNotification?: boolean; + /** List of email addresses which are sent email notifications when the report is finished. Separate from sendNotification. */ + shareEmailAddress?: string[]; + /** Query title. It is used to name the reports generated from this query. */ + title?: string; + } + interface QuerySchedule { + /** Datetime to periodically run the query until. */ + endTimeMs?: string; + /** How often the query is run. */ + frequency?: string; + /** Time of day at which a new report will be generated, represented as minutes past midnight. Range is 0 to 1439. Only applies to scheduled reports. */ + nextRunMinuteOfDay?: number; + /** Canonical timezone code for report generation time. Defaults to America/New_York. */ + nextRunTimezoneCode?: string; + } + interface Report { + /** Key used to identify a report. */ + key?: ReportKey; + /** Report metadata. */ + metadata?: ReportMetadata; + /** Report parameters. */ + params?: Parameters; + } + interface ReportFailure { + /** Error code that shows why the report was not created. */ + errorCode?: string; + } + interface ReportKey { + /** Query ID. */ + queryId?: string; + /** Report ID. */ + reportId?: string; + } + interface ReportMetadata { + /** The path to the location in Google Cloud Storage where the report is stored. */ + googleCloudStoragePath?: string; + /** The ending time for the data that is shown in the report. */ + reportDataEndTimeMs?: string; + /** The starting time for the data that is shown in the report. */ + reportDataStartTimeMs?: string; + /** Report status. */ + status?: ReportStatus; + } + interface ReportStatus { + /** If the report failed, this records the cause. */ + failure?: ReportFailure; + /** The time when this report either completed successfully or failed. */ + finishTimeMs?: string; + /** The file type of the report. */ + format?: string; + /** The state of the report. */ + state?: string; + } + interface RowStatus { + /** Whether the stored entity is changed as a result of upload. */ + changed?: boolean; + /** Entity Id. */ + entityId?: string; + /** Entity name. */ + entityName?: string; + /** Reasons why the entity can't be uploaded. */ + errors?: string[]; + /** Whether the entity is persisted. */ + persisted?: boolean; + /** Row number. */ + rowNumber?: number; + } + interface RunQueryRequest { + /** Report data range used to generate the report. */ + dataRange?: string; + /** The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored otherwise. */ + reportDataEndTimeMs?: string; + /** The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and ignored otherwise. */ + reportDataStartTimeMs?: string; + /** Canonical timezone code for report data time. Defaults to America/New_York. */ + timezoneCode?: string; + } + interface UploadLineItemsRequest { + /** Set to true to get upload status without actually persisting the line items. */ + dryRun?: boolean; + /** Format the line items are in. Default to CSV. */ + format?: string; + /** Line items in CSV to upload. Refer to Entity Write File Format for more information on file format. */ + lineItems?: string; + } + interface UploadLineItemsResponse { + /** Status of upload. */ + uploadStatus?: UploadStatus; + } + interface UploadStatus { + /** Reasons why upload can't be completed. */ + errors?: string[]; + /** Per-row upload status. */ + rowStatus?: RowStatus[]; + } + interface LineitemsResource { + /** Retrieves line items in CSV format. */ + downloadlineitems(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Uploads line items in CSV format. */ + uploadlineitems(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface QueriesResource { + /** Creates a query. */ + createquery(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a stored query as well as the associated stored reports. */ + deletequery(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Query ID to delete. */ + queryId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a stored query. */ + getquery(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Query ID to retrieve. */ + queryId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves stored queries. */ + listqueries(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Runs a stored query to generate a report. */ + runquery(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Query ID to run. */ + queryId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** Retrieves stored reports. */ + listreports(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Query ID with which the reports are associated. */ + queryId: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SdfResource { + /** Retrieves entities in SDF format. */ + download(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.doubleclickbidmanager/readme.md b/types/gapi.client.doubleclickbidmanager/readme.md new file mode 100644 index 0000000000..cdb82d9f8f --- /dev/null +++ b/types/gapi.client.doubleclickbidmanager/readme.md @@ -0,0 +1,99 @@ +# TypeScript typings for DoubleClick Bid Manager API v1 +API for viewing and managing your reports in DoubleClick Bid Manager. +For detailed description please check [documentation](https://developers.google.com/bid-manager/). + +## Installing + +Install typings for DoubleClick Bid Manager API: +``` +npm install @types/gapi.client.doubleclickbidmanager@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('doubleclickbidmanager', 'v1', () => { + // now we can use gapi.client.doubleclickbidmanager + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your reports in DoubleClick Bid Manager + 'https://www.googleapis.com/auth/doubleclickbidmanager', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use DoubleClick Bid Manager API resources: + +```typescript + +/* +Retrieves line items in CSV format. +*/ +await gapi.client.lineitems.downloadlineitems({ }); + +/* +Uploads line items in CSV format. +*/ +await gapi.client.lineitems.uploadlineitems({ }); + +/* +Creates a query. +*/ +await gapi.client.queries.createquery({ }); + +/* +Deletes a stored query as well as the associated stored reports. +*/ +await gapi.client.queries.deletequery({ queryId: "queryId", }); + +/* +Retrieves a stored query. +*/ +await gapi.client.queries.getquery({ queryId: "queryId", }); + +/* +Retrieves stored queries. +*/ +await gapi.client.queries.listqueries({ }); + +/* +Runs a stored query to generate a report. +*/ +await gapi.client.queries.runquery({ queryId: "queryId", }); + +/* +Retrieves stored reports. +*/ +await gapi.client.reports.listreports({ queryId: "queryId", }); + +/* +Retrieves entities in SDF format. +*/ +await gapi.client.sdf.download({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.doubleclickbidmanager/tsconfig.json b/types/gapi.client.doubleclickbidmanager/tsconfig.json new file mode 100644 index 0000000000..1e00b8c904 --- /dev/null +++ b/types/gapi.client.doubleclickbidmanager/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.doubleclickbidmanager-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.doubleclickbidmanager/tslint.json b/types/gapi.client.doubleclickbidmanager/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.doubleclickbidmanager/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.doubleclicksearch/gapi.client.doubleclicksearch-tests.ts b/types/gapi.client.doubleclicksearch/gapi.client.doubleclicksearch-tests.ts new file mode 100644 index 0000000000..14dc6b1fb6 --- /dev/null +++ b/types/gapi.client.doubleclicksearch/gapi.client.doubleclicksearch-tests.ts @@ -0,0 +1,85 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('doubleclicksearch', 'v2', () => { + /** now we can use gapi.client.doubleclicksearch */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your advertising data in DoubleClick Search */ + 'https://www.googleapis.com/auth/doubleclicksearch', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Retrieves a list of conversions from a DoubleClick Search engine account. */ + await gapi.client.conversion.get({ + adGroupId: "adGroupId", + adId: "adId", + advertiserId: "advertiserId", + agencyId: "agencyId", + campaignId: "campaignId", + criterionId: "criterionId", + endDate: 7, + engineAccountId: "engineAccountId", + rowCount: 9, + startDate: 10, + startRow: 11, + }); + /** Inserts a batch of new conversions into DoubleClick Search. */ + await gapi.client.conversion.insert({ + }); + /** Updates a batch of conversions in DoubleClick Search. This method supports patch semantics. */ + await gapi.client.conversion.patch({ + advertiserId: "advertiserId", + agencyId: "agencyId", + endDate: 3, + engineAccountId: "engineAccountId", + rowCount: 5, + startDate: 6, + startRow: 7, + }); + /** Updates a batch of conversions in DoubleClick Search. */ + await gapi.client.conversion.update({ + }); + /** Updates the availabilities of a batch of floodlight activities in DoubleClick Search. */ + await gapi.client.conversion.updateAvailability({ + }); + /** Generates and returns a report immediately. */ + await gapi.client.reports.generate({ + }); + /** Polls for the status of a report request. */ + await gapi.client.reports.get({ + reportId: "reportId", + }); + /** Downloads a report file encoded in UTF-8. */ + await gapi.client.reports.getFile({ + reportFragment: 1, + reportId: "reportId", + }); + /** Inserts a report request into the reporting system. */ + await gapi.client.reports.request({ + }); + /** Retrieve the list of saved columns for a specified advertiser. */ + await gapi.client.savedColumns.list({ + advertiserId: "advertiserId", + agencyId: "agencyId", + }); + } +}); diff --git a/types/gapi.client.doubleclicksearch/index.d.ts b/types/gapi.client.doubleclicksearch/index.d.ts new file mode 100644 index 0000000000..f1e0a69436 --- /dev/null +++ b/types/gapi.client.doubleclicksearch/index.d.ts @@ -0,0 +1,578 @@ +// Type definitions for Google DoubleClick Search API v2 2.0 +// Project: https://developers.google.com/doubleclick-search/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/doubleclicksearch/v2/rest + +/// + +declare namespace gapi.client { + /** Load DoubleClick Search API v2 */ + function load(name: "doubleclicksearch", version: "v2"): PromiseLike; + function load(name: "doubleclicksearch", version: "v2", callback: () => any): void; + + const conversion: doubleclicksearch.ConversionResource; + + const reports: doubleclicksearch.ReportsResource; + + const savedColumns: doubleclicksearch.SavedColumnsResource; + + namespace doubleclicksearch { + interface Availability { + /** DS advertiser ID. */ + advertiserId?: string; + /** DS agency ID. */ + agencyId?: string; + /** The time by which all conversions have been uploaded, in epoch millis UTC. */ + availabilityTimestamp?: string; + /** The numeric segmentation identifier (for example, DoubleClick Search Floodlight activity ID). */ + segmentationId?: string; + /** The friendly segmentation identifier (for example, DoubleClick Search Floodlight activity name). */ + segmentationName?: string; + /** The segmentation type that this availability is for (its default value is FLOODLIGHT). */ + segmentationType?: string; + } + interface Conversion { + /** DS ad group ID. */ + adGroupId?: string; + /** DS ad ID. */ + adId?: string; + /** DS advertiser ID. */ + advertiserId?: string; + /** DS agency ID. */ + agencyId?: string; + /** Available to advertisers only after contacting DoubleClick Search customer support. */ + attributionModel?: string; + /** DS campaign ID. */ + campaignId?: string; + /** + * Sales channel for the product. Acceptable values are: + * - "local": a physical store + * - "online": an online store + */ + channel?: string; + /** DS click ID for the conversion. */ + clickId?: string; + /** + * For offline conversions, advertisers provide this ID. Advertisers can specify any ID that is meaningful to them. Each conversion in a request must + * specify a unique ID, and the combination of ID and timestamp must be unique amongst all conversions within the advertiser. + * For online conversions, DS copies the dsConversionId or floodlightOrderId into this property depending on the advertiser's Floodlight instructions. + */ + conversionId?: string; + /** The time at which the conversion was last modified, in epoch millis UTC. */ + conversionModifiedTimestamp?: string; + /** The time at which the conversion took place, in epoch millis UTC. */ + conversionTimestamp?: string; + /** Available to advertisers only after contacting DoubleClick Search customer support. */ + countMillis?: string; + /** DS criterion (keyword) ID. */ + criterionId?: string; + /** The currency code for the conversion's revenue. Should be in ISO 4217 alphabetic (3-char) format. */ + currencyCode?: string; + /** Custom dimensions for the conversion, which can be used to filter data in a report. */ + customDimension?: CustomDimension[]; + /** Custom metrics for the conversion. */ + customMetric?: CustomMetric[]; + /** The type of device on which the conversion occurred. */ + deviceType?: string; + /** ID that DoubleClick Search generates for each conversion. */ + dsConversionId?: string; + /** DS engine account ID. */ + engineAccountId?: string; + /** The Floodlight order ID provided by the advertiser for the conversion. */ + floodlightOrderId?: string; + /** ID that DS generates and uses to uniquely identify the inventory account that contains the product. */ + inventoryAccountId?: string; + /** The country registered for the Merchant Center feed that contains the product. Use an ISO 3166 code to specify a country. */ + productCountry?: string; + /** DS product group ID. */ + productGroupId?: string; + /** The product ID (SKU). */ + productId?: string; + /** The language registered for the Merchant Center feed that contains the product. Use an ISO 639 code to specify a language. */ + productLanguage?: string; + /** The quantity of this conversion, in millis. */ + quantityMillis?: string; + /** + * The revenue amount of this TRANSACTION conversion, in micros (value multiplied by 1000000, no decimal). For example, to specify a revenue value of "10" + * enter "10000000" (10 million) in your request. + */ + revenueMicros?: string; + /** The numeric segmentation identifier (for example, DoubleClick Search Floodlight activity ID). */ + segmentationId?: string; + /** The friendly segmentation identifier (for example, DoubleClick Search Floodlight activity name). */ + segmentationName?: string; + /** The segmentation type of this conversion (for example, FLOODLIGHT). */ + segmentationType?: string; + /** The state of the conversion, that is, either ACTIVE or REMOVED. Note: state DELETED is deprecated. */ + state?: string; + /** The ID of the local store for which the product was advertised. Applicable only when the channel is "local". */ + storeId?: string; + /** + * The type of the conversion, that is, either ACTION or TRANSACTION. An ACTION conversion is an action by the user that has no monetarily quantifiable + * value, while a TRANSACTION conversion is an action that does have a monetarily quantifiable value. Examples are email list signups (ACTION) versus + * ecommerce purchases (TRANSACTION). + */ + type?: string; + } + interface ConversionList { + /** The conversions being requested. */ + conversion?: Conversion[]; + /** Identifies this as a ConversionList resource. Value: the fixed string doubleclicksearch#conversionList. */ + kind?: string; + } + interface CustomDimension { + /** Custom dimension name. */ + name?: string; + /** Custom dimension value. */ + value?: string; + } + interface CustomMetric { + /** Custom metric name. */ + name?: string; + /** Custom metric numeric value. */ + value?: number; + } + interface Report { + /** Asynchronous report only. Contains a list of generated report files once the report has succesfully completed. */ + files?: Array<{ + /** The size of this report file in bytes. */ + byteCount?: string; + /** Use this url to download the report file. */ + url?: string; + }>; + /** Asynchronous report only. Id of the report. */ + id?: string; + /** Asynchronous report only. True if and only if the report has completed successfully and the report files are ready to be downloaded. */ + isReportReady?: boolean; + /** Identifies this as a Report resource. Value: the fixed string doubleclicksearch#report. */ + kind?: string; + /** The request that created the report. Optional fields not specified in the original request are filled with default values. */ + request?: ReportRequest; + /** The number of report rows generated by the report, not including headers. */ + rowCount?: number; + /** Synchronous report only. Generated report rows. */ + rows?: ReportRow[]; + /** + * The currency code of all monetary values produced in the report, including values that are set by users (e.g., keyword bid settings) and metrics (e.g., + * cost and revenue). The currency code of a report is determined by the statisticsCurrency field of the report request. + */ + statisticsCurrencyCode?: string; + /** If all statistics of the report are sourced from the same time zone, this would be it. Otherwise the field is unset. */ + statisticsTimeZone?: string; + } + interface ReportApiColumnSpec { + /** Name of a DoubleClick Search column to include in the report. */ + columnName?: string; + /** + * Segments a report by a custom dimension. The report must be scoped to an advertiser or lower, and the custom dimension must already be set up in + * DoubleClick Search. The custom dimension name, which appears in DoubleClick Search, is case sensitive. + * If used in a conversion report, returns the value of the specified custom dimension for the given conversion, if set. This column does not segment the + * conversion report. + */ + customDimensionName?: string; + /** + * Name of a custom metric to include in the report. The report must be scoped to an advertiser or lower, and the custom metric must already be set up in + * DoubleClick Search. The custom metric name, which appears in DoubleClick Search, is case sensitive. + */ + customMetricName?: string; + /** + * Inclusive day in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together + * with startDate. + */ + endDate?: string; + /** Synchronous report only. Set to true to group by this column. Defaults to false. */ + groupByColumn?: boolean; + /** + * Text used to identify this column in the report output; defaults to columnName or savedColumnName when not specified. This can be used to prevent + * collisions between DoubleClick Search columns and saved columns with the same name. + */ + headerText?: string; + /** The platform that is used to provide data for the custom dimension. Acceptable values are "floodlight". */ + platformSource?: string; + /** + * Returns metrics only for a specific type of product activity. Accepted values are: + * - "sold": returns metrics only for products that were sold + * - "advertised": returns metrics only for products that were advertised in a Shopping campaign, and that might or might not have been sold + */ + productReportPerspective?: string; + /** + * Name of a saved column to include in the report. The report must be scoped at advertiser or lower, and this saved column must already be created in the + * DoubleClick Search UI. + */ + savedColumnName?: string; + /** + * Inclusive date in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together + * with endDate. + */ + startDate?: string; + } + interface ReportRequest { + /** + * The columns to include in the report. This includes both DoubleClick Search columns and saved columns. For DoubleClick Search columns, only the + * columnName parameter is required. For saved columns only the savedColumnName parameter is required. Both columnName and savedColumnName cannot be set + * in the same stanza. + */ + columns?: ReportApiColumnSpec[]; + /** Format that the report should be returned in. Currently csv or tsv is supported. */ + downloadFormat?: string; + /** A list of filters to be applied to the report. */ + filters?: Array<{ + /** Column to perform the filter on. This can be a DoubleClick Search column or a saved column. */ + column?: ReportApiColumnSpec; + /** Operator to use in the filter. See the filter reference for a list of available operators. */ + operator?: string; + /** A list of values to filter the column value against. */ + values?: any[]; + }>; + /** Determines if removed entities should be included in the report. Defaults to false. Deprecated, please use includeRemovedEntities instead. */ + includeDeletedEntities?: boolean; + /** Determines if removed entities should be included in the report. Defaults to false. */ + includeRemovedEntities?: boolean; + /** + * Asynchronous report only. The maximum number of rows per report file. A large report is split into many files based on this field. Acceptable values + * are 1000000 to 100000000, inclusive. + */ + maxRowsPerFile?: number; + /** Synchronous report only. A list of columns and directions defining sorting to be performed on the report rows. */ + orderBy?: Array<{ + /** Column to perform the sort on. This can be a DoubleClick Search-defined column or a saved column. */ + column?: ReportApiColumnSpec; + /** The sort direction, which is either ascending or descending. */ + sortOrder?: string; + }>; + /** + * The reportScope is a set of IDs that are used to determine which subset of entities will be returned in the report. The full lineage of IDs from the + * lowest scoped level desired up through agency is required. + */ + reportScope?: { + /** DS ad group ID. */ + adGroupId?: string; + /** DS ad ID. */ + adId?: string; + /** DS advertiser ID. */ + advertiserId?: string; + /** DS agency ID. */ + agencyId?: string; + /** DS campaign ID. */ + campaignId?: string; + /** DS engine account ID. */ + engineAccountId?: string; + /** DS keyword ID. */ + keywordId?: string; + }; + /** + * Determines the type of rows that are returned in the report. For example, if you specify reportType: keyword, each row in the report will contain data + * about a keyword. See the Types of Reports reference for the columns that are available for each type. + */ + reportType?: string; + /** + * Synchronous report only. The maxinum number of rows to return; additional rows are dropped. Acceptable values are 0 to 10000, inclusive. Defaults to + * 10000. + */ + rowCount?: number; + /** Synchronous report only. Zero-based index of the first row to return. Acceptable values are 0 to 50000, inclusive. Defaults to 0. */ + startRow?: number; + /** + * Specifies the currency in which monetary will be returned. Possible values are: usd, agency (valid if the report is scoped to agency or lower), + * advertiser (valid if the report is scoped to * advertiser or lower), or account (valid if the report is scoped to engine account or lower). + */ + statisticsCurrency?: string; + /** If metrics are requested in a report, this argument will be used to restrict the metrics to a specific time range. */ + timeRange?: { + /** Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See additional references on how changed attribute reports work. */ + changedAttributesSinceTimestamp?: string; + /** Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See additional references on how changed metrics reports work. */ + changedMetricsSinceTimestamp?: string; + /** Inclusive date in YYYY-MM-DD format. */ + endDate?: string; + /** Inclusive date in YYYY-MM-DD format. */ + startDate?: string; + }; + /** If true, the report would only be created if all the requested stat data are sourced from a single timezone. Defaults to false. */ + verifySingleTimeZone?: boolean; + } + interface ReportRow { + [key: string]: any; + } + interface SavedColumn { + /** Identifies this as a SavedColumn resource. Value: the fixed string doubleclicksearch#savedColumn. */ + kind?: string; + /** The name of the saved column. */ + savedColumnName?: string; + /** The type of data this saved column will produce. */ + type?: string; + } + interface SavedColumnList { + /** The saved columns being requested. */ + items?: SavedColumn[]; + /** Identifies this as a SavedColumnList resource. Value: the fixed string doubleclicksearch#savedColumnList. */ + kind?: string; + } + interface UpdateAvailabilityRequest { + /** The availabilities being requested. */ + availabilities?: Availability[]; + } + interface UpdateAvailabilityResponse { + /** The availabilities being returned. */ + availabilities?: Availability[]; + } + interface ConversionResource { + /** Retrieves a list of conversions from a DoubleClick Search engine account. */ + get(request: { + /** Numeric ID of the ad group. */ + adGroupId?: string; + /** Numeric ID of the ad. */ + adId?: string; + /** Numeric ID of the advertiser. */ + advertiserId: string; + /** Numeric ID of the agency. */ + agencyId: string; + /** Data format for the response. */ + alt?: string; + /** Numeric ID of the campaign. */ + campaignId?: string; + /** Numeric ID of the criterion. */ + criterionId?: string; + /** Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. */ + endDate: number; + /** Numeric ID of the engine account. */ + engineAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The number of conversions to return per call. */ + rowCount: number; + /** First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. */ + startDate: number; + /** The 0-based starting index for retrieving conversions results. */ + startRow: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a batch of new conversions into DoubleClick Search. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a batch of conversions in DoubleClick Search. This method supports patch semantics. */ + patch(request: { + /** Numeric ID of the advertiser. */ + advertiserId: string; + /** Numeric ID of the agency. */ + agencyId: string; + /** Data format for the response. */ + alt?: string; + /** Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. */ + endDate: number; + /** Numeric ID of the engine account. */ + engineAccountId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The number of conversions to return per call. */ + rowCount: number; + /** First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. */ + startDate: number; + /** The 0-based starting index for retrieving conversions results. */ + startRow: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a batch of conversions in DoubleClick Search. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the availabilities of a batch of floodlight activities in DoubleClick Search. */ + updateAvailability(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ReportsResource { + /** Generates and returns a report immediately. */ + generate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Polls for the status of a report request. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of the report request being polled. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Downloads a report file encoded in UTF-8. */ + getFile(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The index of the report fragment to download. */ + reportFragment: number; + /** ID of the report. */ + reportId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Inserts a report request into the reporting system. */ + request(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SavedColumnsResource { + /** Retrieve the list of saved columns for a specified advertiser. */ + list(request: { + /** DS ID of the advertiser. */ + advertiserId: string; + /** DS ID of the agency. */ + agencyId: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.doubleclicksearch/readme.md b/types/gapi.client.doubleclicksearch/readme.md new file mode 100644 index 0000000000..5889f83d22 --- /dev/null +++ b/types/gapi.client.doubleclicksearch/readme.md @@ -0,0 +1,104 @@ +# TypeScript typings for DoubleClick Search API v2 +Reports and modifies your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions). +For detailed description please check [documentation](https://developers.google.com/doubleclick-search/). + +## Installing + +Install typings for DoubleClick Search API: +``` +npm install @types/gapi.client.doubleclicksearch@v2 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('doubleclicksearch', 'v2', () => { + // now we can use gapi.client.doubleclicksearch + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your advertising data in DoubleClick Search + 'https://www.googleapis.com/auth/doubleclicksearch', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use DoubleClick Search API resources: + +```typescript + +/* +Retrieves a list of conversions from a DoubleClick Search engine account. +*/ +await gapi.client.conversion.get({ advertiserId: "advertiserId", agencyId: "agencyId", endDate: 1, engineAccountId: "engineAccountId", rowCount: 1, startDate: 1, startRow: 1, }); + +/* +Inserts a batch of new conversions into DoubleClick Search. +*/ +await gapi.client.conversion.insert({ }); + +/* +Updates a batch of conversions in DoubleClick Search. This method supports patch semantics. +*/ +await gapi.client.conversion.patch({ advertiserId: "advertiserId", agencyId: "agencyId", endDate: 1, engineAccountId: "engineAccountId", rowCount: 1, startDate: 1, startRow: 1, }); + +/* +Updates a batch of conversions in DoubleClick Search. +*/ +await gapi.client.conversion.update({ }); + +/* +Updates the availabilities of a batch of floodlight activities in DoubleClick Search. +*/ +await gapi.client.conversion.updateAvailability({ }); + +/* +Generates and returns a report immediately. +*/ +await gapi.client.reports.generate({ }); + +/* +Polls for the status of a report request. +*/ +await gapi.client.reports.get({ reportId: "reportId", }); + +/* +Downloads a report file encoded in UTF-8. +*/ +await gapi.client.reports.getFile({ reportFragment: 1, reportId: "reportId", }); + +/* +Inserts a report request into the reporting system. +*/ +await gapi.client.reports.request({ }); + +/* +Retrieve the list of saved columns for a specified advertiser. +*/ +await gapi.client.savedColumns.list({ advertiserId: "advertiserId", agencyId: "agencyId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.doubleclicksearch/tsconfig.json b/types/gapi.client.doubleclicksearch/tsconfig.json new file mode 100644 index 0000000000..fb0d0a44bd --- /dev/null +++ b/types/gapi.client.doubleclicksearch/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.doubleclicksearch-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.doubleclicksearch/tslint.json b/types/gapi.client.doubleclicksearch/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.doubleclicksearch/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.drive/gapi.client.drive-tests.ts b/types/gapi.client.drive/gapi.client.drive-tests.ts new file mode 100644 index 0000000000..f9fa0ce332 --- /dev/null +++ b/types/gapi.client.drive/gapi.client.drive-tests.ts @@ -0,0 +1,291 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('drive', 'v3', () => { + /** now we can use gapi.client.drive */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage the files in your Google Drive */ + 'https://www.googleapis.com/auth/drive', + /** View and manage its own configuration data in your Google Drive */ + 'https://www.googleapis.com/auth/drive.appdata', + /** View and manage Google Drive files and folders that you have opened or created with this app */ + 'https://www.googleapis.com/auth/drive.file', + /** View and manage metadata of files in your Google Drive */ + 'https://www.googleapis.com/auth/drive.metadata', + /** View metadata for files in your Google Drive */ + 'https://www.googleapis.com/auth/drive.metadata.readonly', + /** View the photos, videos and albums in your Google Photos */ + 'https://www.googleapis.com/auth/drive.photos.readonly', + /** View the files in your Google Drive */ + 'https://www.googleapis.com/auth/drive.readonly', + /** Modify your Google Apps Script scripts' behavior */ + 'https://www.googleapis.com/auth/drive.scripts', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Gets information about the user, the user's Drive, and system capabilities. */ + await gapi.client.about.get({ + }); + /** Gets the starting pageToken for listing future changes. */ + await gapi.client.changes.getStartPageToken({ + supportsTeamDrives: true, + teamDriveId: "teamDriveId", + }); + /** Lists the changes for a user or Team Drive. */ + await gapi.client.changes.list({ + includeCorpusRemovals: true, + includeRemoved: true, + includeTeamDriveItems: true, + pageSize: 4, + pageToken: "pageToken", + restrictToMyDrive: true, + spaces: "spaces", + supportsTeamDrives: true, + teamDriveId: "teamDriveId", + }); + /** Subscribes to changes for a user. */ + await gapi.client.changes.watch({ + includeCorpusRemovals: true, + includeRemoved: true, + includeTeamDriveItems: true, + pageSize: 4, + pageToken: "pageToken", + restrictToMyDrive: true, + spaces: "spaces", + supportsTeamDrives: true, + teamDriveId: "teamDriveId", + }); + /** Stop watching resources through this channel */ + await gapi.client.channels.stop({ + }); + /** Creates a new comment on a file. */ + await gapi.client.comments.create({ + fileId: "fileId", + }); + /** Deletes a comment. */ + await gapi.client.comments.delete({ + commentId: "commentId", + fileId: "fileId", + }); + /** Gets a comment by ID. */ + await gapi.client.comments.get({ + commentId: "commentId", + fileId: "fileId", + includeDeleted: true, + }); + /** Lists a file's comments. */ + await gapi.client.comments.list({ + fileId: "fileId", + includeDeleted: true, + pageSize: 3, + pageToken: "pageToken", + startModifiedTime: "startModifiedTime", + }); + /** Updates a comment with patch semantics. */ + await gapi.client.comments.update({ + commentId: "commentId", + fileId: "fileId", + }); + /** Creates a copy of a file and applies any requested updates with patch semantics. */ + await gapi.client.files.copy({ + fileId: "fileId", + ignoreDefaultVisibility: true, + keepRevisionForever: true, + ocrLanguage: "ocrLanguage", + supportsTeamDrives: true, + }); + /** Creates a new file. */ + await gapi.client.files.create({ + ignoreDefaultVisibility: true, + keepRevisionForever: true, + ocrLanguage: "ocrLanguage", + supportsTeamDrives: true, + useContentAsIndexableText: true, + }); + /** + * Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the + * parent. If the target is a folder, all descendants owned by the user are also deleted. + */ + await gapi.client.files.delete({ + fileId: "fileId", + supportsTeamDrives: true, + }); + /** Permanently deletes all of the user's trashed files. */ + await gapi.client.files.emptyTrash({ + }); + /** Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. */ + await gapi.client.files.export({ + fileId: "fileId", + mimeType: "mimeType", + }); + /** Generates a set of file IDs which can be provided in create requests. */ + await gapi.client.files.generateIds({ + count: 1, + space: "space", + }); + /** Gets a file's metadata or content by ID. */ + await gapi.client.files.get({ + acknowledgeAbuse: true, + fileId: "fileId", + supportsTeamDrives: true, + }); + /** Lists or searches files. */ + await gapi.client.files.list({ + corpora: "corpora", + corpus: "corpus", + includeTeamDriveItems: true, + orderBy: "orderBy", + pageSize: 5, + pageToken: "pageToken", + q: "q", + spaces: "spaces", + supportsTeamDrives: true, + teamDriveId: "teamDriveId", + }); + /** Updates a file's metadata and/or content with patch semantics. */ + await gapi.client.files.update({ + addParents: "addParents", + fileId: "fileId", + keepRevisionForever: true, + ocrLanguage: "ocrLanguage", + removeParents: "removeParents", + supportsTeamDrives: true, + useContentAsIndexableText: true, + }); + /** Subscribes to changes to a file */ + await gapi.client.files.watch({ + acknowledgeAbuse: true, + fileId: "fileId", + supportsTeamDrives: true, + }); + /** Creates a permission for a file or Team Drive. */ + await gapi.client.permissions.create({ + emailMessage: "emailMessage", + fileId: "fileId", + sendNotificationEmail: true, + supportsTeamDrives: true, + transferOwnership: true, + }); + /** Deletes a permission. */ + await gapi.client.permissions.delete({ + fileId: "fileId", + permissionId: "permissionId", + supportsTeamDrives: true, + }); + /** Gets a permission by ID. */ + await gapi.client.permissions.get({ + fileId: "fileId", + permissionId: "permissionId", + supportsTeamDrives: true, + }); + /** Lists a file's or Team Drive's permissions. */ + await gapi.client.permissions.list({ + fileId: "fileId", + pageSize: 2, + pageToken: "pageToken", + supportsTeamDrives: true, + }); + /** Updates a permission with patch semantics. */ + await gapi.client.permissions.update({ + fileId: "fileId", + permissionId: "permissionId", + removeExpiration: true, + supportsTeamDrives: true, + transferOwnership: true, + }); + /** Creates a new reply to a comment. */ + await gapi.client.replies.create({ + commentId: "commentId", + fileId: "fileId", + }); + /** Deletes a reply. */ + await gapi.client.replies.delete({ + commentId: "commentId", + fileId: "fileId", + replyId: "replyId", + }); + /** Gets a reply by ID. */ + await gapi.client.replies.get({ + commentId: "commentId", + fileId: "fileId", + includeDeleted: true, + replyId: "replyId", + }); + /** Lists a comment's replies. */ + await gapi.client.replies.list({ + commentId: "commentId", + fileId: "fileId", + includeDeleted: true, + pageSize: 4, + pageToken: "pageToken", + }); + /** Updates a reply with patch semantics. */ + await gapi.client.replies.update({ + commentId: "commentId", + fileId: "fileId", + replyId: "replyId", + }); + /** Permanently deletes a revision. This method is only applicable to files with binary content in Drive. */ + await gapi.client.revisions.delete({ + fileId: "fileId", + revisionId: "revisionId", + }); + /** Gets a revision's metadata or content by ID. */ + await gapi.client.revisions.get({ + acknowledgeAbuse: true, + fileId: "fileId", + revisionId: "revisionId", + }); + /** Lists a file's revisions. */ + await gapi.client.revisions.list({ + fileId: "fileId", + pageSize: 2, + pageToken: "pageToken", + }); + /** Updates a revision with patch semantics. */ + await gapi.client.revisions.update({ + fileId: "fileId", + revisionId: "revisionId", + }); + /** Creates a new Team Drive. */ + await gapi.client.teamdrives.create({ + requestId: "requestId", + }); + /** Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. */ + await gapi.client.teamdrives.delete({ + teamDriveId: "teamDriveId", + }); + /** Gets a Team Drive's metadata by ID. */ + await gapi.client.teamdrives.get({ + teamDriveId: "teamDriveId", + }); + /** Lists the user's Team Drives. */ + await gapi.client.teamdrives.list({ + pageSize: 1, + pageToken: "pageToken", + }); + /** Updates a Team Drive's metadata */ + await gapi.client.teamdrives.update({ + teamDriveId: "teamDriveId", + }); + } +}); diff --git a/types/gapi.client.drive/index.d.ts b/types/gapi.client.drive/index.d.ts new file mode 100644 index 0000000000..7004e2c0bb --- /dev/null +++ b/types/gapi.client.drive/index.d.ts @@ -0,0 +1,1831 @@ +// Type definitions for Google Drive API v3 3.0 +// Project: https://developers.google.com/drive/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/drive/v3/rest + +/// + +declare namespace gapi.client { + /** Load Drive API v3 */ + function load(name: "drive", version: "v3"): PromiseLike; + function load(name: "drive", version: "v3", callback: () => any): void; + + const about: drive.AboutResource; + + const changes: drive.ChangesResource; + + const channels: drive.ChannelsResource; + + const comments: drive.CommentsResource; + + const files: drive.FilesResource; + + const permissions: drive.PermissionsResource; + + const replies: drive.RepliesResource; + + const revisions: drive.RevisionsResource; + + const teamdrives: drive.TeamdrivesResource; + + namespace drive { + interface About { + /** Whether the user has installed the requesting app. */ + appInstalled?: boolean; + /** A map of source MIME type to possible targets for all supported exports. */ + exportFormats?: Record; + /** The currently supported folder colors as RGB hex strings. */ + folderColorPalette?: string[]; + /** A map of source MIME type to possible targets for all supported imports. */ + importFormats?: Record; + /** Identifies what kind of resource this is. Value: the fixed string "drive#about". */ + kind?: string; + /** A map of maximum import sizes by MIME type, in bytes. */ + maxImportSizes?: Record; + /** The maximum upload size in bytes. */ + maxUploadSize?: string; + /** The user's storage quota limits and usage. All fields are measured in bytes. */ + storageQuota?: { + /** The usage limit, if applicable. This will not be present if the user has unlimited storage. */ + limit?: string; + /** The total usage across all services. */ + usage?: string; + /** The usage by all files in Google Drive. */ + usageInDrive?: string; + /** The usage by trashed files in Google Drive. */ + usageInDriveTrash?: string; + }; + /** A list of themes that are supported for Team Drives. */ + teamDriveThemes?: Array<{ + /** A link to this Team Drive theme's background image. */ + backgroundImageLink?: string; + /** The color of this Team Drive theme as an RGB hex string. */ + colorRgb?: string; + /** The ID of the theme. */ + id?: string; + }>; + /** The authenticated user. */ + user?: User; + } + interface Change { + /** The updated state of the file. Present if the type is file and the file has not been removed from this list of changes. */ + file?: File; + /** The ID of the file which has changed. */ + fileId?: string; + /** Identifies what kind of resource this is. Value: the fixed string "drive#change". */ + kind?: string; + /** Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access. */ + removed?: boolean; + /** + * The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been + * removed. + */ + teamDrive?: TeamDrive; + /** The ID of the Team Drive associated with this change. */ + teamDriveId?: string; + /** The time of this change (RFC 3339 date-time). */ + time?: string; + /** The type of the change. Possible values are file and teamDrive. */ + type?: string; + } + interface ChangeList { + /** The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ + changes?: Change[]; + /** Identifies what kind of resource this is. Value: the fixed string "drive#changeList". */ + kind?: string; + /** The starting page token for future changes. This will be present only if the end of the current changes list has been reached. */ + newStartPageToken?: string; + /** + * The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any + * reason, it should be discarded, and pagination should be restarted from the first page of results. + */ + nextPageToken?: string; + } + interface Channel { + /** The address where notifications are delivered for this channel. */ + address?: string; + /** Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. */ + expiration?: string; + /** A UUID or similar unique string that identifies this channel. */ + id?: string; + /** Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". */ + kind?: string; + /** Additional parameters controlling delivery channel behavior. Optional. */ + params?: Record; + /** A Boolean value to indicate whether payload is wanted. Optional. */ + payload?: boolean; + /** An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. */ + resourceId?: string; + /** A version-specific identifier for the watched resource. */ + resourceUri?: string; + /** An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. */ + token?: string; + /** The type of delivery mechanism used for this channel. */ + type?: string; + } + interface Comment { + /** A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties. */ + anchor?: string; + /** The user who created the comment. */ + author?: User; + /** The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed. */ + content?: string; + /** The time at which the comment was created (RFC 3339 date-time). */ + createdTime?: string; + /** Whether the comment has been deleted. A deleted comment has no content. */ + deleted?: boolean; + /** The content of the comment with HTML formatting. */ + htmlContent?: string; + /** The ID of the comment. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "drive#comment". */ + kind?: string; + /** The last time the comment or any of its replies was modified (RFC 3339 date-time). */ + modifiedTime?: string; + /** + * The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location + * of the comment. + */ + quotedFileContent?: { + /** The MIME type of the quoted content. */ + mimeType?: string; + /** The quoted content itself. This is interpreted as plain text if set through the API. */ + value?: string; + }; + /** The full list of replies to the comment in chronological order. */ + replies?: Reply[]; + /** Whether the comment has been resolved by one of its replies. */ + resolved?: boolean; + } + interface CommentList { + /** The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ + comments?: Comment[]; + /** Identifies what kind of resource this is. Value: the fixed string "drive#commentList". */ + kind?: string; + /** + * The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any + * reason, it should be discarded, and pagination should be restarted from the first page of results. + */ + nextPageToken?: string; + } + interface File { + /** + * A collection of arbitrary key-value pairs which are private to the requesting app. + * Entries with null values are cleared in update and copy requests. + */ + appProperties?: Record; + /** Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. */ + capabilities?: { + /** Whether the current user can add children to this folder. This is always false when the item is not a folder. */ + canAddChildren?: boolean; + /** Whether the current user can change whether viewers can copy the contents of this file. */ + canChangeViewersCanCopyContent?: boolean; + /** Whether the current user can comment on this file. */ + canComment?: boolean; + /** + * Whether the current user can copy this file. For a Team Drive item, whether the current user can copy non-folder descendants of this item, or this item + * itself if it is not a folder. + */ + canCopy?: boolean; + /** Whether the current user can delete this file. */ + canDelete?: boolean; + /** Whether the current user can download this file. */ + canDownload?: boolean; + /** Whether the current user can edit this file. */ + canEdit?: boolean; + /** Whether the current user can list the children of this folder. This is always false when the item is not a folder. */ + canListChildren?: boolean; + /** Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. */ + canMoveItemIntoTeamDrive?: boolean; + /** + * Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail + * depending on the new parent that is being added. Only populated for Team Drive files. + */ + canMoveTeamDriveItem?: boolean; + /** + * Whether the current user can read the revisions resource of this file. For a Team Drive item, whether revisions of non-folder descendants of this item, + * or this item itself if it is not a folder, can be read. + */ + canReadRevisions?: boolean; + /** Whether the current user can read the Team Drive to which this file belongs. Only populated for Team Drive files. */ + canReadTeamDrive?: boolean; + /** Whether the current user can remove children from this folder. This is always false when the item is not a folder. */ + canRemoveChildren?: boolean; + /** Whether the current user can rename this file. */ + canRename?: boolean; + /** Whether the current user can modify the sharing settings for this file. */ + canShare?: boolean; + /** Whether the current user can move this file to trash. */ + canTrash?: boolean; + /** Whether the current user can restore this file from trash. */ + canUntrash?: boolean; + }; + /** Additional information about the content of the file. These fields are never populated in responses. */ + contentHints?: { + /** Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. */ + indexableText?: string; + /** A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. */ + thumbnail?: { + /** The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). */ + image?: string; + /** The MIME type of the thumbnail. */ + mimeType?: string; + }; + }; + /** The time at which the file was created (RFC 3339 date-time). */ + createdTime?: string; + /** A short description of the file. */ + description?: string; + /** Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. */ + explicitlyTrashed?: boolean; + /** The final component of fullFileExtension. This is only available for files with binary content in Drive. */ + fileExtension?: string; + /** + * The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. + * If an unsupported color is specified, the closest color in the palette will be used instead. + */ + folderColorRgb?: string; + /** + * The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files + * with binary content in Drive. + * This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension. + */ + fullFileExtension?: string; + /** Whether any users are granted file access directly on this file. This field is only populated for Team Drive files. */ + hasAugmentedPermissions?: boolean; + /** + * Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the + * presence of the thumbnailLink field. + */ + hasThumbnail?: boolean; + /** The ID of the file's head revision. This is currently only available for files with binary content in Drive. */ + headRevisionId?: string; + /** A static, unauthenticated link to the file's icon. */ + iconLink?: string; + /** The ID of the file. */ + id?: string; + /** Additional metadata about image media, if available. */ + imageMediaMetadata?: { + /** The aperture used to create the photo (f-number). */ + aperture?: number; + /** The make of the camera used to create the photo. */ + cameraMake?: string; + /** The model of the camera used to create the photo. */ + cameraModel?: string; + /** The color space of the photo. */ + colorSpace?: string; + /** The exposure bias of the photo (APEX value). */ + exposureBias?: number; + /** The exposure mode used to create the photo. */ + exposureMode?: string; + /** The length of the exposure, in seconds. */ + exposureTime?: number; + /** Whether a flash was used to create the photo. */ + flashUsed?: boolean; + /** The focal length used to create the photo, in millimeters. */ + focalLength?: number; + /** The height of the image in pixels. */ + height?: number; + /** The ISO speed used to create the photo. */ + isoSpeed?: number; + /** The lens used to create the photo. */ + lens?: string; + /** Geographic location information stored in the image. */ + location?: { + /** The altitude stored in the image. */ + altitude?: number; + /** The latitude stored in the image. */ + latitude?: number; + /** The longitude stored in the image. */ + longitude?: number; + }; + /** The smallest f-number of the lens at the focal length used to create the photo (APEX value). */ + maxApertureValue?: number; + /** The metering mode used to create the photo. */ + meteringMode?: string; + /** The rotation in clockwise degrees from the image's original orientation. */ + rotation?: number; + /** The type of sensor used to create the photo. */ + sensor?: string; + /** The distance to the subject of the photo, in meters. */ + subjectDistance?: number; + /** The date and time the photo was taken (EXIF DateTime). */ + time?: string; + /** The white balance mode used to create the photo. */ + whiteBalance?: string; + /** The width of the image in pixels. */ + width?: number; + }; + /** Whether the file was created or opened by the requesting app. */ + isAppAuthorized?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "drive#file". */ + kind?: string; + /** The last user to modify the file. */ + lastModifyingUser?: User; + /** The MD5 checksum for the content of the file. This is only applicable to files with binary content in Drive. */ + md5Checksum?: string; + /** + * The MIME type of the file. + * Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new + * revision is uploaded. + * If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the + * About resource. + */ + mimeType?: string; + /** Whether the file has been modified by this user. */ + modifiedByMe?: boolean; + /** The last time the file was modified by the user (RFC 3339 date-time). */ + modifiedByMeTime?: string; + /** + * The last time the file was modified by anyone (RFC 3339 date-time). + * Note that setting modifiedTime will also update modifiedByMeTime for the user. + */ + modifiedTime?: string; + /** + * The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of Team Drives, My + * Drive root folder, and Application Data folder the name is constant. + */ + name?: string; + /** + * The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary + * content in Drive. + */ + originalFilename?: string; + /** Whether the user owns the file. Not populated for Team Drive files. */ + ownedByMe?: boolean; + /** The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for Team Drive files. */ + owners?: User[]; + /** + * The IDs of the parent folders which contain the file. + * If not specified as part of a create request, the file will be placed directly in the My Drive folder. Update requests must use the addParents and + * removeParents parameters to modify the values. + */ + parents?: string[]; + /** List of permission IDs for users with access to this file. */ + permissionIds?: string[]; + /** The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for Team Drive files. */ + permissions?: Permission[]; + /** + * A collection of arbitrary key-value pairs which are visible to all apps. + * Entries with null values are cleared in update and copy requests. + */ + properties?: Record; + /** The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. */ + quotaBytesUsed?: string; + /** Whether the file has been shared. Not populated for Team Drive files. */ + shared?: boolean; + /** The time at which the file was shared with the user, if applicable (RFC 3339 date-time). */ + sharedWithMeTime?: string; + /** The user who shared the file with the requesting user, if applicable. */ + sharingUser?: User; + /** The size of the file's content in bytes. This is only applicable to files with binary content in Drive. */ + size?: string; + /** The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. */ + spaces?: string[]; + /** Whether the user has starred the file. */ + starred?: boolean; + /** ID of the Team Drive the file resides in. */ + teamDriveId?: string; + /** + * A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the + * file's content. + */ + thumbnailLink?: string; + /** The thumbnail version for use in thumbnail cache invalidation. */ + thumbnailVersion?: string; + /** + * Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files + * in the owner's trash. + */ + trashed?: boolean; + /** The time that the item was trashed (RFC 3339 date-time). Only populated for Team Drive files. */ + trashedTime?: string; + /** If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files. */ + trashingUser?: User; + /** A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user. */ + version?: string; + /** Additional metadata about video media. This may not be available immediately upon upload. */ + videoMediaMetadata?: { + /** The duration of the video in milliseconds. */ + durationMillis?: string; + /** The height of the video in pixels. */ + height?: number; + /** The width of the video in pixels. */ + width?: number; + }; + /** Whether the file has been viewed by this user. */ + viewedByMe?: boolean; + /** The last time the file was viewed by the user (RFC 3339 date-time). */ + viewedByMeTime?: string; + /** Whether users with only reader or commenter permission can copy the file's content. This affects copy, download, and print operations. */ + viewersCanCopyContent?: boolean; + /** A link for downloading the content of the file in a browser. This is only available for files with binary content in Drive. */ + webContentLink?: string; + /** A link for opening the file in a relevant Google editor or viewer in a browser. */ + webViewLink?: string; + /** Whether users with only writer permission can modify the file's permissions. Not populated for Team Drive files. */ + writersCanShare?: boolean; + } + interface FileList { + /** The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ + files?: File[]; + /** + * Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when + * searching multiple Team Drives with the "user,allTeamDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that + * clients narrow their query by choosing a different corpus such as "user" or "teamDrive". + */ + incompleteSearch?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "drive#fileList". */ + kind?: string; + /** + * The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, + * it should be discarded, and pagination should be restarted from the first page of results. + */ + nextPageToken?: string; + } + interface GeneratedIds { + /** The IDs generated for the requesting user in the specified space. */ + ids?: string[]; + /** Identifies what kind of resource this is. Value: the fixed string "drive#generatedIds". */ + kind?: string; + /** The type of file that can be created with these IDs. */ + space?: string; + } + interface Permission { + /** Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. */ + allowFileDiscovery?: boolean; + /** Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. */ + deleted?: boolean; + /** A displayable name for users, groups or domains. */ + displayName?: string; + /** The domain to which this permission refers. */ + domain?: string; + /** The email address of the user or group to which this permission refers. */ + emailAddress?: string; + /** + * The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: + * - They can only be set on user and group permissions + * - The time must be in the future + * - The time cannot be more than a year in the future + */ + expirationTime?: string; + /** The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "drive#permission". */ + kind?: string; + /** A link to the user's profile photo, if available. */ + photoLink?: string; + /** + * The role granted by this permission. While new values may be supported in the future, the following are currently allowed: + * - organizer + * - owner + * - writer + * - commenter + * - reader + */ + role?: string; + /** + * Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only + * for Team Drive items. + */ + teamDrivePermissionDetails?: Array<{ + /** Whether this permission is inherited. This field is always populated. This is an output-only field. */ + inherited?: boolean; + /** The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. */ + inheritedFrom?: string; + /** + * The primary role for this user. While new values may be added in the future, the following are currently possible: + * - organizer + * - writer + * - commenter + * - reader + */ + role?: string; + /** + * The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: + * - file + * - member + */ + teamDrivePermissionType?: string; + }>; + /** + * The type of the grantee. Valid values are: + * - user + * - group + * - domain + * - anyone + */ + type?: string; + } + interface PermissionList { + /** Identifies what kind of resource this is. Value: the fixed string "drive#permissionList". */ + kind?: string; + /** + * The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is + * rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + */ + nextPageToken?: string; + /** The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ + permissions?: Permission[]; + } + interface Reply { + /** + * The action the reply performed to the parent comment. Valid values are: + * - resolve + * - reopen + */ + action?: string; + /** The user who created the reply. */ + author?: User; + /** + * The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if + * no action is specified. + */ + content?: string; + /** The time at which the reply was created (RFC 3339 date-time). */ + createdTime?: string; + /** Whether the reply has been deleted. A deleted reply has no content. */ + deleted?: boolean; + /** The content of the reply with HTML formatting. */ + htmlContent?: string; + /** The ID of the reply. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "drive#reply". */ + kind?: string; + /** The last time the reply was modified (RFC 3339 date-time). */ + modifiedTime?: string; + } + interface ReplyList { + /** Identifies what kind of resource this is. Value: the fixed string "drive#replyList". */ + kind?: string; + /** + * The page token for the next page of replies. This will be absent if the end of the replies list has been reached. If the token is rejected for any + * reason, it should be discarded, and pagination should be restarted from the first page of results. + */ + nextPageToken?: string; + /** The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ + replies?: Reply[]; + } + interface Revision { + /** The ID of the revision. */ + id?: string; + /** + * Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after + * newer content is uploaded. This can be set on a maximum of 200 revisions for a file. + * This field is only applicable to files with binary content in Drive. + */ + keepForever?: boolean; + /** Identifies what kind of resource this is. Value: the fixed string "drive#revision". */ + kind?: string; + /** The last user to modify this revision. */ + lastModifyingUser?: User; + /** The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive. */ + md5Checksum?: string; + /** The MIME type of the revision. */ + mimeType?: string; + /** The last time the revision was modified (RFC 3339 date-time). */ + modifiedTime?: string; + /** The original filename used to create this revision. This is only applicable to files with binary content in Drive. */ + originalFilename?: string; + /** Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs. */ + publishAuto?: boolean; + /** Whether this revision is published. This is only applicable to Google Docs. */ + published?: boolean; + /** Whether this revision is published outside the domain. This is only applicable to Google Docs. */ + publishedOutsideDomain?: boolean; + /** The size of the revision's content in bytes. This is only applicable to files with binary content in Drive. */ + size?: string; + } + interface RevisionList { + /** Identifies what kind of resource this is. Value: the fixed string "drive#revisionList". */ + kind?: string; + /** + * The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached. If the token is rejected for any + * reason, it should be discarded, and pagination should be restarted from the first page of results. + */ + nextPageToken?: string; + /** The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ + revisions?: Revision[]; + } + interface StartPageToken { + /** Identifies what kind of resource this is. Value: the fixed string "drive#startPageToken". */ + kind?: string; + /** The starting page token for listing changes. */ + startPageToken?: string; + } + interface TeamDrive { + /** + * An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on + * drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. + */ + backgroundImageFile?: { + /** The ID of an image file in Drive to use for the background image. */ + id?: string; + /** + * The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire + * image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 + * pixels high. + */ + width?: number; + /** + * The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value + * represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire + * image. + */ + xCoordinate?: number; + /** + * The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value + * represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. + */ + yCoordinate?: number; + }; + /** A short-lived link to this Team Drive's background image. */ + backgroundImageLink?: string; + /** Capabilities the current user has on this Team Drive. */ + capabilities?: { + /** Whether the current user can add children to folders in this Team Drive. */ + canAddChildren?: boolean; + /** Whether the current user can change the background of this Team Drive. */ + canChangeTeamDriveBackground?: boolean; + /** Whether the current user can comment on files in this Team Drive. */ + canComment?: boolean; + /** Whether the current user can copy files in this Team Drive. */ + canCopy?: boolean; + /** + * Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team + * Drive. + */ + canDeleteTeamDrive?: boolean; + /** Whether the current user can download files in this Team Drive. */ + canDownload?: boolean; + /** Whether the current user can edit files in this Team Drive */ + canEdit?: boolean; + /** Whether the current user can list the children of folders in this Team Drive. */ + canListChildren?: boolean; + /** Whether the current user can add members to this Team Drive or remove them or change their role. */ + canManageMembers?: boolean; + /** Whether the current user can read the revisions resource of files in this Team Drive. */ + canReadRevisions?: boolean; + /** Whether the current user can remove children from folders in this Team Drive. */ + canRemoveChildren?: boolean; + /** Whether the current user can rename files or folders in this Team Drive. */ + canRename?: boolean; + /** Whether the current user can rename this Team Drive. */ + canRenameTeamDrive?: boolean; + /** Whether the current user can share files or folders in this Team Drive. */ + canShare?: boolean; + }; + /** The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId. */ + colorRgb?: string; + /** The ID of this Team Drive which is also the ID of the top level folder for this Team Drive. */ + id?: string; + /** Identifies what kind of resource this is. Value: the fixed string "drive#teamDrive". */ + kind?: string; + /** The name of this Team Drive. */ + name?: string; + /** + * The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get + * response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is + * a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. + */ + themeId?: string; + } + interface TeamDriveList { + /** Identifies what kind of resource this is. Value: the fixed string "drive#teamDriveList". */ + kind?: string; + /** + * The page token for the next page of Team Drives. This will be absent if the end of the Team Drives list has been reached. If the token is rejected for + * any reason, it should be discarded, and pagination should be restarted from the first page of results. + */ + nextPageToken?: string; + /** The list of Team Drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */ + teamDrives?: TeamDrive[]; + } + interface User { + /** A plain text displayable name for this user. */ + displayName?: string; + /** The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. */ + emailAddress?: string; + /** Identifies what kind of resource this is. Value: the fixed string "drive#user". */ + kind?: string; + /** Whether this user is the requesting user. */ + me?: boolean; + /** The user's ID as visible in Permission resources. */ + permissionId?: string; + /** A link to the user's profile photo, if available. */ + photoLink?: string; + } + interface AboutResource { + /** Gets information about the user, the user's Drive, and system capabilities. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ChangesResource { + /** Gets the starting pageToken for listing future changes. */ + getStartPageToken(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned. */ + teamDriveId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the changes for a user or Team Drive. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed + * from the list of changes and there will be no further change entries for this file. + */ + includeCorpusRemovals?: boolean; + /** Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. */ + includeRemoved?: boolean; + /** Whether Team Drive files or changes should be included in results. */ + includeTeamDriveItems?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of changes to return per page. */ + pageSize?: number; + /** + * The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to + * the response from the getStartPageToken method. + */ + pageToken: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or + * shared files which have not been added to My Drive. + */ + restrictToMyDrive?: boolean; + /** A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. */ + spaces?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** + * The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID + * and change ID as an identifier. + */ + teamDriveId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Subscribes to changes for a user. */ + watch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed + * from the list of changes and there will be no further change entries for this file. + */ + includeCorpusRemovals?: boolean; + /** Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. */ + includeRemoved?: boolean; + /** Whether Team Drive files or changes should be included in results. */ + includeTeamDriveItems?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of changes to return per page. */ + pageSize?: number; + /** + * The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to + * the response from the getStartPageToken method. + */ + pageToken: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or + * shared files which have not been added to My Drive. + */ + restrictToMyDrive?: boolean; + /** A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. */ + spaces?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** + * The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID + * and change ID as an identifier. + */ + teamDriveId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface ChannelsResource { + /** Stop watching resources through this channel */ + stop(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface CommentsResource { + /** Creates a new comment on a file. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a comment. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a comment by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** Whether to return deleted comments. Deleted comments will not include their original content. */ + includeDeleted?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists a file's comments. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** Whether to include deleted comments. Deleted comments will not include their original content. */ + includeDeleted?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of comments to return per page. */ + pageSize?: number; + /** The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time). */ + startModifiedTime?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a comment with patch semantics. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface FilesResource { + /** Creates a copy of a file and applies any requested updates with patch semantics. */ + copy(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** + * Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to + * the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. + */ + ignoreDefaultVisibility?: boolean; + /** Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Drive. */ + keepRevisionForever?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** A language hint for OCR processing during image import (ISO 639-1 code). */ + ocrLanguage?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Creates a new file. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to + * the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. + */ + ignoreDefaultVisibility?: boolean; + /** Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Drive. */ + keepRevisionForever?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** A language hint for OCR processing during image import (ISO 639-1 code). */ + ocrLanguage?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** Whether to use the uploaded content as indexable text. */ + useContentAsIndexableText?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the + * parent. If the target is a folder, all descendants owned by the user are also deleted. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Permanently deletes all of the user's trashed files. */ + emptyTrash(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. */ + export(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The MIME type of the format requested for this export. */ + mimeType: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Generates a set of file IDs which can be provided in create requests. */ + generateIds(request: { + /** Data format for the response. */ + alt?: string; + /** The number of IDs to return. */ + count?: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'. */ + space?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a file's metadata or content by ID. */ + get(request: { + /** Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. */ + acknowledgeAbuse?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists or searches files. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** + * Comma-separated list of bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'teamDrive' and + * 'allTeamDrives'. 'allTeamDrives' must be combined with 'user'; all other values must be used in isolation. Prefer 'user' or 'teamDrive' to + * 'allTeamDrives' for efficiency. + */ + corpora?: string; + /** The source of files to list. Deprecated: use 'corpora' instead. */ + corpus?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether Team Drive items should be included in results. */ + includeTeamDriveItems?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', + * 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the + * 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one + * million files in which the requested sort order is ignored. + */ + orderBy?: string; + /** The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. */ + pageSize?: number; + /** The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** A query for filtering the file results. See the "Search for Files" guide for supported syntax. */ + q?: string; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** A comma-separated list of spaces to query within the corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. */ + spaces?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** ID of Team Drive to search. */ + teamDriveId?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a file's metadata and/or content with patch semantics. */ + update(request: { + /** A comma-separated list of parent IDs to add. */ + addParents?: string; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Drive. */ + keepRevisionForever?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** A language hint for OCR processing during image import (ISO 639-1 code). */ + ocrLanguage?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** A comma-separated list of parent IDs to remove. */ + removeParents?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** Whether to use the uploaded content as indexable text. */ + useContentAsIndexableText?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Subscribes to changes to a file */ + watch(request: { + /** Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. */ + acknowledgeAbuse?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface PermissionsResource { + /** Creates a permission for a file or Team Drive. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** A custom message to include in the notification email. */ + emailMessage?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file or Team Drive. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other + * requests. It must not be disabled for ownership transfers. + */ + sendNotificationEmail?: boolean; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** + * Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of + * the side effect. + */ + transferOwnership?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a permission. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file or Team Drive. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the permission. */ + permissionId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a permission by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the permission. */ + permissionId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists a file's or Team Drive's permissions. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file or Team Drive. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for + * files that are not in a Team Drive, the entire list will be returned. + */ + pageSize?: number; + /** The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a permission with patch semantics. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file or Team Drive. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The ID of the permission. */ + permissionId: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether to remove the expiration date. */ + removeExpiration?: boolean; + /** Whether the requesting application supports Team Drives. */ + supportsTeamDrives?: boolean; + /** + * Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of + * the side effect. + */ + transferOwnership?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RepliesResource { + /** Creates a new reply to a comment. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a reply. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the reply. */ + replyId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a reply by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** Whether to return deleted replies. Deleted replies will not include their original content. */ + includeDeleted?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the reply. */ + replyId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists a comment's replies. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** Whether to include deleted replies. Deleted replies will not include their original content. */ + includeDeleted?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of replies to return per page. */ + pageSize?: number; + /** The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a reply with patch semantics. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The ID of the comment. */ + commentId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the reply. */ + replyId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface RevisionsResource { + /** Permanently deletes a revision. This method is only applicable to files with binary content in Drive. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the revision. */ + revisionId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a revision's metadata or content by ID. */ + get(request: { + /** Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. */ + acknowledgeAbuse?: boolean; + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the revision. */ + revisionId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists a file's revisions. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of revisions to return per page. */ + pageSize?: number; + /** The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a revision with patch semantics. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** The ID of the file. */ + fileId: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the revision. */ + revisionId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TeamdrivesResource { + /** Creates a new Team Drive. */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same + * user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 + * error will be returned. + */ + requestId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the Team Drive */ + teamDriveId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a Team Drive's metadata by ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the Team Drive */ + teamDriveId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists the user's Team Drives. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Maximum number of Team Drives to return. */ + pageSize?: number; + /** Page token for Team Drives. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates a Team Drive's metadata */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the Team Drive */ + teamDriveId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.drive/readme.md b/types/gapi.client.drive/readme.md new file mode 100644 index 0000000000..da5a3fb6e5 --- /dev/null +++ b/types/gapi.client.drive/readme.md @@ -0,0 +1,270 @@ +# TypeScript typings for Drive API v3 +Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions. +For detailed description please check [documentation](https://developers.google.com/drive/). + +## Installing + +Install typings for Drive API: +``` +npm install @types/gapi.client.drive@v3 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('drive', 'v3', () => { + // now we can use gapi.client.drive + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage the files in your Google Drive + 'https://www.googleapis.com/auth/drive', + + // View and manage its own configuration data in your Google Drive + 'https://www.googleapis.com/auth/drive.appdata', + + // View and manage Google Drive files and folders that you have opened or created with this app + 'https://www.googleapis.com/auth/drive.file', + + // View and manage metadata of files in your Google Drive + 'https://www.googleapis.com/auth/drive.metadata', + + // View metadata for files in your Google Drive + 'https://www.googleapis.com/auth/drive.metadata.readonly', + + // View the photos, videos and albums in your Google Photos + 'https://www.googleapis.com/auth/drive.photos.readonly', + + // View the files in your Google Drive + 'https://www.googleapis.com/auth/drive.readonly', + + // Modify your Google Apps Script scripts' behavior + 'https://www.googleapis.com/auth/drive.scripts', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Drive API resources: + +```typescript + +/* +Gets information about the user, the user's Drive, and system capabilities. +*/ +await gapi.client.about.get({ }); + +/* +Gets the starting pageToken for listing future changes. +*/ +await gapi.client.changes.getStartPageToken({ }); + +/* +Lists the changes for a user or Team Drive. +*/ +await gapi.client.changes.list({ pageToken: "pageToken", }); + +/* +Subscribes to changes for a user. +*/ +await gapi.client.changes.watch({ pageToken: "pageToken", }); + +/* +Stop watching resources through this channel +*/ +await gapi.client.channels.stop({ }); + +/* +Creates a new comment on a file. +*/ +await gapi.client.comments.create({ fileId: "fileId", }); + +/* +Deletes a comment. +*/ +await gapi.client.comments.delete({ commentId: "commentId", fileId: "fileId", }); + +/* +Gets a comment by ID. +*/ +await gapi.client.comments.get({ commentId: "commentId", fileId: "fileId", }); + +/* +Lists a file's comments. +*/ +await gapi.client.comments.list({ fileId: "fileId", }); + +/* +Updates a comment with patch semantics. +*/ +await gapi.client.comments.update({ commentId: "commentId", fileId: "fileId", }); + +/* +Creates a copy of a file and applies any requested updates with patch semantics. +*/ +await gapi.client.files.copy({ fileId: "fileId", }); + +/* +Creates a new file. +*/ +await gapi.client.files.create({ }); + +/* +Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted. +*/ +await gapi.client.files.delete({ fileId: "fileId", }); + +/* +Permanently deletes all of the user's trashed files. +*/ +await gapi.client.files.emptyTrash({ }); + +/* +Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. +*/ +await gapi.client.files.export({ fileId: "fileId", mimeType: "mimeType", }); + +/* +Generates a set of file IDs which can be provided in create requests. +*/ +await gapi.client.files.generateIds({ }); + +/* +Gets a file's metadata or content by ID. +*/ +await gapi.client.files.get({ fileId: "fileId", }); + +/* +Lists or searches files. +*/ +await gapi.client.files.list({ }); + +/* +Updates a file's metadata and/or content with patch semantics. +*/ +await gapi.client.files.update({ fileId: "fileId", }); + +/* +Subscribes to changes to a file +*/ +await gapi.client.files.watch({ fileId: "fileId", }); + +/* +Creates a permission for a file or Team Drive. +*/ +await gapi.client.permissions.create({ fileId: "fileId", }); + +/* +Deletes a permission. +*/ +await gapi.client.permissions.delete({ fileId: "fileId", permissionId: "permissionId", }); + +/* +Gets a permission by ID. +*/ +await gapi.client.permissions.get({ fileId: "fileId", permissionId: "permissionId", }); + +/* +Lists a file's or Team Drive's permissions. +*/ +await gapi.client.permissions.list({ fileId: "fileId", }); + +/* +Updates a permission with patch semantics. +*/ +await gapi.client.permissions.update({ fileId: "fileId", permissionId: "permissionId", }); + +/* +Creates a new reply to a comment. +*/ +await gapi.client.replies.create({ commentId: "commentId", fileId: "fileId", }); + +/* +Deletes a reply. +*/ +await gapi.client.replies.delete({ commentId: "commentId", fileId: "fileId", replyId: "replyId", }); + +/* +Gets a reply by ID. +*/ +await gapi.client.replies.get({ commentId: "commentId", fileId: "fileId", replyId: "replyId", }); + +/* +Lists a comment's replies. +*/ +await gapi.client.replies.list({ commentId: "commentId", fileId: "fileId", }); + +/* +Updates a reply with patch semantics. +*/ +await gapi.client.replies.update({ commentId: "commentId", fileId: "fileId", replyId: "replyId", }); + +/* +Permanently deletes a revision. This method is only applicable to files with binary content in Drive. +*/ +await gapi.client.revisions.delete({ fileId: "fileId", revisionId: "revisionId", }); + +/* +Gets a revision's metadata or content by ID. +*/ +await gapi.client.revisions.get({ fileId: "fileId", revisionId: "revisionId", }); + +/* +Lists a file's revisions. +*/ +await gapi.client.revisions.list({ fileId: "fileId", }); + +/* +Updates a revision with patch semantics. +*/ +await gapi.client.revisions.update({ fileId: "fileId", revisionId: "revisionId", }); + +/* +Creates a new Team Drive. +*/ +await gapi.client.teamdrives.create({ requestId: "requestId", }); + +/* +Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. +*/ +await gapi.client.teamdrives.delete({ teamDriveId: "teamDriveId", }); + +/* +Gets a Team Drive's metadata by ID. +*/ +await gapi.client.teamdrives.get({ teamDriveId: "teamDriveId", }); + +/* +Lists the user's Team Drives. +*/ +await gapi.client.teamdrives.list({ }); + +/* +Updates a Team Drive's metadata +*/ +await gapi.client.teamdrives.update({ teamDriveId: "teamDriveId", }); +``` \ No newline at end of file diff --git a/types/gapi.client.drive/tsconfig.json b/types/gapi.client.drive/tsconfig.json new file mode 100644 index 0000000000..6d5901b410 --- /dev/null +++ b/types/gapi.client.drive/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.drive-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.drive/tslint.json b/types/gapi.client.drive/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.drive/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.firebasedynamiclinks/gapi.client.firebasedynamiclinks-tests.ts b/types/gapi.client.firebasedynamiclinks/gapi.client.firebasedynamiclinks-tests.ts new file mode 100644 index 0000000000..4ef78ca6ba --- /dev/null +++ b/types/gapi.client.firebasedynamiclinks/gapi.client.firebasedynamiclinks-tests.ts @@ -0,0 +1,57 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('firebasedynamiclinks', 'v1', () => { + /** now we can use gapi.client.firebasedynamiclinks */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and administer all your Firebase data and settings */ + 'https://www.googleapis.com/auth/firebase', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Creates a short Dynamic Link given either a valid long Dynamic Link or + * details such as Dynamic Link domain, Android and iOS app information. + * The created short Dynamic Link will not expire. + * + * Repeated calls with the same long Dynamic Link or Dynamic Link information + * will produce the same short Dynamic Link. + * + * The Dynamic Link domain in the request must be owned by requester's + * Firebase project. + */ + await gapi.client.shortLinks.create({ + }); + /** + * Fetches analytics stats of a short Dynamic Link for a given + * duration. Metrics include number of clicks, redirects, installs, + * app first opens, and app reopens. + */ + await gapi.client.v1.getLinkStats({ + durationDays: "durationDays", + dynamicLink: "dynamicLink", + }); + /** Get iOS strong/weak-match info for post-install attribution. */ + await gapi.client.v1.installAttribution({ + }); + } +}); diff --git a/types/gapi.client.firebasedynamiclinks/index.d.ts b/types/gapi.client.firebasedynamiclinks/index.d.ts new file mode 100644 index 0000000000..618a8845a6 --- /dev/null +++ b/types/gapi.client.firebasedynamiclinks/index.d.ts @@ -0,0 +1,430 @@ +// Type definitions for Google Firebase Dynamic Links API v1 1.0 +// Project: https://firebase.google.com/docs/dynamic-links/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://firebasedynamiclinks.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Firebase Dynamic Links API v1 */ + function load(name: "firebasedynamiclinks", version: "v1"): PromiseLike; + function load(name: "firebasedynamiclinks", version: "v1", callback: () => any): void; + + const shortLinks: firebasedynamiclinks.ShortLinksResource; + + const v1: firebasedynamiclinks.V1Resource; + + namespace firebasedynamiclinks { + interface AnalyticsInfo { + /** Google Play Campaign Measurements. */ + googlePlayAnalytics?: GooglePlayAnalytics; + /** iTunes Connect App Analytics. */ + itunesConnectAnalytics?: ITunesConnectAnalytics; + } + interface AndroidInfo { + /** Link to open on Android if the app is not installed. */ + androidFallbackLink?: string; + /** If specified, this overrides the ‘link’ parameter on Android. */ + androidLink?: string; + /** + * Minimum version code for the Android app. If the installed app’s version + * code is lower, then the user is taken to the Play Store. + */ + androidMinPackageVersionCode?: string; + /** Android package name of the app. */ + androidPackageName?: string; + } + interface CreateShortDynamicLinkRequest { + /** + * Information about the Dynamic Link to be shortened. + * [Learn more](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically). + */ + dynamicLinkInfo?: DynamicLinkInfo; + /** + * Full long Dynamic Link URL with desired query parameters specified. + * For example, + * "https://sample.app.goo.gl/?link=http://www.google.com&apn=com.sample", + * [Learn more](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically). + */ + longDynamicLink?: string; + /** Short Dynamic Link suffix. Optional. */ + suffix?: Suffix; + } + interface CreateShortDynamicLinkResponse { + /** Preivew link to show the link flow chart. */ + previewLink?: string; + /** Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz */ + shortLink?: string; + /** Information about potential warnings on link creation. */ + warning?: DynamicLinkWarning[]; + } + interface DeviceInfo { + /** Device model name. */ + deviceModelName?: string; + /** Device language code setting. */ + languageCode?: string; + /** Device display resolution height. */ + screenResolutionHeight?: string; + /** Device display resolution width. */ + screenResolutionWidth?: string; + /** Device timezone setting. */ + timezone?: string; + } + interface DynamicLinkEventStat { + /** The number of times this event occurred. */ + count?: string; + /** Link event. */ + event?: string; + /** Requested platform. */ + platform?: string; + } + interface DynamicLinkInfo { + /** + * Parameters used for tracking. See all tracking parameters in the + * [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). + */ + analyticsInfo?: AnalyticsInfo; + /** + * Android related information. See Android related parameters in the + * [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). + */ + androidInfo?: AndroidInfo; + /** + * Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl + * [Learn more](https://firebase.google.com/docs/dynamic-links/android/receive) + * on how to set up Dynamic Link domain associated with your Firebase project. + * + * Required. + */ + dynamicLinkDomain?: string; + /** + * iOS related information. See iOS related parameters in the + * [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). + */ + iosInfo?: IosInfo; + /** + * The link your app will open, You can specify any URL your app can handle. + * This link must be a well-formatted URL, be properly URL-encoded, and use + * the HTTP or HTTPS scheme. See 'link' parameters in the + * [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). + * + * Required. + */ + link?: string; + /** Information of navigation behavior of a Firebase Dynamic Links. */ + navigationInfo?: NavigationInfo; + /** + * Parameters for social meta tag params. + * Used to set meta tag data for link previews on social sites. + */ + socialMetaTagInfo?: SocialMetaTagInfo; + } + interface DynamicLinkStats { + /** Dynamic Link event stats. */ + linkEventStats?: DynamicLinkEventStat[]; + } + interface DynamicLinkWarning { + /** The warning code. */ + warningCode?: string; + /** The document describing the warning, and helps resolve. */ + warningDocumentLink?: string; + /** The warning message to help developers improve their requests. */ + warningMessage?: string; + } + interface GetIosPostInstallAttributionRequest { + /** + * App installation epoch time (https://en.wikipedia.org/wiki/Unix_time). + * This is a client signal for a more accurate weak match. + */ + appInstallationTime?: string; + /** APP bundle ID. */ + bundleId?: string; + /** Device information. */ + device?: DeviceInfo; + /** + * iOS version, ie: 9.3.5. + * Consider adding "build". + */ + iosVersion?: string; + /** + * App post install attribution retrieval information. Disambiguates + * mechanism (iSDK or developer invoked) to retrieve payload from + * clicked link. + */ + retrievalMethod?: string; + /** Google SDK version. */ + sdkVersion?: string; + /** + * Possible unique matched link that server need to check before performing + * fingerprint match. If passed link is short server need to expand the link. + * If link is long server need to vslidate the link. + */ + uniqueMatchLinkToCheck?: string; + /** + * Strong match page information. Disambiguates between default UI and + * custom page to present when strong match succeeds/fails to find cookie. + */ + visualStyle?: string; + } + interface GetIosPostInstallAttributionResponse { + /** + * The minimum version for app, specified by dev through ?imv= parameter. + * Return to iSDK to allow app to evaluate if current version meets this. + */ + appMinimumVersion?: string; + /** The confidence of the returned attribution. */ + attributionConfidence?: string; + /** + * The deep-link attributed post-install via one of several techniques + * (fingerprint, copy unique). + */ + deepLink?: string; + /** + * User-agent specific custom-scheme URIs for iSDK to open. This will be set + * according to the user-agent tha the click was originally made in. There is + * no Safari-equivalent custom-scheme open URLs. + * ie: googlechrome://www.example.com + * ie: firefox://open-url?url=http://www.example.com + * ie: opera-http://example.com + */ + externalBrowserDestinationLink?: string; + /** + * The link to navigate to update the app if min version is not met. + * This is either (in order): 1) fallback link (from ?ifl= parameter, if + * specified by developer) or 2) AppStore URL (from ?isi= parameter, if + * specified), or 3) the payload link (from required link= parameter). + */ + fallbackLink?: string; + /** + * Invitation ID attributed post-install via one of several techniques + * (fingerprint, copy unique). + */ + invitationId?: string; + /** + * Instruction for iSDK to attemmpt to perform strong match. For instance, + * if browser does not support/allow cookie or outside of support browsers, + * this will be false. + */ + isStrongMatchExecutable?: boolean; + /** + * Describes why match failed, ie: "discarded due to low confidence". + * This message will be publicly visible. + */ + matchMessage?: string; + /** + * Entire FDL (short or long) attributed post-install via one of several + * techniques (fingerprint, copy unique). + */ + requestedLink?: string; + /** + * The entire FDL, expanded from a short link. It is the same as the + * requested_link, if it is long. Parameters from this should not be + * used directly (ie: server can default utm_[campaign|medium|source] + * to a value when requested_link lack them, server determine the best + * fallback_link when requested_link specifies >1 fallback links). + */ + resolvedLink?: string; + /** Scion campaign value to be propagated by iSDK to Scion at post-install. */ + utmCampaign?: string; + /** Scion medium value to be propagated by iSDK to Scion at post-install. */ + utmMedium?: string; + /** Scion source value to be propagated by iSDK to Scion at post-install. */ + utmSource?: string; + } + interface GooglePlayAnalytics { + /** + * [AdWords autotagging parameter](https://support.google.com/analytics/answer/1033981?hl=en); + * used to measure Google AdWords ads. This value is generated dynamically + * and should never be modified. + */ + gclid?: string; + /** + * Campaign name; used for keyword analysis to identify a specific product + * promotion or strategic campaign. + */ + utmCampaign?: string; + /** + * Campaign content; used for A/B testing and content-targeted ads to + * differentiate ads or links that point to the same URL. + */ + utmContent?: string; + /** Campaign medium; used to identify a medium such as email or cost-per-click. */ + utmMedium?: string; + /** + * Campaign source; used to identify a search engine, newsletter, or other + * source. + */ + utmSource?: string; + /** Campaign term; used with paid search to supply the keywords for ads. */ + utmTerm?: string; + } + interface ITunesConnectAnalytics { + /** Affiliate token used to create affiliate-coded links. */ + at?: string; + /** + * Campaign text that developers can optionally add to any link in order to + * track sales from a specific marketing campaign. + */ + ct?: string; + /** iTune media types, including music, podcasts, audiobooks and so on. */ + mt?: string; + /** + * Provider token that enables analytics for Dynamic Links from within iTunes + * Connect. + */ + pt?: string; + } + interface IosInfo { + /** iOS App Store ID. */ + iosAppStoreId?: string; + /** iOS bundle ID of the app. */ + iosBundleId?: string; + /** + * Custom (destination) scheme to use for iOS. By default, we’ll use the + * bundle ID as the custom scheme. Developer can override this behavior using + * this param. + */ + iosCustomScheme?: string; + /** Link to open on iOS if the app is not installed. */ + iosFallbackLink?: string; + /** iPad bundle ID of the app. */ + iosIpadBundleId?: string; + /** If specified, this overrides the ios_fallback_link value on iPads. */ + iosIpadFallbackLink?: string; + } + interface NavigationInfo { + /** + * If this option is on, FDL click will be forced to redirect rather than + * show an interstitial page. + */ + enableForcedRedirect?: boolean; + } + interface SocialMetaTagInfo { + /** A short description of the link. Optional. */ + socialDescription?: string; + /** An image url string. Optional. */ + socialImageLink?: string; + /** Title to be displayed. Optional. */ + socialTitle?: string; + } + interface Suffix { + /** Suffix option. */ + option?: string; + } + interface ShortLinksResource { + /** + * Creates a short Dynamic Link given either a valid long Dynamic Link or + * details such as Dynamic Link domain, Android and iOS app information. + * The created short Dynamic Link will not expire. + * + * Repeated calls with the same long Dynamic Link or Dynamic Link information + * will produce the same short Dynamic Link. + * + * The Dynamic Link domain in the request must be owned by requester's + * Firebase project. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface V1Resource { + /** + * Fetches analytics stats of a short Dynamic Link for a given + * duration. Metrics include number of clicks, redirects, installs, + * app first opens, and app reopens. + */ + getLinkStats(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The span of time requested in days. */ + durationDays?: string; + /** Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz */ + dynamicLink: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Get iOS strong/weak-match info for post-install attribution. */ + installAttribution(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + } +} diff --git a/types/gapi.client.firebasedynamiclinks/readme.md b/types/gapi.client.firebasedynamiclinks/readme.md new file mode 100644 index 0000000000..ec49c972a7 --- /dev/null +++ b/types/gapi.client.firebasedynamiclinks/readme.md @@ -0,0 +1,79 @@ +# TypeScript typings for Firebase Dynamic Links API v1 +Programmatically creates and manages Firebase Dynamic Links. +For detailed description please check [documentation](https://firebase.google.com/docs/dynamic-links/). + +## Installing + +Install typings for Firebase Dynamic Links API: +``` +npm install @types/gapi.client.firebasedynamiclinks@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('firebasedynamiclinks', 'v1', () => { + // now we can use gapi.client.firebasedynamiclinks + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and administer all your Firebase data and settings + 'https://www.googleapis.com/auth/firebase', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Firebase Dynamic Links API resources: + +```typescript + +/* +Creates a short Dynamic Link given either a valid long Dynamic Link or +details such as Dynamic Link domain, Android and iOS app information. +The created short Dynamic Link will not expire. + +Repeated calls with the same long Dynamic Link or Dynamic Link information +will produce the same short Dynamic Link. + +The Dynamic Link domain in the request must be owned by requester's +Firebase project. +*/ +await gapi.client.shortLinks.create({ }); + +/* +Fetches analytics stats of a short Dynamic Link for a given +duration. Metrics include number of clicks, redirects, installs, +app first opens, and app reopens. +*/ +await gapi.client.v1.getLinkStats({ dynamicLink: "dynamicLink", }); + +/* +Get iOS strong/weak-match info for post-install attribution. +*/ +await gapi.client.v1.installAttribution({ }); +``` \ No newline at end of file diff --git a/types/gapi.client.firebasedynamiclinks/tsconfig.json b/types/gapi.client.firebasedynamiclinks/tsconfig.json new file mode 100644 index 0000000000..e43d9944a4 --- /dev/null +++ b/types/gapi.client.firebasedynamiclinks/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.firebasedynamiclinks-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.firebasedynamiclinks/tslint.json b/types/gapi.client.firebasedynamiclinks/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.firebasedynamiclinks/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.firebaseremoteconfig/gapi.client.firebaseremoteconfig-tests.ts b/types/gapi.client.firebaseremoteconfig/gapi.client.firebaseremoteconfig-tests.ts new file mode 100644 index 0000000000..60c5cec59c --- /dev/null +++ b/types/gapi.client.firebaseremoteconfig/gapi.client.firebaseremoteconfig-tests.ts @@ -0,0 +1,48 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('firebaseremoteconfig', 'v1', () => { + /** now we can use gapi.client.firebaseremoteconfig */ + + run(); + }); + + async function run() { + /** + * Get the latest version Remote Configuration for a project. + * Returns the RemoteConfig as the payload, and also the eTag as a + * response header. + */ + await gapi.client.projects.getRemoteConfig({ + project: "project", + }); + /** + * Update a RemoteConfig. We treat this as an always-existing + * resource (when it is not found in our data store, we treat it as version + * 0, a template with zero conditions and zero parameters). Hence there are + * no Create or Delete operations. Returns the updated template when + * successful (and the updated eTag as a response header), or an error if + * things go wrong. + * Possible error messages: + * * VALIDATION_ERROR (HTTP status 400) with additional details if the + * template being passed in can not be validated. + * * AUTHENTICATION_ERROR (HTTP status 401) if the request can not be + * authenticate (e.g. no access token, or invalid access token). + * * AUTHORIZATION_ERROR (HTTP status 403) if the request can not be + * authorized (e.g. the user has no access to the specified project id). + * * VERSION_MISMATCH (HTTP status 412) when trying to update when the + * expected eTag (passed in via the "If-match" header) is not specified, or + * is specified but does does not match the current eTag. + * * Internal error (HTTP status 500) for Database problems or other internal + * errors. + */ + await gapi.client.projects.updateRemoteConfig({ + project: "project", + validateOnly: true, + }); + } +}); diff --git a/types/gapi.client.firebaseremoteconfig/index.d.ts b/types/gapi.client.firebaseremoteconfig/index.d.ts new file mode 100644 index 0000000000..22c96e59c8 --- /dev/null +++ b/types/gapi.client.firebaseremoteconfig/index.d.ts @@ -0,0 +1,197 @@ +// Type definitions for Google Firebase Remote Config API v1 1.0 +// Project: https://firebase.google.com/docs/remote-config/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://firebaseremoteconfig.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Firebase Remote Config API v1 */ + function load(name: "firebaseremoteconfig", version: "v1"): PromiseLike; + function load(name: "firebaseremoteconfig", version: "v1", callback: () => any): void; + + const projects: firebaseremoteconfig.ProjectsResource; + + namespace firebaseremoteconfig { + interface RemoteConfig { + /** + * The list of named conditions. The order *does* affect the semantics. + * The condition_name values of these entries must be unique. + * + * The resolved value of a config parameter P is determined as follow: + * * Let Y be the set of values from the submap of P that refer to conditions + * that evaluate to true. + * * If Y is non empty, the value is taken from the specific submap in Y whose + * condition_name is the earliest in this condition list. + * * Else, if P has a default value option (condition_name is empty) then + * the value is taken from that option. + * * Else, parameter P has no value and is omitted from the config result. + * + * Example: parameter key "p1", default value "v1", submap specified as + * {"c1": v2, "c2": v3} where "c1" and "c2" are names of conditions in the + * condition list (where "c1" in this example appears before "c2"). The + * value of p1 would be v2 as long as c1 is true. Otherwise, if c2 is true, + * p1 would evaluate to v3, and if c1 and c2 are both false, p1 would evaluate + * to v1. If no default value was specified, and c1 and c2 were both false, + * no value for p1 would be generated. + */ + conditions?: RemoteConfigCondition[]; + /** + * Map of parameter keys to their optional default values and optional submap + * of (condition name : value). Order doesn't affect semantics, and so is + * sorted by the server. The 'key' values of the params must be unique. + */ + parameters?: Record; + } + interface RemoteConfigCondition { + /** Required. */ + expression?: string; + /** + * Required. + * A non empty and unique name of this condition. + */ + name?: string; + /** + * Optional. + * The display (tag) color of this condition. This serves as part of a tag + * (in the future, we may add tag text as well as tag color, but that is not + * yet implemented in the UI). + * This value has no affect on the semantics of the delivered config and it + * is ignored by the backend, except for passing it through write/read + * requests. + * Not having this value or having the "CONDITION_DISPLAY_COLOR_UNSPECIFIED" + * value (0) have the same meaning: Let the UI choose any valid color when + * displaying the condition. + */ + tagColor?: string; + } + interface RemoteConfigParameter { + /** + * Optional - a map of (condition_name, value). The condition_name of the + * highest priority (the one listed first in the conditions array) determines + * the value of this parameter. + */ + conditionalValues?: Record; + /** + * Optional - value to set the parameter to, when none of the named conditions + * evaluate to true. + */ + defaultValue?: RemoteConfigParameterValue; + } + interface RemoteConfigParameterValue { + /** if true, omit the parameter from the map of fetched parameter values */ + useInAppDefault?: boolean; + /** the string to set the parameter to */ + value?: string; + } + interface ProjectsResource { + /** + * Get the latest version Remote Configuration for a project. + * Returns the RemoteConfig as the payload, and also the eTag as a + * response header. + */ + getRemoteConfig(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The GMP project identifier. Required. + * See note at the beginning of this file regarding project ids. + */ + project: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Update a RemoteConfig. We treat this as an always-existing + * resource (when it is not found in our data store, we treat it as version + * 0, a template with zero conditions and zero parameters). Hence there are + * no Create or Delete operations. Returns the updated template when + * successful (and the updated eTag as a response header), or an error if + * things go wrong. + * Possible error messages: + * * VALIDATION_ERROR (HTTP status 400) with additional details if the + * template being passed in can not be validated. + * * AUTHENTICATION_ERROR (HTTP status 401) if the request can not be + * authenticate (e.g. no access token, or invalid access token). + * * AUTHORIZATION_ERROR (HTTP status 403) if the request can not be + * authorized (e.g. the user has no access to the specified project id). + * * VERSION_MISMATCH (HTTP status 412) when trying to update when the + * expected eTag (passed in via the "If-match" header) is not specified, or + * is specified but does does not match the current eTag. + * * Internal error (HTTP status 500) for Database problems or other internal + * errors. + */ + updateRemoteConfig(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * The GMP project identifier. Required. + * See note at the beginning of this file regarding project ids. + */ + project: string; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + /** + * Optional. Defaults to false (UpdateRemoteConfig call should + * update the backend if there are no validation/interal errors). May be set + * to true to indicate that, should no validation errors occur, + * the call should return a "200 OK" instead of performing the update. Note + * that other error messages (500 Internal Error, 412 Version Mismatch, etc) + * may still result after flipping to false, even if getting a + * "200 OK" when calling with true. + */ + validateOnly?: boolean; + }): Request; + } + } +} diff --git a/types/gapi.client.firebaseremoteconfig/readme.md b/types/gapi.client.firebaseremoteconfig/readme.md new file mode 100644 index 0000000000..eb99d22d5f --- /dev/null +++ b/types/gapi.client.firebaseremoteconfig/readme.md @@ -0,0 +1,64 @@ +# TypeScript typings for Firebase Remote Config API v1 +Firebase Remote Config API allows the 3P clients to manage Remote Config conditions and parameters for Firebase applications. +For detailed description please check [documentation](https://firebase.google.com/docs/remote-config/). + +## Installing + +Install typings for Firebase Remote Config API: +``` +npm install @types/gapi.client.firebaseremoteconfig@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('firebaseremoteconfig', 'v1', () => { + // now we can use gapi.client.firebaseremoteconfig + // ... +}); +``` + + + +After that you can use Firebase Remote Config API resources: + +```typescript + +/* +Get the latest version Remote Configuration for a project. +Returns the RemoteConfig as the payload, and also the eTag as a +response header. +*/ +await gapi.client.projects.getRemoteConfig({ project: "project", }); + +/* +Update a RemoteConfig. We treat this as an always-existing +resource (when it is not found in our data store, we treat it as version +0, a template with zero conditions and zero parameters). Hence there are +no Create or Delete operations. Returns the updated template when +successful (and the updated eTag as a response header), or an error if +things go wrong. +Possible error messages: +* VALIDATION_ERROR (HTTP status 400) with additional details if the +template being passed in can not be validated. +* AUTHENTICATION_ERROR (HTTP status 401) if the request can not be +authenticate (e.g. no access token, or invalid access token). +* AUTHORIZATION_ERROR (HTTP status 403) if the request can not be +authorized (e.g. the user has no access to the specified project id). +* VERSION_MISMATCH (HTTP status 412) when trying to update when the +expected eTag (passed in via the "If-match" header) is not specified, or +is specified but does does not match the current eTag. +* Internal error (HTTP status 500) for Database problems or other internal +errors. +*/ +await gapi.client.projects.updateRemoteConfig({ project: "project", }); +``` \ No newline at end of file diff --git a/types/gapi.client.firebaseremoteconfig/tsconfig.json b/types/gapi.client.firebaseremoteconfig/tsconfig.json new file mode 100644 index 0000000000..9366ffa276 --- /dev/null +++ b/types/gapi.client.firebaseremoteconfig/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.firebaseremoteconfig-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.firebaseremoteconfig/tslint.json b/types/gapi.client.firebaseremoteconfig/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.firebaseremoteconfig/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.firebaserules/gapi.client.firebaserules-tests.ts b/types/gapi.client.firebaserules/gapi.client.firebaserules-tests.ts new file mode 100644 index 0000000000..28ca08a8d8 --- /dev/null +++ b/types/gapi.client.firebaserules/gapi.client.firebaserules-tests.ts @@ -0,0 +1,63 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('firebaserules', 'v1', () => { + /** now we can use gapi.client.firebaserules */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View and administer all your Firebase data and settings */ + 'https://www.googleapis.com/auth/firebase', + /** View all your Firebase data and settings */ + 'https://www.googleapis.com/auth/firebase.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** + * Test `Source` for syntactic and semantic correctness. Issues present, if + * any, will be returned to the caller with a description, severity, and + * source location. + * + * The test method may be executed with `Source` or a `Ruleset` name. + * Passing `Source` is useful for unit testing new rules. Passing a `Ruleset` + * name is useful for regression testing an existing rule. + * + * The following is an example of `Source` that permits users to upload images + * to a bucket bearing their user id and matching the correct metadata: + * + * _*Example*_ + * + * // Users are allowed to subscribe and unsubscribe to the blog. + * service firebase.storage { + * match /users/{userId}/images/{imageName} { + * allow write: if userId == request.auth.uid + * && (imageName.matches('*.png$') + * || imageName.matches('*.jpg$')) + * && resource.mimeType.matches('^image/') + * } + * } + */ + await gapi.client.projects.test({ + name: "name", + }); + } +}); diff --git a/types/gapi.client.firebaserules/index.d.ts b/types/gapi.client.firebaserules/index.d.ts new file mode 100644 index 0000000000..fbe2fb4da7 --- /dev/null +++ b/types/gapi.client.firebaserules/index.d.ts @@ -0,0 +1,828 @@ +// Type definitions for Google Firebase Rules API v1 1.0 +// Project: https://firebase.google.com/docs/storage/security +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://firebaserules.googleapis.com/$discovery/rest?version=v1 + +/// + +declare namespace gapi.client { + /** Load Firebase Rules API v1 */ + function load(name: "firebaserules", version: "v1"): PromiseLike; + function load(name: "firebaserules", version: "v1", callback: () => any): void; + + const projects: firebaserules.ProjectsResource; + + namespace firebaserules { + interface Arg { + /** Argument matches any value provided. */ + anyValue?: any; + /** Argument exactly matches value provided. */ + exactValue?: any; + } + interface File { + /** Textual Content. */ + content?: string; + /** Fingerprint (e.g. github sha) associated with the `File`. */ + fingerprint?: string; + /** File name. */ + name?: string; + } + interface FunctionCall { + /** The arguments that were provided to the function. */ + args?: any[]; + /** Name of the function invoked. */ + function?: string; + } + interface FunctionMock { + /** + * The list of `Arg` values to match. The order in which the arguments are + * provided is the order in which they must appear in the function + * invocation. + */ + args?: Arg[]; + /** + * The name of the function. + * + * The function name must match one provided by a service declaration. + */ + function?: string; + /** The mock result of the function call. */ + result?: Result; + } + interface GetReleaseExecutableResponse { + /** Executable view of the `Ruleset` referenced by the `Release`. */ + executable?: string; + /** The Rules runtime version of the executable. */ + executableVersion?: string; + /** `Language` used to generate the executable bytes. */ + language?: string; + /** `Ruleset` name associated with the `Release` executable. */ + rulesetName?: string; + /** Timestamp for the most recent `Release.update_time`. */ + updateTime?: string; + } + interface Issue { + /** Short error description. */ + description?: string; + /** The severity of the issue. */ + severity?: string; + /** Position of the issue in the `Source`. */ + sourcePosition?: SourcePosition; + } + interface ListReleasesResponse { + /** + * The pagination token to retrieve the next page of results. If the value is + * empty, no further results remain. + */ + nextPageToken?: string; + /** List of `Release` instances. */ + releases?: Release[]; + } + interface ListRulesetsResponse { + /** + * The pagination token to retrieve the next page of results. If the value is + * empty, no further results remain. + */ + nextPageToken?: string; + /** List of `Ruleset` instances. */ + rulesets?: Ruleset[]; + } + interface Release { + /** + * Time the release was created. + * Output only. + */ + createTime?: string; + /** + * Resource name for the `Release`. + * + * `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` + * which affords developers a great deal of flexibility in mapping the name + * to the style that best fits their existing development practices. For + * example, a name could refer to an environment, an app, a version, or some + * combination of three. + * + * In the table below, for the project name `projects/foo`, the following + * relative release paths show how flat and structured names might be chosen + * to match a desired development / deployment strategy. + * + * Use Case | Flat Name | Structured Name + * -------------|---------------------|---------------- + * Environments | releases/qa | releases/qa + * Apps | releases/app1_qa | releases/app1/qa + * Versions | releases/app1_v2_qa | releases/app1/v2/qa + * + * The delimiter between the release name path elements can be almost anything + * and it should work equally well with the release name list filter, but in + * many ways the structured paths provide a clearer picture of the + * relationship between `Release` instances. + * + * Format: `projects/{project_id}/releases/{release_id}` + */ + name?: string; + /** + * Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must + * exist the `Release` to be created. + */ + rulesetName?: string; + /** + * Time the release was updated. + * Output only. + */ + updateTime?: string; + } + interface Result { + /** The result is undefined, meaning the result could not be computed. */ + undefined?: any; + /** + * The result is an actual value. The type of the value must match that + * of the type declared by the service. + */ + value?: any; + } + interface Ruleset { + /** + * Time the `Ruleset` was created. + * Output only. + */ + createTime?: string; + /** + * Name of the `Ruleset`. The ruleset_id is auto generated by the service. + * Format: `projects/{project_id}/rulesets/{ruleset_id}` + * Output only. + */ + name?: string; + /** `Source` for the `Ruleset`. */ + source?: Source; + } + interface Source { + /** `File` set constituting the `Source` bundle. */ + files?: File[]; + } + interface SourcePosition { + /** First column on the source line associated with the source fragment. */ + column?: number; + /** Name of the `File`. */ + fileName?: string; + /** Line number of the source fragment. 1-based. */ + line?: number; + } + interface TestCase { + /** Test expectation. */ + expectation?: string; + /** + * Optional function mocks for service-defined functions. If not set, any + * service defined function is expected to return an error, which may or may + * not influence the test outcome. + */ + functionMocks?: FunctionMock[]; + /** + * Request context. + * + * The exact format of the request context is service-dependent. See the + * appropriate service documentation for information about the supported + * fields and types on the request. Minimally, all services support the + * following fields and types: + * + * Request field | Type + * ---------------|----------------- + * auth.uid | `string` + * auth.token | `map` + * headers | `map` + * method | `string` + * params | `map` + * path | `string` + * time | `google.protobuf.Timestamp` + * + * If the request value is not well-formed for the service, the request will + * be rejected as an invalid argument. + */ + request?: any; + /** + * Optional resource value as it appears in persistent storage before the + * request is fulfilled. + * + * The resource type depends on the `request.path` value. + */ + resource?: any; + } + interface TestResult { + /** + * Debug messages related to test execution issues encountered during + * evaluation. + * + * Debug messages may be related to too many or too few invocations of + * function mocks or to runtime errors that occur during evaluation. + * + * For example: ```Unable to read variable [name: "resource"]``` + */ + debugMessages?: string[]; + /** + * Position in the `Source` or `Ruleset` where the principle runtime error + * occurs. + * + * Evaluation of an expression may result in an error. Rules are deny by + * default, so a `DENY` expectation when an error is generated is valid. + * When there is a `DENY` with an error, the `SourcePosition` is returned. + * + * E.g. `error_position { line: 19 column: 37 }` + */ + errorPosition?: SourcePosition; + /** + * The set of function calls made to service-defined methods. + * + * Function calls are included in the order in which they are encountered + * during evaluation, are provided for both mocked and unmocked functions, + * and included on the response regardless of the test `state`. + */ + functionCalls?: FunctionCall[]; + /** State of the test. */ + state?: string; + } + interface TestRulesetRequest { + /** + * Optional `Source` to be checked for correctness. + * + * This field must not be set when the resource name refers to a `Ruleset`. + */ + source?: Source; + /** Inline `TestSuite` to run. */ + testSuite?: TestSuite; + } + interface TestRulesetResponse { + /** + * Syntactic and semantic `Source` issues of varying severity. Issues of + * `ERROR` severity will prevent tests from executing. + */ + issues?: Issue[]; + /** + * The set of test results given the test cases in the `TestSuite`. + * The results will appear in the same order as the test cases appear in the + * `TestSuite`. + */ + testResults?: TestResult[]; + } + interface TestSuite { + /** Collection of test cases associated with the `TestSuite`. */ + testCases?: TestCase[]; + } + interface ReleasesResource { + /** + * Create a `Release`. + * + * Release names should reflect the developer's deployment practices. For + * example, the release name may include the environment name, application + * name, application version, or any other name meaningful to the developer. + * Once a `Release` refers to a `Ruleset`, the rules can be enforced by + * Firebase Rules-enabled services. + * + * More than one `Release` may be 'live' concurrently. Consider the following + * three `Release` names for `projects/foo` and the `Ruleset` to which they + * refer. + * + * Release Name | Ruleset Name + * --------------------------------|------------- + * projects/foo/releases/prod | projects/foo/rulesets/uuid123 + * projects/foo/releases/prod/beta | projects/foo/rulesets/uuid123 + * projects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456 + * + * The table reflects the `Ruleset` rollout in progress. The `prod` and + * `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23` + * refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be + * updated using the UpdateRelease method. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for the project which owns this `Release`. + * + * Format: `projects/{project_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Delete a `Release` by resource name. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for the `Release` to delete. + * + * Format: `projects/{project_id}/releases/{release_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Get a `Release` by name. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name of the `Release`. + * + * Format: `projects/{project_id}/releases/{release_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Get the `Release` executable to use when enforcing rules. */ + getExecutable(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The requested runtime executable version. + * Defaults to FIREBASE_RULES_EXECUTABLE_V1 + */ + executableVersion?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name of the `Release`. + * + * Format: `projects/{project_id}/releases/{release_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * List the `Release` values for a project. This list may optionally be + * filtered by `Release` name, `Ruleset` name, `TestSuite` name, or any + * combination thereof. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * `Release` filter. The list method supports filters with restrictions on the + * `Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`. + * + * Example 1: A filter of 'name=prod*' might return `Release`s with names + * within 'projects/foo' prefixed with 'prod': + * + * Name | Ruleset Name + * ------------------------------|------------- + * projects/foo/releases/prod | projects/foo/rulesets/uuid1234 + * projects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234 + * projects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888 + * + * Example 2: A filter of `name=prod* ruleset_name=uuid1234` would return only + * `Release` instances for 'projects/foo' with names prefixed with 'prod' + * referring to the same `Ruleset` name of 'uuid1234': + * + * Name | Ruleset Name + * ------------------------------|------------- + * projects/foo/releases/prod | projects/foo/rulesets/1234 + * projects/foo/releases/prod/v1 | projects/foo/rulesets/1234 + * + * In the examples, the filter parameters refer to the search filters are + * relative to the project. Fully qualified prefixed may also be used. e.g. + * `test_suite_name=projects/foo/testsuites/uuid1` + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for the project. + * + * Format: `projects/{project_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Page size to load. Maximum of 100. Defaults to 10. + * Note: `page_size` is just a hint and the service may choose to load fewer + * than `page_size` results due to the size of the output. To traverse all of + * the releases, the caller should iterate until the `page_token` on the + * response is empty. + */ + pageSize?: number; + /** Next page token for the next batch of `Release` instances. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Update a `Release`. + * + * Only updates to the `ruleset_name` and `test_suite_name` fields will be + * honored. `Release` rename is not supported. To create a `Release` use the + * CreateRelease method. + */ + update(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for the `Release`. + * + * `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` + * which affords developers a great deal of flexibility in mapping the name + * to the style that best fits their existing development practices. For + * example, a name could refer to an environment, an app, a version, or some + * combination of three. + * + * In the table below, for the project name `projects/foo`, the following + * relative release paths show how flat and structured names might be chosen + * to match a desired development / deployment strategy. + * + * Use Case | Flat Name | Structured Name + * -------------|---------------------|---------------- + * Environments | releases/qa | releases/qa + * Apps | releases/app1_qa | releases/app1/qa + * Versions | releases/app1_v2_qa | releases/app1/v2/qa + * + * The delimiter between the release name path elements can be almost anything + * and it should work equally well with the release name list filter, but in + * many ways the structured paths provide a clearer picture of the + * relationship between `Release` instances. + * + * Format: `projects/{project_id}/releases/{release_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface RulesetsResource { + /** + * Create a `Ruleset` from `Source`. + * + * The `Ruleset` is given a unique generated name which is returned to the + * caller. `Source` containing syntactic or semantics errors will result in an + * error response indicating the first error encountered. For a detailed view + * of `Source` issues, use TestRuleset. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for Project which owns this `Ruleset`. + * + * Format: `projects/{project_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * Delete a `Ruleset` by resource name. + * + * If the `Ruleset` is referenced by a `Release` the operation will fail. + */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for the ruleset to delete. + * + * Format: `projects/{project_id}/rulesets/{ruleset_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Get a `Ruleset` by name including the full `Source` contents. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for the ruleset to get. + * + * Format: `projects/{project_id}/rulesets/{ruleset_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** + * List `Ruleset` metadata only and optionally filter the results by `Ruleset` + * name. + * + * The full `Source` contents of a `Ruleset` may be retrieved with + * GetRuleset. + */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * `Ruleset` filter. The list method supports filters with restrictions on + * `Ruleset.name`. + * + * Filters on `Ruleset.create_time` should use the `date` function which + * parses strings that conform to the RFC 3339 date/time specifications. + * + * Example: `create_time > date("2017-01-01") AND name=UUID-*` + */ + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Resource name for the project. + * + * Format: `projects/{project_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * Page size to load. Maximum of 100. Defaults to 10. + * Note: `page_size` is just a hint and the service may choose to load less + * than `page_size` due to the size of the output. To traverse all of the + * releases, caller should iterate until the `page_token` is empty. + */ + pageSize?: number; + /** Next page token for loading the next batch of `Ruleset` instances. */ + pageToken?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface ProjectsResource { + /** + * Test `Source` for syntactic and semantic correctness. Issues present, if + * any, will be returned to the caller with a description, severity, and + * source location. + * + * The test method may be executed with `Source` or a `Ruleset` name. + * Passing `Source` is useful for unit testing new rules. Passing a `Ruleset` + * name is useful for regression testing an existing rule. + * + * The following is an example of `Source` that permits users to upload images + * to a bucket bearing their user id and matching the correct metadata: + * + * _*Example*_ + * + * // Users are allowed to subscribe and unsubscribe to the blog. + * service firebase.storage { + * match /users/{userId}/images/{imageName} { + * allow write: if userId == request.auth.uid + * && (imageName.matches('*.png$') + * || imageName.matches('*.jpg$')) + * && resource.mimeType.matches('^image/') + * } + * } + */ + test(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * Tests may either provide `source` or a `Ruleset` resource name. + * + * For tests against `source`, the resource name must refer to the project: + * Format: `projects/{project_id}` + * + * For tests against a `Ruleset`, this must be the `Ruleset` resource name: + * Format: `projects/{project_id}/rulesets/{ruleset_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + releases: ReleasesResource; + rulesets: RulesetsResource; + } + } +} diff --git a/types/gapi.client.firebaserules/readme.md b/types/gapi.client.firebaserules/readme.md new file mode 100644 index 0000000000..992701be26 --- /dev/null +++ b/types/gapi.client.firebaserules/readme.md @@ -0,0 +1,87 @@ +# TypeScript typings for Firebase Rules API v1 +Creates and manages rules that determine when a Firebase Rules-enabled service should permit a request. + +For detailed description please check [documentation](https://firebase.google.com/docs/storage/security). + +## Installing + +Install typings for Firebase Rules API: +``` +npm install @types/gapi.client.firebaserules@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('firebaserules', 'v1', () => { + // now we can use gapi.client.firebaserules + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View and administer all your Firebase data and settings + 'https://www.googleapis.com/auth/firebase', + + // View all your Firebase data and settings + 'https://www.googleapis.com/auth/firebase.readonly', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Firebase Rules API resources: + +```typescript + +/* +Test `Source` for syntactic and semantic correctness. Issues present, if +any, will be returned to the caller with a description, severity, and +source location. + +The test method may be executed with `Source` or a `Ruleset` name. +Passing `Source` is useful for unit testing new rules. Passing a `Ruleset` +name is useful for regression testing an existing rule. + +The following is an example of `Source` that permits users to upload images +to a bucket bearing their user id and matching the correct metadata: + +_*Example*_ + + // Users are allowed to subscribe and unsubscribe to the blog. + service firebase.storage { + match /users/{userId}/images/{imageName} { + allow write: if userId == request.auth.uid + && (imageName.matches('*.png$') + || imageName.matches('*.jpg$')) + && resource.mimeType.matches('^image/') + } + } +*/ +await gapi.client.projects.test({ name: "name", }); +``` \ No newline at end of file diff --git a/types/gapi.client.firebaserules/tsconfig.json b/types/gapi.client.firebaserules/tsconfig.json new file mode 100644 index 0000000000..fe476614b8 --- /dev/null +++ b/types/gapi.client.firebaserules/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.firebaserules-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.firebaserules/tslint.json b/types/gapi.client.firebaserules/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.firebaserules/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.firestore/gapi.client.firestore-tests.ts b/types/gapi.client.firestore/gapi.client.firestore-tests.ts new file mode 100644 index 0000000000..45c7838019 --- /dev/null +++ b/types/gapi.client.firestore/gapi.client.firestore-tests.ts @@ -0,0 +1,34 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('firestore', 'v1beta1', () => { + /** now we can use gapi.client.firestore */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View and manage your data across Google Cloud Platform services */ + 'https://www.googleapis.com/auth/cloud-platform', + /** View and manage your Google Cloud Datastore data */ + 'https://www.googleapis.com/auth/datastore', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.firestore/index.d.ts b/types/gapi.client.firestore/index.d.ts new file mode 100644 index 0000000000..783434a8c7 --- /dev/null +++ b/types/gapi.client.firestore/index.d.ts @@ -0,0 +1,1579 @@ +// Type definitions for Google Google Cloud Firestore API v1beta1 1.0 +// Project: https://cloud.google.com/firestore +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://firestore.googleapis.com/$discovery/rest?version=v1beta1 + +/// + +declare namespace gapi.client { + /** Load Google Cloud Firestore API v1beta1 */ + function load(name: "firestore", version: "v1beta1"): PromiseLike; + function load(name: "firestore", version: "v1beta1", callback: () => any): void; + + const projects: firestore.ProjectsResource; + + namespace firestore { + interface ArrayValue { + /** Values in the array. */ + values?: Value[]; + } + interface BatchGetDocumentsRequest { + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + */ + documents?: string[]; + /** + * The fields to return. If not set, returns all fields. + * + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + */ + mask?: DocumentMask; + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + */ + newTransaction?: TransactionOptions; + /** + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + */ + readTime?: string; + /** Reads documents in a transaction. */ + transaction?: string; + } + interface BatchGetDocumentsResponse { + /** A document that was requested. */ + found?: Document; + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + missing?: string; + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + */ + readTime?: string; + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * BatchGetDocumentsRequest.new_transaction was set in the request. + */ + transaction?: string; + } + interface BeginTransactionRequest { + /** + * The options for the transaction. + * Defaults to a read-write transaction. + */ + options?: TransactionOptions; + } + interface BeginTransactionResponse { + /** The transaction that was started. */ + transaction?: string; + } + interface CollectionSelector { + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + */ + allDescendants?: boolean; + /** + * The collection ID. + * When set, selects only collections with this ID. + */ + collectionId?: string; + } + interface CommitRequest { + /** + * If non-empty, applies all writes in this transaction, and commits it. + * Otherwise, applies the writes as if they were in their own transaction. + */ + transaction?: string; + /** + * The writes to apply. + * + * Always executed atomically and in order. + */ + writes?: Write[]; + } + interface CommitResponse { + /** The time at which the commit occurred. */ + commitTime?: string; + /** + * The result of applying the writes. + * + * This i-th write result corresponds to the i-th write in the + * request. + */ + writeResults?: WriteResult[]; + } + interface CompositeFilter { + /** + * The list of filters to combine. + * Must contain at least one filter. + */ + filters?: Filter[]; + /** The operator for combining multiple filters. */ + op?: string; + } + interface Cursor { + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + */ + before?: boolean; + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * + * Can contain fewer values than specified in the order by clause. + */ + values?: Value[]; + } + interface Document { + /** + * Output only. The time at which the document was created. + * + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + */ + createTime?: string; + /** + * The document's fields. + * + * The map keys represent field names. + * + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example, + * `foo_bar_17`. + * + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The map + * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by the simple + * or quoted field names of the containing fields, delimited by `.`. For + * example, the structured field + * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be + * represented by the field path `foo.x&y`. + * + * Within a field path, a quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + */ + fields?: Record; + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name?: string; + /** + * Output only. The time at which the document was last changed. + * + * This value is initally set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + */ + updateTime?: string; + } + interface DocumentChange { + /** + * The new state of the Document. + * + * If `mask` is set, contains only fields that were updated or added. + */ + document?: Document; + /** A set of target IDs for targets that no longer match this document. */ + removedTargetIds?: number[]; + /** A set of target IDs of targets that match this document. */ + targetIds?: number[]; + } + interface DocumentDelete { + /** The resource name of the Document that was deleted. */ + document?: string; + /** + * The read timestamp at which the delete was observed. + * + * Greater or equal to the `commit_time` of the delete. + */ + readTime?: string; + /** A set of target IDs for targets that previously matched this entity. */ + removedTargetIds?: number[]; + } + interface DocumentMask { + /** + * The list of field paths in the mask. See Document.fields for a field + * path syntax reference. + */ + fieldPaths?: string[]; + } + interface DocumentRemove { + /** The resource name of the Document that has gone out of view. */ + document?: string; + /** + * The read timestamp at which the remove was observed. + * + * Greater or equal to the `commit_time` of the change/delete/remove. + */ + readTime?: string; + /** A set of target IDs for targets that previously matched this document. */ + removedTargetIds?: number[]; + } + interface DocumentTransform { + /** The name of the document to transform. */ + document?: string; + /** + * The list of transformations to apply to the fields of the document, in + * order. + */ + fieldTransforms?: FieldTransform[]; + } + interface DocumentsTarget { + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + */ + documents?: string[]; + } + interface ExistenceFilter { + /** + * The total count of documents that match target_id. + * + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + */ + count?: number; + /** The target ID to which this filter applies. */ + targetId?: number; + } + interface FieldFilter { + /** The field to filter by. */ + field?: FieldReference; + /** The operator to filter by. */ + op?: string; + /** The value to compare to. */ + value?: Value; + } + interface FieldReference { + fieldPath?: string; + } + interface FieldTransform { + /** + * The path of the field. See Document.fields for the field path syntax + * reference. + */ + fieldPath?: string; + /** Sets the field to the given server value. */ + setToServerValue?: string; + } + interface Filter { + /** A composite filter. */ + compositeFilter?: CompositeFilter; + /** A filter on a document field. */ + fieldFilter?: FieldFilter; + /** A filter that takes exactly one argument. */ + unaryFilter?: UnaryFilter; + } + interface Index { + /** The collection ID to which this index applies. Required. */ + collectionId?: string; + /** The fields to index. */ + fields?: IndexField[]; + /** The resource name of the index. */ + name?: string; + /** + * The state of the index. + * The state is read-only. + * @OutputOnly + */ + state?: string; + } + interface IndexField { + /** + * The path of the field. Must match the field path specification described + * by google.firestore.v1beta1.Document.fields. + * Special field path `__name__` may be used by itself or at the end of a + * path. `__type__` may be used only at the end of path. + */ + fieldPath?: string; + /** The field's mode. */ + mode?: string; + } + interface IndexOperationMetadata { + /** + * True if the [google.longrunning.Operation] was cancelled. If the + * cancellation is in progress, cancelled will be true but + * google.longrunning.Operation.done will be false. + */ + cancelled?: boolean; + /** Progress of the existing operation, measured in number of documents. */ + documentProgress?: Progress; + /** + * The time the operation ended, either successfully or otherwise. Unset if + * the operation is still active. + */ + endTime?: string; + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/indexes/{index_id}` + */ + index?: string; + /** The type of index operation. */ + operationType?: string; + /** The time that work began on the operation. */ + startTime?: string; + } + interface 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; + } + interface ListCollectionIdsResponse { + /** The collection ids. */ + collectionIds?: string[]; + /** A page token that may be used to continue the list. */ + nextPageToken?: string; + } + interface ListDocumentsResponse { + /** The Documents found. */ + documents?: Document[]; + /** The next page token. */ + nextPageToken?: string; + } + interface ListIndexesResponse { + /** The indexes. */ + indexes?: Index[]; + /** The standard List next-page token. */ + nextPageToken?: string; + } + interface ListenRequest { + /** A target to add to this stream. */ + addTarget?: Target; + /** Labels associated with this target change. */ + labels?: Record; + /** The ID of a target to remove from this stream. */ + removeTarget?: number; + } + interface ListenResponse { + /** A Document has changed. */ + documentChange?: DocumentChange; + /** A Document has been deleted. */ + documentDelete?: DocumentDelete; + /** + * A Document has been removed from a target (because it is no longer + * relevant to that target). + */ + documentRemove?: DocumentRemove; + /** + * A filter to apply to the set of documents previously returned for the + * given target. + * + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + */ + filter?: ExistenceFilter; + /** Targets have changed. */ + targetChange?: TargetChange; + } + interface MapValue { + /** + * The map's fields. + * + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + */ + fields?: Record; + } + interface Operation { + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** The error result of the operation in case of failure or cancellation. */ + error?: Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: Record; + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + */ + response?: Record; + } + interface Order { + /** The direction to order by. Defaults to `ASCENDING`. */ + direction?: string; + /** The field to order by. */ + field?: FieldReference; + } + interface Precondition { + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + */ + exists?: boolean; + /** + * When set, the target document must exist and have been last updated at + * that time. + */ + updateTime?: string; + } + interface Progress { + /** + * An estimate of how much work has been completed. Note that this may be + * greater than `work_estimated`. + */ + workCompleted?: string; + /** + * An estimate of how much work needs to be performed. Zero if the + * work estimate is unavailable. May change as work progresses. + */ + workEstimated?: string; + } + interface Projection { + /** + * The fields to return. + * + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + */ + fields?: FieldReference[]; + } + interface QueryTarget { + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent?: string; + /** A structured query. */ + structuredQuery?: StructuredQuery; + } + interface ReadOnly { + /** + * Reads documents at the given time. + * This may not be older than 60 seconds. + */ + readTime?: string; + } + interface ReadWrite { + /** An optional transaction to retry. */ + retryTransaction?: string; + } + interface RollbackRequest { + /** The transaction to roll back. */ + transaction?: string; + } + interface RunQueryRequest { + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + */ + newTransaction?: TransactionOptions; + /** + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + */ + readTime?: string; + /** A structured query. */ + structuredQuery?: StructuredQuery; + /** Reads documents in a transaction. */ + transaction?: string; + } + interface RunQueryResponse { + /** + * A query result. + * Not set when reporting partial progress. + */ + document?: Document; + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + */ + readTime?: string; + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + */ + skippedResults?: number; + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * RunQueryRequest.new_transaction was set in the request. + * If set, no other fields will be set in this response. + */ + transaction?: string; + } + interface Status { + /** The status code, which should be an enum value of google.rpc.Code. */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + details?: Array>; + /** + * 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; + } + interface StructuredQuery { + /** A end point for the query results. */ + endAt?: Cursor; + /** The collections to query. */ + from?: CollectionSelector[]; + /** + * The maximum number of results to return. + * + * Applies after all other constraints. + * Must be >= 0 if specified. + */ + limit?: number; + /** + * The number of results to skip. + * + * Applies before limit, but after all other constraints. Must be >= 0 if + * specified. + */ + offset?: number; + /** + * The order to apply to the query results. + * + * Firestore guarantees a stable ordering through the following rules: + * + * * Any field required to appear in `order_by`, that is not already + * specified in `order_by`, is appended to the order in field name order + * by default. + * * If an order on `__name__` is not specified, it is appended by default. + * + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * + * * `SELECT * FROM Foo ORDER BY A` becomes + * `SELECT * FROM Foo ORDER BY A, __name__` + * * `SELECT * FROM Foo ORDER BY A DESC` becomes + * `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` + * * `SELECT * FROM Foo WHERE A > 1` becomes + * `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__` + */ + orderBy?: Order[]; + /** The projection to return. */ + select?: Projection; + /** A starting point for the query results. */ + startAt?: Cursor; + /** The filter to apply. */ + where?: Filter; + } + interface Target { + /** A target specified by a set of document names. */ + documents?: DocumentsTarget; + /** If the target should be removed once it is current and consistent. */ + once?: boolean; + /** A target specified by a query. */ + query?: QueryTarget; + /** + * Start listening after a specific `read_time`. + * + * The client must know the state of matching documents at this time. + */ + readTime?: string; + /** + * A resume token from a prior TargetChange for an identical target. + * + * Using a resume token with a different target is unsupported and may fail. + */ + resumeToken?: string; + /** + * A client provided target ID. + * + * If not set, the server will assign an ID for the target. + * + * Used for resuming a target without changing IDs. The IDs can either be + * client-assigned or be server-assigned in a previous stream. All targets + * with client provided IDs must be added before adding a target that needs + * a server-assigned id. + */ + targetId?: number; + } + interface TargetChange { + /** The error that resulted in this change, if applicable. */ + cause?: Status; + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + */ + readTime?: string; + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * + * Not set on every target change. + */ + resumeToken?: string; + /** The type of change that occurred. */ + targetChangeType?: string; + /** + * The target IDs of targets that have changed. + * + * If empty, the change applies to all targets. + * + * For `target_change_type=ADD`, the order of the target IDs matches the order + * of the requests to add the targets. This allows clients to unambiguously + * associate server-assigned target IDs with added targets. + * + * For other states, the order of the target IDs is not defined. + */ + targetIds?: number[]; + } + interface TransactionOptions { + /** The transaction can only be used for read operations. */ + readOnly?: ReadOnly; + /** The transaction can be used for both read and write operations. */ + readWrite?: ReadWrite; + } + interface UnaryFilter { + /** The field to which to apply the operator. */ + field?: FieldReference; + /** The unary operator to apply. */ + op?: string; + } + interface Value { + /** + * An array value. + * + * Cannot contain another array value. + */ + arrayValue?: ArrayValue; + /** A boolean value. */ + booleanValue?: boolean; + /** + * A bytes value. + * + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + */ + bytesValue?: string; + /** A double value. */ + doubleValue?: number; + /** A geo point value representing a point on the surface of Earth. */ + geoPointValue?: LatLng; + /** An integer value. */ + integerValue?: string; + /** A map value. */ + mapValue?: MapValue; + /** A null value. */ + nullValue?: string; + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + referenceValue?: string; + /** + * A string value. + * + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + */ + stringValue?: string; + /** + * A timestamp value. + * + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + */ + timestampValue?: string; + } + interface Write { + /** + * An optional precondition on the document. + * + * The write will fail if this is set and not met by the target document. + */ + currentDocument?: Precondition; + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + delete?: string; + /** + * Applies a tranformation to a document. + * At most one `transform` per document is allowed in a given request. + * An `update` cannot follow a `transform` on the same document in a given + * request. + */ + transform?: DocumentTransform; + /** A document to write. */ + update?: Document; + /** + * The fields to update in this write. + * + * This field can be set only when the operation is `update`. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + */ + updateMask?: DocumentMask; + } + interface WriteRequest { + /** Labels associated with this write request. */ + labels?: Record; + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + */ + streamId?: string; + /** + * A stream token that was previously sent by the server. + * + * The client should set this field to the token from the most recent + * WriteResponse it has received. This acknowledges that the client has + * received responses up to this token. After sending this token, earlier + * tokens may not be used anymore. + * + * The server may close the stream if there are too many unacknowledged + * responses. + * + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * + * Leave this field unset when creating a new stream. + */ + streamToken?: string; + /** + * The writes to apply. + * + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + */ + writes?: Write[]; + } + interface WriteResponse { + /** The time at which the commit occurred. */ + commitTime?: string; + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + */ + streamId?: string; + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * + * This field is always set. + */ + streamToken?: string; + /** + * The result of applying the writes. + * + * This i-th write result corresponds to the i-th write in the + * request. + */ + writeResults?: WriteResult[]; + } + interface WriteResult { + /** + * The results of applying each DocumentTransform.FieldTransform, in the + * same order. + */ + transformResults?: Value[]; + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * + * If the write did not actually change the document, this will be the + * previous update_time. + */ + updateTime?: string; + } + interface DocumentsResource { + /** + * Gets multiple documents. + * + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + */ + batchGet(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Starts a new transaction. */ + beginTransaction(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Commits a transaction, while optionally updating documents. */ + commit(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Creates a new document. */ + createDocument(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** The collection ID, relative to `parent`, to list. For example: `chatrooms`. */ + collectionId: string; + /** + * The client-assigned document ID to use for this document. + * + * Optional. If not specified, an ID will be assigned by the service. + */ + documentId?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The list of field paths in the mask. See Document.fields for a field + * path syntax reference. + */ + "mask.fieldPaths"?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes a document. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + */ + "currentDocument.exists"?: boolean; + /** + * When set, the target document must exist and have been last updated at + * that time. + */ + "currentDocument.updateTime"?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets a single document. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The list of field paths in the mask. See Document.fields for a field + * path syntax reference. + */ + "mask.fieldPaths"?: string; + /** + * The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Reads the version of the document at the given time. + * This may not be older than 60 seconds. + */ + readTime?: string; + /** Reads the document in a transaction. */ + transaction?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists documents. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The collection ID, relative to `parent`, to list. For example: `chatrooms` + * or `messages`. + */ + collectionId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The list of field paths in the mask. See Document.fields for a field + * path syntax reference. + */ + "mask.fieldPaths"?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The order to sort results by. For example: `priority desc, name`. */ + orderBy?: string; + /** The maximum number of documents to return. */ + pageSize?: number; + /** The `next_page_token` value returned from a previous List request, if any. */ + pageToken?: string; + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * Reads documents as they were at the given time. + * This may not be older than 60 seconds. + */ + readTime?: string; + /** + * If the list should show missing documents. A missing document is a + * document that does not exist but has sub-documents. These documents will + * be returned with a key but will not have fields, Document.create_time, + * or Document.update_time set. + * + * Requests with `show_missing` may not specify `where` or + * `order_by`. + */ + showMissing?: boolean; + /** Reads documents in a transaction. */ + transaction?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists all the collection IDs underneath a document. */ + listCollectionIds(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The maximum number of results to return. */ + pageSize?: number; + /** + * A page token. Must be a value from + * ListCollectionIdsResponse. + */ + pageToken?: string; + /** + * The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Listens to changes. */ + listen(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Updates or inserts a document. */ + patch(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + */ + "currentDocument.exists"?: boolean; + /** + * When set, the target document must exist and have been last updated at + * that time. + */ + "currentDocument.updateTime"?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The list of field paths in the mask. See Document.fields for a field + * path syntax reference. + */ + "mask.fieldPaths"?: string; + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** + * The list of field paths in the mask. See Document.fields for a field + * path syntax reference. + */ + "updateMask.fieldPaths"?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Rolls back a transaction. */ + rollback(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + */ + database: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Runs a query. */ + runQuery(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Streams batches of document updates and deletes, in order. */ + write(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** + * The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + */ + database: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface IndexesResource { + /** + * Creates the specified index. + * A newly created index's initial state is `CREATING`. On completion of the + * returned google.longrunning.Operation, the state will be `READY`. + * If the index already exists, the call will return an `ALREADY_EXISTS` + * status. + * + * During creation, the process could result in an error, in which case the + * index will move to the `ERROR` state. The process can be recovered by + * fixing the data that caused the error, removing the index with + * delete, then re-creating the index with + * create. + * + * Indexes with a single field cannot be created. + */ + create(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The name of the database this index will apply to. For example: + * `projects/{project_id}/databases/{database_id}` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Deletes an index. */ + delete(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The index name. For example: + * `projects/{project_id}/databases/{database_id}/indexes/{index_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request<{}>; + /** Gets an index. */ + get(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * The name of the index. For example: + * `projects/{project_id}/databases/{database_id}/indexes/{index_id}` + */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + /** Lists the indexes that match the specified filters. */ + list(request: { + /** V1 error format. */ + "$.xgafv"?: string; + /** OAuth access token. */ + access_token?: string; + /** Data format for response. */ + alt?: string; + /** OAuth bearer token. */ + bearer_token?: string; + /** JSONP */ + callback?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + filter?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** The standard List page size. */ + pageSize?: number; + /** The standard List page token. */ + pageToken?: string; + /** + * The database name. For example: + * `projects/{project_id}/databases/{database_id}` + */ + parent: string; + /** Pretty-print response. */ + pp?: boolean; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ + quotaUser?: string; + /** Legacy upload protocol for media (e.g. "media", "multipart"). */ + uploadType?: string; + /** Upload protocol for media (e.g. "raw", "multipart"). */ + upload_protocol?: string; + }): Request; + } + interface DatabasesResource { + documents: DocumentsResource; + indexes: IndexesResource; + } + interface ProjectsResource { + databases: DatabasesResource; + } + } +} diff --git a/types/gapi.client.firestore/readme.md b/types/gapi.client.firestore/readme.md new file mode 100644 index 0000000000..8609bf31fb --- /dev/null +++ b/types/gapi.client.firestore/readme.md @@ -0,0 +1,57 @@ +# TypeScript typings for Google Cloud Firestore API v1beta1 + +For detailed description please check [documentation](https://cloud.google.com/firestore). + +## Installing + +Install typings for Google Cloud Firestore API: +``` +npm install @types/gapi.client.firestore@v1beta1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('firestore', 'v1beta1', () => { + // now we can use gapi.client.firestore + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View and manage your Google Cloud Datastore data + 'https://www.googleapis.com/auth/datastore', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Google Cloud Firestore API resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.firestore/tsconfig.json b/types/gapi.client.firestore/tsconfig.json new file mode 100644 index 0000000000..c15195612c --- /dev/null +++ b/types/gapi.client.firestore/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.firestore-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.firestore/tslint.json b/types/gapi.client.firestore/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.firestore/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.fitness/gapi.client.fitness-tests.ts b/types/gapi.client.fitness/gapi.client.fitness-tests.ts new file mode 100644 index 0000000000..81bcf6a5bf --- /dev/null +++ b/types/gapi.client.fitness/gapi.client.fitness-tests.ts @@ -0,0 +1,66 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('fitness', 'v1', () => { + /** now we can use gapi.client.fitness */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** View your activity information in Google Fit */ + 'https://www.googleapis.com/auth/fitness.activity.read', + /** View and store your activity information in Google Fit */ + 'https://www.googleapis.com/auth/fitness.activity.write', + /** View blood glucose data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.blood_glucose.read', + /** View and store blood glucose data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.blood_glucose.write', + /** View blood pressure data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.blood_pressure.read', + /** View and store blood pressure data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.blood_pressure.write', + /** View body sensor information in Google Fit */ + 'https://www.googleapis.com/auth/fitness.body.read', + /** View and store body sensor data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.body.write', + /** View body temperature data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.body_temperature.read', + /** View and store body temperature data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.body_temperature.write', + /** View your stored location data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.location.read', + /** View and store your location data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.location.write', + /** View nutrition information in Google Fit */ + 'https://www.googleapis.com/auth/fitness.nutrition.read', + /** View and store nutrition information in Google Fit */ + 'https://www.googleapis.com/auth/fitness.nutrition.write', + /** View oxygen saturation data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.oxygen_saturation.read', + /** View and store oxygen saturation data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.oxygen_saturation.write', + /** View reproductive health data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.reproductive_health.read', + /** View and store reproductive health data in Google Fit */ + 'https://www.googleapis.com/auth/fitness.reproductive_health.write', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + } +}); diff --git a/types/gapi.client.fitness/index.d.ts b/types/gapi.client.fitness/index.d.ts new file mode 100644 index 0000000000..a5b2f034d5 --- /dev/null +++ b/types/gapi.client.fitness/index.d.ts @@ -0,0 +1,767 @@ +// Type definitions for Google Fitness v1 1.0 +// Project: https://developers.google.com/fit/rest/ +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/fitness/v1/rest + +/// + +declare namespace gapi.client { + /** Load Fitness v1 */ + function load(name: "fitness", version: "v1"): PromiseLike; + function load(name: "fitness", version: "v1", callback: () => any): void; + + const users: fitness.UsersResource; + + namespace fitness { + interface AggregateBucket { + /** Available for Bucket.Type.ACTIVITY_TYPE, Bucket.Type.ACTIVITY_SEGMENT */ + activity?: number; + /** There will be one dataset per AggregateBy in the request. */ + dataset?: Dataset[]; + /** The end time for the aggregated data, in milliseconds since epoch, inclusive. */ + endTimeMillis?: string; + /** Available for Bucket.Type.SESSION */ + session?: Session; + /** The start time for the aggregated data, in milliseconds since epoch, inclusive. */ + startTimeMillis?: string; + /** The type of a bucket signifies how the data aggregation is performed in the bucket. */ + type?: string; + } + interface AggregateBy { + /** + * A data source ID to aggregate. Mutually exclusive of dataTypeName. Only data from the specified data source ID will be included in the aggregation. The + * dataset in the response will have the same data source ID. + */ + dataSourceId?: string; + /** + * The data type to aggregate. All data sources providing this data type will contribute data to the aggregation. The response will contain a single + * dataset for this data type name. The dataset will have a data source ID of derived:com.google.:com.google.android.gms:aggregated + */ + dataTypeName?: string; + } + interface AggregateRequest { + /** + * The specification of data to be aggregated. At least one aggregateBy spec must be provided. All data that is specified will be aggregated using the + * same bucketing criteria. There will be one dataset in the response for every aggregateBy spec. + */ + aggregateBy?: AggregateBy[]; + /** + * Specifies that data be aggregated each activity segment recored for a user. Similar to bucketByActivitySegment, but bucketing is done for each activity + * segment rather than all segments of the same type. Mutually exclusive of other bucketing specifications. + */ + bucketByActivitySegment?: BucketByActivity; + /** + * Specifies that data be aggregated by the type of activity being performed when the data was recorded. All data that was recorded during a certain + * activity type (for the given time range) will be aggregated into the same bucket. Data that was recorded while the user was not active will not be + * included in the response. Mutually exclusive of other bucketing specifications. + */ + bucketByActivityType?: BucketByActivity; + /** + * Specifies that data be aggregated by user sessions. Data that does not fall within the time range of a session will not be included in the response. + * Mutually exclusive of other bucketing specifications. + */ + bucketBySession?: BucketBySession; + /** Specifies that data be aggregated by a single time interval. Mutually exclusive of other bucketing specifications. */ + bucketByTime?: BucketByTime; + /** The end of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive. */ + endTimeMillis?: string; + /** + * A list of acceptable data quality standards. Only data points which conform to at least one of the specified data quality standards will be returned. + * If the list is empty, all data points are returned. + */ + filteredDataQualityStandard?: string[]; + /** The start of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive. */ + startTimeMillis?: string; + } + interface AggregateResponse { + /** A list of buckets containing the aggregated data. */ + bucket?: AggregateBucket[]; + } + interface Application { + /** An optional URI that can be used to link back to the application. */ + detailsUrl?: string; + /** + * The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of + * convenience for other developers who would like to identify which REST created an Application or Data Source. + */ + name?: string; + /** + * Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. + * REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName. + */ + packageName?: string; + /** Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data. */ + version?: string; + } + interface BucketByActivity { + /** The default activity stream will be used if a specific activityDataSourceId is not specified. */ + activityDataSourceId?: string; + /** Specifies that only activity segments of duration longer than minDurationMillis are considered and used as a container for aggregated data. */ + minDurationMillis?: string; + } + interface BucketBySession { + /** Specifies that only sessions of duration longer than minDurationMillis are considered and used as a container for aggregated data. */ + minDurationMillis?: string; + } + interface BucketByTime { + /** + * Specifies that result buckets aggregate data by exactly durationMillis time frames. Time frames that contain no data will be included in the response + * with an empty dataset. + */ + durationMillis?: string; + period?: BucketByTimePeriod; + } + interface BucketByTimePeriod { + /** org.joda.timezone.DateTimeZone */ + timeZoneId?: string; + type?: string; + value?: number; + } + interface DataPoint { + /** Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp. */ + computationTimeMillis?: string; + /** The data type defining the format of the values in this data point. */ + dataTypeName?: string; + /** The end time of the interval represented by this data point, in nanoseconds since epoch. */ + endTimeNanos?: string; + /** + * Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the + * current state of the data. + */ + modifiedTimeMillis?: string; + /** + * If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the + * data point originally. + */ + originDataSourceId?: string; + /** The raw timestamp from the original SensorEvent. */ + rawTimestampNanos?: string; + /** The start time of the interval represented by this data point, in nanoseconds since epoch. */ + startTimeNanos?: string; + /** + * Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that + * the field is listed with in the data type specified in a data source. + * + * Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field. + */ + value?: Value[]; + } + interface DataSource { + /** Information about an application which feeds sensor data into the platform. */ + application?: Application; + dataQualityStandard?: string[]; + /** + * A unique identifier for the data stream produced by this data source. The identifier includes: + * + * + * - The physical device's manufacturer, model, and serial number (UID). + * - The application's package name or name. Package name is used when the data source was created by an Android application. The developer project number + * is used when the data source was created by a REST client. + * - The data source's type. + * - The data source's stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version + * of the hardware/the application isn't used. This allows us to preserve the same stream through version updates. This also means that two DataSource + * objects may represent the same data stream even if they're not equal. + * + * The exact format of the data stream ID created by an Android application is: + * type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName + * + * The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project + * number:device.manufacturer:device.model:device.uid:dataStreamName + * + * When any of the optional fields that comprise of the data stream ID are blank, they will be omitted from the data stream ID. The minimum viable data + * stream ID would be: type:dataType.name:developer project number + * + * Finally, the developer project number is obfuscated when read by any REST or Android client that did not create the data source. Only the data source + * creator will see the developer project number in clear and normal form. + */ + dataStreamId?: string; + /** + * The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting + * the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent + * sensors. + */ + dataStreamName?: string; + /** The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API. */ + dataType?: DataType; + /** Representation of an integrated device (such as a phone or a wearable) that can hold sensors. */ + device?: Device; + /** An end-user visible name for this data source. */ + name?: string; + /** A constant describing the type of this data source. Indicates whether this data source produces raw or derived data. */ + type?: string; + } + interface DataType { + /** A field represents one dimension of a data type. */ + field?: DataTypeField[]; + /** Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform. */ + name?: string; + } + interface DataTypeField { + /** The different supported formats for each field in a data type. */ + format?: string; + /** Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type. */ + name?: string; + optional?: boolean; + } + interface Dataset { + /** The data stream ID of the data source that created the points in this dataset. */ + dataSourceId?: string; + /** + * The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also + * match the first part of the dataset identifier. + */ + maxEndTimeNs?: string; + /** + * The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also + * match the first part of the dataset identifier. + */ + minStartTimeNs?: string; + /** + * This token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. + * Provide this value in a subsequent GET request to return the next page of data points within this dataset. + */ + nextPageToken?: string; + /** + * A partial list of data points contained in the dataset, ordered by largest endTimeNanos first. This list is considered complete when retrieving a small + * dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response. + */ + point?: DataPoint[]; + } + interface Device { + /** Manufacturer of the product/hardware. */ + manufacturer?: string; + /** End-user visible model name for the device. */ + model?: string; + /** A constant representing the type of the device. */ + type?: string; + /** + * The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data + * source. Only the data source creator will see the uid field in clear and normal form. + */ + uid?: string; + /** Version string for the device hardware/software. */ + version?: string; + } + interface ListDataPointChangesResponse { + /** The data stream ID of the data source with data point changes. */ + dataSourceId?: string; + /** Deleted data points for the user. Note, for modifications this should be parsed before handling insertions. */ + deletedDataPoint?: DataPoint[]; + /** Inserted data points for the user. */ + insertedDataPoint?: DataPoint[]; + /** The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. */ + nextPageToken?: string; + } + interface ListDataSourcesResponse { + /** A previously created data source. */ + dataSource?: DataSource[]; + } + interface ListSessionsResponse { + /** + * If includeDeleted is set to true in the request, this list will contain sessions deleted with original end times that are within the startTime and + * endTime frame. + */ + deletedSession?: Session[]; + /** Flag to indicate server has more data to transfer */ + hasMoreData?: boolean; + /** The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. */ + nextPageToken?: string; + /** Sessions with an end time that is between startTime and endTime of the request. */ + session?: Session[]; + } + interface MapValue { + /** Floating point value. */ + fpVal?: number; + } + interface Session { + /** + * Session active time. While start_time_millis and end_time_millis define the full session time, the active time can be shorter and specified by + * active_time_millis. If the inactive time during the session is known, it should also be inserted via a com.google.activity.segment data point with a + * STILL activity value + */ + activeTimeMillis?: string; + /** The type of activity this session represents. */ + activityType?: number; + /** The application that created the session. */ + application?: Application; + /** A description for this session. */ + description?: string; + /** An end time, in milliseconds since epoch, inclusive. */ + endTimeMillis?: string; + /** A client-generated identifier that is unique across all sessions owned by this particular user. */ + id?: string; + /** A timestamp that indicates when the session was last modified. */ + modifiedTimeMillis?: string; + /** A human readable name of the session. */ + name?: string; + /** A start time, in milliseconds since epoch, inclusive. */ + startTimeMillis?: string; + } + interface Value { + /** Floating point value. When this is set, other values must not be set. */ + fpVal?: number; + /** Integer value. When this is set, other values must not be set. */ + intVal?: number; + /** + * Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys + * should be kept small whenever possible. Data streams with large keys and high data frequency may be down sampled. + */ + mapVal?: ValueMapValEntry[]; + /** + * String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and + * high data frequency may be down sampled. + */ + stringVal?: string; + } + interface ValueMapValEntry { + key?: string; + value?: MapValue; + } + interface DataPointChangesResource { + /** Queries for user's data point changes for a particular data source. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The data stream ID of the data source that created the dataset. */ + dataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** If specified, no more than this many data point changes will be included in the response. */ + limit?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of + * nextPageToken from the previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** List data points for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DatasetsResource { + /** + * Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most + * data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as + * com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be + * deleted. + */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The client's current time in milliseconds since epoch. */ + currentTimeMillis?: string; + /** The data stream ID of the data source that created the dataset. */ + dataSourceId: string; + /** + * Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. + * The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** When the operation was performed on the client. */ + modifiedTimeMillis?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum + * end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to + * the dataset start time. + */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The data stream ID of the data source that created the dataset. */ + dataSourceId: string; + /** + * Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. + * The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** + * If specified, no more than this many data points will be included in the dataset. If there are more data points in the dataset, nextPageToken will be + * set in the dataset response. + */ + limit?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The continuation token, which is used to page through large datasets. To get the next page of a dataset, set this parameter to the value of + * nextPageToken from the previous response. Each subsequent call will yield a partial dataset with data point end timestamps that are strictly smaller + * than those in the previous partial response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to + * retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** + * The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds + * instead of milliseconds. + */ + currentTimeMillis?: string; + /** The data stream ID of the data source that created the dataset. */ + dataSourceId: string; + /** + * Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. + * The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + */ + datasetId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface DataSourcesResource { + /** + * Creates a new data source that is unique across all data sources belonging to this user. The data stream ID field can be omitted and will be generated + * by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source + * fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer + * project number is obfuscated when read by any other developer reading public data types. + */ + create(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes the specified data source. The request will fail if the data source contains any data points. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The data stream ID of the data source to delete. */ + dataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Returns the specified data source. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** The data stream ID of the data source to retrieve. */ + dataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive; the user may have private data + * sources that are only visible to other developers, or calls using other scopes. + */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** The names of data types to include in the list. If not specified, all data sources will be returned. */ + dataTypeName?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be + * modified. + * + * Data sources are identified by their dataStreamId. This method supports patch semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** The data stream ID of the data source to update. */ + dataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be + * modified. + * + * Data sources are identified by their dataStreamId. + */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The data stream ID of the data source to update. */ + dataSourceId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + dataPointChanges: DataPointChangesResource; + datasets: DatasetsResource; + } + interface DatasetResource { + /** + * Aggregates data of a certain type or stream into buckets divided by a given type of boundary. Multiple data sets of multiple types and from multiple + * sources can be aggreated into exactly one bucket type per request. + */ + aggregate(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Aggregate data for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface SessionsResource { + /** Deletes a session specified by the given session ID. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** The client's current time in milliseconds since epoch. */ + currentTimeMillis?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the session to be deleted. */ + sessionId: string; + /** Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Lists sessions previously created. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. */ + endTime?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * If true, deleted sessions will be returned. When set to true, sessions returned in this response will only have an ID and will not have any other + * fields. + */ + includeDeleted?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** + * The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of + * nextPageToken from the previous response. + */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. */ + startTime?: string; + /** List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates or insert a given session. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** The client's current time in milliseconds since epoch. */ + currentTimeMillis?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The ID of the session to be created. */ + sessionId: string; + /** Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ + userId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface UsersResource { + dataSources: DataSourcesResource; + dataset: DatasetResource; + sessions: SessionsResource; + } + } +} diff --git a/types/gapi.client.fitness/readme.md b/types/gapi.client.fitness/readme.md new file mode 100644 index 0000000000..e8dee74aba --- /dev/null +++ b/types/gapi.client.fitness/readme.md @@ -0,0 +1,105 @@ +# TypeScript typings for Fitness v1 +Stores and accesses user data in the fitness store from apps on any platform. +For detailed description please check [documentation](https://developers.google.com/fit/rest/). + +## Installing + +Install typings for Fitness: +``` +npm install @types/gapi.client.fitness@v1 --save-dev +``` + +## Usage + +You need to initialize Google API client in your code: +```typescript +gapi.load("client", () => { + // now we can use gapi.client + // ... +}); +``` + +Then load api client wrapper: +```typescript +gapi.client.load('fitness', 'v1', () => { + // now we can use gapi.client.fitness + // ... +}); +``` + +Don't forget to authenticate your client before sending any request to resources: +```typescript + +// declare client_id registered in Google Developers Console +var client_id = '', + scope = [ + // View your activity information in Google Fit + 'https://www.googleapis.com/auth/fitness.activity.read', + + // View and store your activity information in Google Fit + 'https://www.googleapis.com/auth/fitness.activity.write', + + // View blood glucose data in Google Fit + 'https://www.googleapis.com/auth/fitness.blood_glucose.read', + + // View and store blood glucose data in Google Fit + 'https://www.googleapis.com/auth/fitness.blood_glucose.write', + + // View blood pressure data in Google Fit + 'https://www.googleapis.com/auth/fitness.blood_pressure.read', + + // View and store blood pressure data in Google Fit + 'https://www.googleapis.com/auth/fitness.blood_pressure.write', + + // View body sensor information in Google Fit + 'https://www.googleapis.com/auth/fitness.body.read', + + // View and store body sensor data in Google Fit + 'https://www.googleapis.com/auth/fitness.body.write', + + // View body temperature data in Google Fit + 'https://www.googleapis.com/auth/fitness.body_temperature.read', + + // View and store body temperature data in Google Fit + 'https://www.googleapis.com/auth/fitness.body_temperature.write', + + // View your stored location data in Google Fit + 'https://www.googleapis.com/auth/fitness.location.read', + + // View and store your location data in Google Fit + 'https://www.googleapis.com/auth/fitness.location.write', + + // View nutrition information in Google Fit + 'https://www.googleapis.com/auth/fitness.nutrition.read', + + // View and store nutrition information in Google Fit + 'https://www.googleapis.com/auth/fitness.nutrition.write', + + // View oxygen saturation data in Google Fit + 'https://www.googleapis.com/auth/fitness.oxygen_saturation.read', + + // View and store oxygen saturation data in Google Fit + 'https://www.googleapis.com/auth/fitness.oxygen_saturation.write', + + // View reproductive health data in Google Fit + 'https://www.googleapis.com/auth/fitness.reproductive_health.read', + + // View and store reproductive health data in Google Fit + 'https://www.googleapis.com/auth/fitness.reproductive_health.write', + ], + immediate = true; +// ... + +gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { + if (authResult && !authResult.error) { + /* handle succesfull authorization */ + } else { + /* handle authorization error */ + } +}); +``` + +After that you can use Fitness resources: + +```typescript +``` \ No newline at end of file diff --git a/types/gapi.client.fitness/tsconfig.json b/types/gapi.client.fitness/tsconfig.json new file mode 100644 index 0000000000..d165e53085 --- /dev/null +++ b/types/gapi.client.fitness/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "gapi.client.fitness-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gapi.client.fitness/tslint.json b/types/gapi.client.fitness/tslint.json new file mode 100644 index 0000000000..1c5c1ce060 --- /dev/null +++ b/types/gapi.client.fitness/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [false], + "ban-types": [false], + "await-promise": [true, "Request"] + } +} diff --git a/types/gapi.client.fusiontables/gapi.client.fusiontables-tests.ts b/types/gapi.client.fusiontables/gapi.client.fusiontables-tests.ts new file mode 100644 index 0000000000..3ce93fc7f1 --- /dev/null +++ b/types/gapi.client.fusiontables/gapi.client.fusiontables-tests.ts @@ -0,0 +1,225 @@ +/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* IMPORTANT. +* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +**/ +gapi.load('client', () => { + /** now we can use gapi.client */ + gapi.client.load('fusiontables', 'v2', () => { + /** now we can use gapi.client.fusiontables */ + + /** don't forget to authenticate your client before sending any request to resources: */ + /** declare client_id registered in Google Developers Console */ + const client_id = '<>'; + const scope = [ + /** Manage your Fusion Tables */ + 'https://www.googleapis.com/auth/fusiontables', + /** View your Fusion Tables */ + 'https://www.googleapis.com/auth/fusiontables.readonly', + ]; + const immediate = true; + gapi.auth.authorize({ client_id, scope, immediate }, authResult => { + if (authResult && !authResult.error) { + /** handle succesfull authorization */ + run(); + } else { + /** handle authorization error */ + } + }); + run(); + }); + + async function run() { + /** Deletes the specified column. */ + await gapi.client.column.delete({ + columnId: "columnId", + tableId: "tableId", + }); + /** Retrieves a specific column by its ID. */ + await gapi.client.column.get({ + columnId: "columnId", + tableId: "tableId", + }); + /** Adds a new column to the table. */ + await gapi.client.column.insert({ + tableId: "tableId", + }); + /** Retrieves a list of columns. */ + await gapi.client.column.list({ + maxResults: 1, + pageToken: "pageToken", + tableId: "tableId", + }); + /** Updates the name or type of an existing column. This method supports patch semantics. */ + await gapi.client.column.patch({ + columnId: "columnId", + tableId: "tableId", + }); + /** Updates the name or type of an existing column. */ + await gapi.client.column.update({ + columnId: "columnId", + tableId: "tableId", + }); + /** + * Executes a Fusion Tables SQL statement, which can be any of + * - SELECT + * - INSERT + * - UPDATE + * - DELETE + * - SHOW + * - DESCRIBE + * - CREATE statement. + */ + await gapi.client.query.sql({ + hdrs: true, + sql: "sql", + typed: true, + }); + /** + * Executes a SQL statement which can be any of + * - SELECT + * - SHOW + * - DESCRIBE + */ + await gapi.client.query.sqlGet({ + hdrs: true, + sql: "sql", + typed: true, + }); + /** Deletes a style. */ + await gapi.client.style.delete({ + styleId: 1, + tableId: "tableId", + }); + /** Gets a specific style. */ + await gapi.client.style.get({ + styleId: 1, + tableId: "tableId", + }); + /** Adds a new style for the table. */ + await gapi.client.style.insert({ + tableId: "tableId", + }); + /** Retrieves a list of styles. */ + await gapi.client.style.list({ + maxResults: 1, + pageToken: "pageToken", + tableId: "tableId", + }); + /** Updates an existing style. This method supports patch semantics. */ + await gapi.client.style.patch({ + styleId: 1, + tableId: "tableId", + }); + /** Updates an existing style. */ + await gapi.client.style.update({ + styleId: 1, + tableId: "tableId", + }); + /** Copies a table. */ + await gapi.client.table.copy({ + copyPresentation: true, + tableId: "tableId", + }); + /** Deletes a table. */ + await gapi.client.table.delete({ + tableId: "tableId", + }); + /** Retrieves a specific table by its ID. */ + await gapi.client.table.get({ + tableId: "tableId", + }); + /** Imports more rows into a table. */ + await gapi.client.table.importRows({ + delimiter: "delimiter", + encoding: "encoding", + endLine: 3, + isStrict: true, + startLine: 5, + tableId: "tableId", + }); + /** Imports a new table. */ + await gapi.client.table.importTable({ + delimiter: "delimiter", + encoding: "encoding", + name: "name", + }); + /** Creates a new table. */ + await gapi.client.table.insert({ + }); + /** Retrieves a list of tables a user owns. */ + await gapi.client.table.list({ + maxResults: 1, + pageToken: "pageToken", + }); + /** + * Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch + * semantics. + */ + await gapi.client.table.patch({ + replaceViewDefinition: true, + tableId: "tableId", + }); + /** Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. */ + await gapi.client.table.replaceRows({ + delimiter: "delimiter", + encoding: "encoding", + endLine: 3, + isStrict: true, + startLine: 5, + tableId: "tableId", + }); + /** Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. */ + await gapi.client.table.update({ + replaceViewDefinition: true, + tableId: "tableId", + }); + /** Deletes a specific task by its ID, unless that task has already started running. */ + await gapi.client.task.delete({ + tableId: "tableId", + taskId: "taskId", + }); + /** Retrieves a specific task by its ID. */ + await gapi.client.task.get({ + tableId: "tableId", + taskId: "taskId", + }); + /** Retrieves a list of tasks. */ + await gapi.client.task.list({ + maxResults: 1, + pageToken: "pageToken", + startIndex: 3, + tableId: "tableId", + }); + /** Deletes a template */ + await gapi.client.template.delete({ + tableId: "tableId", + templateId: 2, + }); + /** Retrieves a specific template by its id */ + await gapi.client.template.get({ + tableId: "tableId", + templateId: 2, + }); + /** Creates a new template for the table. */ + await gapi.client.template.insert({ + tableId: "tableId", + }); + /** Retrieves a list of templates. */ + await gapi.client.template.list({ + maxResults: 1, + pageToken: "pageToken", + tableId: "tableId", + }); + /** Updates an existing template. This method supports patch semantics. */ + await gapi.client.template.patch({ + tableId: "tableId", + templateId: 2, + }); + /** Updates an existing template */ + await gapi.client.template.update({ + tableId: "tableId", + templateId: 2, + }); + } +}); diff --git a/types/gapi.client.fusiontables/index.d.ts b/types/gapi.client.fusiontables/index.d.ts new file mode 100644 index 0000000000..95750c8f38 --- /dev/null +++ b/types/gapi.client.fusiontables/index.d.ts @@ -0,0 +1,1188 @@ +// Type definitions for Google Fusion Tables API v2 2.0 +// Project: https://developers.google.com/fusiontables +// Definitions by: Bolisov Alexey +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// IMPORTANT +// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// Generated from: https://www.googleapis.com/discovery/v1/apis/fusiontables/v2/rest + +/// + +declare namespace gapi.client { + /** Load Fusion Tables API v2 */ + function load(name: "fusiontables", version: "v2"): PromiseLike; + function load(name: "fusiontables", version: "v2", callback: () => any): void; + + const column: fusiontables.ColumnResource; + + const query: fusiontables.QueryResource; + + const style: fusiontables.StyleResource; + + const table: fusiontables.TableResource; + + const task: fusiontables.TaskResource; + + const template: fusiontables.TemplateResource; + + namespace fusiontables { + interface Bucket { + /** Color of line or the interior of a polygon in #RRGGBB format. */ + color?: string; + /** Icon name used for a point. */ + icon?: string; + /** Maximum value in the selected column for a row to be styled according to the bucket color, opacity, icon, or weight. */ + max?: number; + /** Minimum value in the selected column for a row to be styled according to the bucket color, opacity, icon, or weight. */ + min?: number; + /** Opacity of the color: 0.0 (transparent) to 1.0 (opaque). */ + opacity?: number; + /** Width of a line (in pixels). */ + weight?: number; + } + interface Column { + /** Identifier of the base column. If present, this column is derived from the specified base column. */ + baseColumn?: { + /** The id of the column in the base table from which this column is derived. */ + columnId?: number; + /** Offset to the entry in the list of base tables in the table definition. */ + tableIndex?: number; + }; + /** Identifier for the column. */ + columnId?: number; + /** JSON schema for interpreting JSON in this column. */ + columnJsonSchema?: string; + /** JSON object containing custom column properties. */ + columnPropertiesJson?: string; + /** Column description. */ + description?: string; + /** + * Format pattern. + * Acceptable values are DT_DATE_MEDIUMe.g Dec 24, 2008 DT_DATE_SHORTfor example 12/24/08 DT_DATE_TIME_MEDIUMfor example Dec 24, 2008 8:30:45 PM + * DT_DATE_TIME_SHORTfor example 12/24/08 8:30 PM DT_DAY_MONTH_2_DIGIT_YEARfor example 24/12/08 DT_DAY_MONTH_2_DIGIT_YEAR_TIMEfor example 24/12/08 20:30 + * DT_DAY_MONTH_2_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/08 8:30 PM DT_DAY_MONTH_4_DIGIT_YEARfor example 24/12/2008 DT_DAY_MONTH_4_DIGIT_YEAR_TIMEfor + * example 24/12/2008 20:30 DT_DAY_MONTH_4_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/2008 8:30 PM DT_ISO_YEAR_MONTH_DAYfor example 2008-12-24 + * DT_ISO_YEAR_MONTH_DAY_TIMEfor example 2008-12-24 20:30:45 DT_MONTH_DAY_4_DIGIT_YEARfor example 12/24/2008 DT_TIME_LONGfor example 8:30:45 PM UTC-6 + * DT_TIME_MEDIUMfor example 8:30:45 PM DT_TIME_SHORTfor example 8:30 PM DT_YEAR_ONLYfor example 2008 HIGHLIGHT_UNTYPED_CELLSHighlight cell data that does + * not match the data type NONENo formatting (default) NUMBER_CURRENCYfor example $1234.56 NUMBER_DEFAULTfor example 1,234.56 NUMBER_INTEGERfor example + * 1235 NUMBER_NO_SEPARATORfor example 1234.56 NUMBER_PERCENTfor example 123,456% NUMBER_SCIENTIFICfor example 1E3 STRING_EIGHT_LINE_IMAGEDisplays + * thumbnail images as tall as eight lines of text STRING_FOUR_LINE_IMAGEDisplays thumbnail images as tall as four lines of text STRING_JSON_TEXTAllows + * editing of text as JSON in UI STRING_JSON_LISTAllows editing of text as a JSON list in UI STRING_LINKTreats cell as a link (must start with http:// or + * https://) STRING_ONE_LINE_IMAGEDisplays thumbnail images as tall as one line of text STRING_VIDEO_OR_MAPDisplay a video or map thumbnail + */ + formatPattern?: string; + /** + * Column graph predicate. + * Used to map table to graph data model (subject,predicate,object) + * See W3C Graph-based Data Model. + */ + graphPredicate?: string; + /** The kind of item this is. For a column, this is always fusiontables#column. */ + kind?: string; + /** Name of the column. */ + name?: string; + /** Type of the column. */ + type?: string; + /** List of valid values used to validate data and supply a drop-down list of values in the web application. */ + validValues?: string[]; + /** If true, data entered via the web application is validated. */ + validateData?: boolean; + } + interface ColumnList { + /** List of all requested columns. */ + items?: Column[]; + /** The kind of item this is. For a column list, this is always fusiontables#columnList. */ + kind?: string; + /** Token used to access the next page of this result. No token is displayed if there are no more pages left. */ + nextPageToken?: string; + /** Total number of columns for the table. */ + totalItems?: number; + } + interface Geometry { + /** The list of geometries in this geometry collection. */ + geometries?: any[]; + geometry?: any; + /** Type: A collection of geometries. */ + type?: string; + } + interface Import { + /** The kind of item this is. For an import, this is always fusiontables#import. */ + kind?: string; + /** The number of rows received from the import request. */ + numRowsReceived?: string; + } + interface Line { + /** The coordinates that define the line. */ + coordinates?: number[][]; + /** Type: A line geometry. */ + type?: string; + } + interface LineStyle { + /** Color of the line in #RRGGBB format. */ + strokeColor?: string; + /** Column-value, gradient or buckets styler that is used to determine the line color and opacity. */ + strokeColorStyler?: StyleFunction; + /** Opacity of the line : 0.0 (transparent) to 1.0 (opaque). */ + strokeOpacity?: number; + /** Width of the line in pixels. */ + strokeWeight?: number; + /** Column-value or bucket styler that is used to determine the width of the line. */ + strokeWeightStyler?: StyleFunction; + } + interface Point { + /** The coordinates that define the point. */ + coordinates?: number[]; + /** Point: A point geometry. */ + type?: string; + } + interface PointStyle { + /** Name of the icon. Use values defined in http://www.google.com/fusiontables/DataSource?dsrcid=308519 */ + iconName?: string; + /** Column or a bucket value from which the icon name is to be determined. */ + iconStyler?: StyleFunction; + } + interface Polygon { + /** The coordinates that define the polygon. */ + coordinates?: number[][][]; + /** Type: A polygon geometry. */ + type?: string; + } + interface PolygonStyle { + /** Color of the interior of the polygon in #RRGGBB format. */ + fillColor?: string; + /** Column-value, gradient, or bucket styler that is used to determine the interior color and opacity of the polygon. */ + fillColorStyler?: StyleFunction; + /** Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 (opaque). */ + fillOpacity?: number; + /** Color of the polygon border in #RRGGBB format. */ + strokeColor?: string; + /** Column-value, gradient or buckets styler that is used to determine the border color and opacity. */ + strokeColorStyler?: StyleFunction; + /** Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque). */ + strokeOpacity?: number; + /** Width of the polyon border in pixels. */ + strokeWeight?: number; + /** Column-value or bucket styler that is used to determine the width of the polygon border. */ + strokeWeightStyler?: StyleFunction; + } + interface Sqlresponse { + /** Columns in the table. */ + columns?: string[]; + /** The kind of item this is. For responses to SQL queries, this is always fusiontables#sqlresponse. */ + kind?: string; + /** + * The rows in the table. For each cell we print out whatever cell value (e.g., numeric, string) exists. Thus it is important that each cell contains only + * one value. + */ + rows?: any[][]; + } + interface StyleFunction { + /** Bucket function that assigns a style based on the range a column value falls into. */ + buckets?: Bucket[]; + /** Name of the column whose value is used in the style. */ + columnName?: string; + /** Gradient function that interpolates a range of colors based on column value. */ + gradient?: { + /** Array with two or more colors. */ + colors?: Array<{ + /** Color in #RRGGBB format. */ + color?: string; + /** Opacity of the color: 0.0 (transparent) to 1.0 (opaque). */ + opacity?: number; + }>; + /** Higher-end of the interpolation range: rows with this value will be assigned to colors[n-1]. */ + max?: number; + /** Lower-end of the interpolation range: rows with this value will be assigned to colors[0]. */ + min?: number; + }; + /** + * Stylers can be one of three kinds: "fusiontables#fromColumn if the column value is to be used as is, i.e., the column values can have colors in + * #RRGGBBAA format or integer line widths or icon names; fusiontables#gradient if the styling of the row is to be based on applying the gradient function + * on the column value; or fusiontables#buckets if the styling is to based on the bucket into which the the column value falls. + */ + kind?: string; + } + interface StyleSetting { + /** + * The kind of item this is. A StyleSetting contains the style definitions for points, lines, and polygons in a table. Since a table can have any one or + * all of them, a style definition can have point, line and polygon style definitions. + */ + kind?: string; + /** Style definition for points in the table. */ + markerOptions?: PointStyle; + /** Optional name for the style setting. */ + name?: string; + /** Style definition for polygons in the table. */ + polygonOptions?: PolygonStyle; + /** Style definition for lines in the table. */ + polylineOptions?: LineStyle; + /** Identifier for the style setting (unique only within tables). */ + styleId?: number; + /** Identifier for the table. */ + tableId?: string; + } + interface StyleSettingList { + /** All requested style settings. */ + items?: StyleSetting[]; + /** The kind of item this is. For a style list, this is always fusiontables#styleSettingList . */ + kind?: string; + /** Token used to access the next page of this result. No token is displayed if there are no more styles left. */ + nextPageToken?: string; + /** Total number of styles for the table. */ + totalItems?: number; + } + interface Table { + /** Attribution assigned to the table. */ + attribution?: string; + /** Optional link for attribution. */ + attributionLink?: string; + /** Base table identifier if this table is a view or merged table. */ + baseTableIds?: string[]; + /** Default JSON schema for validating all JSON column properties. */ + columnPropertiesJsonSchema?: string; + /** Columns in the table. */ + columns?: Column[]; + /** Description assigned to the table. */ + description?: string; + /** Variable for whether table is exportable. */ + isExportable?: boolean; + /** The kind of item this is. For a table, this is always fusiontables#table. */ + kind?: string; + /** Name assigned to a table. */ + name?: string; + /** SQL that encodes the table definition for derived tables. */ + sql?: string; + /** Encrypted unique alphanumeric identifier for the table. */ + tableId?: string; + /** JSON object containing custom table properties. */ + tablePropertiesJson?: string; + /** JSON schema for validating the JSON table properties. */ + tablePropertiesJsonSchema?: string; + } + interface TableList { + /** List of all requested tables. */ + items?: Table[]; + /** The kind of item this is. For table list, this is always fusiontables#tableList. */ + kind?: string; + /** Token used to access the next page of this result. No token is displayed if there are no more pages left. */ + nextPageToken?: string; + } + interface Task { + /** Type of the resource. This is always "fusiontables#task". */ + kind?: string; + /** Task percentage completion. */ + progress?: string; + /** false while the table is busy with some other task. true if this background task is currently running. */ + started?: boolean; + /** Identifier for the task. */ + taskId?: string; + /** Type of background task. */ + type?: string; + } + interface TaskList { + /** List of all requested tasks. */ + items?: Task[]; + /** Type of the resource. This is always "fusiontables#taskList". */ + kind?: string; + /** Token used to access the next page of this result. No token is displayed if there are no more pages left. */ + nextPageToken?: string; + /** Total number of tasks for the table. */ + totalItems?: number; + } + interface Template { + /** List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified. */ + automaticColumnNames?: string[]; + /** + * Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, + * e.g., script. Only one of body or automaticColumns can be specified. + */ + body?: string; + /** The kind of item this is. For a template, this is always fusiontables#template. */ + kind?: string; + /** Optional name assigned to a template. */ + name?: string; + /** Identifier for the table for which the template is defined. */ + tableId?: string; + /** Identifier for the template, unique within the context of a particular table. */ + templateId?: number; + } + interface TemplateList { + /** List of all requested templates. */ + items?: Template[]; + /** The kind of item this is. For a template list, this is always fusiontables#templateList . */ + kind?: string; + /** Token used to access the next page of this result. No token is displayed if there are no more pages left. */ + nextPageToken?: string; + /** Total number of templates for the table. */ + totalItems?: number; + } + interface ColumnResource { + /** Deletes the specified column. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Name or identifier for the column being deleted. */ + columnId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table from which the column is being deleted. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a specific column by its ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Name or identifier for the column that is being requested. */ + columnId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table to which the column belongs. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds a new column to the table. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table for which a new column is being added. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of columns. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of columns to return. Default is 5. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Continuation token specifying which result page to return. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table whose columns are being listed. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the name or type of an existing column. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Name or identifier for the column that is being updated. */ + columnId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table for which the column is being updated. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates the name or type of an existing column. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Name or identifier for the column that is being updated. */ + columnId: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table for which the column is being updated. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface QueryResource { + /** + * Executes a Fusion Tables SQL statement, which can be any of + * - SELECT + * - INSERT + * - UPDATE + * - DELETE + * - SHOW + * - DESCRIBE + * - CREATE statement. + */ + sql(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether column names are included in the first row. Default is true. */ + hdrs?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * A Fusion Tables SQL statement, which can be any of + * - SELECT + * - INSERT + * - UPDATE + * - DELETE + * - SHOW + * - DESCRIBE + * - CREATE + */ + sql: string; + /** Whether typed values are returned in the (JSON) response: numbers for numeric values and parsed geometries for KML values. Default is true. */ + typed?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Executes a SQL statement which can be any of + * - SELECT + * - SHOW + * - DESCRIBE + */ + sqlGet(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** Whether column names are included (in the first row). Default is true. */ + hdrs?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** + * A SQL statement which can be any of + * - SELECT + * - SHOW + * - DESCRIBE + */ + sql: string; + /** Whether typed values are returned in the (JSON) response: numbers for numeric values and parsed geometries for KML values. Default is true. */ + typed?: boolean; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface StyleResource { + /** Deletes a style. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Identifier (within a table) for the style being deleted */ + styleId: number; + /** Table from which the style is being deleted */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Gets a specific style. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Identifier (integer) for a specific style in a table */ + styleId: number; + /** Table to which the requested style belongs */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Adds a new style for the table. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table for which a new style is being added */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of styles. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of styles to return. Optional. Default is 5. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Continuation token specifying which result page to return. Optional. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table whose styles are being listed */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing style. This method supports patch semantics. */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Identifier (within a table) for the style being updated. */ + styleId: number; + /** Table whose style is being updated. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing style. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Identifier (within a table) for the style being updated. */ + styleId: number; + /** Table whose style is being updated. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TableResource { + /** Copies a table. */ + copy(request: { + /** Data format for the response. */ + alt?: string; + /** Whether to also copy tabs, styles, and templates. Default is false. */ + copyPresentation?: boolean; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of the table that is being copied. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Deletes a table. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** ID of the table to be deleted. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a specific table by its ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Identifier for the table being requested. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** Imports more rows into a table. */ + importRows(request: { + /** Data format for the response. */ + alt?: string; + /** The delimiter used to separate cell values. This can only consist of a single character. Default is ,. */ + delimiter?: string; + /** The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the encoding. */ + encoding?: string; + /** + * The index of the line up to which data will be imported. Default is to import the entire file. If endLine is negative, it is an offset from the end of + * the file; the imported content will exclude the last endLine lines. + */ + endLine?: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Whether the imported CSV must have the same number of values for each row. If false, rows with fewer values will be padded with empty values. Default + * is true. + */ + isStrict?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The index of the first line from which to start importing, inclusive. Default is 0. */ + startLine?: number; + /** The table into which new rows are being imported. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Imports a new table. */ + importTable(request: { + /** Data format for the response. */ + alt?: string; + /** The delimiter used to separate cell values. This can only consist of a single character. Default is ,. */ + delimiter?: string; + /** The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the encoding. */ + encoding?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** The name to be assigned to the new table. */ + name: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** Creates a new table. */ + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** Retrieves a list of tables a user owns. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of tables to return. Default is 5. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Continuation token specifying which result page to return. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** + * Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch + * semantics. + */ + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the view definition is also updated. The specified view definition replaces the existing one. Only a view can be updated with a new definition. */ + replaceViewDefinition?: boolean; + /** ID of the table that is being updated. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + /** Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. */ + replaceRows(request: { + /** Data format for the response. */ + alt?: string; + /** The delimiter used to separate cell values. This can only consist of a single character. Default is ,. */ + delimiter?: string; + /** The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding. */ + encoding?: string; + /** + * The index of the line up to which data will be imported. Default is to import the entire file. If endLine is negative, it is an offset from the end of + * the file; the imported content will exclude the last endLine lines. + */ + endLine?: number; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** + * Whether the imported CSV must have the same number of column values for each row. If true, throws an exception if the CSV does not have the same number + * of columns. If false, rows with fewer column values will be padded with empty values. Default is true. + */ + isStrict?: boolean; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** The index of the first line from which to start importing, inclusive. Default is 0. */ + startLine?: number; + /** Table whose rows will be replaced. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. */ + update(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Whether the view definition is also updated. The specified view definition replaces the existing one. Only a view can be updated with a new definition. */ + replaceViewDefinition?: boolean; + /** ID of the table that is being updated. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request
; + } + interface TaskResource { + /** Deletes a specific task by its ID, unless that task has already started running. */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table from which the task is being deleted. */ + tableId: string; + /** The identifier of the task to delete. */ + taskId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a specific task by its ID. */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table to which the task belongs. */ + tableId: string; + /** The identifier of the task to get. */ + taskId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a list of tasks. */ + list(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** Maximum number of tasks to return. Default is 5. */ + maxResults?: number; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Continuation token specifying which result page to return. */ + pageToken?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Index of the first result returned in the current page. */ + startIndex?: number; + /** Table whose tasks are being listed. */ + tableId: string; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + } + interface TemplateResource { + /** Deletes a template */ + delete(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table from which the template is being deleted */ + tableId: string; + /** Identifier for the template which is being deleted */ + templateId: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request; + /** Retrieves a specific template by its id */ + get(request: { + /** Data format for the response. */ + alt?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * Overrides userIp if both are provided. + */ + quotaUser?: string; + /** Table to which the template belongs */ + tableId: string; + /** Identifier for the template that is being requested */ + templateId: number; + /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + userIp?: string; + }): Request