From f807e0e9952f09719c2aaa4a8347472a2d82ad6a Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 28 Dec 2016 14:14:57 -0800 Subject: [PATCH 1/4] 15.1.0 --- CHANGELOG.md | 7 + apis/androidenterprise/v1.js | 1 + apis/androidpublisher/v2.js | 82 ++ apis/appengine/v1.js | 330 ++--- apis/appengine/v1beta4.js | 232 +-- apis/appengine/v1beta5.js | 235 +-- apis/bigquery/v2.js | 5 +- apis/books/v1.js | 2 +- apis/cloudbuild/v1.js | 11 +- apis/cloudresourcemanager/v1.js | 4 +- apis/cloudresourcemanager/v1beta1.js | 4 +- apis/compute/alpha.js | 119 +- apis/compute/beta.js | 24 +- apis/compute/v1.js | 13 +- apis/content/v2.js | 110 +- apis/content/v2sandbox.js | 34 +- apis/dataflow/v1b3.js | 2 + apis/deploymentmanager/v2.js | 11 +- apis/gmail/v1.js | 2 +- apis/identitytoolkit/v3.js | 1 + apis/language/v1.js | 17 +- apis/language/v1beta1.js | 17 +- apis/logging/v2.js | 641 +++----- apis/logging/v2beta1.js | 561 +++---- apis/ml/v1beta1.js | 2 +- apis/monitoring/v3.js | 12 +- apis/pubsub/v1.js | 1071 ++++++++------ apis/pubsub/v1beta1a.js | 462 +++--- apis/pubsub/v1beta2.js | 704 +++++---- apis/runtimeconfig/v1beta1.js | 24 +- apis/servicecontrol/v1.js | 4 +- apis/servicemanagement/v1.js | 97 +- apis/sheets/v4.js | 16 +- apis/sqladmin/v1beta4.js | 50 + apis/storage/v1.js | 2010 ++++++++++++++------------ apis/youtube/v3.js | 6 +- package.json | 2 +- 37 files changed, 3656 insertions(+), 3269 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf5ee6b3e..00ab66671c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +##### 15.1.0 - 28 December 2016 + +###### Backwards compatible changes +- Added new methods to the `androidpublisher` `v2` API +- Added new methods to the `compute` `alpha` API +- Added new methods to the `sqladmin` `v1beta4` API + ##### 15.0.0 - 05 December 2016 ###### Breaking changes diff --git a/apis/androidenterprise/v1.js b/apis/androidenterprise/v1.js index 675a1f0b22..a0312d6212 100644 --- a/apis/androidenterprise/v1.js +++ b/apis/androidenterprise/v1.js @@ -3783,6 +3783,7 @@ Possible values include: * @property {string} data 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. * @property {string} id An opaque, unique identifier for this ServiceAccountKey. Assigned by the server. * @property {string} kind Identifies what kind of resource this is. Value: the fixed string "androidenterprise#serviceAccountKey". + * @property {string} publicData 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. * @property {string} type The file format of the generated key data. */ /** diff --git a/apis/androidpublisher/v2.js b/apis/androidpublisher/v2.js index aa0ecec323..eea0639496 100644 --- a/apis/androidpublisher/v2.js +++ b/apis/androidpublisher/v2.js @@ -2074,6 +2074,49 @@ function Androidpublisher(options) { // eslint-disable-line context: self }; + return createAPIRequest(parameters, callback); + } + }, + + voidedpurchases: { + + /** + * androidpublisher.purchases.voidedpurchases.list + * + * @desc Lists the purchases that were cancelled, refunded or charged-back. + * + * @alias androidpublisher.purchases.voidedpurchases.list + * @memberOf! androidpublisher(v2) + * + * @param {object} params Parameters for request + * @param {string=} params.endTime The end time of list window, in milliseconds since the epoch (Jan 1, 1970). If not specified, default to current time, which is also the latest accepted end time. This parameter will be ignored if pagination token is set. + * @param {integer=} params.maxResults + * @param {string} params.packageName The package name of the application for which voided purchases need to be returned (for example, 'com.some.thing'). + * @param {integer=} params.startIndex + * @param {string=} params.startTime The start time of list window, in milliseconds since the epoch (Jan 1, 1970). If not specified, default to current time - 30 days, which is also the earlies accepted start time. This parameter will be ignored if pagination token is set. + * @param {string=} params.token + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list: function (params, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); + + var parameters = { + options: utils.extend({ + url: 'https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/purchases/voidedpurchases', + method: 'GET' + }, options), + params: params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: self + }; + return createAPIRequest(parameters, callback); } } @@ -2092,6 +2135,7 @@ function Androidpublisher(options) { // eslint-disable-line * @param {object} params Parameters for request * @param {string} params.packageName Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". * @param {string} params.reviewId + * @param {string=} params.translationLanguage * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -2130,6 +2174,7 @@ function Androidpublisher(options) { // eslint-disable-line * @param {string} params.packageName Unique identifier for the Android app for which we want reviews; for example, "com.spiffygame". * @param {integer=} params.startIndex * @param {string=} params.token + * @param {string=} params.translationLanguage * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -2283,6 +2328,22 @@ function Androidpublisher(options) { // eslint-disable-line * @property {androidpublisher(v2).Timestamp} lastModified The last time at which this comment was updated. * @property {string} text The content of the comment, i.e. reply body. */ +/** + * @typedef DeviceMetadata + * @memberOf! androidpublisher(v2) + * @type object + * @property {string} cpuMake Device CPU make e.g. "Qualcomm" + * @property {string} cpuModel Device CPU model e.g. "MSM8974" + * @property {string} deviceClass Device class (e.g. tablet) + * @property {integer} glEsVersion OpenGL version + * @property {string} manufacturer Device manufacturer (e.g. Motorola) + * @property {string} nativePlatform Comma separated list of native platforms (e.g. "arm", "arm7") + * @property {string} productName Device model name (e.g. Droid) + * @property {integer} ramMb Device RAM in Megabytes e.g. "2048" + * @property {integer} screenDensityDpi Screen density in DPI + * @property {integer} screenHeightPx Screen height in pixels + * @property {integer} screenWidthPx Screen width in pixels + */ /** * @typedef Entitlement * @memberOf! androidpublisher(v2) @@ -2639,9 +2700,30 @@ function Androidpublisher(options) { // eslint-disable-line * @property {integer} appVersionCode Integer version code of the app as installed at the time the review was written. May be absent. * @property {string} appVersionName String version name of the app as installed at the time the review was written. May be absent. * @property {string} device Codename for the reviewer's device, e.g. klte, flounder. May be absent. + * @property {androidpublisher(v2).DeviceMetadata} deviceMetadata Some information about the characteristics of the user's device * @property {androidpublisher(v2).Timestamp} lastModified The last time at which this comment was updated. + * @property {string} originalText 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. * @property {string} reviewerLanguage 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. * @property {integer} starRating The star rating associated with the review, from 1 to 5. * @property {string} text 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. + * @property {integer} thumbsDownCount Number of users who have given this review a thumbs down + * @property {integer} thumbsUpCount Number of users who have given this review a thumbs up + */ +/** + * @typedef VoidedPurchase + * @memberOf! androidpublisher(v2) + * @type object + * @property {string} kind This kind represents a voided purchase object in the androidpublisher service. + * @property {string} purchaseTimeMillis The time the purchase was made, in milliseconds since the epoch (Jan 1, 1970). + * @property {string} purchaseToken The token that was generated when a purchase was made and uniquely identifies a purchase. + * @property {string} voidedTimeMillis The time when the purchase was cancelled/refunded/chargeback, in milliseconds since the epoch (Jan 1, 1970). + */ +/** + * @typedef VoidedPurchasesListResponse + * @memberOf! androidpublisher(v2) + * @type object + * @property {androidpublisher(v2).PageInfo} pageInfo + * @property {androidpublisher(v2).TokenPagination} tokenPagination + * @property {androidpublisher(v2).VoidedPurchase[]} voidedPurchases */ module.exports = Androidpublisher; diff --git a/apis/appengine/v1.js b/apis/appengine/v1.js index 54ce4a3b66..d312ed5d88 100644 --- a/apis/appengine/v1.js +++ b/apis/appengine/v1.js @@ -40,89 +40,6 @@ function Appengine(options) { // eslint-disable-line var self = this; self._options = options || {}; - self.experimental = { - - apps: { - - operations: { - - /** - * appengine.experimental.apps.operations.list - * - * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. - * - * @alias appengine.experimental.apps.operations.list - * @memberOf! appengine(v1) - * - * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. The name of the operation collection. - * @param {string=} params.filter The standard list filter. - * @param {integer=} params.pageSize The standard list page size. - * @param {string=} params.pageToken The standard list page token. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list: function (params, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - options || (options = {}); - - var parameters = { - options: utils.extend({ - url: 'https://appengine.googleapis.com/experimental/apps/{appsId}/operations', - method: 'GET' - }, options), - params: params, - requiredParams: ['appsId'], - pathParams: ['appsId'], - context: self - }; - - return createAPIRequest(parameters, callback); - }, - - /** - * appengine.experimental.apps.operations.get - * - * @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. - * - * @alias appengine.experimental.apps.operations.get - * @memberOf! appengine(v1) - * - * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. The name of the operation resource. - * @param {string} params.operationsId Part of `name`. See documentation of `appsId`. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get: function (params, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - options || (options = {}); - - var parameters = { - options: utils.extend({ - url: 'https://appengine.googleapis.com/experimental/apps/{appsId}/operations/{operationsId}', - method: 'GET' - }, options), - params: params, - requiredParams: ['appsId', 'operationsId'], - pathParams: ['appsId', 'operationsId'], - context: self - }; - - return createAPIRequest(parameters, callback); - } - } - } - }; - self.apps = { /** @@ -134,7 +51,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the Application resource to get. Example: `apps/myapp`. + * @param {string} params.appsId Part of `name`. Name of the Application resource to get. Example: apps/myapp. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -163,7 +80,7 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.create * - * @desc Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the [Google Cloud Resource Manager create project topic](https://cloud.google.com/resource-manager/docs/creating-project). + * @desc Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). * * @alias appengine.apps.create * @memberOf! appengine(v1) @@ -198,13 +115,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.patch * - * @desc Updates the specified Application resource. You can update the following fields: * [`auth_domain`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.auth_domain) * [`default_cookie_expiration`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.default_cookie_expiration) + * @desc Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.default_cookie_expiration) * * @alias appengine.apps.patch * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the Application resource to update. Example: `apps/myapp`. + * @param {string} params.appsId Part of `name`. Name of the Application resource to update. Example: apps/myapp. * @param {string=} params.updateMask Standard field mask for the set of fields to be updated. * @param {appengine(v1).Application} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -235,13 +152,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.repair * - * @desc 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*. + * @desc 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. * * @alias appengine.apps.repair * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the application to repair. Example: `apps/myapp` + * @param {string} params.appsId Part of `name`. Name of the application to repair. Example: apps/myapp * @param {appengine(v1).RepairApplicationRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -273,7 +190,7 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.operations.list * - * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/x/operations. * * @alias appengine.apps.operations.list * @memberOf! appengine(v1) @@ -356,7 +273,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `parent`. Name of the parent Application resource. Example: `apps/myapp`. + * @param {string} params.appsId Part of `parent`. Name of the parent Application resource. Example: apps/myapp. * @param {integer=} params.pageSize Maximum results to return per page. * @param {string=} params.pageToken Continuation token for fetching the next page of results. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -393,7 +310,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -429,10 +346,10 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string=} params.updateMask Standard field mask for the set of fields to be updated. - * @param {boolean=} params.migrateTraffic Set to `true` to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version 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). + * @param {boolean=} params.migrateTraffic Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version 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). * @param {appengine(v1).Service} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -468,7 +385,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -506,9 +423,9 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `parent`. Name of the parent Service resource. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `parent`. See documentation of `appsId`. - * @param {string=} params.view Controls the set of fields returned in the `List` response. + * @param {string=} params.view Controls the set of fields returned in the List response. * @param {integer=} params.pageSize Maximum results to return per page. * @param {string=} params.pageToken Continuation token for fetching the next page of results. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -539,16 +456,16 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.services.versions.get * - * @desc Gets the specified Version resource. By default, only a `BASIC_VIEW` will be returned. Specify the `FULL_VIEW` parameter to get the full resource. + * @desc Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource. * * @alias appengine.apps.services.versions.get * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. - * @param {string=} params.view Controls the set of fields returned in the `Get` response. + * @param {string=} params.view Controls the set of fields returned in the Get response. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -583,7 +500,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `parent`. Name of the parent resource to create this version under. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `parent`. See documentation of `appsId`. * @param {appengine(v1).Version} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -614,13 +531,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.services.versions.patch * - * @desc 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. + * @desc 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. * * @alias appengine.apps.services.versions.patch * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default/versions/1`. + * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string=} params.updateMask Standard field mask for the set of fields to be updated. @@ -659,7 +576,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -698,7 +615,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `parent`. Name of the parent Version resource. Example: `apps/myapp/services/default/versions/v1`. + * @param {string} params.appsId Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1. * @param {string} params.servicesId Part of `parent`. See documentation of `appsId`. * @param {string} params.versionsId Part of `parent`. See documentation of `appsId`. * @param {integer=} params.pageSize Maximum results to return per page. @@ -737,7 +654,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -775,7 +692,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -807,13 +724,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.services.versions.instances.debug * - * @desc 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. + * @desc 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. * * @alias appengine.apps.services.versions.instances.debug * @memberOf! appengine(v1) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -936,11 +853,11 @@ function Appengine(options) { // eslint-disable-line * @typedef Operation * @memberOf! appengine(v1) * @type object - * @property {string} name 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`. + * @property {string} name 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. * @property {object} metadata 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. - * @property {boolean} done 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. + * @property {boolean} done 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. * @property {appengine(v1).Status} error The error result of the operation in case of failure or cancellation. - * @property {object} response 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`. + * @property {object} response 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. */ /** * @typedef Status @@ -954,23 +871,23 @@ function Appengine(options) { // eslint-disable-line * @typedef Application * @memberOf! appengine(v1) * @type object - * @property {string} name Full path to the Application resource in the API. Example: `apps/myapp`. @OutputOnly - * @property {string} id 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`. - * @property {appengine(v1).UrlDispatchRule[]} dispatchRules HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. @OutputOnly - * @property {string} authDomain Google Apps authentication domain that controls which users can access this application. Defaults to open access for any Google Account. - * @property {string} locationId 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 US `europe-west` - Western Europe `us-east1` - Eastern US - * @property {string} codeBucket 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 - * @property {string} defaultCookieExpiration Cookie expiration policy for this application. @OutputOnly - * @property {string} defaultHostname Hostname used to reach this application, as resolved by App Engine. @OutputOnly - * @property {string} defaultBucket Google Cloud Storage bucket that can be used by this application to store content. @OutputOnly + * @property {string} name Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly + * @property {string} id 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. + * @property {appengine(v1).UrlDispatchRule[]} dispatchRules HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly + * @property {string} authDomain Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. + * @property {string} locationId 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 + * @property {string} codeBucket 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 + * @property {string} defaultCookieExpiration Cookie expiration policy for this application. + * @property {string} defaultHostname Hostname used to reach this application, as resolved by App Engine.@OutputOnly + * @property {string} defaultBucket Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly */ /** * @typedef UrlDispatchRule * @memberOf! appengine(v1) * @type object - * @property {string} domain Domain name to match against. The wildcard "`*`" is supported if specified before a period: "`*.`". Defaults to matching all domains: "`*`". - * @property {string} path 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. - * @property {string} service Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: `default`. + * @property {string} domain Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". + * @property {string} path 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. + * @property {string} service Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default. */ /** * @typedef RepairApplicationRequest @@ -988,8 +905,8 @@ function Appengine(options) { // eslint-disable-line * @typedef Service * @memberOf! appengine(v1) * @type object - * @property {string} name Full path to the Service resource in the API. Example: `apps/myapp/services/default`. @OutputOnly - * @property {string} id Relative name of the service within the application. Example: `default`. @OutputOnly + * @property {string} name Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly + * @property {string} id Relative name of the service within the application. Example: default.@OutputOnly * @property {appengine(v1).TrafficSplit} split Mapping that defines fractional HTTP traffic diversion to different versions within the service. */ /** @@ -1010,42 +927,43 @@ function Appengine(options) { // eslint-disable-line * @typedef Version * @memberOf! appengine(v1) * @type object - * @property {string} name Full path to the Version resource in the API. Example: `apps/myapp/services/default/versions/v1`. @OutputOnly - * @property {string} id 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-". + * @property {string} name Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly + * @property {string} id 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-". * @property {appengine(v1).AutomaticScaling} automaticScaling Automatic scaling is based on request rate, response latencies, and other application metrics. * @property {appengine(v1).BasicScaling} basicScaling 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. * @property {appengine(v1).ManualScaling} manualScaling A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. * @property {string[]} inboundServices Before an application can receive email or XMPP messages, the application must be configured to enable the service. - * @property {string} instanceClass 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_1G` Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or BasicScaling. + * @property {string} instanceClass 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. * @property {appengine(v1).Network} network Extra network settings. Only applicable for VM runtimes. * @property {appengine(v1).Resources} resources Machine resources for this version. Only applicable for VM runtimes. - * @property {string} runtime Desired runtime. Example: `python27`. + * @property {string} runtime Desired runtime. Example: python27. * @property {boolean} threadsafe Whether multiple requests can be dispatched to this version at once. * @property {boolean} vm Whether to deploy this version in a container on a virtual machine. * @property {object} betaSettings Metadata settings that are supplied to this version to enable beta runtime features. - * @property {string} env App Engine execution environment for this version. Defaults to `standard`. - * @property {string} servingStatus 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`. - * @property {string} createdBy Email address of the user who created this version. @OutputOnly - * @property {string} createTime Time that this version was created. @OutputOnly - * @property {string} diskUsageBytes Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk. @OutputOnly - * @property {appengine(v1).UrlMap[]} handlers 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. - * @property {appengine(v1).ErrorHandler[]} errorHandlers Custom static error pages. Limited to 10KB per page. Only returned in `GET` requests if `view=FULL` is set. - * @property {appengine(v1).Library[]} libraries Configuration for third-party Python runtime libraries that are required by the application. Only returned in `GET` requests if `view=FULL` is set. - * @property {appengine(v1).ApiConfigHandler} apiConfig Serving configuration for [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). Only returned in `GET` requests if `view=FULL` is set. - * @property {object} envVariables Environment variables available to the application. Only returned in `GET` requests if `view=FULL` is set. - * @property {string} defaultExpiration 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. - * @property {appengine(v1).HealthCheck} healthCheck 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. - * @property {string} nobuildFilesRegex 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. - * @property {appengine(v1).Deployment} deployment Code and application artifacts that make up this version. Only returned in `GET` requests if `view=FULL` is set. - * @property {string} versionUrl Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com" @OutputOnly + * @property {string} env App Engine execution environment for this version.Defaults to standard. + * @property {string} servingStatus 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. + * @property {string} createdBy Email address of the user who created this version.@OutputOnly + * @property {string} createTime Time that this version was created.@OutputOnly + * @property {string} diskUsageBytes Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly + * @property {appengine(v1).UrlMap[]} handlers 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. + * @property {appengine(v1).ErrorHandler[]} errorHandlers Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set. + * @property {appengine(v1).Library[]} libraries Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set. + * @property {appengine(v1).ApiConfigHandler} apiConfig Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set. + * @property {object} envVariables Environment variables available to the application.Only returned in GET requests if view=FULL is set. + * @property {string} defaultExpiration 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. + * @property {appengine(v1).HealthCheck} healthCheck 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. + * @property {string} nobuildFilesRegex 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. + * @property {appengine(v1).Deployment} deployment Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set. + * @property {string} versionUrl Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly + * @property {appengine(v1).EndpointsApiService} endpointsApiService 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. */ /** * @typedef AutomaticScaling * @memberOf! appengine(v1) * @type object - * @property {string} coolDownPeriod 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. + * @property {string} coolDownPeriod 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. * @property {appengine(v1).CpuUtilization} cpuUtilization Target scaling by CPU usage. - * @property {integer} maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance. Defaults to a runtime-specific value. + * @property {integer} maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value. * @property {integer} maxIdleInstances Maximum number of idle instances that should be maintained for this version. * @property {integer} maxTotalInstances Maximum number of instances that should be started to handle requests. * @property {string} maxPendingLatency Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. @@ -1099,7 +1017,7 @@ function Appengine(options) { // eslint-disable-line * @typedef ManualScaling * @memberOf! appengine(v1) * @type object - * @property {integer} instances 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. + * @property {integer} instances 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. */ /** * @typedef Network @@ -1107,7 +1025,8 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string[]} forwardedPorts List of ports, or port pairs, to forward from the virtual machine to the application container. * @property {string} instanceTag Tag to apply to the VM instance during creation. - * @property {string} name Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path. Defaults to `default`. + * @property {string} name Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default. + * @property {string} subnetworkName 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 Flex app. */ /** * @typedef Resources @@ -1124,7 +1043,7 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string} name Unique name for the volume. * @property {string} volumeType Underlying volume type, e.g. 'tmpfs'. - * @property {number} sizeGb Volume size in GB. + * @property {number} sizeGb Volume size in gigabytes. */ /** * @typedef UrlMap @@ -1136,8 +1055,8 @@ function Appengine(options) { // eslint-disable-line * @property {appengine(v1).ApiEndpointHandler} apiEndpoint Uses API Endpoints to handle requests. * @property {string} securityLevel Security (HTTPS) enforcement for this URL. * @property {string} login Level of login required to access this resource. - * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to `redirect`. - * @property {string} redirectHttpResponseCode `30x` code to use when performing redirects for the `secure` field. Defaults to `302`. + * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to redirect. + * @property {string} redirectHttpResponseCode 30x code to use when performing redirects for the secure field. Defaults to 302. */ /** * @typedef StaticFilesHandler @@ -1146,7 +1065,7 @@ function Appengine(options) { // eslint-disable-line * @property {string} path 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. * @property {string} uploadPathRegex Regular expression that matches the file paths for all files that should be referenced by this handler. * @property {object} httpHeaders HTTP headers to use for all responses from these URLs. - * @property {string} mimeType 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. + * @property {string} mimeType 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. * @property {string} expiration Time a static file served by this handler should be cached by web proxies and browsers. * @property {boolean} requireMatchingFile Whether this handler should match the request if the file referenced by the handler does not exist. * @property {boolean} applicationReadable 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. @@ -1169,7 +1088,7 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string} errorCode Error condition this handler applies to. * @property {string} staticFile Static file content to be served for this error. - * @property {string} mimeType MIME type of file. Defaults to `text/html`. + * @property {string} mimeType MIME type of file. Defaults to text/html. */ /** * @typedef Library @@ -1182,8 +1101,8 @@ function Appengine(options) { // eslint-disable-line * @typedef ApiConfigHandler * @memberOf! appengine(v1) * @type object - * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to `redirect`. - * @property {string} login Level of login required to access this resource. Defaults to `optional`. + * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to redirect. + * @property {string} login Level of login required to access this resource. Defaults to optional. * @property {string} script Path to the script from the application root directory. * @property {string} securityLevel Security (HTTPS) enforcement for this URL. * @property {string} url URL to serve the endpoint at. @@ -1212,9 +1131,9 @@ function Appengine(options) { // eslint-disable-line * @typedef FileInfo * @memberOf! appengine(v1) * @type object - * @property {string} sourceUrl 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/\/\'. + * @property {string} sourceUrl 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//'. * @property {string} sha1Sum The SHA1 hash of the file, in hex. - * @property {string} mimeType The MIME type of the file. Defaults to the value from Google Cloud Storage. + * @property {string} mimeType The MIME type of the file.Defaults to the value from Google Cloud Storage. */ /** * @typedef ContainerInfo @@ -1226,9 +1145,16 @@ function Appengine(options) { // eslint-disable-line * @typedef ZipInfo * @memberOf! appengine(v1) * @type object - * @property {string} sourceUrl 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/\/\'. + * @property {string} sourceUrl 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//'. * @property {integer} filesCount 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. */ +/** + * @typedef EndpointsApiService + * @memberOf! appengine(v1) + * @type object + * @property {string} name Endpoints service name which is the name of the "service" resource in the Service Management API. For example "myapi.endpoints.myproject.cloud.goog" + * @property {string} configId Endpoints service configuration id as specified by the Service Management API. For example "2016-09-19r1" + */ /** * @typedef ListInstancesResponse * @memberOf! appengine(v1) @@ -1240,28 +1166,28 @@ function Appengine(options) { // eslint-disable-line * @typedef Instance * @memberOf! appengine(v1) * @type object - * @property {string} name Full path to the Instance resource in the API. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. @OutputOnly - * @property {string} id Relative name of the instance within the version. Example: `instance-1`. @OutputOnly - * @property {string} appEngineRelease App Engine release this instance is running on. @OutputOnly - * @property {string} availability Availability of the instance. @OutputOnly - * @property {string} vmName Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmZoneName Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmId Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} startTime Time that this instance was started. @OutputOnly - * @property {integer} requests Number of requests since this instance was started. @OutputOnly - * @property {integer} errors Number of errors since this instance was started. @OutputOnly - * @property {number} qps Average queries per second (QPS) over the last minute. @OutputOnly - * @property {integer} averageLatency Average latency (ms) over the last minute. @OutputOnly - * @property {string} memoryUsage Total memory in use (bytes). @OutputOnly - * @property {string} vmStatus Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {boolean} vmDebugEnabled Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmIp The IP address of this instance. Only applicable for instances in App Engine flexible environment. @OutputOnly + * @property {string} name Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly + * @property {string} id Relative name of the instance within the version. Example: instance-1.@OutputOnly + * @property {string} appEngineRelease App Engine release this instance is running on.@OutputOnly + * @property {string} availability Availability of the instance.@OutputOnly + * @property {string} vmName Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmZoneName Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmId Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} startTime Time that this instance was started.@OutputOnly + * @property {integer} requests Number of requests since this instance was started.@OutputOnly + * @property {integer} errors Number of errors since this instance was started.@OutputOnly + * @property {number} qps Average queries per second (QPS) over the last minute.@OutputOnly + * @property {integer} averageLatency Average latency (ms) over the last minute.@OutputOnly + * @property {string} memoryUsage Total memory in use (bytes).@OutputOnly + * @property {string} vmStatus Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {boolean} vmDebugEnabled Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmIp The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly */ /** * @typedef DebugInstanceRequest * @memberOf! appengine(v1) * @type object - * @property {string} sshKey Public SSH key to add to the instance. Example: `[USERNAME]:ssh-rsa KEY_VALUE` or `[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) + * @property {string} sshKey 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). */ /** * @typedef ListLocationsResponse @@ -1274,8 +1200,8 @@ function Appengine(options) { // eslint-disable-line * @typedef Location * @memberOf! appengine(v1) * @type object - * @property {string} name Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` - * @property {string} locationId The canonical id for this location. For example: `"us-east1"`. + * @property {string} name Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" + * @property {string} locationId The canonical id for this location. For example: "us-east1". * @property {object} labels Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} * @property {object} metadata Service-specific metadata. For example the available capacity at the given location. */ @@ -1283,48 +1209,50 @@ function Appengine(options) { // eslint-disable-line * @typedef OperationMetadataExperimental * @memberOf! appengine(v1) * @type object - * @property {string} method API method that initiated this operation. Example: `google.appengine.experimental.CustomDomains.CreateCustomDomain`. @OutputOnly - * @property {string} insertTime Time that this operation was created. @OutputOnly - * @property {string} endTime Time that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/customDomains/example.com`. @OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly + * @property {string} insertTime Time that this operation was created.@OutputOnly + * @property {string} endTime Time that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly */ /** * @typedef OperationMetadata * @memberOf! appengine(v1) * @type object - * @property {string} operationType Type of this operation. Deprecated, use method field instead. Example: "create_version". @OutputOnly - * @property {string} insertTime Timestamp that this operation was created. @OutputOnly - * @property {string} endTime Timestamp that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/modules/default`. @OutputOnly - * @property {string} method API method that initiated this operation. Example: `google.appengine.v1beta4.Version.CreateVersion`. @OutputOnly + * @property {string} operationType Type of this operation. Deprecated, use method field instead. Example: "create_version".@OutputOnly + * @property {string} insertTime Timestamp that this operation was created.@OutputOnly + * @property {string} endTime Timestamp that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly */ /** * @typedef OperationMetadataV1Beta5 * @memberOf! appengine(v1) * @type object - * @property {string} method API method name that initiated this operation. Example: `google.appengine.v1beta5.Version.CreateVersion`. @OutputOnly - * @property {string} insertTime Timestamp that this operation was created. @OutputOnly - * @property {string} endTime Timestamp that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/services/default`. @OutputOnly + * @property {string} method API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly + * @property {string} insertTime Timestamp that this operation was created.@OutputOnly + * @property {string} endTime Timestamp that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly */ /** * @typedef OperationMetadataV1 * @memberOf! appengine(v1) * @type object - * @property {string} method API method that initiated this operation. Example: `google.appengine.v1.Versions.CreateVersion`. @OutputOnly - * @property {string} insertTime Time that this operation was created. @OutputOnly - * @property {string} endTime Time that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/services/default`. @OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly + * @property {string} insertTime Time that this operation was created.@OutputOnly + * @property {string} endTime Time that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly + * @property {string} ephemeralMessage Ephemeral message that may change every time the operation is polled. @OutputOnly + * @property {string[]} warning Durable messages that persist on every operation poll. @OutputOnly */ /** * @typedef LocationMetadata * @memberOf! appengine(v1) * @type object - * @property {boolean} standardEnvironmentAvailable App Engine Standard Environment is available in the given location. @OutputOnly - * @property {boolean} flexibleEnvironmentAvailable App Engine Flexible Environment is available in the given location. @OutputOnly + * @property {boolean} standardEnvironmentAvailable App Engine Standard Environment is available in the given location.@OutputOnly + * @property {boolean} flexibleEnvironmentAvailable App Engine Flexible Environment is available in the given location.@OutputOnly */ module.exports = Appengine; diff --git a/apis/appengine/v1beta4.js b/apis/appengine/v1beta4.js index 0d327dc6d4..d9775688cd 100644 --- a/apis/appengine/v1beta4.js +++ b/apis/appengine/v1beta4.js @@ -45,7 +45,7 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.create * - * @desc Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the [Google Cloud Resource Manager create project topic](https://cloud.google.com/resource-manager/docs/creating-project). + * @desc Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). * * @alias appengine.apps.create * @memberOf! appengine(v1beta4) @@ -86,8 +86,8 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the application to get. Example: `apps/myapp`. - * @param {boolean=} params.ensureResourcesExist Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the `GET` operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. + * @param {string} params.appsId Part of `name`. Name of the application to get. Example: apps/myapp. + * @param {boolean=} params.ensureResourcesExist Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -116,13 +116,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.patch * - * @desc Updates the specified Application resource. You can update the following fields: * [`auth_domain`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) * [`default_cookie_expiration`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration) + * @desc Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration) * * @alias appengine.apps.patch * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the Application resource to update. Example: `apps/myapp`. + * @param {string} params.appsId Part of `name`. Name of the Application resource to update. Example: apps/myapp. * @param {string=} params.mask Standard field mask for the set of fields to be updated. * @param {appengine(v1beta4).Application} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -155,7 +155,7 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.operations.list * - * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/x/operations. * * @alias appengine.apps.operations.list * @memberOf! appengine(v1beta4) @@ -238,7 +238,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -274,7 +274,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -310,7 +310,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp. * @param {integer=} params.pageSize Maximum results to return per page. * @param {string=} params.pageToken Continuation token for fetching the next page of results. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -347,10 +347,10 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: `apps/myapp/modules/default`. + * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string=} params.mask Standard field mask for the set of fields to be updated. - * @param {boolean=} params.migrateTraffic Set to `true` to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module 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). + * @param {boolean=} params.migrateTraffic Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module 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). * @param {appengine(v1beta4).Module} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -388,7 +388,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: `apps/myapp/modules/default`. + * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {appengine(v1beta4).Version} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -425,7 +425,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -456,16 +456,16 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.modules.versions.get * - * @desc Gets the specified Version resource. By default, only a `BASIC_VIEW` will be returned. Specify the `FULL_VIEW` parameter to get the full resource. + * @desc Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource. * * @alias appengine.apps.modules.versions.get * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. - * @param {string=} params.view Controls the set of fields returned in the `Get` response. + * @param {string=} params.view Controls the set of fields returned in the Get response. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -500,9 +500,9 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. - * @param {string=} params.view Controls the set of fields returned in the `List` response. + * @param {string=} params.view Controls the set of fields returned in the List response. * @param {integer=} params.pageSize Maximum results to return per page. * @param {string=} params.pageToken Continuation token for fetching the next page of results. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -533,13 +533,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.modules.versions.patch * - * @desc 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/v1beta4/apps.modules.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/v1beta4/apps.modules.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/v1beta4/apps.modules.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/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + * @desc 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/v1beta4/apps.modules.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/v1beta4/apps.modules.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/v1beta4/apps.modules.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/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. * * @alias appengine.apps.modules.versions.patch * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: `apps/myapp/modules/default/versions/1`. + * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string=} params.mask Standard field mask for the set of fields to be updated. @@ -580,7 +580,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -618,7 +618,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -656,7 +656,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {integer=} params.pageSize Maximum results to return per page. @@ -689,13 +689,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.modules.versions.instances.debug * - * @desc 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. + * @desc 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. * * @alias appengine.apps.modules.versions.instances.debug * @memberOf! appengine(v1beta4) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/modules/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1. * @param {string} params.modulesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -818,11 +818,11 @@ function Appengine(options) { // eslint-disable-line * @typedef Operation * @memberOf! appengine(v1beta4) * @type object - * @property {string} name 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`. + * @property {string} name 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. * @property {object} metadata 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. - * @property {boolean} done 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. + * @property {boolean} done 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. * @property {appengine(v1beta4).Status} error The error result of the operation in case of failure or cancellation. - * @property {object} response 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`. + * @property {object} response 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. */ /** * @typedef Status @@ -836,62 +836,62 @@ function Appengine(options) { // eslint-disable-line * @typedef Application * @memberOf! appengine(v1beta4) * @type object - * @property {string} name Full path to the Application resource in the API. Example: `apps/myapp`. @OutputOnly - * @property {string} id 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`. - * @property {appengine(v1beta4).UrlDispatchRule[]} dispatchRules HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent. @OutputOnly - * @property {string} authDomain Google Apps authentication domain that controls which users can access this application. Defaults to open access for any Google Account. - * @property {string} location 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 US `europe-west` - Western Europe `us-east1` - Eastern US - * @property {string} codeBucket 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 - * @property {string} defaultCookieExpiration Cookie expiration policy for this application. @OutputOnly - * @property {string} defaultHostname Hostname used to reach the application, as resolved by App Engine. @OutputOnly - * @property {string} defaultBucket Google Cloud Storage bucket that can be used by this application to store content. @OutputOnly + * @property {string} name Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly + * @property {string} id 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. + * @property {appengine(v1beta4).UrlDispatchRule[]} dispatchRules HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent.@OutputOnly + * @property {string} authDomain Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. + * @property {string} location 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 + * @property {string} codeBucket 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 + * @property {string} defaultCookieExpiration Cookie expiration policy for this application. + * @property {string} defaultHostname Hostname used to reach the application, as resolved by App Engine.@OutputOnly + * @property {string} defaultBucket Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly */ /** * @typedef UrlDispatchRule * @memberOf! appengine(v1beta4) * @type object - * @property {string} domain Domain name to match against. The wildcard "`*`" is supported if specified before a period: "`*.`". Defaults to matching all domains: "`*`". - * @property {string} path 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. - * @property {string} module Resource ID of a module in this application that should serve the matched request. The module must already exist. Example: `default`. + * @property {string} domain Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". + * @property {string} path 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. + * @property {string} module Resource ID of a module in this application that should serve the matched request. The module must already exist. Example: default. */ /** * @typedef Version * @memberOf! appengine(v1beta4) * @type object - * @property {string} name Full path to the Version resource in the API. Example: `apps/myapp/modules/default/versions/v1`. @OutputOnly - * @property {string} id Relative name of the version within the module. Example: `v1`. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-". + * @property {string} name Full path to the Version resource in the API. Example: apps/myapp/modules/default/versions/v1.@OutputOnly + * @property {string} id Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-". * @property {appengine(v1beta4).AutomaticScaling} automaticScaling Automatic scaling is based on request rate, response latencies, and other application metrics. * @property {appengine(v1beta4).BasicScaling} basicScaling A module 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. * @property {appengine(v1beta4).ManualScaling} manualScaling A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. * @property {string[]} inboundServices Before an application can receive email or XMPP messages, the application must be configured to enable the service. - * @property {string} instanceClass 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_1G` Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or BasicScaling. + * @property {string} instanceClass 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. * @property {appengine(v1beta4).Network} network Extra network settings. Only applicable for VM runtimes. * @property {appengine(v1beta4).Resources} resources Machine resources for this version. Only applicable for VM runtimes. - * @property {string} runtime Desired runtime. Example: `python27`. + * @property {string} runtime Desired runtime. Example: python27. * @property {boolean} threadsafe Whether multiple requests can be dispatched to this version at once. * @property {boolean} vm Whether to deploy this version in a container on a virtual machine. * @property {object} betaSettings Metadata settings that are supplied to this version to enable beta runtime features. - * @property {string} env App Engine execution environment to use for this version. Defaults to `1`. - * @property {string} servingStatus 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`. - * @property {string} deployer Email address of the user who created this version. @OutputOnly - * @property {string} creationTime Time that this version was created. @OutputOnly - * @property {appengine(v1beta4).UrlMap[]} handlers 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. - * @property {appengine(v1beta4).ErrorHandler[]} errorHandlers Custom static error pages. Limited to 10KB per page. Only returned in `GET` requests if `view=FULL` is set. - * @property {appengine(v1beta4).Library[]} libraries Configuration for third-party Python runtime libraries required by the application. Only returned in `GET` requests if `view=FULL` is set. - * @property {appengine(v1beta4).ApiConfigHandler} apiConfig Serving configuration for [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). Only returned in `GET` requests if `view=FULL` is set. - * @property {object} envVariables Environment variables made available to the application. Only returned in `GET` requests if `view=FULL` is set. - * @property {string} defaultExpiration 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. - * @property {appengine(v1beta4).HealthCheck} healthCheck 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. - * @property {string} nobuildFilesRegex 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. - * @property {appengine(v1beta4).Deployment} deployment Code and application artifacts that make up this version. Only returned in `GET` requests if `view=FULL` is set. + * @property {string} env App Engine execution environment to use for this version.Defaults to 1. + * @property {string} servingStatus 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. + * @property {string} deployer Email address of the user who created this version.@OutputOnly + * @property {string} creationTime Time that this version was created.@OutputOnly + * @property {appengine(v1beta4).UrlMap[]} handlers 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. + * @property {appengine(v1beta4).ErrorHandler[]} errorHandlers Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set. + * @property {appengine(v1beta4).Library[]} libraries Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set. + * @property {appengine(v1beta4).ApiConfigHandler} apiConfig Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set. + * @property {object} envVariables Environment variables made available to the application.Only returned in GET requests if view=FULL is set. + * @property {string} defaultExpiration 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. + * @property {appengine(v1beta4).HealthCheck} healthCheck 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. + * @property {string} nobuildFilesRegex 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. + * @property {appengine(v1beta4).Deployment} deployment Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set. */ /** * @typedef AutomaticScaling * @memberOf! appengine(v1beta4) * @type object - * @property {string} coolDownPeriod 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. + * @property {string} coolDownPeriod 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. * @property {appengine(v1beta4).CpuUtilization} cpuUtilization Target scaling by CPU usage. - * @property {integer} maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance. Defaults to a runtime-specific value. + * @property {integer} maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value. * @property {integer} maxIdleInstances Maximum number of idle instances that should be maintained for this version. * @property {integer} maxTotalInstances Maximum number of instances that should be started to handle requests. * @property {string} maxPendingLatency Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. @@ -945,7 +945,7 @@ function Appengine(options) { // eslint-disable-line * @typedef ManualScaling * @memberOf! appengine(v1beta4) * @type object - * @property {integer} instances Number of instances to assign to the module 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. + * @property {integer} instances Number of instances to assign to the module 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. */ /** * @typedef Network @@ -953,7 +953,7 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string[]} forwardedPorts List of ports, or port pairs, to forward from the virtual machine to the application container. * @property {string} instanceTag Tag to apply to the VM instance during creation. - * @property {string} name Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path. Defaults to `default`. + * @property {string} name Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default. */ /** * @typedef Resources @@ -970,7 +970,7 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string} name Unique name for the volume. * @property {string} volumeType Underlying volume type, e.g. 'tmpfs'. - * @property {number} sizeGb Volume size in GB. + * @property {number} sizeGb Volume size in gigabytes. */ /** * @typedef UrlMap @@ -978,13 +978,13 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string} urlRegex A 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. * @property {appengine(v1beta4).StaticFilesHandler} staticFiles Returns the contents of a file, such as an image, as the response. - * @property {appengine(v1beta4).StaticDirectoryHandler} staticDirectory Serves the entire contents of a directory as static files. This attribute is deprecated. You can mimic the behavior of static directories using static files. + * @property {appengine(v1beta4).StaticDirectoryHandler} staticDirectory Serves the entire contents of a directory as static files.This attribute is deprecated. You can mimic the behavior of static directories using static files. * @property {appengine(v1beta4).ScriptHandler} script Executes a script to handle the request that matches this URL pattern. * @property {appengine(v1beta4).ApiEndpointHandler} apiEndpoint Uses API Endpoints to handle requests. * @property {string} securityLevel Security (HTTPS) enforcement for this URL. * @property {string} login Level of login required to access this resource. - * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to `redirect`. - * @property {string} redirectHttpResponseCode `30x` code to use when performing redirects for the `secure` field. Defaults to `302`. + * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to redirect. + * @property {string} redirectHttpResponseCode 30x code to use when performing redirects for the secure field. Defaults to 302. */ /** * @typedef StaticFilesHandler @@ -1002,7 +1002,7 @@ function Appengine(options) { // eslint-disable-line * @typedef StaticDirectoryHandler * @memberOf! appengine(v1beta4) * @type object - * @property {string} directory Path to the directory containing the static files from the application root directory. Everything after the end of the matched URL pattern is appended to `static_dir` to form the full path to the requested file. + * @property {string} directory Path to the directory containing the static files from the application root directory. Everything after the end of the matched URL pattern is appended to static_dir to form the full path to the requested file. * @property {object} httpHeaders HTTP headers to use for all responses from these URLs. * @property {string} mimeType MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are direved from each file's filename extension. * @property {string} expiration Time a static file served by this handler should be cached. @@ -1027,7 +1027,7 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string} errorCode Error condition this handler applies to. * @property {string} staticFile Static file content to be served for this error. - * @property {string} mimeType MIME type of file. Defaults to `text/html`. + * @property {string} mimeType MIME type of file. Defaults to text/html. */ /** * @typedef Library @@ -1040,8 +1040,8 @@ function Appengine(options) { // eslint-disable-line * @typedef ApiConfigHandler * @memberOf! appengine(v1beta4) * @type object - * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to `redirect`. - * @property {string} login Level of login required to access this resource. Defaults to `optional`. + * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to redirect. + * @property {string} login Level of login required to access this resource. Defaults to optional. * @property {string} script Path to the script from the application root directory. * @property {string} securityLevel Security (HTTPS) enforcement for this URL. * @property {string} url URL to serve the endpoint at. @@ -1070,9 +1070,9 @@ function Appengine(options) { // eslint-disable-line * @typedef FileInfo * @memberOf! appengine(v1beta4) * @type object - * @property {string} sourceUrl 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/\/\'. + * @property {string} sourceUrl 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//'. * @property {string} sha1Sum The SHA1 hash of the file, in hex. - * @property {string} mimeType The MIME type of the file. Defaults to the value from Google Cloud Storage. + * @property {string} mimeType The MIME type of the file.Defaults to the value from Google Cloud Storage. */ /** * @typedef ContainerInfo @@ -1098,8 +1098,8 @@ function Appengine(options) { // eslint-disable-line * @typedef Module * @memberOf! appengine(v1beta4) * @type object - * @property {string} name Full path to the Module resource in the API. Example: `apps/myapp/modules/default`. @OutputOnly - * @property {string} id Relative name of the module within the application. Example: `default`. @OutputOnly + * @property {string} name Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly + * @property {string} id Relative name of the module within the application. Example: default.@OutputOnly * @property {appengine(v1beta4).TrafficSplit} split Mapping that defines fractional HTTP traffic diversion to different versions within the module. */ /** @@ -1120,22 +1120,22 @@ function Appengine(options) { // eslint-disable-line * @typedef Instance * @memberOf! appengine(v1beta4) * @type object - * @property {string} name Full path to the Instance resource in the API. Example: `apps/myapp/modules/default/versions/v1/instances/instance-1`. @OutputOnly - * @property {string} id Relative name of the instance within the version. Example: `instance-1`. @OutputOnly - * @property {string} appEngineRelease App Engine release this instance is running on. @OutputOnly - * @property {string} availability Availability of the instance. @OutputOnly - * @property {string} vmName Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmZoneName Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmId Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} startTimestamp Time that this instance was started. @OutputOnly - * @property {integer} requests Number of requests since this instance was started. @OutputOnly - * @property {integer} errors Number of errors since this instance was started. @OutputOnly - * @property {number} qps Average queries per second (QPS) over the last minute. @OutputOnly - * @property {integer} averageLatency Average latency (ms) over the last minute. @OutputOnly - * @property {string} memoryUsage Total memory in use (bytes). @OutputOnly - * @property {string} vmStatus Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {boolean} vmUnlocked Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmIp The IP address of this instance. Only applicable for instances in App Engine flexible environment. @OutputOnly + * @property {string} name Full path to the Instance resource in the API. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.@OutputOnly + * @property {string} id Relative name of the instance within the version. Example: instance-1.@OutputOnly + * @property {string} appEngineRelease App Engine release this instance is running on.@OutputOnly + * @property {string} availability Availability of the instance.@OutputOnly + * @property {string} vmName Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmZoneName Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmId Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} startTimestamp Time that this instance was started.@OutputOnly + * @property {integer} requests Number of requests since this instance was started.@OutputOnly + * @property {integer} errors Number of errors since this instance was started.@OutputOnly + * @property {number} qps Average queries per second (QPS) over the last minute.@OutputOnly + * @property {integer} averageLatency Average latency (ms) over the last minute.@OutputOnly + * @property {string} memoryUsage Total memory in use (bytes).@OutputOnly + * @property {string} vmStatus Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {boolean} vmUnlocked Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmIp The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly */ /** * @typedef ListInstancesResponse @@ -1148,7 +1148,7 @@ function Appengine(options) { // eslint-disable-line * @typedef DebugInstanceRequest * @memberOf! appengine(v1beta4) * @type object - * @property {string} sshKey Public SSH key to add to the instance. Example: `[USERNAME]:ssh-rsa KEY_VALUE` or `[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) + * @property {string} sshKey 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). */ /** * @typedef ListLocationsResponse @@ -1161,8 +1161,8 @@ function Appengine(options) { // eslint-disable-line * @typedef Location * @memberOf! appengine(v1beta4) * @type object - * @property {string} name Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` - * @property {string} locationId The canonical id for this location. For example: `"us-east1"`. + * @property {string} name Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" + * @property {string} locationId The canonical id for this location. For example: "us-east1". * @property {object} labels Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} * @property {object} metadata Service-specific metadata. For example the available capacity at the given location. */ @@ -1170,48 +1170,50 @@ function Appengine(options) { // eslint-disable-line * @typedef OperationMetadataExperimental * @memberOf! appengine(v1beta4) * @type object - * @property {string} method API method that initiated this operation. Example: `google.appengine.experimental.CustomDomains.CreateCustomDomain`. @OutputOnly - * @property {string} insertTime Time that this operation was created. @OutputOnly - * @property {string} endTime Time that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/customDomains/example.com`. @OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly + * @property {string} insertTime Time that this operation was created.@OutputOnly + * @property {string} endTime Time that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly */ /** * @typedef OperationMetadata * @memberOf! appengine(v1beta4) * @type object - * @property {string} operationType Type of this operation. Deprecated, use method field instead. Example: "create_version". @OutputOnly - * @property {string} insertTime Timestamp that this operation was created. @OutputOnly - * @property {string} endTime Timestamp that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/modules/default`. @OutputOnly - * @property {string} method API method that initiated this operation. Example: `google.appengine.v1beta4.Version.CreateVersion`. @OutputOnly + * @property {string} operationType Type of this operation. Deprecated, use method field instead. Example: "create_version".@OutputOnly + * @property {string} insertTime Timestamp that this operation was created.@OutputOnly + * @property {string} endTime Timestamp that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly */ /** * @typedef OperationMetadataV1Beta5 * @memberOf! appengine(v1beta4) * @type object - * @property {string} method API method name that initiated this operation. Example: `google.appengine.v1beta5.Version.CreateVersion`. @OutputOnly - * @property {string} insertTime Timestamp that this operation was created. @OutputOnly - * @property {string} endTime Timestamp that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/services/default`. @OutputOnly + * @property {string} method API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly + * @property {string} insertTime Timestamp that this operation was created.@OutputOnly + * @property {string} endTime Timestamp that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly */ /** * @typedef OperationMetadataV1 * @memberOf! appengine(v1beta4) * @type object - * @property {string} method API method that initiated this operation. Example: `google.appengine.v1.Versions.CreateVersion`. @OutputOnly - * @property {string} insertTime Time that this operation was created. @OutputOnly - * @property {string} endTime Time that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/services/default`. @OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly + * @property {string} insertTime Time that this operation was created.@OutputOnly + * @property {string} endTime Time that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly + * @property {string} ephemeralMessage Ephemeral message that may change every time the operation is polled. @OutputOnly + * @property {string[]} warning Durable messages that persist on every operation poll. @OutputOnly */ /** * @typedef LocationMetadata * @memberOf! appengine(v1beta4) * @type object - * @property {boolean} standardEnvironmentAvailable App Engine Standard Environment is available in the given location. @OutputOnly - * @property {boolean} flexibleEnvironmentAvailable App Engine Flexible Environment is available in the given location. @OutputOnly + * @property {boolean} standardEnvironmentAvailable App Engine Standard Environment is available in the given location.@OutputOnly + * @property {boolean} flexibleEnvironmentAvailable App Engine Flexible Environment is available in the given location.@OutputOnly */ module.exports = Appengine; diff --git a/apis/appengine/v1beta5.js b/apis/appengine/v1beta5.js index 668452845c..13a6c90469 100644 --- a/apis/appengine/v1beta5.js +++ b/apis/appengine/v1beta5.js @@ -45,7 +45,7 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.create * - * @desc Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the [Google Cloud Resource Manager create project topic](https://cloud.google.com/resource-manager/docs/creating-project). + * @desc Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). * * @alias appengine.apps.create * @memberOf! appengine(v1beta5) @@ -86,8 +86,8 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the application to get. Example: `apps/myapp`. - * @param {boolean=} params.ensureResourcesExist Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the `GET` operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API. + * @param {string} params.appsId Part of `name`. Name of the application to get. Example: apps/myapp. + * @param {boolean=} params.ensureResourcesExist Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -116,13 +116,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.patch * - * @desc Updates the specified Application resource. You can update the following fields: * [`auth_domain`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain) * [`default_cookie_expiration`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration) + * @desc Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration) * * @alias appengine.apps.patch * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the Application resource to update. Example: `apps/myapp`. + * @param {string} params.appsId Part of `name`. Name of the Application resource to update. Example: apps/myapp. * @param {string=} params.mask Standard field mask for the set of fields to be updated. * @param {appengine(v1beta5).Application} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -155,7 +155,7 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.operations.list * - * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/x/operations. * * @alias appengine.apps.operations.list * @memberOf! appengine(v1beta5) @@ -238,7 +238,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -274,7 +274,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -310,7 +310,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp. * @param {integer=} params.pageSize Maximum results to return per page. * @param {string=} params.pageToken Continuation token for fetching the next page of results. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -347,10 +347,10 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string=} params.mask Standard field mask for the set of fields to be updated. - * @param {boolean=} params.migrateTraffic Set to `true` to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/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). + * @param {boolean=} params.migrateTraffic Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/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). * @param {appengine(v1beta5).Service} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -425,7 +425,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -456,16 +456,16 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.services.versions.get * - * @desc Gets the specified Version resource. By default, only a `BASIC_VIEW` will be returned. Specify the `FULL_VIEW` parameter to get the full resource. + * @desc Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource. * * @alias appengine.apps.services.versions.get * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. - * @param {string=} params.view Controls the set of fields returned in the `Get` response. + * @param {string=} params.view Controls the set of fields returned in the Get response. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -500,9 +500,9 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. - * @param {string=} params.view Controls the set of fields returned in the `List` response. + * @param {string=} params.view Controls the set of fields returned in the List response. * @param {integer=} params.pageSize Maximum results to return per page. * @param {string=} params.pageToken Continuation token for fetching the next page of results. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -533,13 +533,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.services.versions.patch * - * @desc 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/v1beta5/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/v1beta5/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/v1beta5/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/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + * @desc 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/v1beta5/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/v1beta5/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/v1beta5/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/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. * * @alias appengine.apps.services.versions.patch * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default/versions/1`. + * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string=} params.mask Standard field mask for the set of fields to be updated. @@ -618,7 +618,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -656,7 +656,7 @@ function Appengine(options) { // eslint-disable-line * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {integer=} params.pageSize Maximum results to return per page. @@ -689,13 +689,13 @@ function Appengine(options) { // eslint-disable-line /** * appengine.apps.services.versions.instances.debug * - * @desc 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. + * @desc 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. * * @alias appengine.apps.services.versions.instances.debug * @memberOf! appengine(v1beta5) * * @param {object} params Parameters for request - * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. + * @param {string} params.appsId Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1. * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string} params.versionsId Part of `name`. See documentation of `appsId`. * @param {string} params.instancesId Part of `name`. See documentation of `appsId`. @@ -818,11 +818,11 @@ function Appengine(options) { // eslint-disable-line * @typedef Operation * @memberOf! appengine(v1beta5) * @type object - * @property {string} name 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`. + * @property {string} name 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. * @property {object} metadata 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. - * @property {boolean} done 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. + * @property {boolean} done 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. * @property {appengine(v1beta5).Status} error The error result of the operation in case of failure or cancellation. - * @property {object} response 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`. + * @property {object} response 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. */ /** * @typedef Status @@ -836,63 +836,64 @@ function Appengine(options) { // eslint-disable-line * @typedef Application * @memberOf! appengine(v1beta5) * @type object - * @property {string} name Full path to the Application resource in the API. Example: `apps/myapp`. @OutputOnly - * @property {string} id 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`. - * @property {appengine(v1beta5).UrlDispatchRule[]} dispatchRules HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. @OutputOnly - * @property {string} authDomain Google Apps authentication domain that controls which users can access this application. Defaults to open access for any Google Account. - * @property {string} location 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 US `europe-west` - Western Europe `us-east1` - Eastern US - * @property {string} codeBucket A 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 - * @property {string} defaultCookieExpiration Cookie expiration policy for this application. @OutputOnly - * @property {string} defaultHostname Hostname used to reach the application, as resolved by App Engine. @OutputOnly - * @property {string} defaultBucket A Google Cloud Storage bucket that can be used by the application to store content. @OutputOnly + * @property {string} name Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly + * @property {string} id 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. + * @property {appengine(v1beta5).UrlDispatchRule[]} dispatchRules HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly + * @property {string} authDomain Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. + * @property {string} location 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 + * @property {string} codeBucket A 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 + * @property {string} defaultCookieExpiration Cookie expiration policy for this application. + * @property {string} defaultHostname Hostname used to reach the application, as resolved by App Engine.@OutputOnly + * @property {string} defaultBucket A Google Cloud Storage bucket that can be used by the application to store content.@OutputOnly */ /** * @typedef UrlDispatchRule * @memberOf! appengine(v1beta5) * @type object - * @property {string} domain Domain name to match against. The wildcard "`*`" is supported if specified before a period: "`*.`". Defaults to matching all domains: "`*`". - * @property {string} path 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. - * @property {string} service Resource id of a service in this application that should serve the matched request. The service must already exist. Example: `default`. + * @property {string} domain Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". + * @property {string} path 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. + * @property {string} service Resource id of a service in this application that should serve the matched request. The service must already exist. Example: default. */ /** * @typedef Version * @memberOf! appengine(v1beta5) * @type object - * @property {string} name Full path to the Version resource in the API. Example: `apps/myapp/services/default/versions/v1`. @OutputOnly - * @property {string} id Relative name of the version within the module. Example: `v1`. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-". + * @property {string} name Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly + * @property {string} id Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-". * @property {appengine(v1beta5).AutomaticScaling} automaticScaling Automatic scaling is based on request rate, response latencies, and other application metrics. * @property {appengine(v1beta5).BasicScaling} basicScaling 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. * @property {appengine(v1beta5).ManualScaling} manualScaling A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. * @property {string[]} inboundServices Before an application can receive email or XMPP messages, the application must be configured to enable the service. - * @property {string} instanceClass 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_1G` Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or BasicScaling. + * @property {string} instanceClass 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. * @property {appengine(v1beta5).Network} network Extra network settings. Only applicable for VM runtimes. * @property {appengine(v1beta5).Resources} resources Machine resources for this version. Only applicable for VM runtimes. - * @property {string} runtime Desired runtime. Example: `python27`. + * @property {string} runtime Desired runtime. Example: python27. * @property {boolean} threadsafe Whether multiple requests can be dispatched to this version at once. * @property {boolean} vm Whether to deploy this version in a container on a virtual machine. * @property {object} betaSettings Metadata settings that are supplied to this version to enable beta runtime features. - * @property {string} env App Engine execution environment to use for this version. Defaults to `1`. - * @property {string} servingStatus 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`. - * @property {string} deployer Email address of the user who created this version. @OutputOnly - * @property {string} creationTime Time that this version was created. @OutputOnly - * @property {string} diskUsageBytes Total size of version files hosted on App Engine disk in bytes. @OutputOnly - * @property {appengine(v1beta5).UrlMap[]} handlers 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. - * @property {appengine(v1beta5).ErrorHandler[]} errorHandlers Custom static error pages. Limited to 10KB per page. Only returned in `GET` requests if `view=FULL` is set. - * @property {appengine(v1beta5).Library[]} libraries Configuration for third-party Python runtime libraries required by the application. Only returned in `GET` requests if `view=FULL` is set. - * @property {appengine(v1beta5).ApiConfigHandler} apiConfig Serving configuration for [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/). Only returned in `GET` requests if `view=FULL` is set. - * @property {object} envVariables Environment variables made available to the application. Only returned in `GET` requests if `view=FULL` is set. - * @property {string} defaultExpiration 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. - * @property {appengine(v1beta5).HealthCheck} healthCheck Configures health checking for VM instances. Unhealthy instances are be stopped and replaced with new instances. Only applicable for VM runtimes. Only returned in `GET` requests if `view=FULL` is set. - * @property {string} nobuildFilesRegex 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. - * @property {appengine(v1beta5).Deployment} deployment Code and application artifacts that make up this version. Only returned in `GET` requests if `view=FULL` is set. + * @property {string} env App Engine execution environment to use for this version.Defaults to 1. + * @property {string} servingStatus 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. + * @property {string} deployer Email address of the user who created this version.@OutputOnly + * @property {string} creationTime Time that this version was created.@OutputOnly + * @property {string} diskUsageBytes Total size of version files hosted on App Engine disk in bytes.@OutputOnly + * @property {appengine(v1beta5).UrlMap[]} handlers 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. + * @property {appengine(v1beta5).ErrorHandler[]} errorHandlers Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set. + * @property {appengine(v1beta5).Library[]} libraries Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set. + * @property {appengine(v1beta5).ApiConfigHandler} apiConfig Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set. + * @property {object} envVariables Environment variables made available to the application.Only returned in GET requests if view=FULL is set. + * @property {string} defaultExpiration 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. + * @property {appengine(v1beta5).HealthCheck} healthCheck Configures health checking for VM instances. Unhealthy instances are be stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set. + * @property {string} nobuildFilesRegex 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. + * @property {appengine(v1beta5).Deployment} deployment Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set. + * @property {appengine(v1beta5).EndpointsApiService} endpointsApiService 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. */ /** * @typedef AutomaticScaling * @memberOf! appengine(v1beta5) * @type object - * @property {string} coolDownPeriod 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. + * @property {string} coolDownPeriod 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. * @property {appengine(v1beta5).CpuUtilization} cpuUtilization Target scaling by CPU usage. - * @property {integer} maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance. Defaults to a runtime-specific value. + * @property {integer} maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value. * @property {integer} maxIdleInstances Maximum number of idle instances that should be maintained for this version. * @property {integer} maxTotalInstances Maximum number of instances that should be started to handle requests. * @property {string} maxPendingLatency Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. @@ -946,7 +947,7 @@ function Appengine(options) { // eslint-disable-line * @typedef ManualScaling * @memberOf! appengine(v1beta5) * @type object - * @property {integer} instances 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. + * @property {integer} instances 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. */ /** * @typedef Network @@ -954,7 +955,8 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string[]} forwardedPorts List of ports, or port pairs, to forward from the virtual machine to the application container. * @property {string} instanceTag Tag to apply to the VM instance during creation. - * @property {string} name Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path. Defaults to `default`. + * @property {string} name Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default. + * @property {string} subnetworkName 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 Flex app. */ /** * @typedef Resources @@ -971,7 +973,7 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string} name Unique name for the volume. * @property {string} volumeType Underlying volume type, e.g. 'tmpfs'. - * @property {number} sizeGb Volume size in GB. + * @property {number} sizeGb Volume size in gigabytes. */ /** * @typedef UrlMap @@ -983,8 +985,8 @@ function Appengine(options) { // eslint-disable-line * @property {appengine(v1beta5).ApiEndpointHandler} apiEndpoint Uses API Endpoints to handle requests. * @property {string} securityLevel Security (HTTPS) enforcement for this URL. * @property {string} login Level of login required to access this resource. - * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to `redirect`. - * @property {string} redirectHttpResponseCode `30x` code to use when performing redirects for the `secure` field. Defaults to `302`. + * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to redirect. + * @property {string} redirectHttpResponseCode 30x code to use when performing redirects for the secure field. Defaults to 302. */ /** * @typedef StaticFilesHandler @@ -1016,7 +1018,7 @@ function Appengine(options) { // eslint-disable-line * @type object * @property {string} errorCode Error condition this handler applies to. * @property {string} staticFile Static file content to be served for this error. - * @property {string} mimeType MIME type of file. Defaults to `text/html`. + * @property {string} mimeType MIME type of file. Defaults to text/html. */ /** * @typedef Library @@ -1029,8 +1031,8 @@ function Appengine(options) { // eslint-disable-line * @typedef ApiConfigHandler * @memberOf! appengine(v1beta5) * @type object - * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to `redirect`. - * @property {string} login Level of login required to access this resource. Defaults to `optional`. + * @property {string} authFailAction Action to take when users access resources that require authentication. Defaults to redirect. + * @property {string} login Level of login required to access this resource. Defaults to optional. * @property {string} script Path to the script from the application root directory. * @property {string} securityLevel Security (HTTPS) enforcement for this URL. * @property {string} url URL to serve the endpoint at. @@ -1059,9 +1061,9 @@ function Appengine(options) { // eslint-disable-line * @typedef FileInfo * @memberOf! appengine(v1beta5) * @type object - * @property {string} sourceUrl 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/\/\'. + * @property {string} sourceUrl 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//'. * @property {string} sha1Sum The SHA1 hash of the file, in hex. - * @property {string} mimeType The MIME type of the file. Defaults to the value from Google Cloud Storage. + * @property {string} mimeType The MIME type of the file.Defaults to the value from Google Cloud Storage. */ /** * @typedef ContainerInfo @@ -1076,6 +1078,13 @@ function Appengine(options) { // eslint-disable-line * @property {string} repository URI string identifying the repository. Example: "https://source.developers.google.com/p/app-123/r/default" * @property {string} revisionId The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): "2198322f89e0bb2e25021667c2ed489d1fd34e6b" */ +/** + * @typedef EndpointsApiService + * @memberOf! appengine(v1beta5) + * @type object + * @property {string} name Endpoints service name which is the name of the "service" resource in the Service Management API. For example "myapi.endpoints.myproject.cloud.goog" + * @property {string} configId Endpoints service configuration id as specified by the Service Management API. For example "2016-09-19r1" + */ /** * @typedef ListVersionsResponse * @memberOf! appengine(v1beta5) @@ -1087,8 +1096,8 @@ function Appengine(options) { // eslint-disable-line * @typedef Service * @memberOf! appengine(v1beta5) * @type object - * @property {string} name Full path to the Service resource in the API. Example: `apps/myapp/services/default`. @OutputOnly - * @property {string} id Relative name of the service within the application. Example: `default`. @OutputOnly + * @property {string} name Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly + * @property {string} id Relative name of the service within the application. Example: default.@OutputOnly * @property {appengine(v1beta5).TrafficSplit} split Mapping that defines fractional HTTP traffic diversion to different versions within the service. */ /** @@ -1109,22 +1118,22 @@ function Appengine(options) { // eslint-disable-line * @typedef Instance * @memberOf! appengine(v1beta5) * @type object - * @property {string} name Full path to the Instance resource in the API. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. @OutputOnly - * @property {string} id Relative name of the instance within the version. Example: `instance-1`. @OutputOnly - * @property {string} appEngineRelease App Engine release this instance is running on. @OutputOnly - * @property {string} availability Availability of the instance. @OutputOnly - * @property {string} vmName Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmZoneName Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmId Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} startTimestamp Time that this instance was started. @OutputOnly - * @property {integer} requests Number of requests since this instance was started. @OutputOnly - * @property {integer} errors Number of errors since this instance was started. @OutputOnly - * @property {number} qps Average queries per second (QPS) over the last minute. @OutputOnly - * @property {integer} averageLatency Average latency (ms) over the last minute. @OutputOnly - * @property {string} memoryUsage Total memory in use (bytes). @OutputOnly - * @property {string} vmStatus Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {boolean} vmUnlocked Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment. @OutputOnly - * @property {string} vmIp The IP address of this instance. Only applicable for instances in App Engine flexible environment. @OutputOnly + * @property {string} name Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly + * @property {string} id Relative name of the instance within the version. Example: instance-1.@OutputOnly + * @property {string} appEngineRelease App Engine release this instance is running on.@OutputOnly + * @property {string} availability Availability of the instance.@OutputOnly + * @property {string} vmName Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmZoneName Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmId Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} startTimestamp Time that this instance was started.@OutputOnly + * @property {integer} requests Number of requests since this instance was started.@OutputOnly + * @property {integer} errors Number of errors since this instance was started.@OutputOnly + * @property {number} qps Average queries per second (QPS) over the last minute.@OutputOnly + * @property {integer} averageLatency Average latency (ms) over the last minute.@OutputOnly + * @property {string} memoryUsage Total memory in use (bytes).@OutputOnly + * @property {string} vmStatus Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {boolean} vmUnlocked Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly + * @property {string} vmIp The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly */ /** * @typedef ListInstancesResponse @@ -1137,7 +1146,7 @@ function Appengine(options) { // eslint-disable-line * @typedef DebugInstanceRequest * @memberOf! appengine(v1beta5) * @type object - * @property {string} sshKey Public SSH key to add to the instance. Example: `[USERNAME]:ssh-rsa KEY_VALUE` or `[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) + * @property {string} sshKey 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). */ /** * @typedef ListLocationsResponse @@ -1150,8 +1159,8 @@ function Appengine(options) { // eslint-disable-line * @typedef Location * @memberOf! appengine(v1beta5) * @type object - * @property {string} name Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` - * @property {string} locationId The canonical id for this location. For example: `"us-east1"`. + * @property {string} name Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" + * @property {string} locationId The canonical id for this location. For example: "us-east1". * @property {object} labels Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} * @property {object} metadata Service-specific metadata. For example the available capacity at the given location. */ @@ -1159,48 +1168,50 @@ function Appengine(options) { // eslint-disable-line * @typedef OperationMetadataExperimental * @memberOf! appengine(v1beta5) * @type object - * @property {string} method API method that initiated this operation. Example: `google.appengine.experimental.CustomDomains.CreateCustomDomain`. @OutputOnly - * @property {string} insertTime Time that this operation was created. @OutputOnly - * @property {string} endTime Time that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/customDomains/example.com`. @OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly + * @property {string} insertTime Time that this operation was created.@OutputOnly + * @property {string} endTime Time that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly */ /** * @typedef OperationMetadata * @memberOf! appengine(v1beta5) * @type object - * @property {string} operationType Type of this operation. Deprecated, use method field instead. Example: "create_version". @OutputOnly - * @property {string} insertTime Timestamp that this operation was created. @OutputOnly - * @property {string} endTime Timestamp that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/modules/default`. @OutputOnly - * @property {string} method API method that initiated this operation. Example: `google.appengine.v1beta4.Version.CreateVersion`. @OutputOnly + * @property {string} operationType Type of this operation. Deprecated, use method field instead. Example: "create_version".@OutputOnly + * @property {string} insertTime Timestamp that this operation was created.@OutputOnly + * @property {string} endTime Timestamp that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly */ /** * @typedef OperationMetadataV1Beta5 * @memberOf! appengine(v1beta5) * @type object - * @property {string} method API method name that initiated this operation. Example: `google.appengine.v1beta5.Version.CreateVersion`. @OutputOnly - * @property {string} insertTime Timestamp that this operation was created. @OutputOnly - * @property {string} endTime Timestamp that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/services/default`. @OutputOnly + * @property {string} method API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly + * @property {string} insertTime Timestamp that this operation was created.@OutputOnly + * @property {string} endTime Timestamp that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly */ /** * @typedef OperationMetadataV1 * @memberOf! appengine(v1beta5) * @type object - * @property {string} method API method that initiated this operation. Example: `google.appengine.v1.Versions.CreateVersion`. @OutputOnly - * @property {string} insertTime Time that this operation was created. @OutputOnly - * @property {string} endTime Time that this operation completed. @OutputOnly - * @property {string} user User who requested this operation. @OutputOnly - * @property {string} target Name of the resource that this operation is acting on. Example: `apps/myapp/services/default`. @OutputOnly + * @property {string} method API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly + * @property {string} insertTime Time that this operation was created.@OutputOnly + * @property {string} endTime Time that this operation completed.@OutputOnly + * @property {string} user User who requested this operation.@OutputOnly + * @property {string} target Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly + * @property {string} ephemeralMessage Ephemeral message that may change every time the operation is polled. @OutputOnly + * @property {string[]} warning Durable messages that persist on every operation poll. @OutputOnly */ /** * @typedef LocationMetadata * @memberOf! appengine(v1beta5) * @type object - * @property {boolean} standardEnvironmentAvailable App Engine Standard Environment is available in the given location. @OutputOnly - * @property {boolean} flexibleEnvironmentAvailable App Engine Flexible Environment is available in the given location. @OutputOnly + * @property {boolean} standardEnvironmentAvailable App Engine Standard Environment is available in the given location.@OutputOnly + * @property {boolean} flexibleEnvironmentAvailable App Engine Flexible Environment is available in the given location.@OutputOnly */ module.exports = Appengine; diff --git a/apis/bigquery/v2.js b/apis/bigquery/v2.js index 4bced38e19..bbd86849ad 100644 --- a/apis/bigquery/v2.js +++ b/apis/bigquery/v2.js @@ -2088,6 +2088,7 @@ function Bigquery(options) { // eslint-disable-line * @property {string} fieldDelimiter [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 (','). * @property {boolean} ignoreUnknownValues [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 * @property {integer} maxBadRecords [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. + * @property {string} nullMarker [Optional] This string will be interpreted as a null value when it appears in a CSV file. The default value is the empty string. Please refer to the documentation for further information. * @property {string[]} projectionFields [Experimental] 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. * @property {string} quote [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. * @property {bigquery(v2).TableSchema} schema [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. @@ -2170,6 +2171,7 @@ function Bigquery(options) { // eslint-disable-line * @property {bigquery(v2).ExplainQueryStage[]} queryPlan [Output-only, Experimental] Describes execution plan for the query. * @property {bigquery(v2).TableReference[]} referencedTables [Output-only, Experimental] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list. * @property {bigquery(v2).TableSchema} schema [Output-only, Experimental] The schema of the results. Present only for successful dry run of non-legacy SQL queries. + * @property {string} statementType [Output-only, Experimental] The type of query statement, if valid. * @property {string} totalBytesBilled [Output-only] Total bytes billed for the job. * @property {string} totalBytesProcessed [Output-only] Total bytes processed for the job. * @property {bigquery(v2).QueryParameter[]} undeclaredQueryParameters [Output-only, Experimental] Standard SQL only: list of undeclared query parameters detected during a dry run validation. @@ -2299,6 +2301,7 @@ function Bigquery(options) { // eslint-disable-line * @property {string} friendlyName [Optional] A descriptive name for this table. * @property {string} id [Output-only] An opaque ID uniquely identifying the table. * @property {string} kind [Output-only] The type of the resource. + * @property {object} labels [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 letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and must be unique within a dataset. Both keys and values are additionally constrained to be <= 128 bytes in size. * @property {string} lastModifiedTime [Output-only] The time when this table was last modified, in milliseconds since the epoch. * @property {string} location [Output-only] The geographic location where the table resides. This value is inherited from the dataset. * @property {string} numBytes [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. @@ -2353,7 +2356,7 @@ function Bigquery(options) { // eslint-disable-line * @property {bigquery(v2).TableFieldSchema[]} fields [Optional] Describes the nested schema fields if the type property is set to RECORD. * @property {string} mode [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. * @property {string} name [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. - * @property {string} type [Required] The field data type. Possible values include STRING, BYTES, INTEGER, FLOAT, BOOLEAN, TIMESTAMP, DATE, TIME, DATETIME, or RECORD (where RECORD indicates that the field contains a nested schema). + * @property {string} type [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). */ /** * @typedef TableList diff --git a/apis/books/v1.js b/apis/books/v1.js index b732b09e40..4202d30c5c 100644 --- a/apis/books/v1.js +++ b/apis/books/v1.js @@ -2257,7 +2257,7 @@ function Books(options) { // eslint-disable-line * @memberOf! books(v1) * @type object * @property {string} kind Resource type. - * @property {object[]} series Series info list. The client always expects this element in the JSON output, hence declared here as OutputAlways. + * @property {object[]} series */ /** * @typedef Seriesmembership diff --git a/apis/cloudbuild/v1.js b/apis/cloudbuild/v1.js index 391afa9725..5eac2c6c01 100644 --- a/apis/cloudbuild/v1.js +++ b/apis/cloudbuild/v1.js @@ -654,14 +654,14 @@ Default time is ten minutes. * @property {string[]} images 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 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. * @property {string} startTime Time at which execution of the build was started. +@OutputOnly * @property {string} buildTriggerId The ID of the BuildTrigger that triggered this build, if it was triggered automatically. @OutputOnly @@ -730,10 +730,9 @@ an entrypoint, the first element in args will be used as the entrypoint, and the remainder will be used as arguments. * @property {string} name 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. +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 diff --git a/apis/cloudresourcemanager/v1.js b/apis/cloudresourcemanager/v1.js index 6a09948d0f..0f9b290f9c 100644 --- a/apis/cloudresourcemanager/v1.js +++ b/apis/cloudresourcemanager/v1.js @@ -1301,7 +1301,9 @@ Required * @property {cloudresourcemanager(v1).ResourceId} parent An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent -cannot be modified. +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. * @property {object} labels The labels associated with this Project. diff --git a/apis/cloudresourcemanager/v1beta1.js b/apis/cloudresourcemanager/v1beta1.js index 628db30199..ad1a86b391 100644 --- a/apis/cloudresourcemanager/v1beta1.js +++ b/apis/cloudresourcemanager/v1beta1.js @@ -1545,7 +1545,9 @@ used in the type-specific API's. * @property {cloudresourcemanager(v1beta1).ResourceId} parent An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent -cannot be modified. +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. * @property {object} labels The labels associated with this Project. diff --git a/apis/compute/alpha.js b/apis/compute/alpha.js index 68f79f8666..cfe85c5101 100644 --- a/apis/compute/alpha.js +++ b/apis/compute/alpha.js @@ -4799,7 +4799,11 @@ function Compute(options) { // eslint-disable-line * @memberOf! compute(alpha) * * @param {object} params Parameters for request + * @param {string=} params.filter * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {integer=} params.maxResults + * @param {string=} params.order_by + * @param {string=} params.pageToken * @param {string} params.project Project ID for this request. * @param {string} params.zone The name of the zone where the managed instance group is located. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -6904,6 +6908,43 @@ function Compute(options) { // eslint-disable-line self.networks = { + /** + * compute.networks.addPeering + * + * @desc Adds a peering to the specified network. + * + * @alias compute.networks.addPeering + * @memberOf! compute(alpha) + * + * @param {object} params Parameters for request + * @param {string} params.network Name of the network resource to add peering to. + * @param {string} params.project Project ID for this request. + * @param {compute(alpha).NetworksAddPeeringRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + addPeering: function (params, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); + + var parameters = { + options: utils.extend({ + url: 'https://www.googleapis.com/compute/alpha/projects/{project}/global/networks/{network}/addPeering', + method: 'POST' + }, options), + params: params, + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], + context: self + }; + + return createAPIRequest(parameters, callback); + }, + /** * compute.networks.delete * @@ -7051,6 +7092,43 @@ function Compute(options) { // eslint-disable-line return createAPIRequest(parameters, callback); }, + /** + * compute.networks.removePeering + * + * @desc Removes a peering from the specified network. + * + * @alias compute.networks.removePeering + * @memberOf! compute(alpha) + * + * @param {object} params Parameters for request + * @param {string} params.network Name of the network resource to remove peering from. + * @param {string} params.project Project ID for this request. + * @param {compute(alpha).NetworksRemovePeeringRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + removePeering: function (params, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); + + var parameters = { + options: utils.extend({ + url: 'https://www.googleapis.com/compute/alpha/projects/{project}/global/networks/{network}/removePeering', + method: 'POST' + }, options), + params: params, + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], + context: self + }; + + return createAPIRequest(parameters, callback); + }, + /** * compute.networks.switchToCustomMode * @@ -8797,7 +8875,11 @@ function Compute(options) { // eslint-disable-line * @memberOf! compute(alpha) * * @param {object} params Parameters for request + * @param {string=} params.filter * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {integer=} params.maxResults + * @param {string=} params.order_by + * @param {string=} params.pageToken * @param {string} params.project Project ID for this request. * @param {string} params.region Name of the region scoping this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -13741,8 +13823,16 @@ Instance templates do not store customer-supplied encryption keys, so you cannot * @typedef AuditConfig * @memberOf! compute(alpha) * @type object + * @property {compute(alpha).AuditLogConfig[]} auditLogConfigs The configuration for each type of logging * @property {string[]} exemptedMembers Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members. - * @property {string} service 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. + * @property {string} service Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services. + */ +/** + * @typedef AuditLogConfig + * @memberOf! compute(alpha) + * @type object + * @property {string[]} exemptedMembers Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members. + * @property {string} logType The log type that this config enables. */ /** * @typedef Autoscaler @@ -13866,6 +13956,7 @@ This cannot be used for internal load balancing. This cannot be used for internal load balancing. * @property {string} description An optional description of this resource. Provide this property when you create the resource. +* @property {boolean} failover This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService. * @property {string} group The fully-qualified URL of a zonal 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. @@ -13928,6 +14019,7 @@ When the load balancing scheme is INTERNAL, this field is not used. * @property {compute(alpha).BackendServiceCdnPolicy} cdnPolicy Cloud CDN configuration for this BackendService. * @property {compute(alpha).ConnectionDraining} connectionDraining * @property {string} creationTimestamp [Output Only] Creation timestamp in RFC3339 text format. +* @property {string[]} customRequestHeaders Headers that the HTTP/S load balancer should add to proxied requests. * @property {string} description An optional description of this resource. Provide this property when you create the resource. * @property {boolean} enableCDN If true, enable Cloud CDN for this BackendService. @@ -14297,7 +14389,10 @@ global/images/family/my-private-family * @type object * @property {object[]} allowed The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. * @property {string} creationTimestamp [Output Only] Creation timestamp in RFC3339 text format. +* @property {object[]} denied The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. * @property {string} description An optional description of this resource. Provide this property when you create the resource. +* @property {string[]} destinationRanges 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. +* @property {string} direction 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. * @property {string} id [Output Only] The unique identifier for the resource. This identifier is defined by the server. * @property {string} kind [Output Ony] Type of the resource. Always compute#firewall for firewall rules. * @property {string} name 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. @@ -14307,6 +14402,7 @@ If you choose to specify this property, you can specify the network as a full or - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default +* @property {integer} priority 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. * @property {string} selfLink [Output Only] Server-defined URL for the resource. * @property {string[]} sourceRanges 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. * @property {string[]} sourceTags If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. 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. @@ -14477,7 +14573,7 @@ This field is not used for internal load balancing. * @property {compute(alpha).SSLHealthCheck} sslHealthCheck * @property {compute(alpha).TCPHealthCheck} tcpHealthCheck * @property {integer} timeoutSec 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. - * @property {string} type Specifies the type of the healthCheck, either TCP, UDP, SSL, HTTP, HTTPS or HTTP2. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. + * @property {string} type 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. * @property {compute(alpha).UDPHealthCheck} udpHealthCheck * @property {integer} unhealthyThreshold A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. */ @@ -14808,6 +14904,7 @@ If you have disabled creation retries, this field will not be populated; instead * @property {integer} recreating [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. * @property {integer} refreshing [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. * @property {integer} restarting [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. +* @property {integer} verifying [Output Only] The number of instances in the managed instance group that are being verified. */ /** * @typedef InstanceGroupManagerAggregatedList @@ -14823,7 +14920,7 @@ If you have disabled creation retries, this field will not be populated; instead * @typedef InstanceGroupManagerAutoHealingPolicy * @memberOf! compute(alpha) * @type object - * @property {string} healthCheck The URL for the HttpHealthCheck or HttpsHealthCheck that signals autohealing. + * @property {string} healthCheck The URL for the health check that signals autohealing. * @property {integer} initialDelaySec The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. * @property {compute(alpha).FixedOrPercent} maxUnavailable Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used. */ @@ -15259,6 +15356,20 @@ If you specify this property, you can specify the network as a full or partial U * @property {string} state [Output Only] State for the peering. * @property {string} stateDetails [Output Only] Details about the current state of the peering. */ +/** + * @typedef NetworksAddPeeringRequest + * @memberOf! compute(alpha) + * @type object + * @property {boolean} autoCreateRoutes Whether Google Compute Engine manages the routes automatically. + * @property {string} name Name of the peering, which should conform to RFC1035. + * @property {string} peerNetwork 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. + */ +/** + * @typedef NetworksRemovePeeringRequest + * @memberOf! compute(alpha) + * @type object + * @property {string} name Name of the peering, which should conform to RFC1035. + */ /** * @typedef Operation * @memberOf! compute(alpha) @@ -15796,7 +15907,7 @@ If you do not provide an encryption key when creating the snapshot, then the sna * @property {string} id [Output Only] The unique identifier for the resource. This identifier is defined by the server. * @property {string} kind [Output Only] Type of the resource. Always compute#sslCertificate for SSL certificates. * @property {string} name 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. - * @property {string} privateKey A write-only private key in PEM format. Only insert RPCs will include this field. + * @property {string} privateKey A write-only private key in PEM format. Only insert requests will include this field. * @property {string} selfLink [Output only] Server-defined URL for the resource. */ /** diff --git a/apis/compute/beta.js b/apis/compute/beta.js index 20e9dee6dc..f0b4a49518 100644 --- a/apis/compute/beta.js +++ b/apis/compute/beta.js @@ -4071,7 +4071,11 @@ function Compute(options) { // eslint-disable-line * @memberOf! compute(beta) * * @param {object} params Parameters for request + * @param {string=} params.filter * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {integer=} params.maxResults + * @param {string=} params.order_by + * @param {string=} params.pageToken * @param {string} params.project Project ID for this request. * @param {string} params.zone The name of the zone where the managed instance group is located. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -7236,7 +7240,11 @@ function Compute(options) { // eslint-disable-line * @memberOf! compute(beta) * * @param {object} params Parameters for request + * @param {string=} params.filter * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {integer=} params.maxResults + * @param {string=} params.order_by + * @param {string=} params.pageToken * @param {string} params.project Project ID for this request. * @param {string} params.region Name of the region scoping this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -11862,8 +11870,16 @@ Instance templates do not store customer-supplied encryption keys, so you cannot * @typedef AuditConfig * @memberOf! compute(beta) * @type object + * @property {compute(beta).AuditLogConfig[]} auditLogConfigs The configuration for each type of logging * @property {string[]} exemptedMembers Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members. - * @property {string} service 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. + * @property {string} service Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services. + */ +/** + * @typedef AuditLogConfig + * @memberOf! compute(beta) + * @type object + * @property {string[]} exemptedMembers Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members. + * @property {string} logType The log type that this config enables. */ /** * @typedef Autoscaler @@ -12476,7 +12492,7 @@ This field is not used for internal load balancing. * @property {compute(beta).SSLHealthCheck} sslHealthCheck * @property {compute(beta).TCPHealthCheck} tcpHealthCheck * @property {integer} timeoutSec 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. - * @property {string} type Specifies the type of the healthCheck, either TCP, UDP, SSL, HTTP, HTTPS or HTTP2. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. + * @property {string} type 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. * @property {compute(beta).UDPHealthCheck} udpHealthCheck * @property {integer} unhealthyThreshold A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. */ @@ -12760,7 +12776,7 @@ If you have disabled creation retries, this field will not be populated; instead * @typedef InstanceGroupManagerAutoHealingPolicy * @memberOf! compute(beta) * @type object - * @property {string} healthCheck The URL for the HttpHealthCheck or HttpsHealthCheck that signals autohealing. + * @property {string} healthCheck The URL for the health check that signals autohealing. * @property {integer} initialDelaySec The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600]. */ /** @@ -13624,7 +13640,7 @@ If you do not provide an encryption key when creating the snapshot, then the sna * @property {string} id [Output Only] The unique identifier for the resource. This identifier is defined by the server. * @property {string} kind [Output Only] Type of the resource. Always compute#sslCertificate for SSL certificates. * @property {string} name 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. - * @property {string} privateKey A write-only private key in PEM format. Only insert RPCs will include this field. + * @property {string} privateKey A write-only private key in PEM format. Only insert requests will include this field. * @property {string} selfLink [Output only] Server-defined URL for the resource. */ /** diff --git a/apis/compute/v1.js b/apis/compute/v1.js index b070dd1228..3a5c277b43 100644 --- a/apis/compute/v1.js +++ b/apis/compute/v1.js @@ -7277,7 +7277,11 @@ function Compute(options) { // eslint-disable-line * @memberOf! compute(v1) * * @param {object} params Parameters for request + * @param {string=} params.filter * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {integer=} params.maxResults + * @param {string=} params.order_by + * @param {string=} params.pageToken * @param {string} params.project Project ID for this request. * @param {string} params.zone The name of the zone where the managed instance group is located. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -12433,7 +12437,11 @@ function Compute(options) { // eslint-disable-line * @memberOf! compute(v1) * * @param {object} params Parameters for request + * @param {string=} params.filter * @param {string} params.instanceGroupManager The name of the managed instance group. + * @param {integer=} params.maxResults + * @param {string=} params.order_by + * @param {string=} params.pageToken * @param {string} params.project Project ID for this request. * @param {string} params.region Name of the region scoping this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -20454,6 +20462,7 @@ When the protocol is UDP, this field is not used. * @typedef CacheInvalidationRule * @memberOf! compute(v1) * @type object + * @property {string} host If set, this invalidation rule will only apply to requests with a Host header matching host. * @property {string} path */ /** @@ -20772,7 +20781,7 @@ This field is not used for internal load balancing. * @property {compute(v1).SSLHealthCheck} sslHealthCheck * @property {compute(v1).TCPHealthCheck} tcpHealthCheck * @property {integer} timeoutSec 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. - * @property {string} type Specifies the type of the healthCheck, either TCP, UDP, SSL, HTTP, HTTPS or HTTP2. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. + * @property {string} type 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. * @property {integer} unhealthyThreshold A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. */ /** @@ -21810,7 +21819,7 @@ If you do not provide an encryption key when creating the snapshot, then the sna * @property {string} id [Output Only] The unique identifier for the resource. This identifier is defined by the server. * @property {string} kind [Output Only] Type of the resource. Always compute#sslCertificate for SSL certificates. * @property {string} name 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. - * @property {string} privateKey A write-only private key in PEM format. Only insert RPCs will include this field. + * @property {string} privateKey A write-only private key in PEM format. Only insert requests will include this field. * @property {string} selfLink [Output only] Server-defined URL for the resource. */ /** diff --git a/apis/content/v2.js b/apis/content/v2.js index cccf2530ef..04532e8008 100644 --- a/apis/content/v2.js +++ b/apis/content/v2.js @@ -115,7 +115,7 @@ function Content(options) { // eslint-disable-line /** * content.accounts.delete * - * @desc Deletes a Merchant Center sub-account. + * @desc Deletes a Merchant Center sub-account. This method can only be called for multi-client accounts. * * @alias content.accounts.delete * @memberOf! content(v2) @@ -152,7 +152,7 @@ function Content(options) { // eslint-disable-line /** * content.accounts.get * - * @desc Retrieves a Merchant Center account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.accounts.get * @memberOf! content(v2) @@ -188,7 +188,7 @@ function Content(options) { // eslint-disable-line /** * content.accounts.insert * - * @desc Creates a Merchant Center sub-account. + * @desc Creates a Merchant Center sub-account. This method can only be called for multi-client accounts. * * @alias content.accounts.insert * @memberOf! content(v2) @@ -225,7 +225,7 @@ function Content(options) { // eslint-disable-line /** * content.accounts.list * - * @desc Lists the sub-accounts in your Merchant Center account. + * @desc Lists the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. * * @alias content.accounts.list * @memberOf! content(v2) @@ -262,7 +262,7 @@ function Content(options) { // eslint-disable-line /** * content.accounts.patch * - * @desc Updates a Merchant Center account. This method supports patch semantics. + * @desc Updates a Merchant Center account. This method can only be called for multi-client accounts. This method supports patch semantics. * * @alias content.accounts.patch * @memberOf! content(v2) @@ -300,7 +300,7 @@ function Content(options) { // eslint-disable-line /** * content.accounts.update * - * @desc Updates a Merchant Center account. + * @desc Updates a Merchant Center account. This method can only be called for multi-client accounts. * * @alias content.accounts.update * @memberOf! content(v2) @@ -378,7 +378,7 @@ function Content(options) { // eslint-disable-line /** * content.accountshipping.get * - * @desc Retrieves the shipping settings of the account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.accountshipping.get * @memberOf! content(v2) @@ -414,7 +414,7 @@ function Content(options) { // eslint-disable-line /** * content.accountshipping.list * - * @desc Lists the shipping settings of the sub-accounts in your Merchant Center account. + * @desc Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. * * @alias content.accountshipping.list * @memberOf! content(v2) @@ -451,7 +451,7 @@ function Content(options) { // eslint-disable-line /** * content.accountshipping.patch * - * @desc Updates the shipping settings of the account. This method supports patch semantics. + * @desc 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 or sub-accounts if the managing account is a multi-client account. This method supports patch semantics. * * @alias content.accountshipping.patch * @memberOf! content(v2) @@ -489,7 +489,7 @@ function Content(options) { // eslint-disable-line /** * content.accountshipping.update * - * @desc Updates the shipping settings of the account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.accountshipping.update * @memberOf! content(v2) @@ -566,7 +566,7 @@ function Content(options) { // eslint-disable-line /** * content.accountstatuses.get * - * @desc Retrieves the status of a Merchant Center account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.accountstatuses.get * @memberOf! content(v2) @@ -602,7 +602,7 @@ function Content(options) { // eslint-disable-line /** * content.accountstatuses.list * - * @desc Lists the statuses of the sub-accounts in your Merchant Center account. + * @desc Lists the statuses of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. * * @alias content.accountstatuses.list * @memberOf! content(v2) @@ -679,7 +679,7 @@ function Content(options) { // eslint-disable-line /** * content.accounttax.get * - * @desc Retrieves the tax settings of the account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.accounttax.get * @memberOf! content(v2) @@ -715,7 +715,7 @@ function Content(options) { // eslint-disable-line /** * content.accounttax.list * - * @desc Lists the tax settings of the sub-accounts in your Merchant Center account. + * @desc Lists the tax settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. * * @alias content.accounttax.list * @memberOf! content(v2) @@ -752,7 +752,7 @@ function Content(options) { // eslint-disable-line /** * content.accounttax.patch * - * @desc Updates the tax settings of the account. This method supports patch semantics. + * @desc 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 or sub-accounts if the managing account is a multi-client account. This method supports patch semantics. * * @alias content.accounttax.patch * @memberOf! content(v2) @@ -790,7 +790,7 @@ function Content(options) { // eslint-disable-line /** * content.accounttax.update * - * @desc Updates the tax settings of the account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.accounttax.update * @memberOf! content(v2) @@ -868,7 +868,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeeds.delete * - * @desc Deletes a datafeed from your Merchant Center account. + * @desc Deletes a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.datafeeds.delete * @memberOf! content(v2) @@ -905,7 +905,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeeds.get * - * @desc Retrieves a datafeed from your Merchant Center account. + * @desc Retrieves a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.datafeeds.get * @memberOf! content(v2) @@ -941,7 +941,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeeds.insert * - * @desc Registers a datafeed with your Merchant Center account. + * @desc Registers a datafeed with your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.datafeeds.insert * @memberOf! content(v2) @@ -978,7 +978,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeeds.list * - * @desc Lists the datafeeds in your Merchant Center account. + * @desc Lists the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.datafeeds.list * @memberOf! content(v2) @@ -1015,7 +1015,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeeds.patch * - * @desc Updates a datafeed of your Merchant Center account. This method supports patch semantics. + * @desc Updates a datafeed of your Merchant Center account. This method can only be called for non-multi-client accounts. This method supports patch semantics. * * @alias content.datafeeds.patch * @memberOf! content(v2) @@ -1053,7 +1053,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeeds.update * - * @desc Updates a datafeed of your Merchant Center account. + * @desc Updates a datafeed of your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.datafeeds.update * @memberOf! content(v2) @@ -1130,7 +1130,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeedstatuses.get * - * @desc Retrieves the status of a datafeed from your Merchant Center account. + * @desc Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.datafeedstatuses.get * @memberOf! content(v2) @@ -1166,7 +1166,7 @@ function Content(options) { // eslint-disable-line /** * content.datafeedstatuses.list * - * @desc Lists the statuses of the datafeeds in your Merchant Center account. + * @desc Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.datafeedstatuses.list * @memberOf! content(v2) @@ -1207,7 +1207,7 @@ function Content(options) { // eslint-disable-line /** * content.inventory.custombatch * - * @desc Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. + * @desc 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. * * @alias content.inventory.custombatch * @memberOf! content(v2) @@ -1243,7 +1243,7 @@ function Content(options) { // eslint-disable-line /** * content.inventory.set * - * @desc Updates price and availability of a product in your Merchant Center account. This operation does not update the expiration date of the product. + * @desc 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. * * @alias content.inventory.set * @memberOf! content(v2) @@ -1286,7 +1286,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.acknowledge * - * @desc Marks an order as acknowledged. + * @desc Marks an order as acknowledged. This method can only be called for non-multi-client accounts. * * @alias content.orders.acknowledge * @memberOf! content(v2) @@ -1323,7 +1323,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.advancetestorder * - * @desc Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". + * @desc Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts. * * @alias content.orders.advancetestorder * @memberOf! content(v2) @@ -1359,7 +1359,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.cancel * - * @desc Cancels all line items in an order. + * @desc Cancels all line items in an order. This method can only be called for non-multi-client accounts. * * @alias content.orders.cancel * @memberOf! content(v2) @@ -1396,7 +1396,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.cancellineitem * - * @desc Cancels a line item. + * @desc Cancels a line item. This method can only be called for non-multi-client accounts. * * @alias content.orders.cancellineitem * @memberOf! content(v2) @@ -1433,7 +1433,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.createtestorder * - * @desc Sandbox only. Creates a test order. + * @desc Sandbox only. Creates a test order. This method can only be called for non-multi-client accounts. * * @alias content.orders.createtestorder * @memberOf! content(v2) @@ -1469,7 +1469,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.custombatch * - * @desc Retrieves or modifies multiple orders in a single request. + * @desc Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts. * * @alias content.orders.custombatch * @memberOf! content(v2) @@ -1504,7 +1504,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.get * - * @desc Retrieves an order from your Merchant Center account. + * @desc Retrieves an order from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.orders.get * @memberOf! content(v2) @@ -1540,7 +1540,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.getbymerchantorderid * - * @desc Retrieves an order using merchant order id. + * @desc Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts. * * @alias content.orders.getbymerchantorderid * @memberOf! content(v2) @@ -1576,7 +1576,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.gettestordertemplate * - * @desc Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. + * @desc 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. * * @alias content.orders.gettestordertemplate * @memberOf! content(v2) @@ -1612,7 +1612,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.list * - * @desc Lists the orders in your Merchant Center account. + * @desc Lists the orders in your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.orders.list * @memberOf! content(v2) @@ -1654,7 +1654,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.refund * - * @desc Refund a portion of the order, up to the full amount paid. + * @desc Refund a portion of the order, up to the full amount paid. This method can only be called for non-multi-client accounts. * * @alias content.orders.refund * @memberOf! content(v2) @@ -1691,7 +1691,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.returnlineitem * - * @desc Returns a line item. + * @desc Returns a line item. This method can only be called for non-multi-client accounts. * * @alias content.orders.returnlineitem * @memberOf! content(v2) @@ -1728,7 +1728,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.shiplineitems * - * @desc Marks line item(s) as shipped. + * @desc Marks line item(s) as shipped. This method can only be called for non-multi-client accounts. * * @alias content.orders.shiplineitems * @memberOf! content(v2) @@ -1765,7 +1765,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.updatemerchantorderid * - * @desc Updates the merchant order ID for a given order. + * @desc Updates the merchant order ID for a given order. This method can only be called for non-multi-client accounts. * * @alias content.orders.updatemerchantorderid * @memberOf! content(v2) @@ -1802,7 +1802,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.updateshipment * - * @desc Updates a shipment's status, carrier, and/or tracking ID. + * @desc Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-multi-client accounts. * * @alias content.orders.updateshipment * @memberOf! content(v2) @@ -1843,7 +1843,7 @@ function Content(options) { // eslint-disable-line /** * content.products.custombatch * - * @desc Retrieves, inserts, and deletes multiple products in a single request. + * @desc Retrieves, inserts, and deletes multiple products in a single request. This method can only be called for non-multi-client accounts. * * @alias content.products.custombatch * @memberOf! content(v2) @@ -1879,7 +1879,7 @@ function Content(options) { // eslint-disable-line /** * content.products.delete * - * @desc Deletes a product from your Merchant Center account. + * @desc Deletes a product from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.products.delete * @memberOf! content(v2) @@ -1916,7 +1916,7 @@ function Content(options) { // eslint-disable-line /** * content.products.get * - * @desc Retrieves a product from your Merchant Center account. + * @desc Retrieves a product from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.products.get * @memberOf! content(v2) @@ -1952,7 +1952,7 @@ function Content(options) { // eslint-disable-line /** * content.products.insert * - * @desc Uploads a product to your Merchant Center account. + * @desc Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry. This method can only be called for non-multi-client accounts. * * @alias content.products.insert * @memberOf! content(v2) @@ -1989,7 +1989,7 @@ function Content(options) { // eslint-disable-line /** * content.products.list * - * @desc Lists the products in your Merchant Center account. + * @desc Lists the products in your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.products.list * @memberOf! content(v2) @@ -2031,7 +2031,7 @@ function Content(options) { // eslint-disable-line /** * content.productstatuses.custombatch * - * @desc Gets the statuses of multiple products in a single request. + * @desc Gets the statuses of multiple products in a single request. This method can only be called for non-multi-client accounts. * * @alias content.productstatuses.custombatch * @memberOf! content(v2) @@ -2066,7 +2066,7 @@ function Content(options) { // eslint-disable-line /** * content.productstatuses.get * - * @desc Gets the status of a product from your Merchant Center account. + * @desc Gets the status of a product from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.productstatuses.get * @memberOf! content(v2) @@ -2102,7 +2102,7 @@ function Content(options) { // eslint-disable-line /** * content.productstatuses.list * - * @desc Lists the statuses of the products in your Merchant Center account. + * @desc Lists the statuses of the products in your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.productstatuses.list * @memberOf! content(v2) @@ -2180,7 +2180,7 @@ function Content(options) { // eslint-disable-line /** * content.shippingsettings.get * - * @desc Retrieves the shipping settings of the account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.shippingsettings.get * @memberOf! content(v2) @@ -2251,7 +2251,7 @@ function Content(options) { // eslint-disable-line /** * content.shippingsettings.list * - * @desc Lists the shipping settings of the sub-accounts in your Merchant Center account. + * @desc Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. * * @alias content.shippingsettings.list * @memberOf! content(v2) @@ -2288,7 +2288,7 @@ function Content(options) { // eslint-disable-line /** * content.shippingsettings.patch * - * @desc Updates the shipping settings of the account. This method supports patch semantics. + * @desc 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 or sub-accounts if the managing account is a multi-client account. This method supports patch semantics. * * @alias content.shippingsettings.patch * @memberOf! content(v2) @@ -2326,7 +2326,7 @@ function Content(options) { // eslint-disable-line /** * content.shippingsettings.update * - * @desc Updates the shipping settings of the account. + * @desc 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 or sub-accounts if the managing account is a multi-client account. * * @alias content.shippingsettings.update * @memberOf! content(v2) @@ -3062,7 +3062,7 @@ United States * @memberOf! content(v2) * @type object * @property {string} email Email address of the customer. - * @property {boolean} explicitMarketingPreference 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 Purchases on Google checkout flow. + * @property {boolean} explicitMarketingPreference 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. * @property {string} fullName Full name of the customer. */ /** @@ -3886,7 +3886,7 @@ Acceptable values are: * @memberOf! content(v2) * @type object * @property {string} email Email address of the customer. - * @property {boolean} explicitMarketingPreference 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 Purchases on Google checkout flow. Optional. + * @property {boolean} explicitMarketingPreference 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. * @property {string} fullName Full name of the customer. */ /** diff --git a/apis/content/v2sandbox.js b/apis/content/v2sandbox.js index 00481b7ee5..f0465f88da 100644 --- a/apis/content/v2sandbox.js +++ b/apis/content/v2sandbox.js @@ -45,7 +45,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.acknowledge * - * @desc Marks an order as acknowledged. + * @desc Marks an order as acknowledged. This method can only be called for non-multi-client accounts. * * @alias content.orders.acknowledge * @memberOf! content(v2sandbox) @@ -82,7 +82,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.advancetestorder * - * @desc Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". + * @desc Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts. * * @alias content.orders.advancetestorder * @memberOf! content(v2sandbox) @@ -118,7 +118,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.cancel * - * @desc Cancels all line items in an order. + * @desc Cancels all line items in an order. This method can only be called for non-multi-client accounts. * * @alias content.orders.cancel * @memberOf! content(v2sandbox) @@ -155,7 +155,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.cancellineitem * - * @desc Cancels a line item. + * @desc Cancels a line item. This method can only be called for non-multi-client accounts. * * @alias content.orders.cancellineitem * @memberOf! content(v2sandbox) @@ -192,7 +192,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.createtestorder * - * @desc Sandbox only. Creates a test order. + * @desc Sandbox only. Creates a test order. This method can only be called for non-multi-client accounts. * * @alias content.orders.createtestorder * @memberOf! content(v2sandbox) @@ -228,7 +228,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.custombatch * - * @desc Retrieves or modifies multiple orders in a single request. + * @desc Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts. * * @alias content.orders.custombatch * @memberOf! content(v2sandbox) @@ -263,7 +263,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.get * - * @desc Retrieves an order from your Merchant Center account. + * @desc Retrieves an order from your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.orders.get * @memberOf! content(v2sandbox) @@ -299,7 +299,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.getbymerchantorderid * - * @desc Retrieves an order using merchant order id. + * @desc Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts. * * @alias content.orders.getbymerchantorderid * @memberOf! content(v2sandbox) @@ -335,7 +335,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.gettestordertemplate * - * @desc Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. + * @desc 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. * * @alias content.orders.gettestordertemplate * @memberOf! content(v2sandbox) @@ -371,7 +371,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.list * - * @desc Lists the orders in your Merchant Center account. + * @desc Lists the orders in your Merchant Center account. This method can only be called for non-multi-client accounts. * * @alias content.orders.list * @memberOf! content(v2sandbox) @@ -413,7 +413,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.refund * - * @desc Refund a portion of the order, up to the full amount paid. + * @desc Refund a portion of the order, up to the full amount paid. This method can only be called for non-multi-client accounts. * * @alias content.orders.refund * @memberOf! content(v2sandbox) @@ -450,7 +450,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.returnlineitem * - * @desc Returns a line item. + * @desc Returns a line item. This method can only be called for non-multi-client accounts. * * @alias content.orders.returnlineitem * @memberOf! content(v2sandbox) @@ -487,7 +487,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.shiplineitems * - * @desc Marks line item(s) as shipped. + * @desc Marks line item(s) as shipped. This method can only be called for non-multi-client accounts. * * @alias content.orders.shiplineitems * @memberOf! content(v2sandbox) @@ -524,7 +524,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.updatemerchantorderid * - * @desc Updates the merchant order ID for a given order. + * @desc Updates the merchant order ID for a given order. This method can only be called for non-multi-client accounts. * * @alias content.orders.updatemerchantorderid * @memberOf! content(v2sandbox) @@ -561,7 +561,7 @@ function Content(options) { // eslint-disable-line /** * content.orders.updateshipment * - * @desc Updates a shipment's status, carrier, and/or tracking ID. + * @desc Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-multi-client accounts. * * @alias content.orders.updateshipment * @memberOf! content(v2sandbox) @@ -671,7 +671,7 @@ United States * @memberOf! content(v2sandbox) * @type object * @property {string} email Email address of the customer. - * @property {boolean} explicitMarketingPreference 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 Purchases on Google checkout flow. + * @property {boolean} explicitMarketingPreference 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. * @property {string} fullName Full name of the customer. */ /** @@ -1112,7 +1112,7 @@ Start date and end date are separated by a forward slash (/). The start date is * @memberOf! content(v2sandbox) * @type object * @property {string} email Email address of the customer. - * @property {boolean} explicitMarketingPreference 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 Purchases on Google checkout flow. Optional. + * @property {boolean} explicitMarketingPreference 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. * @property {string} fullName Full name of the customer. */ /** diff --git a/apis/dataflow/v1b3.js b/apis/dataflow/v1b3.js index 7065f5ecaf..9b76e4b66d 100644 --- a/apis/dataflow/v1b3.js +++ b/apis/dataflow/v1b3.js @@ -1081,6 +1081,8 @@ function Dataflow(options) { // eslint-disable-line * @property {integer} maxWorkers The maximum number of workers to start for the job. * @property {string} zone The zone to start the workers in. * @property {string} serviceAccountEmail The service account to run the job as. + * @property {string} tempLocation The temp location to use for the job. + * @property {boolean} bypassTempDirValidation Bypass the safety checks for the job's temp directory. Use with caution. */ /** * @typedef ReportWorkItemStatusRequest diff --git a/apis/deploymentmanager/v2.js b/apis/deploymentmanager/v2.js index a2d7000e2e..601e4248f5 100644 --- a/apis/deploymentmanager/v2.js +++ b/apis/deploymentmanager/v2.js @@ -184,6 +184,7 @@ function Deploymentmanager(options) { // eslint-disable-line * @memberOf! deploymentmanager(v2) * * @param {object} params Parameters for request + * @param {string=} params.deletePolicy Sets the policy to use for deleting resources. * @param {string} params.deployment The name of the deployment for this request. * @param {string} params.project The project ID for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -1489,8 +1490,16 @@ function Deploymentmanager(options) { // eslint-disable-line * @typedef AuditConfig * @memberOf! deploymentmanager(v2) * @type object + * @property {deploymentmanager(v2).AuditLogConfig[]} auditLogConfigs The configuration for each type of logging * @property {string[]} exemptedMembers Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members. - * @property {string} service 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. + * @property {string} service Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services. + */ +/** + * @typedef AuditLogConfig + * @memberOf! deploymentmanager(v2) + * @type object + * @property {string[]} exemptedMembers Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members. + * @property {string} logType The log type that this config enables. */ /** * @typedef Binding diff --git a/apis/gmail/v1.js b/apis/gmail/v1.js index 493fb6758b..2fc8ac39ff 100644 --- a/apis/gmail/v1.js +++ b/apis/gmail/v1.js @@ -687,7 +687,7 @@ function Gmail(options) { // eslint-disable-line /** * gmail.users.messages.batchModify * - * @desc Modifies labels on the given labels. + * @desc Modifies the labels on the specified messages. * * @alias gmail.users.messages.batchModify * @memberOf! gmail(v1) diff --git a/apis/identitytoolkit/v3.js b/apis/identitytoolkit/v3.js index 259cc90cc0..fc385294e0 100644 --- a/apis/identitytoolkit/v3.js +++ b/apis/identitytoolkit/v3.js @@ -734,6 +734,7 @@ function Identitytoolkit(options) { // eslint-disable-line * @property {string} delegatedProjectNumber GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. * @property {integer} maxResults The max number of results to return in the response. * @property {string} nextPageToken The token for the next page. This should be taken from the previous response. + * @property {string} targetProjectId Specify which project (field value is actually project id) to operate. Only used when provided credential. */ /** * @typedef IdentitytoolkitRelyingpartyGetAccountInfoRequest diff --git a/apis/language/v1.js b/apis/language/v1.js index 9180909656..b41609b750 100644 --- a/apis/language/v1.js +++ b/apis/language/v1.js @@ -194,9 +194,7 @@ automatically detected). Both ISO and BCP-47 language codes are accepted.<br> **Current Language Restrictions:** - * Only English, Spanish, and Japanese textual content - are supported, with the following additional restriction: - * `analyzeSentiment` only supports English text. + * Only English, Spanish, and Japanese textual content are supported. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. @@ -371,7 +369,7 @@ supports proper noun mentions. * @memberOf! language(v1) * @type object * @property {number} score Sentiment score between -1.0 (negative sentiment) and 1.0 -(positive sentiment.) +(positive sentiment). * @property {number} magnitude A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). @@ -380,12 +378,11 @@ negative). * @typedef Token * @memberOf! language(v1) * @type object -* @property {language(v1).TextSpan} text The token text. -* @property {language(v1).PartOfSpeech} partOfSpeech Parts of speech tag for this token. -* @property {language(v1).DependencyEdge} dependencyEdge Dependency tree parse for this token. -* @property {string} lemma <a href="https://en.wikipedia.org/wiki/Lemma_(morphology)"> -Lemma</a> of the token. -*/ + * @property {language(v1).TextSpan} text The token text. + * @property {language(v1).PartOfSpeech} partOfSpeech Parts of speech tag for this token. + * @property {language(v1).DependencyEdge} dependencyEdge Dependency tree parse for this token. + * @property {string} lemma [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + */ /** * @typedef AnalyzeEntitiesResponse * @memberOf! language(v1) diff --git a/apis/language/v1beta1.js b/apis/language/v1beta1.js index 3c8b505ace..8d03d41dd3 100644 --- a/apis/language/v1beta1.js +++ b/apis/language/v1beta1.js @@ -194,9 +194,7 @@ automatically detected). Both ISO and BCP-47 language codes are accepted.<br> **Current Language Restrictions:** - * Only English, Spanish, and Japanese textual content - are supported, with the following additional restriction: - * `analyzeSentiment` only supports English text. + * Only English, Spanish, and Japanese textual content are supported. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. @@ -371,7 +369,7 @@ supports proper noun mentions. * @memberOf! language(v1beta1) * @type object * @property {number} score Sentiment score between -1.0 (negative sentiment) and 1.0 -(positive sentiment.) +(positive sentiment). * @property {number} polarity DEPRECATED FIELD - This field is being deprecated in favor of score. Please refer to our documentation at https://cloud.google.com/natural-language/docs for more information. @@ -383,12 +381,11 @@ negative). * @typedef Token * @memberOf! language(v1beta1) * @type object -* @property {language(v1beta1).TextSpan} text The token text. -* @property {language(v1beta1).PartOfSpeech} partOfSpeech Parts of speech tag for this token. -* @property {language(v1beta1).DependencyEdge} dependencyEdge Dependency tree parse for this token. -* @property {string} lemma <a href="https://en.wikipedia.org/wiki/Lemma_(morphology)"> -Lemma</a> of the token. -*/ + * @property {language(v1beta1).TextSpan} text The token text. + * @property {language(v1beta1).PartOfSpeech} partOfSpeech Parts of speech tag for this token. + * @property {language(v1beta1).DependencyEdge} dependencyEdge Dependency tree parse for this token. + * @property {string} lemma [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + */ /** * @typedef AnalyzeEntitiesResponse * @memberOf! language(v1beta1) diff --git a/apis/logging/v2.js b/apis/logging/v2.js index 8c6dcca366..4530fc916a 100644 --- a/apis/logging/v2.js +++ b/apis/logging/v2.js @@ -53,9 +53,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -90,7 +90,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more information about log names, see LogEntry. + * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -122,14 +122,14 @@ function Logging(options) { // eslint-disable-line /** * logging.folders.sinks.update * - * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create). If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: `destination`, `filter`, `output_version_format`, `start_time`, and `end_time`. The updated filter might also have a new `writer_identity`; see the `unique_writer_identity` field. + * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field. * * @alias logging.folders.sinks.update * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {boolean=} params.uniqueWriterIdentity Optional. See [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) for a description of this field. When updating a sink, the effect of this field on the value of `writer_identity` in the updated sink depends on both the old and new values of this field: + If the old and new values of this field are both false or both true, then there is no change to the sink's `writer_identity`. + If the old value was false and the new value is true, then `writer_identity` is changed to a unique service account. + It is an error if the old value was true and the new value is false. + * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". + * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value was false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value was true and the new value is false. * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -165,7 +165,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -194,14 +194,14 @@ function Logging(options) { // eslint-disable-line /** * logging.folders.sinks.create * - * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. * * @alias logging.folders.sinks.create * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as `writer_identity` in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as `writer_identity` is `cloud-logs@google.com`, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of `writer_identity` will be a unique service account used only for exports from the new sink. For more information, see `writer_identity` in LogSink. - * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: "projects/my-logging-project", "organizations/123456789". * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -237,9 +237,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -268,13 +268,13 @@ function Logging(options) { // eslint-disable-line /** * logging.folders.sinks.delete * - * @desc Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted. + * @desc Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. * * @alias logging.folders.sinks.delete * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink does not exist. + * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -315,9 +315,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -352,7 +352,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more information about log names, see LogEntry. + * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -384,14 +384,14 @@ function Logging(options) { // eslint-disable-line /** * logging.billingAccounts.sinks.update * - * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create). If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: `destination`, `filter`, `output_version_format`, `start_time`, and `end_time`. The updated filter might also have a new `writer_identity`; see the `unique_writer_identity` field. + * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field. * * @alias logging.billingAccounts.sinks.update * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {boolean=} params.uniqueWriterIdentity Optional. See [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) for a description of this field. When updating a sink, the effect of this field on the value of `writer_identity` in the updated sink depends on both the old and new values of this field: + If the old and new values of this field are both false or both true, then there is no change to the sink's `writer_identity`. + If the old value was false and the new value is true, then `writer_identity` is changed to a unique service account. + It is an error if the old value was true and the new value is false. + * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". + * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value was false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value was true and the new value is false. * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -427,7 +427,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -456,14 +456,14 @@ function Logging(options) { // eslint-disable-line /** * logging.billingAccounts.sinks.create * - * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. * * @alias logging.billingAccounts.sinks.create * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as `writer_identity` in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as `writer_identity` is `cloud-logs@google.com`, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of `writer_identity` will be a unique service account used only for exports from the new sink. For more information, see `writer_identity` in LogSink. - * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: "projects/my-logging-project", "organizations/123456789". * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -499,9 +499,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -530,13 +530,13 @@ function Logging(options) { // eslint-disable-line /** * logging.billingAccounts.sinks.delete * - * @desc Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted. + * @desc Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. * * @alias logging.billingAccounts.sinks.delete * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink does not exist. + * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -577,9 +577,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -614,7 +614,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more information about log names, see LogEntry. + * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -646,14 +646,14 @@ function Logging(options) { // eslint-disable-line /** * logging.organizations.sinks.update * - * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create). If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: `destination`, `filter`, `output_version_format`, `start_time`, and `end_time`. The updated filter might also have a new `writer_identity`; see the `unique_writer_identity` field. + * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field. * * @alias logging.organizations.sinks.update * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {boolean=} params.uniqueWriterIdentity Optional. See [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) for a description of this field. When updating a sink, the effect of this field on the value of `writer_identity` in the updated sink depends on both the old and new values of this field: + If the old and new values of this field are both false or both true, then there is no change to the sink's `writer_identity`. + If the old value was false and the new value is true, then `writer_identity` is changed to a unique service account. + It is an error if the old value was true and the new value is false. + * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". + * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value was false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value was true and the new value is false. * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -689,7 +689,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -718,14 +718,14 @@ function Logging(options) { // eslint-disable-line /** * logging.organizations.sinks.create * - * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. * * @alias logging.organizations.sinks.create * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as `writer_identity` in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as `writer_identity` is `cloud-logs@google.com`, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of `writer_identity` will be a unique service account used only for exports from the new sink. For more information, see `writer_identity` in LogSink. - * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: "projects/my-logging-project", "organizations/123456789". * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -761,9 +761,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -792,13 +792,13 @@ function Logging(options) { // eslint-disable-line /** * logging.organizations.sinks.delete * - * @desc Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted. + * @desc Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. * * @alias logging.organizations.sinks.delete * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink does not exist. + * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -839,7 +839,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's `name` field must be the same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is created. + * @param {string} params.metricName The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. * @param {logging(v2).LogMetric} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -875,7 +875,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {string} params.metricName The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -910,7 +910,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.parent The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. + * @param {string} params.parent The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. * @param {logging(v2).LogMetric} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -946,9 +946,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The name of the project containing the metrics: "projects/[PROJECT_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The name of the project containing the metrics: "projects/[PROJECT_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -983,7 +983,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {string} params.metricName The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1021,9 +1021,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1058,7 +1058,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more information about log names, see LogEntry. + * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1090,14 +1090,14 @@ function Logging(options) { // eslint-disable-line /** * logging.projects.sinks.update * - * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create). If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: `destination`, `filter`, `output_version_format`, `start_time`, and `end_time`. The updated filter might also have a new `writer_identity`; see the `unique_writer_identity` field. + * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field. * * @alias logging.projects.sinks.update * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {boolean=} params.uniqueWriterIdentity Optional. See [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) for a description of this field. When updating a sink, the effect of this field on the value of `writer_identity` in the updated sink depends on both the old and new values of this field: + If the old and new values of this field are both false or both true, then there is no change to the sink's `writer_identity`. + If the old value was false and the new value is true, then `writer_identity` is changed to a unique service account. + It is an error if the old value was true and the new value is false. + * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". + * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value was false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value was true and the new value is false. * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -1133,7 +1133,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1162,14 +1162,14 @@ function Logging(options) { // eslint-disable-line /** * logging.projects.sinks.create * - * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. * * @alias logging.projects.sinks.create * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as `writer_identity` in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as `writer_identity` is `cloud-logs@google.com`, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of `writer_identity` will be a unique service account used only for exports from the new sink. For more information, see `writer_identity` in LogSink. - * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: "projects/my-logging-project", "organizations/123456789". * @param {logging(v2).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -1205,9 +1205,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1236,13 +1236,13 @@ function Logging(options) { // eslint-disable-line /** * logging.projects.sinks.delete * - * @desc Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted. + * @desc Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. * * @alias logging.projects.sinks.delete * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink does not exist. + * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1275,7 +1275,7 @@ function Logging(options) { // eslint-disable-line /** * logging.entries.write * - * @desc Writes log entries to Stackdriver Logging. All log entries are written by this method. + * @desc Writes log entries to Stackdriver Logging. All log entries are written by this method. * * @alias logging.entries.write * @memberOf! logging(v2) @@ -1310,7 +1310,7 @@ function Logging(options) { // eslint-disable-line /** * logging.entries.list * - * @desc Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see [Exporting Logs](/logging/docs/export). + * @desc Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs. * * @alias logging.entries.list * @memberOf! logging(v2) @@ -1349,14 +1349,14 @@ function Logging(options) { // eslint-disable-line /** * logging.monitoredResourceDescriptors.list * - * @desc Lists the monitored resource descriptors used by Stackdriver Logging. + * @desc Lists the descriptors for monitored resource types used by Stackdriver Logging. * * @alias logging.monitoredResourceDescriptors.list * @memberOf! logging(v2) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1389,180 +1389,80 @@ function Logging(options) { // eslint-disable-line * @typedef ListLogEntriesResponse * @memberOf! logging(v2) * @type object -* @property {logging(v2).LogEntry[]} entries A list of log entries. -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -*/ + * @property {logging(v2).LogEntry[]} entries A list of log entries. + * @property {string} nextPageToken If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search. + */ /** * @typedef ListSinksResponse * @memberOf! logging(v2) * @type object -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call the same -method again using the value of `nextPageToken` as `pageToken`. -* @property {logging(v2).LogSink[]} sinks A list of sinks. -*/ + * @property {string} nextPageToken If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. + * @property {logging(v2).LogSink[]} sinks A list of sinks. + */ /** * @typedef SourceLocation * @memberOf! logging(v2) * @type object -* @property {string} file Source file name. Depending on the runtime environment, this might be a -simple name or a fully-qualified name. -* @property {string} functionName Human-readable name of the function or method being invoked, with optional -context such as the class or package name. This information is used in -contexts such as the logs viewer, where a file and line number are less -meaningful. The format can vary by language. For example: -`qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` -(Python). -* @property {string} line Line within the source file. -*/ + * @property {string} file Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. + * @property {string} functionName Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). + * @property {string} line Line within the source file. + */ /** * @typedef LogSink * @memberOf! logging(v2) * @type object * @property {string} destination Required. The export destination: - - "storage.googleapis.com/[GCS_BUCKET]" - "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - -The sink's `writer_identity`, set when the sink is created, must -have permission to write to the destination or else the log -entries are not exported. For more information, see -[Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). -* @property {string} filter Optional. -An [advanced logs filter](/logging/docs/view/advanced_filters). The only -exported log entries are those that are in the resource owning the sink and -that match the filter. The filter must use the log entry format specified -by the `output_version_format` parameter. For example, in the v2 format: - - logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR -* @property {string} endTime Optional. The time at which this sink will stop exporting log entries. Log -entries are exported only if their timestamp is earlier than the end time. -If this field is not supplied, there is no end time. If both a start time -and an end time are provided, then the end time must be later than the -start time. -* @property {string} name Required. The client-assigned sink identifier, unique within the -project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are -limited to 100 characters and can include only the following characters: -upper and lower-case alphanumeric characters, underscores, hyphens, and -periods. -* @property {string} startTime Optional. The time at which this sink will begin exporting log entries. -Log entries are exported only if their timestamp is not earlier than the -start time. The default value of this field is the time the sink is -created or updated. -* @property {string} outputVersionFormat Optional. The log entry format to use for this sink's exported log -entries. The v2 format is used by default. -**The v1 format is deprecated** and should be used only as part of a -migration effort to v2. -See [Migration to the v2 API](/logging/docs/api/v2/migration-to-v2). -* @property {string} writerIdentity Output only. An IAM identity&mdash;a service account or group&mdash;under -which Stackdriver Logging writes the exported log entries to the sink's -destination. This field is set by -[sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) -and -[sinks.update](/logging/docs/api/reference/rest/v2/projects.sinks/update), -based on the setting of `unique_writer_identity` in those methods. - -Until you grant this identity write-access to the destination, log entry -exports from this sink will fail. For more information, -see [Granting access for a -resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). -Consult the destination service's documentation to determine the -appropriate IAM roles to assign to the identity. +"storage.googleapis.com/[GCS_BUCKET]" +"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" +"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" +The sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks. +* @property {string} filter Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format: +logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + +* @property {string} endTime Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time. +* @property {string} name Required. The client-assigned sink identifier, unique within the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. +* @property {string} startTime Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated. +* @property {string} outputVersionFormat Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API. +* @property {string} writerIdentity Output only. An IAM identity&mdash;a service account or group&mdash;under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. */ /** * @typedef ListLogsResponse * @memberOf! logging(v2) * @type object -* @property {string[]} logIds A list of log identifiers. For example, -`"syslog"` or `"cloudresourcemanager.googleapis.com/activity"`. -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -*/ + * @property {string[]} logNames A list of log names. For example, "projects/my-project/syslog" or "organizations/123/cloudresourcemanager.googleapis.com%2Factivity". + * @property {string} nextPageToken If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. + */ /** * @typedef LogMetric * @memberOf! logging(v2) * @type object * @property {string} description Optional. A description of this metric, which is used in documentation. -* @property {string} filter Required. An [advanced logs filter](/logging/docs/view/advanced_filters). -Example: - - "resource.type=gae_app AND severity>=ERROR" - +* @property {string} filter Required. An advanced logs filter which is used to match log entries. Example: +"resource.type=gae_app AND severity>=ERROR" The maximum length of the filter is 20000 characters. -* @property {string} name Required. The client-assigned metric identifier. -Examples: `"error_count"`, `"nginx/requests"`. - -Metric identifiers are limited to 100 characters and can include -only the following characters: `A-Z`, `a-z`, `0-9`, and the -special characters `_-.,+!*',()%/`. The forward-slash character -(`/`) denotes a hierarchy of name pieces, and it cannot be the -first character of the name. - -The metric identifier in this field must not be -[URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding). -However, when the metric identifier appears as the `[METRIC_ID]` -part of a `metric_name` API parameter, then the metric identifier -must be URL-encoded. Example: -`"projects/my-project/metrics/nginx%2Frequests"`. -* @property {string} version Output only. The API version that created or updated this metric. -The version also dictates the syntax of the filter expression. When a value -for this field is missing, the default value of V2 should be assumed. +* @property {string} name Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". +* @property {string} version Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed. */ /** * @typedef LogEntry * @memberOf! logging(v2) * @type object * @property {string} textPayload The log entry payload, represented as a Unicode string (UTF-8). -* @property {logging(v2).HttpRequest} httpRequest Optional. Information about the HTTP request associated with this -log entry, if applicable. -* @property {logging(v2).LogEntrySourceLocation} sourceLocation Optional. Source code location information associated with the log entry, -if any. -* @property {object} jsonPayload The log entry payload, represented as a structure that is -expressed as a JSON object. -* @property {object} labels Optional. A set of user-defined (key, value) data that provides additional -information about the log entry. -* @property {string} trace Optional. Resource name of the trace associated with the log entry, if any. -If it contains a relative resource name, the name is assumed to be relative -to `//tracing.googleapis.com`. Example: -`projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` +* @property {logging(v2).HttpRequest} httpRequest Optional. Information about the HTTP request associated with this log entry, if applicable. +* @property {logging(v2).LogEntrySourceLocation} sourceLocation Optional. Source code location information associated with the log entry, if any. +* @property {object} jsonPayload The log entry payload, represented as a structure that is expressed as a JSON object. +* @property {object} labels Optional. A set of user-defined (key, value) data that provides additional information about the log entry. +* @property {string} trace Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 * @property {string} logName Required. The resource name of the log to which this log entry belongs: - - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - -`[LOG_ID]` must be URL-encoded within `log_name`. Example: -`"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. -`[LOG_ID]` must be less than 512 characters long and can only include the -following characters: upper and lower case alphanumeric characters, -forward-slash, underscore, hyphen, and period. - -For backward compatibility, if `log_name` begins with a forward-slash, such -as `/projects/...`, then the log entry is ingested as usual but the -forward-slash is removed. Listing the log entry will not show the leading -slash and filtering for a log name with a leading slash will never return -any results. -* @property {string} severity Optional. The severity of the log entry. The default value is -`LogSeverity.DEFAULT`. -* @property {logging(v2).MonitoredResource} resource Required. The monitored resource associated with this log entry. -Example: a log entry that reports a database error would be -associated with the monitored resource designating the particular -database that reported the error. -* @property {object} protoPayload The log entry payload, represented as a protocol buffer. Some -Google Cloud Platform services use this field for their log -entry payloads. -* @property {string} timestamp Optional. The time the event described by the log entry occurred. If -omitted, Stackdriver Logging will use the time the log entry is received. -* @property {string} insertId Optional. A unique ID for the log entry. If you provide this -field, the logging service considers other log entries in the -same project with the same ID as duplicates which can be removed. If -omitted, Stackdriver Logging will generate a unique ID for this -log entry. -* @property {logging(v2).LogEntryOperation} operation Optional. Information about an operation associated with the log entry, if -applicable. +"projects/[PROJECT_ID]/logs/[LOG_ID]" +"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" +[LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. +* @property {string} severity Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT. +* @property {logging(v2).MonitoredResource} resource Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error. +* @property {object} protoPayload The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. +* @property {string} timestamp Optional. The time the event described by the log entry occurred. If omitted, Stackdriver Logging will use the time the log entry is received. +* @property {string} insertId Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same project with the same ID as duplicates which can be removed. If omitted, Stackdriver Logging will generate a unique ID for this log entry. +* @property {logging(v2).LogEntryOperation} operation Optional. Information about an operation associated with the log entry, if applicable. */ /** * @typedef LogLine @@ -1577,62 +1477,31 @@ applicable. * @typedef SourceReference * @memberOf! logging(v2) * @type object -* @property {string} repository Optional. A URI string identifying the repository. -Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" -* @property {string} revisionId The canonical and persistent identifier of the deployed revision. -Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" -*/ + * @property {string} repository Optional. A URI string identifying the repository. Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" + * @property {string} revisionId The canonical and persistent identifier of the deployed revision. Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" + */ /** * @typedef MonitoredResource * @memberOf! logging(v2) * @type object -* @property {object} labels Required. Values for all of the labels listed in the associated monitored -resource descriptor. For example, Cloud SQL databases use the labels -`"database_id"` and `"zone"`. -* @property {string} type Required. The monitored resource type. This field must match -the `type` field of a MonitoredResourceDescriptor object. For -example, the type of a Cloud SQL database is `"cloudsql_database"`. -*/ + * @property {object} labels Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels "database_id" and "zone". + * @property {string} type Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is "cloudsql_database". + */ /** * @typedef WriteLogEntriesRequest * @memberOf! logging(v2) * @type object -* @property {object} labels Optional. Default labels that are added to the `labels` field of all log -entries in `entries`. If a log entry already has a label with the same key -as a label in this parameter, then the log entry's label is not changed. -See LogEntry. -* @property {logging(v2).LogEntry[]} entries Required. The log entries to write. Values supplied for the fields -`log_name`, `resource`, and `labels` in this `entries.write` request are -added to those log entries that do not provide their own values for the -fields. - -To improve throughput and to avoid exceeding the -[quota limit](/logging/quota-policy) for calls to `entries.write`, -you should write multiple log entries at once rather than -calling this method for each individual log entry. -* @property {string} logName Optional. A default log resource name that is assigned to all log entries -in `entries` that do not specify a value for `log_name`: - - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - -`[LOG_ID]` must be URL-encoded. For example, -`"projects/my-project-id/logs/syslog"` or -`"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. -For more information about log names, see -LogEntry. -* @property {boolean} partialSuccess Optional. Whether valid entries should be written even if some other -entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any -entry is not written, the response status will be the error associated -with one of the failed entries and include error details in the form of -WriteLogEntriesPartialErrors. -* @property {logging(v2).MonitoredResource} resource Optional. A default monitored resource object that is assigned to all log -entries in `entries` that do not specify a value for `resource`. Example: - - { "type": "gce_instance", - "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - +* @property {object} labels Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry. +* @property {logging(v2).LogEntry[]} entries Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are added to those log entries that do not provide their own values for the fields.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry. +* @property {string} logName Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name: +"projects/[PROJECT_ID]/logs/[LOG_ID]" +"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" +[LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. +* @property {boolean} partialSuccess Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, the response status will be the error associated with one of the failed entries and include error details in the form of WriteLogEntriesPartialErrors. +* @property {logging(v2).MonitoredResource} resource Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example: +{ "type": "gce_instance", + "labels": { + "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See LogEntry. */ /** @@ -1647,55 +1516,35 @@ See LogEntry. * @typedef ListLogMetricsResponse * @memberOf! logging(v2) * @type object -* @property {logging(v2).LogMetric[]} metrics A list of logs-based metrics. -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -*/ + * @property {logging(v2).LogMetric[]} metrics A list of logs-based metrics. + * @property {string} nextPageToken If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. + */ /** * @typedef MonitoredResourceDescriptor * @memberOf! logging(v2) * @type object -* @property {string} displayName Optional. A concise name for the monitored resource type that might be -displayed in user interfaces. It should be a Title Cased Noun Phrase, -without any article or other determiners. For example, -`"Google Cloud SQL Database"`. -* @property {string} description Optional. A detailed description of the monitored resource type that might -be used in documentation. -* @property {logging(v2).LabelDescriptor[]} labels Required. A set of labels used to describe instances of this monitored -resource type. For example, an individual Google Cloud SQL database is -identified by values for the labels `"database_id"` and `"zone"`. -* @property {string} type Required. The monitored resource type. For example, the type -`"cloudsql_database"` represents databases in Google Cloud SQL. -The maximum length of this value is 256 characters. -* @property {string} name Optional. The resource name of the monitored resource descriptor: -`"projects/{project_id}/monitoredResourceDescriptors/{type}"` where -{type} is the value of the `type` field in this object and -{project_id} is a project ID that provides API-specific context for -accessing the type. APIs that do not use project information can use the -resource name format `"monitoredResourceDescriptors/{type}"`. -*/ + * @property {string} displayName Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, "Google Cloud SQL Database". + * @property {string} description Optional. A detailed description of the monitored resource type that might be used in documentation. + * @property {logging(v2).LabelDescriptor[]} labels Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels "database_id" and "zone". + * @property {string} type Required. The monitored resource type. For example, the type "cloudsql_database" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters. + * @property {string} name Optional. The resource name of the monitored resource descriptor: "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format "monitoredResourceDescriptors/{type}". + */ /** * @typedef ListMonitoredResourceDescriptorsResponse * @memberOf! logging(v2) * @type object -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -* @property {logging(v2).MonitoredResourceDescriptor[]} resourceDescriptors A list of resource descriptors. -*/ + * @property {string} nextPageToken If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. + * @property {logging(v2).MonitoredResourceDescriptor[]} resourceDescriptors A list of resource descriptors. + */ /** * @typedef LogEntryOperation * @memberOf! logging(v2) * @type object -* @property {string} producer Optional. An arbitrary producer identifier. The combination of -`id` and `producer` must be globally unique. Examples for `producer`: -`"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. -* @property {boolean} last Optional. Set this to True if this is the last log entry in the operation. -* @property {boolean} first Optional. Set this to True if this is the first log entry in the operation. -* @property {string} id Optional. An arbitrary operation identifier. Log entries with the -same identifier are assumed to be part of the same operation. -*/ + * @property {string} producer Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication". + * @property {boolean} last Optional. Set this to True if this is the last log entry in the operation. + * @property {boolean} first Optional. Set this to True if this is the first log entry in the operation. + * @property {string} id Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. + */ /** * @typedef Empty * @memberOf! logging(v2) @@ -1705,105 +1554,66 @@ same identifier are assumed to be part of the same operation. * @typedef HttpRequest * @memberOf! logging(v2) * @type object -* @property {boolean} cacheLookup Whether or not a cache lookup was attempted. -* @property {string} responseSize The size of the HTTP response message sent back to the client, in bytes, -including the response headers and the response body. -* @property {integer} status The response code indicating the status of response. -Examples: 200, 404. -* @property {boolean} cacheValidatedWithOriginServer Whether or not the response was validated with the origin server before -being served from cache. This field is only meaningful if `cache_hit` is -True. -* @property {string} referer The referer URL of the request, as defined in -[HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). -* @property {boolean} cacheHit Whether or not an entity was served from cache -(with or without validation). -* @property {string} requestUrl The scheme (http, https), the host name, the path and the query -portion of the URL that was requested. -Example: `"http://example.com/some/info?color=red"`. -* @property {string} latency The request processing latency on the server, from the time the request was -received until the response was sent. -* @property {string} cacheFillBytes The number of HTTP response bytes inserted into cache. Set only when a -cache fill was attempted. -* @property {string} requestMethod The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. -* @property {string} remoteIp The IP address (IPv4 or IPv6) of the client that issued the HTTP -request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. -* @property {string} serverIp The IP address (IPv4 or IPv6) of the origin server that the request was -sent to. -* @property {string} userAgent The user agent sent by the client. Example: -`"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. -* @property {string} requestSize The size of the HTTP request message in bytes, including the request -headers and the request body. -*/ + * @property {boolean} cacheLookup Whether or not a cache lookup was attempted. + * @property {string} responseSize The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body. + * @property {integer} status The response code indicating the status of response. Examples: 200, 404. + * @property {boolean} cacheValidatedWithOriginServer Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True. + * @property {string} referer The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * @property {boolean} cacheHit Whether or not an entity was served from cache (with or without validation). + * @property {string} requestUrl The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: "http://example.com/some/info?color=red". + * @property {string} latency The request processing latency on the server, from the time the request was received until the response was sent. + * @property {string} cacheFillBytes The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted. + * @property {string} requestMethod The request method. Examples: "GET", "HEAD", "PUT", "POST". + * @property {string} remoteIp The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". + * @property {string} serverIp The IP address (IPv4 or IPv6) of the origin server that the request was sent to. + * @property {string} userAgent The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)". + * @property {string} requestSize The size of the HTTP request message in bytes, including the request headers and the request body. + */ /** * @typedef LogEntrySourceLocation * @memberOf! logging(v2) * @type object -* @property {string} function Optional. Human-readable name of the function or method being invoked, with -optional context such as the class or package name. This information may be -used in contexts such as the logs viewer, where a file and line number are -less meaningful. The format can vary by language. For example: -`qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` -(Python). -* @property {string} file Optional. Source file name. Depending on the runtime environment, this -might be a simple name or a fully-qualified name. -* @property {string} line Optional. Line within the source file. 1-based; 0 indicates no line number -available. -*/ + * @property {string} function Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). + * @property {string} file Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. + * @property {string} line Optional. Line within the source file. 1-based; 0 indicates no line number available. + */ /** * @typedef RequestLog * @memberOf! logging(v2) * @type object -* @property {string} responseSize Size in bytes sent back to client by request. -* @property {string} requestId Globally unique identifier for a request, which is based on the request -start time. Request IDs for requests which started later will compare -greater as strings than those for requests which started earlier. -* @property {boolean} first Whether this is the first `RequestLog` entry for this request. If an -active request has several `RequestLog` entries written to Stackdriver -Logging, then this field will be set for one of them. -* @property {string} method Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`. -* @property {string} versionId Version of the application that handled this request. -* @property {integer} status HTTP response status code. Example: 200, 404. -* @property {boolean} wasLoadingRequest Whether this was a loading request for the instance. -* @property {string} ip Origin IP address. -* @property {string} nickname The logged-in user who made the request. - -Most likely, this is the part of the user's email before the `@` sign. The -field value is the same for different requests from the same user, but -different users can have similar names. This information is also -available to the application via the App Engine Users API. - -This field will be populated starting with App Engine 1.9.21. -* @property {string} taskQueueName Queue name of the request, in the case of an offline request. -* @property {string} pendingTime Time this request spent in the pending request queue. -* @property {integer} instanceIndex If the instance processing this request belongs to a manually scaled -module, then this is the 0-based index of the instance. Otherwise, this -value is -1. -* @property {logging(v2).SourceReference[]} sourceReference Source code for the application that handled this request. There can be -more than one source reference per deployed application if source code is -distributed among multiple repositories. -* @property {string} moduleId Module of the application that handled this request. -* @property {string} host Internet host and port number of the resource being requested. -* @property {string} latency Latency of the request. -* @property {string} urlMapEntry File or class that handled the request. -* @property {string} endTime Time when the request finished. -* @property {logging(v2).LogLine[]} line A list of log lines emitted by the application while serving this request. -* @property {string} megaCycles Number of CPU megacycles used to process request. -* @property {string} appId Application that handled this request. -* @property {string} traceId Stackdriver Trace identifier for this request. -* @property {string} taskName Task name of the request, in the case of an offline request. -* @property {number} cost An indication of the relative cost of serving this request. -* @property {string} instanceId An identifier for the instance that handled the request. -* @property {string} startTime Time when the request started. -* @property {string} appEngineRelease App Engine release version. -* @property {string} resource Contains the path and query portion of the URL that was requested. For -example, if the URL was "http://example.com/app?name=val", the resource -would be "/app?name=val". The fragment identifier, which is identified by -the `#` character, is not included. -* @property {string} httpVersion HTTP version of request. Example: `"HTTP/1.1"`. -* @property {string} referrer Referrer URL of request. -* @property {string} userAgent User agent that made the request. -* @property {boolean} finished Whether this request is finished or active. -*/ + * @property {string} responseSize Size in bytes sent back to client by request. + * @property {string} requestId Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier. + * @property {boolean} first Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them. + * @property {string} method Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". + * @property {string} versionId Version of the application that handled this request. + * @property {integer} status HTTP response status code. Example: 200, 404. + * @property {boolean} wasLoadingRequest Whether this was a loading request for the instance. + * @property {string} ip Origin IP address. + * @property {string} nickname The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21. + * @property {string} taskQueueName Queue name of the request, in the case of an offline request. + * @property {string} pendingTime Time this request spent in the pending request queue. + * @property {integer} instanceIndex If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1. + * @property {logging(v2).SourceReference[]} sourceReference Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories. + * @property {string} moduleId Module of the application that handled this request. + * @property {string} host Internet host and port number of the resource being requested. + * @property {string} latency Latency of the request. + * @property {string} urlMapEntry File or class that handled the request. + * @property {string} endTime Time when the request finished. + * @property {logging(v2).LogLine[]} line A list of log lines emitted by the application while serving this request. + * @property {string} megaCycles Number of CPU megacycles used to process request. + * @property {string} appId Application that handled this request. + * @property {string} traceId Stackdriver Trace identifier for this request. + * @property {string} taskName Task name of the request, in the case of an offline request. + * @property {number} cost An indication of the relative cost of serving this request. + * @property {string} instanceId An identifier for the instance that handled the request. + * @property {string} startTime Time when the request started. + * @property {string} appEngineRelease App Engine release version. + * @property {string} resource Contains the path and query portion of the URL that was requested. For example, if the URL was "http://example.com/app?name=val", the resource would be "/app?name=val". The fragment identifier, which is identified by the # character, is not included. + * @property {string} httpVersion HTTP version of request. Example: "HTTP/1.1". + * @property {string} referrer Referrer URL of request. + * @property {string} userAgent User agent that made the request. + * @property {boolean} finished Whether this request is finished or active. + */ /** * @typedef WriteLogEntriesResponse * @memberOf! logging(v2) @@ -1813,37 +1623,14 @@ the `#` character, is not included. * @typedef ListLogEntriesRequest * @memberOf! logging(v2) * @type object -* @property {string} filter Optional. A filter that chooses which log entries to return. See [Advanced -Logs Filters](/logging/docs/view/advanced_filters). Only log entries that -match the filter are returned. An empty filter matches all log entries in -the resources listed in `resource_names`. Referencing a parent resource -that is not listed in `resource_names` will cause the filter to return no -results. -The maximum length of the filter is 20000 characters. -* @property {string[]} projectIds Deprecated. Use `resource_names` instead. One or more project identifiers -or project numbers from which to retrieve log entries. Example: -`"my-project-1A"`. If present, these project identifiers are converted to -resource name format and added to the list of resources in -`resource_names`. -* @property {string[]} resourceNames Required. Names of one or more resources from which to retrieve log -entries: - - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - -Projects listed in the `project_ids` field are added to this list. -* @property {integer} pageSize Optional. The maximum number of results to return from this request. -Non-positive values are ignored. The presence of `nextPageToken` in the -response indicates that more results might be available. -* @property {string} orderBy Optional. How the results should be sorted. Presently, the only permitted -values are `"timestamp asc"` (default) and `"timestamp desc"`. The first -option returns entries in order of increasing values of -`LogEntry.timestamp` (oldest first), and the second option returns entries -in order of decreasing timestamps (newest first). Entries with equal -timestamps are returned in order of `LogEntry.insertId`. -* @property {string} pageToken Optional. If present, then retrieve the next batch of results from the -preceding call to this method. `pageToken` must be the value of -`nextPageToken` from the previous response. The values of other method -parameters should be identical to those in the previous call. +* @property {string} filter Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters. +* @property {string[]} projectIds Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names. +* @property {string[]} resourceNames Required. Names of one or more resources from which to retrieve log entries: +"projects/[PROJECT_ID]" +"organizations/[ORGANIZATION_ID]" +Projects listed in the project_ids field are added to this list. +* @property {integer} pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. +* @property {string} orderBy Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of LogEntry.insertId. +* @property {string} pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. */ module.exports = Logging; diff --git a/apis/logging/v2beta1.js b/apis/logging/v2beta1.js index 7ee1d75485..10cb448fdd 100644 --- a/apis/logging/v2beta1.js +++ b/apis/logging/v2beta1.js @@ -103,7 +103,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's `name` field must be the same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is created. + * @param {string} params.metricName The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. * @param {logging(v2beta1).LogMetric} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -184,7 +184,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {string} params.metricName The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -267,7 +267,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.parent The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. + * @param {string} params.parent The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. * @param {logging(v2beta1).LogMetric} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -355,9 +355,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The name of the project containing the metrics: "projects/[PROJECT_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The name of the project containing the metrics: "projects/[PROJECT_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -437,7 +437,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {string} params.metricName The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -475,9 +475,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -557,7 +557,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more information about log names, see LogEntry. + * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -589,7 +589,7 @@ function Logging(options) { // eslint-disable-line /** * logging.projects.sinks.update * - * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create). If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: `destination`, `filter`, `output_version_format`, `start_time`, and `end_time`. The updated filter might also have a new `writer_identity`; see the `unique_writer_identity` field. + * @desc Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field. * * @example * // BEFORE RUNNING: @@ -643,8 +643,8 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. - * @param {boolean=} params.uniqueWriterIdentity Optional. See [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) for a description of this field. When updating a sink, the effect of this field on the value of `writer_identity` in the updated sink depends on both the old and new values of this field: + If the old and new values of this field are both false or both true, then there is no change to the sink's `writer_identity`. + If the old value was false and the new value is true, then `writer_identity` is changed to a unique service account. + It is an error if the old value was true and the new value is false. + * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". + * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value was false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value was true and the new value is false. * @param {logging(v2beta1).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -725,7 +725,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param {string} params.sinkName Required. The parent resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -754,7 +754,7 @@ function Logging(options) { // eslint-disable-line /** * logging.projects.sinks.create * - * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + * @desc Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. * * @example * // BEFORE RUNNING: @@ -808,8 +808,8 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as `writer_identity` in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as `writer_identity` is `cloud-logs@google.com`, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of `writer_identity` will be a unique service account used only for exports from the new sink. For more information, see `writer_identity` in LogSink. - * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. + * @param {boolean=} params.uniqueWriterIdentity Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * @param {string} params.parent Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" Examples: "projects/my-logging-project", "organizations/123456789". * @param {logging(v2beta1).LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -897,9 +897,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -928,7 +928,7 @@ function Logging(options) { // eslint-disable-line /** * logging.projects.sinks.delete * - * @desc Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted. + * @desc Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. * * @example * // BEFORE RUNNING: @@ -981,7 +981,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink does not exist. + * @param {string} params.sinkName Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1022,9 +1022,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1104,7 +1104,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more information about log names, see LogEntry. + * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1137,7 +1137,7 @@ function Logging(options) { // eslint-disable-line /** * logging.entries.write * - * @desc Writes log entries to Stackdriver Logging. All log entries are written by this method. + * @desc Writes log entries to Stackdriver Logging. All log entries are written by this method. * * @example * // BEFORE RUNNING: @@ -1215,7 +1215,7 @@ function Logging(options) { // eslint-disable-line /** * logging.entries.list * - * @desc Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see [Exporting Logs](/logging/docs/export). + * @desc Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs. * * @example * // BEFORE RUNNING: @@ -1304,7 +1304,7 @@ function Logging(options) { // eslint-disable-line /** * logging.monitoredResourceDescriptors.list * - * @desc Lists the monitored resource descriptors used by Stackdriver Logging. + * @desc Lists the descriptors for monitored resource types used by Stackdriver Logging. * * @example * // BEFORE RUNNING: @@ -1358,8 +1358,8 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1400,9 +1400,9 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available. - * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call. + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * @param {string} params.parent Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1482,7 +1482,7 @@ function Logging(options) { // eslint-disable-line * @memberOf! logging(v2beta1) * * @param {object} params Parameters for request - * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" `[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`, `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more information about log names, see LogEntry. + * @param {string} params.logName Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1515,180 +1515,80 @@ function Logging(options) { // eslint-disable-line * @typedef ListLogEntriesResponse * @memberOf! logging(v2beta1) * @type object -* @property {logging(v2beta1).LogEntry[]} entries A list of log entries. -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -*/ + * @property {logging(v2beta1).LogEntry[]} entries A list of log entries. + * @property {string} nextPageToken If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search. + */ /** * @typedef ListSinksResponse * @memberOf! logging(v2beta1) * @type object -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call the same -method again using the value of `nextPageToken` as `pageToken`. -* @property {logging(v2beta1).LogSink[]} sinks A list of sinks. -*/ + * @property {string} nextPageToken If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. + * @property {logging(v2beta1).LogSink[]} sinks A list of sinks. + */ /** * @typedef SourceLocation * @memberOf! logging(v2beta1) * @type object -* @property {string} file Source file name. Depending on the runtime environment, this might be a -simple name or a fully-qualified name. -* @property {string} functionName Human-readable name of the function or method being invoked, with optional -context such as the class or package name. This information is used in -contexts such as the logs viewer, where a file and line number are less -meaningful. The format can vary by language. For example: -`qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` -(Python). -* @property {string} line Line within the source file. -*/ + * @property {string} file Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. + * @property {string} functionName Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). + * @property {string} line Line within the source file. + */ /** * @typedef LogSink * @memberOf! logging(v2beta1) * @type object * @property {string} destination Required. The export destination: - - "storage.googleapis.com/[GCS_BUCKET]" - "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - -The sink's `writer_identity`, set when the sink is created, must -have permission to write to the destination or else the log -entries are not exported. For more information, see -[Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). -* @property {string} filter Optional. -An [advanced logs filter](/logging/docs/view/advanced_filters). The only -exported log entries are those that are in the resource owning the sink and -that match the filter. The filter must use the log entry format specified -by the `output_version_format` parameter. For example, in the v2 format: - - logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR -* @property {string} endTime Optional. The time at which this sink will stop exporting log entries. Log -entries are exported only if their timestamp is earlier than the end time. -If this field is not supplied, there is no end time. If both a start time -and an end time are provided, then the end time must be later than the -start time. -* @property {string} name Required. The client-assigned sink identifier, unique within the -project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are -limited to 100 characters and can include only the following characters: -upper and lower-case alphanumeric characters, underscores, hyphens, and -periods. -* @property {string} startTime Optional. The time at which this sink will begin exporting log entries. -Log entries are exported only if their timestamp is not earlier than the -start time. The default value of this field is the time the sink is -created or updated. -* @property {string} outputVersionFormat Optional. The log entry format to use for this sink's exported log -entries. The v2 format is used by default. -**The v1 format is deprecated** and should be used only as part of a -migration effort to v2. -See [Migration to the v2 API](/logging/docs/api/v2/migration-to-v2). -* @property {string} writerIdentity Output only. An IAM identity&mdash;a service account or group&mdash;under -which Stackdriver Logging writes the exported log entries to the sink's -destination. This field is set by -[sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) -and -[sinks.update](/logging/docs/api/reference/rest/v2/projects.sinks/update), -based on the setting of `unique_writer_identity` in those methods. - -Until you grant this identity write-access to the destination, log entry -exports from this sink will fail. For more information, -see [Granting access for a -resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). -Consult the destination service's documentation to determine the -appropriate IAM roles to assign to the identity. +"storage.googleapis.com/[GCS_BUCKET]" +"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" +"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" +The sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks. +* @property {string} filter Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format: +logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + +* @property {string} endTime Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time. +* @property {string} name Required. The client-assigned sink identifier, unique within the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. +* @property {string} startTime Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated. +* @property {string} outputVersionFormat Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API. +* @property {string} writerIdentity Output only. An IAM identity&mdash;a service account or group&mdash;under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. */ /** * @typedef ListLogsResponse * @memberOf! logging(v2beta1) * @type object -* @property {string[]} logIds A list of log identifiers. For example, -`"syslog"` or `"cloudresourcemanager.googleapis.com/activity"`. -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -*/ + * @property {string[]} logNames A list of log names. For example, "projects/my-project/syslog" or "organizations/123/cloudresourcemanager.googleapis.com%2Factivity". + * @property {string} nextPageToken If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. + */ /** * @typedef LogMetric * @memberOf! logging(v2beta1) * @type object * @property {string} description Optional. A description of this metric, which is used in documentation. -* @property {string} filter Required. An [advanced logs filter](/logging/docs/view/advanced_filters). -Example: - - "resource.type=gae_app AND severity>=ERROR" - +* @property {string} filter Required. An advanced logs filter which is used to match log entries. Example: +"resource.type=gae_app AND severity>=ERROR" The maximum length of the filter is 20000 characters. -* @property {string} name Required. The client-assigned metric identifier. -Examples: `"error_count"`, `"nginx/requests"`. - -Metric identifiers are limited to 100 characters and can include -only the following characters: `A-Z`, `a-z`, `0-9`, and the -special characters `_-.,+!*',()%/`. The forward-slash character -(`/`) denotes a hierarchy of name pieces, and it cannot be the -first character of the name. - -The metric identifier in this field must not be -[URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding). -However, when the metric identifier appears as the `[METRIC_ID]` -part of a `metric_name` API parameter, then the metric identifier -must be URL-encoded. Example: -`"projects/my-project/metrics/nginx%2Frequests"`. -* @property {string} version Output only. The API version that created or updated this metric. -The version also dictates the syntax of the filter expression. When a value -for this field is missing, the default value of V2 should be assumed. +* @property {string} name Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". +* @property {string} version Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed. */ /** * @typedef LogEntry * @memberOf! logging(v2beta1) * @type object * @property {string} textPayload The log entry payload, represented as a Unicode string (UTF-8). -* @property {logging(v2beta1).HttpRequest} httpRequest Optional. Information about the HTTP request associated with this -log entry, if applicable. -* @property {logging(v2beta1).LogEntrySourceLocation} sourceLocation Optional. Source code location information associated with the log entry, -if any. -* @property {object} jsonPayload The log entry payload, represented as a structure that is -expressed as a JSON object. -* @property {object} labels Optional. A set of user-defined (key, value) data that provides additional -information about the log entry. -* @property {string} trace Optional. Resource name of the trace associated with the log entry, if any. -If it contains a relative resource name, the name is assumed to be relative -to `//tracing.googleapis.com`. Example: -`projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` +* @property {logging(v2beta1).HttpRequest} httpRequest Optional. Information about the HTTP request associated with this log entry, if applicable. +* @property {logging(v2beta1).LogEntrySourceLocation} sourceLocation Optional. Source code location information associated with the log entry, if any. +* @property {object} jsonPayload The log entry payload, represented as a structure that is expressed as a JSON object. +* @property {object} labels Optional. A set of user-defined (key, value) data that provides additional information about the log entry. +* @property {string} trace Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 * @property {string} logName Required. The resource name of the log to which this log entry belongs: - - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - -`[LOG_ID]` must be URL-encoded within `log_name`. Example: -`"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. -`[LOG_ID]` must be less than 512 characters long and can only include the -following characters: upper and lower case alphanumeric characters, -forward-slash, underscore, hyphen, and period. - -For backward compatibility, if `log_name` begins with a forward-slash, such -as `/projects/...`, then the log entry is ingested as usual but the -forward-slash is removed. Listing the log entry will not show the leading -slash and filtering for a log name with a leading slash will never return -any results. -* @property {string} severity Optional. The severity of the log entry. The default value is -`LogSeverity.DEFAULT`. -* @property {logging(v2beta1).MonitoredResource} resource Required. The monitored resource associated with this log entry. -Example: a log entry that reports a database error would be -associated with the monitored resource designating the particular -database that reported the error. -* @property {object} protoPayload The log entry payload, represented as a protocol buffer. Some -Google Cloud Platform services use this field for their log -entry payloads. -* @property {string} timestamp Optional. The time the event described by the log entry occurred. If -omitted, Stackdriver Logging will use the time the log entry is received. -* @property {string} insertId Optional. A unique ID for the log entry. If you provide this -field, the logging service considers other log entries in the -same project with the same ID as duplicates which can be removed. If -omitted, Stackdriver Logging will generate a unique ID for this -log entry. -* @property {logging(v2beta1).LogEntryOperation} operation Optional. Information about an operation associated with the log entry, if -applicable. +"projects/[PROJECT_ID]/logs/[LOG_ID]" +"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" +[LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. +* @property {string} severity Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT. +* @property {logging(v2beta1).MonitoredResource} resource Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error. +* @property {object} protoPayload The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. +* @property {string} timestamp Optional. The time the event described by the log entry occurred. If omitted, Stackdriver Logging will use the time the log entry is received. +* @property {string} insertId Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same project with the same ID as duplicates which can be removed. If omitted, Stackdriver Logging will generate a unique ID for this log entry. +* @property {logging(v2beta1).LogEntryOperation} operation Optional. Information about an operation associated with the log entry, if applicable. */ /** * @typedef LogLine @@ -1703,62 +1603,31 @@ applicable. * @typedef SourceReference * @memberOf! logging(v2beta1) * @type object -* @property {string} repository Optional. A URI string identifying the repository. -Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" -* @property {string} revisionId The canonical and persistent identifier of the deployed revision. -Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" -*/ + * @property {string} repository Optional. A URI string identifying the repository. Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" + * @property {string} revisionId The canonical and persistent identifier of the deployed revision. Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" + */ /** * @typedef MonitoredResource * @memberOf! logging(v2beta1) * @type object -* @property {object} labels Required. Values for all of the labels listed in the associated monitored -resource descriptor. For example, Cloud SQL databases use the labels -`"database_id"` and `"zone"`. -* @property {string} type Required. The monitored resource type. This field must match -the `type` field of a MonitoredResourceDescriptor object. For -example, the type of a Cloud SQL database is `"cloudsql_database"`. -*/ + * @property {object} labels Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels "database_id" and "zone". + * @property {string} type Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is "cloudsql_database". + */ /** * @typedef WriteLogEntriesRequest * @memberOf! logging(v2beta1) * @type object -* @property {object} labels Optional. Default labels that are added to the `labels` field of all log -entries in `entries`. If a log entry already has a label with the same key -as a label in this parameter, then the log entry's label is not changed. -See LogEntry. -* @property {logging(v2beta1).LogEntry[]} entries Required. The log entries to write. Values supplied for the fields -`log_name`, `resource`, and `labels` in this `entries.write` request are -added to those log entries that do not provide their own values for the -fields. - -To improve throughput and to avoid exceeding the -[quota limit](/logging/quota-policy) for calls to `entries.write`, -you should write multiple log entries at once rather than -calling this method for each individual log entry. -* @property {string} logName Optional. A default log resource name that is assigned to all log entries -in `entries` that do not specify a value for `log_name`: - - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - -`[LOG_ID]` must be URL-encoded. For example, -`"projects/my-project-id/logs/syslog"` or -`"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. -For more information about log names, see -LogEntry. -* @property {boolean} partialSuccess Optional. Whether valid entries should be written even if some other -entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any -entry is not written, the response status will be the error associated -with one of the failed entries and include error details in the form of -WriteLogEntriesPartialErrors. -* @property {logging(v2beta1).MonitoredResource} resource Optional. A default monitored resource object that is assigned to all log -entries in `entries` that do not specify a value for `resource`. Example: - - { "type": "gce_instance", - "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - +* @property {object} labels Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry. +* @property {logging(v2beta1).LogEntry[]} entries Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are added to those log entries that do not provide their own values for the fields.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry. +* @property {string} logName Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name: +"projects/[PROJECT_ID]/logs/[LOG_ID]" +"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" +[LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. +* @property {boolean} partialSuccess Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, the response status will be the error associated with one of the failed entries and include error details in the form of WriteLogEntriesPartialErrors. +* @property {logging(v2beta1).MonitoredResource} resource Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example: +{ "type": "gce_instance", + "labels": { + "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See LogEntry. */ /** @@ -1773,55 +1642,35 @@ See LogEntry. * @typedef ListLogMetricsResponse * @memberOf! logging(v2beta1) * @type object -* @property {logging(v2beta1).LogMetric[]} metrics A list of logs-based metrics. -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -*/ + * @property {logging(v2beta1).LogMetric[]} metrics A list of logs-based metrics. + * @property {string} nextPageToken If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. + */ /** * @typedef MonitoredResourceDescriptor * @memberOf! logging(v2beta1) * @type object -* @property {string} displayName Optional. A concise name for the monitored resource type that might be -displayed in user interfaces. It should be a Title Cased Noun Phrase, -without any article or other determiners. For example, -`"Google Cloud SQL Database"`. -* @property {string} description Optional. A detailed description of the monitored resource type that might -be used in documentation. -* @property {logging(v2beta1).LabelDescriptor[]} labels Required. A set of labels used to describe instances of this monitored -resource type. For example, an individual Google Cloud SQL database is -identified by values for the labels `"database_id"` and `"zone"`. -* @property {string} type Required. The monitored resource type. For example, the type -`"cloudsql_database"` represents databases in Google Cloud SQL. -The maximum length of this value is 256 characters. -* @property {string} name Optional. The resource name of the monitored resource descriptor: -`"projects/{project_id}/monitoredResourceDescriptors/{type}"` where -{type} is the value of the `type` field in this object and -{project_id} is a project ID that provides API-specific context for -accessing the type. APIs that do not use project information can use the -resource name format `"monitoredResourceDescriptors/{type}"`. -*/ + * @property {string} displayName Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, "Google Cloud SQL Database". + * @property {string} description Optional. A detailed description of the monitored resource type that might be used in documentation. + * @property {logging(v2beta1).LabelDescriptor[]} labels Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels "database_id" and "zone". + * @property {string} type Required. The monitored resource type. For example, the type "cloudsql_database" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters. + * @property {string} name Optional. The resource name of the monitored resource descriptor: "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format "monitoredResourceDescriptors/{type}". + */ /** * @typedef ListMonitoredResourceDescriptorsResponse * @memberOf! logging(v2beta1) * @type object -* @property {string} nextPageToken If there might be more results than appear in this response, then -`nextPageToken` is included. To get the next set of results, call this -method again using the value of `nextPageToken` as `pageToken`. -* @property {logging(v2beta1).MonitoredResourceDescriptor[]} resourceDescriptors A list of resource descriptors. -*/ + * @property {string} nextPageToken If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. + * @property {logging(v2beta1).MonitoredResourceDescriptor[]} resourceDescriptors A list of resource descriptors. + */ /** * @typedef LogEntryOperation * @memberOf! logging(v2beta1) * @type object -* @property {string} producer Optional. An arbitrary producer identifier. The combination of -`id` and `producer` must be globally unique. Examples for `producer`: -`"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. -* @property {boolean} last Optional. Set this to True if this is the last log entry in the operation. -* @property {boolean} first Optional. Set this to True if this is the first log entry in the operation. -* @property {string} id Optional. An arbitrary operation identifier. Log entries with the -same identifier are assumed to be part of the same operation. -*/ + * @property {string} producer Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication". + * @property {boolean} last Optional. Set this to True if this is the last log entry in the operation. + * @property {boolean} first Optional. Set this to True if this is the first log entry in the operation. + * @property {string} id Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. + */ /** * @typedef Empty * @memberOf! logging(v2beta1) @@ -1831,105 +1680,66 @@ same identifier are assumed to be part of the same operation. * @typedef HttpRequest * @memberOf! logging(v2beta1) * @type object -* @property {boolean} cacheLookup Whether or not a cache lookup was attempted. -* @property {string} responseSize The size of the HTTP response message sent back to the client, in bytes, -including the response headers and the response body. -* @property {integer} status The response code indicating the status of response. -Examples: 200, 404. -* @property {boolean} cacheValidatedWithOriginServer Whether or not the response was validated with the origin server before -being served from cache. This field is only meaningful if `cache_hit` is -True. -* @property {string} referer The referer URL of the request, as defined in -[HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). -* @property {boolean} cacheHit Whether or not an entity was served from cache -(with or without validation). -* @property {string} requestUrl The scheme (http, https), the host name, the path and the query -portion of the URL that was requested. -Example: `"http://example.com/some/info?color=red"`. -* @property {string} latency The request processing latency on the server, from the time the request was -received until the response was sent. -* @property {string} cacheFillBytes The number of HTTP response bytes inserted into cache. Set only when a -cache fill was attempted. -* @property {string} requestMethod The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. -* @property {string} remoteIp The IP address (IPv4 or IPv6) of the client that issued the HTTP -request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. -* @property {string} serverIp The IP address (IPv4 or IPv6) of the origin server that the request was -sent to. -* @property {string} userAgent The user agent sent by the client. Example: -`"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. -* @property {string} requestSize The size of the HTTP request message in bytes, including the request -headers and the request body. -*/ + * @property {boolean} cacheLookup Whether or not a cache lookup was attempted. + * @property {string} responseSize The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body. + * @property {integer} status The response code indicating the status of response. Examples: 200, 404. + * @property {boolean} cacheValidatedWithOriginServer Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True. + * @property {string} referer The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * @property {boolean} cacheHit Whether or not an entity was served from cache (with or without validation). + * @property {string} requestUrl The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: "http://example.com/some/info?color=red". + * @property {string} latency The request processing latency on the server, from the time the request was received until the response was sent. + * @property {string} cacheFillBytes The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted. + * @property {string} requestMethod The request method. Examples: "GET", "HEAD", "PUT", "POST". + * @property {string} remoteIp The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". + * @property {string} serverIp The IP address (IPv4 or IPv6) of the origin server that the request was sent to. + * @property {string} userAgent The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)". + * @property {string} requestSize The size of the HTTP request message in bytes, including the request headers and the request body. + */ /** * @typedef LogEntrySourceLocation * @memberOf! logging(v2beta1) * @type object -* @property {string} function Optional. Human-readable name of the function or method being invoked, with -optional context such as the class or package name. This information may be -used in contexts such as the logs viewer, where a file and line number are -less meaningful. The format can vary by language. For example: -`qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` -(Python). -* @property {string} file Optional. Source file name. Depending on the runtime environment, this -might be a simple name or a fully-qualified name. -* @property {string} line Optional. Line within the source file. 1-based; 0 indicates no line number -available. -*/ + * @property {string} function Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). + * @property {string} file Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. + * @property {string} line Optional. Line within the source file. 1-based; 0 indicates no line number available. + */ /** * @typedef RequestLog * @memberOf! logging(v2beta1) * @type object -* @property {string} responseSize Size in bytes sent back to client by request. -* @property {string} requestId Globally unique identifier for a request, which is based on the request -start time. Request IDs for requests which started later will compare -greater as strings than those for requests which started earlier. -* @property {boolean} first Whether this is the first `RequestLog` entry for this request. If an -active request has several `RequestLog` entries written to Stackdriver -Logging, then this field will be set for one of them. -* @property {string} method Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`. -* @property {string} versionId Version of the application that handled this request. -* @property {integer} status HTTP response status code. Example: 200, 404. -* @property {boolean} wasLoadingRequest Whether this was a loading request for the instance. -* @property {string} ip Origin IP address. -* @property {string} nickname The logged-in user who made the request. - -Most likely, this is the part of the user's email before the `@` sign. The -field value is the same for different requests from the same user, but -different users can have similar names. This information is also -available to the application via the App Engine Users API. - -This field will be populated starting with App Engine 1.9.21. -* @property {string} taskQueueName Queue name of the request, in the case of an offline request. -* @property {string} pendingTime Time this request spent in the pending request queue. -* @property {integer} instanceIndex If the instance processing this request belongs to a manually scaled -module, then this is the 0-based index of the instance. Otherwise, this -value is -1. -* @property {logging(v2beta1).SourceReference[]} sourceReference Source code for the application that handled this request. There can be -more than one source reference per deployed application if source code is -distributed among multiple repositories. -* @property {string} moduleId Module of the application that handled this request. -* @property {string} host Internet host and port number of the resource being requested. -* @property {string} latency Latency of the request. -* @property {string} urlMapEntry File or class that handled the request. -* @property {string} endTime Time when the request finished. -* @property {logging(v2beta1).LogLine[]} line A list of log lines emitted by the application while serving this request. -* @property {string} megaCycles Number of CPU megacycles used to process request. -* @property {string} appId Application that handled this request. -* @property {string} traceId Stackdriver Trace identifier for this request. -* @property {string} taskName Task name of the request, in the case of an offline request. -* @property {number} cost An indication of the relative cost of serving this request. -* @property {string} instanceId An identifier for the instance that handled the request. -* @property {string} startTime Time when the request started. -* @property {string} appEngineRelease App Engine release version. -* @property {string} resource Contains the path and query portion of the URL that was requested. For -example, if the URL was "http://example.com/app?name=val", the resource -would be "/app?name=val". The fragment identifier, which is identified by -the `#` character, is not included. -* @property {string} httpVersion HTTP version of request. Example: `"HTTP/1.1"`. -* @property {string} referrer Referrer URL of request. -* @property {string} userAgent User agent that made the request. -* @property {boolean} finished Whether this request is finished or active. -*/ + * @property {string} responseSize Size in bytes sent back to client by request. + * @property {string} requestId Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier. + * @property {boolean} first Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them. + * @property {string} method Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". + * @property {string} versionId Version of the application that handled this request. + * @property {integer} status HTTP response status code. Example: 200, 404. + * @property {boolean} wasLoadingRequest Whether this was a loading request for the instance. + * @property {string} ip Origin IP address. + * @property {string} nickname The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21. + * @property {string} taskQueueName Queue name of the request, in the case of an offline request. + * @property {string} pendingTime Time this request spent in the pending request queue. + * @property {integer} instanceIndex If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1. + * @property {logging(v2beta1).SourceReference[]} sourceReference Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories. + * @property {string} moduleId Module of the application that handled this request. + * @property {string} host Internet host and port number of the resource being requested. + * @property {string} latency Latency of the request. + * @property {string} urlMapEntry File or class that handled the request. + * @property {string} endTime Time when the request finished. + * @property {logging(v2beta1).LogLine[]} line A list of log lines emitted by the application while serving this request. + * @property {string} megaCycles Number of CPU megacycles used to process request. + * @property {string} appId Application that handled this request. + * @property {string} traceId Stackdriver Trace identifier for this request. + * @property {string} taskName Task name of the request, in the case of an offline request. + * @property {number} cost An indication of the relative cost of serving this request. + * @property {string} instanceId An identifier for the instance that handled the request. + * @property {string} startTime Time when the request started. + * @property {string} appEngineRelease App Engine release version. + * @property {string} resource Contains the path and query portion of the URL that was requested. For example, if the URL was "http://example.com/app?name=val", the resource would be "/app?name=val". The fragment identifier, which is identified by the # character, is not included. + * @property {string} httpVersion HTTP version of request. Example: "HTTP/1.1". + * @property {string} referrer Referrer URL of request. + * @property {string} userAgent User agent that made the request. + * @property {boolean} finished Whether this request is finished or active. + */ /** * @typedef WriteLogEntriesResponse * @memberOf! logging(v2beta1) @@ -1939,37 +1749,14 @@ the `#` character, is not included. * @typedef ListLogEntriesRequest * @memberOf! logging(v2beta1) * @type object -* @property {string} filter Optional. A filter that chooses which log entries to return. See [Advanced -Logs Filters](/logging/docs/view/advanced_filters). Only log entries that -match the filter are returned. An empty filter matches all log entries in -the resources listed in `resource_names`. Referencing a parent resource -that is not listed in `resource_names` will cause the filter to return no -results. -The maximum length of the filter is 20000 characters. -* @property {string[]} projectIds Deprecated. Use `resource_names` instead. One or more project identifiers -or project numbers from which to retrieve log entries. Example: -`"my-project-1A"`. If present, these project identifiers are converted to -resource name format and added to the list of resources in -`resource_names`. -* @property {string[]} resourceNames Required. Names of one or more resources from which to retrieve log -entries: - - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - -Projects listed in the `project_ids` field are added to this list. -* @property {integer} pageSize Optional. The maximum number of results to return from this request. -Non-positive values are ignored. The presence of `nextPageToken` in the -response indicates that more results might be available. -* @property {string} orderBy Optional. How the results should be sorted. Presently, the only permitted -values are `"timestamp asc"` (default) and `"timestamp desc"`. The first -option returns entries in order of increasing values of -`LogEntry.timestamp` (oldest first), and the second option returns entries -in order of decreasing timestamps (newest first). Entries with equal -timestamps are returned in order of `LogEntry.insertId`. -* @property {string} pageToken Optional. If present, then retrieve the next batch of results from the -preceding call to this method. `pageToken` must be the value of -`nextPageToken` from the previous response. The values of other method -parameters should be identical to those in the previous call. +* @property {string} filter Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters. +* @property {string[]} projectIds Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names. +* @property {string[]} resourceNames Required. Names of one or more resources from which to retrieve log entries: +"projects/[PROJECT_ID]" +"organizations/[ORGANIZATION_ID]" +Projects listed in the project_ids field are added to this list. +* @property {integer} pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. +* @property {string} orderBy Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of LogEntry.insertId. +* @property {string} pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. */ module.exports = Logging; diff --git a/apis/ml/v1beta1.js b/apis/ml/v1beta1.js index 8ade6546cd..afe534e7d5 100644 --- a/apis/ml/v1beta1.js +++ b/apis/ml/v1beta1.js @@ -841,7 +841,7 @@ google.rpc.Status.details field, or localized by the client. * @typedef GoogleCloudMlV1beta1__TrainingOutput * @memberOf! ml(v1beta1) * @type object - * @property {number} consumedMlUnits The amount of ML units consumed by the job. + * @property {number} consumedMLUnits The amount of ML units consumed by the job. * @property {string} completedTrialCount The number of hyperparameter tuning trials that completed successfully. * @property {ml(v1beta1).GoogleCloudMlV1beta1__HyperparameterOutput[]} trials Results for individual Hyperparameter trials. */ diff --git a/apis/monitoring/v3.js b/apis/monitoring/v3.js index cfa149964d..bba8cbb2bc 100644 --- a/apis/monitoring/v3.js +++ b/apis/monitoring/v3.js @@ -1067,7 +1067,7 @@ function Monitoring(options) { // eslint-disable-line * * @param {object} params Parameters for request * @param {string=} params.filter A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.label.instance_name = "my-instance-name" - * @param {string=} params.aggregation.groupByFields The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified, the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored. + * @param {string=} params.aggregation.groupByFields The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored. * @param {string=} params.aggregation.crossSeriesReducer The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned. * @param {string=} params.interval.endTime Required. The end of the time interval. * @param {string=} params.interval.startTime Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time. @@ -1384,10 +1384,10 @@ NAME is a sequence of non-blank printable ASCII characters not containing ' * @property {string} metricKind Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported. * @property {string} valueType Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported. * @property {string} displayName A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". -* @property {string} name The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project 123456789: -"projects/123456789/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount" +* @property {string} name The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project my-project-id: +"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount" -* @property {string} type The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example: +* @property {string} type The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined custom metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example: "custom.googleapis.com/invoice/paid/amount" "appengine.googleapis.com/http/server/response_latencies" @@ -1508,8 +1508,8 @@ Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd editio * @typedef Option * @memberOf! monitoring(v3) * @type object - * @property {object} value The option's value. For example, "com.google.protobuf". - * @property {string} name The option's name. For example, "java_package". + * @property {object} value The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type. + * @property {string} name The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry". For custom options, it should be the fully-qualified name. For example, "google.api.http". */ /** * @typedef Empty diff --git a/apis/pubsub/v1.js b/apis/pubsub/v1.js index ba2e52e36c..b71504f009 100644 --- a/apis/pubsub/v1.js +++ b/apis/pubsub/v1.js @@ -25,6 +25,7 @@ var utils = require('../../lib/utils'); * Google Cloud Pub/Sub API * * Provides reliable, many-to-many, asynchronous messaging between applications. + * * @example * var google = require('googleapis'); @@ -42,12 +43,12 @@ function Pubsub(options) { // eslint-disable-line self.projects = { - topics: { + subscriptions: { /** - * pubsub.projects.topics.setIamPolicy + * pubsub.projects.subscriptions.modifyPushConfig * - * @desc Sets the access control policy on the specified resource. Replaces any existing policy. + * @desc Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`. * * @example * // BEFORE RUNNING: @@ -75,12 +76,10 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'setIamPolicy' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'modifyPushConfig' method: * - * // * REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as - * // a path, such as `projects//zones//disks/`. The format for the path specified - * // in this value is resource specific and is specified in the `setIamPolicy` documentation. - * resource_: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * // * The name of the subscription. + * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", * * resource: {}, * @@ -88,7 +87,7 @@ function Pubsub(options) { // eslint-disable-line * auth: authClient * }; * - * pubsub.projects.topics.setIamPolicy(request, function(err, result) { + * pubsub.projects.subscriptions.modifyPushConfig(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -97,17 +96,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.topics.setIamPolicy + * @alias pubsub.projects.subscriptions.modifyPushConfig * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1).SetIamPolicyRequest} params.resource Request body data + * @param {string} params.subscription The name of the subscription. Format is `projects/{project}/subscriptions/{sub}`. + * @param {pubsub(v1).ModifyPushConfigRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy: function (params, options, callback) { + modifyPushConfig: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -116,12 +115,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:setIamPolicy', + url: 'https://pubsub.googleapis.com/v1/{subscription}:modifyPushConfig', method: 'POST' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -129,7 +128,7 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.getIamPolicy + * pubsub.projects.subscriptions.getIamPolicy * * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. * @@ -164,13 +163,13 @@ function Pubsub(options) { // eslint-disable-line * // * REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as * // a path, such as `projects//zones//disks/`. The format for the path specified * // in this value is resource specific and is specified in the `getIamPolicy` documentation. - * resource_: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * resource_: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", * * // Auth client * auth: authClient * }; * - * pubsub.projects.topics.getIamPolicy(request, function(err, result) { + * pubsub.projects.subscriptions.getIamPolicy(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -179,7 +178,7 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.topics.getIamPolicy + * @alias pubsub.projects.subscriptions.getIamPolicy * @memberOf! pubsub(v1) * * @param {object} params Parameters for request @@ -210,9 +209,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.testIamPermissions + * pubsub.projects.subscriptions.pull * - * @desc Returns permissions that a caller has on the specified resource. + * @desc Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription. * * @example * // BEFORE RUNNING: @@ -240,13 +239,10 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'testIamPermissions' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'pull' method: * - * // * REQUIRED: The resource for which the policy detail is being requested. `resource` is usually - * // specified as a path, such as `projects//zones//disks/`. The format for the - * // path specified in this value is resource specific and is specified in the `testIamPermissions` - * // documentation. - * resource_: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * // * The subscription from which messages should be pulled. + * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", * * resource: {}, * @@ -254,7 +250,7 @@ function Pubsub(options) { // eslint-disable-line * auth: authClient * }; * - * pubsub.projects.topics.testIamPermissions(request, function(err, result) { + * pubsub.projects.subscriptions.pull(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -263,17 +259,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.topics.testIamPermissions + * @alias pubsub.projects.subscriptions.pull * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1).TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.subscription The subscription from which messages should be pulled. Format is `projects/{project}/subscriptions/{sub}`. + * @param {pubsub(v1).PullRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions: function (params, options, callback) { + pull: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -282,12 +278,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:testIamPermissions', + url: 'https://pubsub.googleapis.com/v1/{subscription}:pull', method: 'POST' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -295,9 +291,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.create + * pubsub.projects.subscriptions.list * - * @desc Creates the given topic with the given name. + * @desc Lists matching subscriptions. * * @example * // BEFORE RUNNING: @@ -325,40 +321,43 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'create' method: - * - * // * The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` - * // must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - * // underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be - * // between 3 and 255 characters in length, and it must not start with `"goog"`. - * name: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: * - * resource: {}, + * // * The name of the cloud project that subscriptions belong to. + * project: "projects/{MY-PROJECT}", * * // Auth client * auth: authClient * }; * - * pubsub.projects.topics.create(request, function(err, result) { + * + * var recur = function(err, result) { * if (err) { * console.log(err); * } else { * console.log(result); + * if (result.nextPageToken) { + * request.pageToken = result.nextPageToken; + * pubsub.projects.subscriptions.list(request, recur); + * } * } - * }); + * }; + * + * pubsub.projects.subscriptions.list(request, recur); * }); * - * @alias pubsub.projects.topics.create + * @alias pubsub.projects.subscriptions.list * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.name The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - * @param {pubsub(v1).Topic} params.resource Request body data + * @param {integer=} params.pageSize Maximum number of subscriptions to return. + * @param {string} params.project The name of the cloud project that subscriptions belong to. Format is `projects/{project}`. + * @param {string=} params.pageToken The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create: function (params, options, callback) { + list: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -367,12 +366,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{name}', - method: 'PUT' + url: 'https://pubsub.googleapis.com/v1/{project}/subscriptions', + method: 'GET' }, options), params: params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['project'], + pathParams: ['project'], context: self }; @@ -380,9 +379,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.publish + * pubsub.projects.subscriptions.get * - * @desc Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute. + * @desc Gets the configuration details of a subscription. * * @example * // BEFORE RUNNING: @@ -410,18 +409,16 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'publish' method: - * - * // * The messages in the request will be published on this topic. - * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: * - * resource: {}, + * // * The name of the subscription to get. + * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", * * // Auth client * auth: authClient * }; * - * pubsub.projects.topics.publish(request, function(err, result) { + * pubsub.projects.subscriptions.get(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -430,17 +427,16 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.topics.publish + * @alias pubsub.projects.subscriptions.get * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.topic The messages in the request will be published on this topic. - * @param {pubsub(v1).PublishRequest} params.resource Request body data + * @param {string} params.subscription The name of the subscription to get. Format is `projects/{project}/subscriptions/{sub}`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - publish: function (params, options, callback) { + get: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -449,12 +445,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{topic}:publish', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1/{subscription}', + method: 'GET' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -462,9 +458,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.get + * pubsub.projects.subscriptions.create * - * @desc Gets the configuration of a topic. + * @desc Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic, conforming to the [resource name format](https://cloud.google.com/pubsub/docs/overview#names). The generated name is populated in the returned Subscription object. Note that for REST API requests, you must specify a name in the request. * * @example * // BEFORE RUNNING: @@ -492,16 +488,22 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'create' method: * - * // * The name of the topic to get. - * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * // * The name of the subscription. It must have the format + * // `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, + * // and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods + * // (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in + * // length, and it must not start with `"goog"`. + * name: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * + * resource: {}, * * // Auth client * auth: authClient * }; * - * pubsub.projects.topics.get(request, function(err, result) { + * pubsub.projects.subscriptions.create(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -510,16 +512,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.topics.get + * @alias pubsub.projects.subscriptions.create * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.topic The name of the topic to get. + * @param {string} params.name The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. + * @param {pubsub(v1).Subscription} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get: function (params, options, callback) { + create: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -528,12 +531,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{topic}', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1/{name}', + method: 'PUT' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: ['name'], + pathParams: ['name'], context: self }; @@ -541,9 +544,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.list + * pubsub.projects.subscriptions.modifyAckDeadline * - * @desc Lists matching topics. + * @desc Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages. * * @example * // BEFORE RUNNING: @@ -571,43 +574,37 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'modifyAckDeadline' method: * - * // * The name of the cloud project that topics belong to. - * project: "projects/{MY-PROJECT}", + * // * The name of the subscription. + * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * + * resource: {}, * * // Auth client * auth: authClient * }; * - * - * var recur = function(err, result) { + * pubsub.projects.subscriptions.modifyAckDeadline(request, function(err, result) { * if (err) { * console.log(err); * } else { * console.log(result); - * if (result.nextPageToken) { - * request.pageToken = result.nextPageToken; - * pubsub.projects.topics.list(request, recur); - * } * } - * }; - * - * pubsub.projects.topics.list(request, recur); + * }); * }); * - * @alias pubsub.projects.topics.list + * @alias pubsub.projects.subscriptions.modifyAckDeadline * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.project The name of the cloud project that topics belong to. - * @param {integer=} params.pageSize Maximum number of topics to return. - * @param {string=} params.pageToken The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data. + * @param {string} params.subscription The name of the subscription. Format is `projects/{project}/subscriptions/{sub}`. + * @param {pubsub(v1).ModifyAckDeadlineRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list: function (params, options, callback) { + modifyAckDeadline: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -616,12 +613,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{project}/topics', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1/{subscription}:modifyAckDeadline', + method: 'POST' }, options), params: params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -629,9 +626,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.delete + * pubsub.projects.subscriptions.setIamPolicy * - * @desc Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`. + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. * * @example * // BEFORE RUNNING: @@ -659,16 +656,20 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'setIamPolicy' method: * - * // * Name of the topic to delete. - * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * // * REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as + * // a path, such as `projects//zones//disks/`. The format for the path specified + * // in this value is resource specific and is specified in the `setIamPolicy` documentation. + * resource_: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * + * resource: {}, * * // Auth client * auth: authClient * }; * - * pubsub.projects.topics.delete(request, function(err, result) { + * pubsub.projects.subscriptions.setIamPolicy(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -677,16 +678,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.topics.delete + * @alias pubsub.projects.subscriptions.setIamPolicy * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.topic Name of the topic to delete. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1).SetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete: function (params, options, callback) { + setIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -695,116 +697,22 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{topic}', - method: 'DELETE' + url: 'https://pubsub.googleapis.com/v1/{resource}:setIamPolicy', + method: 'POST' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; return createAPIRequest(parameters, callback); }, - subscriptions: { - - /** - * pubsub.projects.topics.subscriptions.list - * - * @desc Lists the name of the subscriptions for this topic. - * - * @example - * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Pub/Sub API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/pubsub - * // 2. This sample uses Application Default Credentials for authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' - * var google = require('googleapis'); - * var pubsub = google.pubsub('v1'); - * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * - * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: - * - * // * The name of the topic that subscriptions are attached to. - * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", - * - * // Auth client - * auth: authClient - * }; - * - * - * var recur = function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * if (result.nextPageToken) { - * request.pageToken = result.nextPageToken; - * pubsub.projects.topics.subscriptions.list(request, recur); - * } - * } - * }; - * - * pubsub.projects.topics.subscriptions.list(request, recur); - * }); - * - * @alias pubsub.projects.topics.subscriptions.list - * @memberOf! pubsub(v1) - * - * @param {object} params Parameters for request - * @param {string} params.topic The name of the topic that subscriptions are attached to. - * @param {integer=} params.pageSize Maximum number of subscription names to return. - * @param {string=} params.pageToken The value returned by the last `ListTopicSubscriptionsResponse`; indicates that this is a continuation of a prior `ListTopicSubscriptions` call, and that the system should return the next page of data. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list: function (params, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - options || (options = {}); - - var parameters = { - options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{topic}/subscriptions', - method: 'GET' - }, options), - params: params, - requiredParams: ['topic'], - pathParams: ['topic'], - context: self - }; - - return createAPIRequest(parameters, callback); - } - } - }, - - subscriptions: { - /** - * pubsub.projects.subscriptions.setIamPolicy + * pubsub.projects.subscriptions.delete * - * @desc Sets the access control policy on the specified resource. Replaces any existing policy. + * @desc Deletes an existing subscription. All messages retained in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription or its topic unless the same topic is specified. * * @example * // BEFORE RUNNING: @@ -832,20 +740,16 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'setIamPolicy' method: - * - * // * REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as - * // a path, such as `projects//zones//disks/`. The format for the path specified - * // in this value is resource specific and is specified in the `setIamPolicy` documentation. - * resource_: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: * - * resource: {}, + * // * The subscription to delete. + * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", * * // Auth client * auth: authClient * }; * - * pubsub.projects.subscriptions.setIamPolicy(request, function(err, result) { + * pubsub.projects.subscriptions.delete(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -854,17 +758,16 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.setIamPolicy + * @alias pubsub.projects.subscriptions.delete * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1).SetIamPolicyRequest} params.resource Request body data + * @param {string} params.subscription The subscription to delete. Format is `projects/{project}/subscriptions/{sub}`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy: function (params, options, callback) { + delete: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -873,12 +776,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:setIamPolicy', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1/{subscription}', + method: 'DELETE' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -886,9 +789,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.getIamPolicy + * pubsub.projects.subscriptions.testIamPermissions * - * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. * * @example * // BEFORE RUNNING: @@ -916,18 +819,21 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'getIamPolicy' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'testIamPermissions' method: * - * // * REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as - * // a path, such as `projects//zones//disks/`. The format for the path specified - * // in this value is resource specific and is specified in the `getIamPolicy` documentation. + * // * REQUIRED: The resource for which the policy detail is being requested. `resource` is usually + * // specified as a path, such as `projects//zones//disks/`. The format for the + * // path specified in this value is resource specific and is specified in the `testIamPermissions` + * // documentation. * resource_: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", * + * resource: {}, + * * // Auth client * auth: authClient * }; * - * pubsub.projects.subscriptions.getIamPolicy(request, function(err, result) { + * pubsub.projects.subscriptions.testIamPermissions(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -936,16 +842,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.getIamPolicy + * @alias pubsub.projects.subscriptions.testIamPermissions * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1).TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy: function (params, options, callback) { + testIamPermissions: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -954,8 +861,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:getIamPolicy', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1/{resource}:testIamPermissions', + method: 'POST' }, options), params: params, requiredParams: ['resource'], @@ -967,9 +874,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.testIamPermissions + * pubsub.projects.subscriptions.acknowledge * - * @desc Returns permissions that a caller has on the specified resource. + * @desc Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error. * * @example * // BEFORE RUNNING: @@ -997,13 +904,10 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'testIamPermissions' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'acknowledge' method: * - * // * REQUIRED: The resource for which the policy detail is being requested. `resource` is usually - * // specified as a path, such as `projects//zones//disks/`. The format for the - * // path specified in this value is resource specific and is specified in the `testIamPermissions` - * // documentation. - * resource_: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // * The subscription whose message is being acknowledged. + * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", * * resource: {}, * @@ -1011,7 +915,7 @@ function Pubsub(options) { // eslint-disable-line * auth: authClient * }; * - * pubsub.projects.subscriptions.testIamPermissions(request, function(err, result) { + * pubsub.projects.subscriptions.acknowledge(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1020,17 +924,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.testIamPermissions + * @alias pubsub.projects.subscriptions.acknowledge * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1).TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.subscription The subscription whose message is being acknowledged. Format is `projects/{project}/subscriptions/{sub}`. + * @param {pubsub(v1).AcknowledgeRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions: function (params, options, callback) { + acknowledge: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1039,22 +943,25 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:testIamPermissions', + url: 'https://pubsub.googleapis.com/v1/{subscription}:acknowledge', method: 'POST' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; return createAPIRequest(parameters, callback); - }, + } + }, + + topics: { /** - * pubsub.projects.subscriptions.create + * pubsub.projects.topics.getIamPolicy * - * @desc Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. Note that for REST API requests, you must specify a name. + * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. * * @example * // BEFORE RUNNING: @@ -1082,22 +989,18 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'create' method: - * - * // * The name of the subscription. It must have the format - * // `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, - * // and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods - * // (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in - * // length, and it must not start with `"goog"`. - * name: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // TODO: Change placeholders below to appropriate parameter values for the 'getIamPolicy' method: * - * resource: {}, + * // * REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as + * // a path, such as `projects//zones//disks/`. The format for the path specified + * // in this value is resource specific and is specified in the `getIamPolicy` documentation. + * resource_: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", * * // Auth client * auth: authClient * }; * - * pubsub.projects.subscriptions.create(request, function(err, result) { + * pubsub.projects.topics.getIamPolicy(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1106,17 +1009,16 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.create + * @alias pubsub.projects.topics.getIamPolicy * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.name The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - * @param {pubsub(v1).Subscription} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create: function (params, options, callback) { + getIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1125,12 +1027,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{name}', - method: 'PUT' + url: 'https://pubsub.googleapis.com/v1/{resource}:getIamPolicy', + method: 'GET' }, options), params: params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; @@ -1138,9 +1040,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.get + * pubsub.projects.topics.publish * - * @desc Gets the configuration details of a subscription. + * @desc Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute. * * @example * // BEFORE RUNNING: @@ -1168,16 +1070,18 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'publish' method: * - * // * The name of the subscription to get. - * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // * The messages in the request will be published on this topic. + * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * + * resource: {}, * * // Auth client * auth: authClient * }; * - * pubsub.projects.subscriptions.get(request, function(err, result) { + * pubsub.projects.topics.publish(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1186,16 +1090,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.get + * @alias pubsub.projects.topics.publish * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.subscription The name of the subscription to get. + * @param {string} params.topic The messages in the request will be published on this topic. Format is `projects/{project}/topics/{topic}`. + * @param {pubsub(v1).PublishRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get: function (params, options, callback) { + publish: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1204,12 +1109,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{subscription}', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1/{topic}:publish', + method: 'POST' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -1217,9 +1122,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.list + * pubsub.projects.topics.list * - * @desc Lists matching subscriptions. + * @desc Lists matching topics. * * @example * // BEFORE RUNNING: @@ -1249,7 +1154,7 @@ function Pubsub(options) { // eslint-disable-line * var request = { * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: * - * // * The name of the cloud project that subscriptions belong to. + * // * The name of the cloud project that topics belong to. * project: "projects/{MY-PROJECT}", * * // Auth client @@ -1264,21 +1169,21 @@ function Pubsub(options) { // eslint-disable-line * console.log(result); * if (result.nextPageToken) { * request.pageToken = result.nextPageToken; - * pubsub.projects.subscriptions.list(request, recur); + * pubsub.projects.topics.list(request, recur); * } * } * }; * - * pubsub.projects.subscriptions.list(request, recur); + * pubsub.projects.topics.list(request, recur); * }); * - * @alias pubsub.projects.subscriptions.list + * @alias pubsub.projects.topics.list * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.project The name of the cloud project that subscriptions belong to. - * @param {integer=} params.pageSize Maximum number of subscriptions to return. - * @param {string=} params.pageToken The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data. + * @param {integer=} params.pageSize Maximum number of topics to return. + * @param {string} params.project The name of the cloud project that topics belong to. Format is `projects/{project}`. + * @param {string=} params.pageToken The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1292,7 +1197,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{project}/subscriptions', + url: 'https://pubsub.googleapis.com/v1/{project}/topics', method: 'GET' }, options), params: params, @@ -1305,9 +1210,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.delete + * pubsub.projects.topics.get * - * @desc Deletes an existing subscription. All messages retained in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription or its topic unless the same topic is specified. + * @desc Gets the configuration of a topic. * * @example * // BEFORE RUNNING: @@ -1335,16 +1240,16 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: * - * // * The subscription to delete. - * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // * The name of the topic to get. + * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", * * // Auth client * auth: authClient * }; * - * pubsub.projects.subscriptions.delete(request, function(err, result) { + * pubsub.projects.topics.get(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1353,16 +1258,16 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.delete + * @alias pubsub.projects.topics.get * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.subscription The subscription to delete. + * @param {string} params.topic The name of the topic to get. Format is `projects/{project}/topics/{topic}`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete: function (params, options, callback) { + get: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1371,12 +1276,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{subscription}', - method: 'DELETE' + url: 'https://pubsub.googleapis.com/v1/{topic}', + method: 'GET' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -1384,9 +1289,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.modifyAckDeadline + * pubsub.projects.topics.create * - * @desc Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages. + * @desc Creates the given topic with the given name. * * @example * // BEFORE RUNNING: @@ -1414,10 +1319,13 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'modifyAckDeadline' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'create' method: * - * // * The name of the subscription. - * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // * The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` + * // must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), + * // underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be + * // between 3 and 255 characters in length, and it must not start with `"goog"`. + * name: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", * * resource: {}, * @@ -1425,7 +1333,7 @@ function Pubsub(options) { // eslint-disable-line * auth: authClient * }; * - * pubsub.projects.subscriptions.modifyAckDeadline(request, function(err, result) { + * pubsub.projects.topics.create(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1434,17 +1342,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.modifyAckDeadline + * @alias pubsub.projects.topics.create * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.subscription The name of the subscription. - * @param {pubsub(v1).ModifyAckDeadlineRequest} params.resource Request body data + * @param {string} params.name The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. + * @param {pubsub(v1).Topic} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - modifyAckDeadline: function (params, options, callback) { + create: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1453,12 +1361,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{subscription}:modifyAckDeadline', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1/{name}', + method: 'PUT' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['name'], + pathParams: ['name'], context: self }; @@ -1466,9 +1374,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.acknowledge + * pubsub.projects.topics.setIamPolicy * - * @desc Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error. + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. * * @example * // BEFORE RUNNING: @@ -1496,10 +1404,12 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'acknowledge' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'setIamPolicy' method: * - * // * The subscription whose message is being acknowledged. - * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // * REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as + * // a path, such as `projects//zones//disks/`. The format for the path specified + * // in this value is resource specific and is specified in the `setIamPolicy` documentation. + * resource_: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", * * resource: {}, * @@ -1507,7 +1417,7 @@ function Pubsub(options) { // eslint-disable-line * auth: authClient * }; * - * pubsub.projects.subscriptions.acknowledge(request, function(err, result) { + * pubsub.projects.topics.setIamPolicy(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1516,17 +1426,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.acknowledge + * @alias pubsub.projects.topics.setIamPolicy * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.subscription The subscription whose message is being acknowledged. - * @param {pubsub(v1).AcknowledgeRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1).SetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - acknowledge: function (params, options, callback) { + setIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1535,12 +1445,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{subscription}:acknowledge', + url: 'https://pubsub.googleapis.com/v1/{resource}:setIamPolicy', method: 'POST' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; @@ -1548,9 +1458,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.pull + * pubsub.projects.topics.delete * - * @desc Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription. + * @desc Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`. * * @example * // BEFORE RUNNING: @@ -1578,18 +1488,16 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'pull' method: - * - * // * The subscription from which messages should be pulled. - * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: * - * resource: {}, + * // * Name of the topic to delete. + * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", * * // Auth client * auth: authClient * }; * - * pubsub.projects.subscriptions.pull(request, function(err, result) { + * pubsub.projects.topics.delete(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1598,17 +1506,16 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.pull + * @alias pubsub.projects.topics.delete * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.subscription The subscription from which messages should be pulled. - * @param {pubsub(v1).PullRequest} params.resource Request body data + * @param {string} params.topic Name of the topic to delete. Format is `projects/{project}/topics/{topic}`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - pull: function (params, options, callback) { + delete: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1617,12 +1524,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{subscription}:pull', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1/{topic}', + method: 'DELETE' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -1630,9 +1537,9 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.modifyPushConfig + * pubsub.projects.topics.testIamPermissions * - * @desc Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`. + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. * * @example * // BEFORE RUNNING: @@ -1660,10 +1567,13 @@ function Pubsub(options) { // eslint-disable-line * } * * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'modifyPushConfig' method: + * // TODO: Change placeholders below to appropriate parameter values for the 'testIamPermissions' method: * - * // * The name of the subscription. - * subscription: "projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}", + * // * REQUIRED: The resource for which the policy detail is being requested. `resource` is usually + * // specified as a path, such as `projects//zones//disks/`. The format for the + * // path specified in this value is resource specific and is specified in the `testIamPermissions` + * // documentation. + * resource_: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", * * resource: {}, * @@ -1671,7 +1581,7 @@ function Pubsub(options) { // eslint-disable-line * auth: authClient * }; * - * pubsub.projects.subscriptions.modifyPushConfig(request, function(err, result) { + * pubsub.projects.topics.testIamPermissions(request, function(err, result) { * if (err) { * console.log(err); * } else { @@ -1680,17 +1590,17 @@ function Pubsub(options) { // eslint-disable-line * }); * }); * - * @alias pubsub.projects.subscriptions.modifyPushConfig + * @alias pubsub.projects.topics.testIamPermissions * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.subscription The name of the subscription. - * @param {pubsub(v1).ModifyPushConfigRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1).TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - modifyPushConfig: function (params, options, callback) { + testIamPermissions: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1699,37 +1609,128 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{subscription}:modifyPushConfig', + url: 'https://pubsub.googleapis.com/v1/{resource}:testIamPermissions', method: 'POST' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; return createAPIRequest(parameters, callback); + }, + + subscriptions: { + + /** + * pubsub.projects.topics.subscriptions.list + * + * @desc Lists the name of the subscriptions for this topic. + * + * @example + * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Pub/Sub API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/pubsub + * // 2. This sample uses Application Default Credentials for authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk/ and run + * // 'gcloud beta auth application-default login' + * // 3. Install the Node.js client library and Application Default Credentials + * // library by running 'npm install googleapis --save' + * var google = require('googleapis'); + * var pubsub = google.pubsub('v1'); + * + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.log('Authentication failed because of ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * + * var request = { + * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: + * + * // * The name of the topic that subscriptions are attached to. + * topic: "projects/{MY-PROJECT}/topics/{MY-TOPIC}", + * + * // Auth client + * auth: authClient + * }; + * + * + * var recur = function(err, result) { + * if (err) { + * console.log(err); + * } else { + * console.log(result); + * if (result.nextPageToken) { + * request.pageToken = result.nextPageToken; + * pubsub.projects.topics.subscriptions.list(request, recur); + * } + * } + * }; + * + * pubsub.projects.topics.subscriptions.list(request, recur); + * }); + * + * @alias pubsub.projects.topics.subscriptions.list + * @memberOf! pubsub(v1) + * + * @param {object} params Parameters for request + * @param {string} params.topic The name of the topic that subscriptions are attached to. Format is `projects/{project}/topics/{topic}`. + * @param {integer=} params.pageSize Maximum number of subscription names to return. + * @param {string=} params.pageToken The value returned by the last `ListTopicSubscriptionsResponse`; indicates that this is a continuation of a prior `ListTopicSubscriptions` call, and that the system should return the next page of data. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list: function (params, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); + + var parameters = { + options: utils.extend({ + url: 'https://pubsub.googleapis.com/v1/{topic}/subscriptions', + method: 'GET' + }, options), + params: params, + requiredParams: ['topic'], + pathParams: ['topic'], + context: self + }; + + return createAPIRequest(parameters, callback); + } } }, snapshots: { /** - * pubsub.projects.snapshots.setIamPolicy + * pubsub.projects.snapshots.testIamPermissions * - * @desc Sets the access control policy on the specified resource. Replaces any existing policy. + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. * - * @alias pubsub.projects.snapshots.setIamPolicy + * @alias pubsub.projects.snapshots.testIamPermissions * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1).SetIamPolicyRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1).TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy: function (params, options, callback) { + testIamPermissions: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1738,7 +1739,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:setIamPolicy', + url: 'https://pubsub.googleapis.com/v1/{resource}:testIamPermissions', method: 'POST' }, options), params: params, @@ -1751,20 +1752,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.snapshots.getIamPolicy + * pubsub.projects.snapshots.setIamPolicy * - * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. * - * @alias pubsub.projects.snapshots.getIamPolicy + * @alias pubsub.projects.snapshots.setIamPolicy * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1).SetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy: function (params, options, callback) { + setIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1773,8 +1775,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:getIamPolicy', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1/{resource}:setIamPolicy', + method: 'POST' }, options), params: params, requiredParams: ['resource'], @@ -1786,21 +1788,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.snapshots.testIamPermissions + * pubsub.projects.snapshots.getIamPolicy * - * @desc Returns permissions that a caller has on the specified resource. + * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. * - * @alias pubsub.projects.snapshots.testIamPermissions + * @alias pubsub.projects.snapshots.getIamPolicy * @memberOf! pubsub(v1) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1).TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions: function (params, options, callback) { + getIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -1809,8 +1810,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1/{resource}:testIamPermissions', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1/{resource}:getIamPolicy', + method: 'GET' }, options), params: params, requiredParams: ['resource'], @@ -1825,144 +1826,274 @@ function Pubsub(options) { // eslint-disable-line } /** - * @typedef SetIamPolicyRequest + * @typedef Topic * @memberOf! pubsub(v1) * @type object - * @property {pubsub(v1).Policy} policy 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. - */ +* @property {string} name The name of the topic. It must have the format +`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, +and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), +underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent +signs (`%`). It must be between 3 and 255 characters in length, and it +must not start with `"goog"`. +*/ /** - * @typedef Policy + * @typedef SetIamPolicyRequest * @memberOf! pubsub(v1) * @type object - * @property {integer} version Version of the `Policy`. The default version is 0. - * @property {pubsub(v1).Binding[]} bindings 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. - * @property {string} etag `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. - */ +* @property {pubsub(v1).Policy} policy 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. +*/ /** - * @typedef Binding + * @typedef ReceivedMessage * @memberOf! pubsub(v1) * @type object - * @property {string} role Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required - * @property {string[]} members 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`. + * @property {string} ackId This ID can be used to acknowledge the received message. + * @property {pubsub(v1).PubsubMessage} message The message. */ /** - * @typedef TestIamPermissionsRequest + * @typedef PublishRequest * @memberOf! pubsub(v1) * @type object - * @property {string[]} permissions 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). + * @property {pubsub(v1).PubsubMessage[]} messages The messages to publish. */ /** * @typedef TestIamPermissionsResponse * @memberOf! pubsub(v1) * @type object - * @property {string[]} permissions A subset of `TestPermissionsRequest.permissions` that the caller is allowed. - */ +* @property {string[]} permissions A subset of `TestPermissionsRequest.permissions` that the caller is +allowed. +*/ /** - * @typedef Topic + * @typedef PublishResponse * @memberOf! pubsub(v1) * @type object - * @property {string} name The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - */ +* @property {string[]} messageIds The server-assigned ID of each published message, in the same order as +the messages in the request. IDs are guaranteed to be unique within +the topic. +*/ /** - * @typedef PublishRequest + * @typedef ListSubscriptionsResponse * @memberOf! pubsub(v1) * @type object - * @property {pubsub(v1).PubsubMessage[]} messages The messages to publish. - */ +* @property {pubsub(v1).Subscription[]} subscriptions The subscriptions that match the request. +* @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match +the request; this value should be passed in a new +`ListSubscriptionsRequest` to get more subscriptions. +*/ /** - * @typedef PubsubMessage + * @typedef Policy * @memberOf! pubsub(v1) * @type object - * @property {string} data The message payload. For JSON requests, the value of this field must be [base64-encoded](https://tools.ietf.org/html/rfc4648). - * @property {object} attributes Optional attributes for this message. - * @property {string} messageId ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call. - * @property {string} publishTime The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call. - */ +* @property {pubsub(v1).Binding[]} bindings 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. +* @property {string} etag `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. +* @property {integer} version Version of the `Policy`. The default version is 0. +*/ /** - * @typedef PublishResponse + * @typedef ListTopicSubscriptionsResponse * @memberOf! pubsub(v1) * @type object - * @property {string[]} messageIds The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic. - */ +* @property {string[]} subscriptions The names of the subscriptions that match the request. +* @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match +the request; this value should be passed in a new +`ListTopicSubscriptionsRequest` to get more subscriptions. +*/ /** - * @typedef ListTopicsResponse + * @typedef Subscription * @memberOf! pubsub(v1) * @type object - * @property {pubsub(v1).Topic[]} topics The resulting topics. - * @property {string} nextPageToken If not empty, indicates that there may be more topics that match the request; this value should be passed in a new `ListTopicsRequest`. - */ +* @property {pubsub(v1).PushConfig} pushConfig If push delivery is used with this subscription, this field is +used to configure it. An empty `pushConfig` signifies that the subscriber +will pull and ack messages using API methods. +* @property {string} topic The name of the topic from which this subscription is receiving messages. +Format is `projects/{project}/topics/{topic}`. +The value of this field will be `_deleted-topic_` if the topic has been +deleted. +* @property {integer} ackDeadlineSeconds This value is the maximum time after a subscriber receives a message +before the subscriber should acknowledge the message. After message +delivery but before the ack deadline expires and before the message is +acknowledged, it is an outstanding message and will not be delivered +again during that time (on a best-effort basis). + +For pull subscriptions, this value is used as the initial value for the ack +deadline. To override this value for a given message, call +`ModifyAckDeadline` with the corresponding `ack_id` if using +pull. +The minimum custom deadline you can specify is 10 seconds. +The maximum custom deadline you can specify is 600 seconds (10 minutes). +If this parameter is 0, a default value of 10 seconds is used. + +For push delivery, this value is also used to set the request timeout for +the call to the push endpoint. + +If the subscriber never acknowledges the message, the Pub/Sub +system will eventually redeliver the message. +* @property {string} name The name of the subscription. It must have the format +`"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must +start with a letter, and contain only letters (`[A-Za-z]`), numbers +(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), +plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters +in length, and it must not start with `"goog"`. +*/ /** - * @typedef ListTopicSubscriptionsResponse + * @typedef ModifyAckDeadlineRequest * @memberOf! pubsub(v1) * @type object - * @property {string[]} subscriptions The names of the subscriptions that match the request. - * @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListTopicSubscriptionsRequest` to get more subscriptions. - */ +* @property {integer} ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to +the Pub/Sub system. For example, if the value is 10, the new +ack deadline will expire 10 seconds after the `ModifyAckDeadline` call +was made. Specifying zero may immediately make the message available for +another pull request. +The minimum deadline you can specify is 0 seconds. +The maximum deadline you can specify is 600 seconds (10 minutes). +* @property {string[]} ackIds List of acknowledgment IDs. +*/ /** - * @typedef Empty + * @typedef TestIamPermissionsRequest * @memberOf! pubsub(v1) * @type object - */ +* @property {string[]} permissions 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). +*/ /** - * @typedef Subscription + * @typedef PushConfig * @memberOf! pubsub(v1) * @type object - * @property {string} name The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - * @property {string} topic The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted. - * @property {pubsub(v1).PushConfig} pushConfig If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods. - * @property {integer} ackDeadlineSeconds This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is 0, a default value of 10 seconds is used. - */ +* @property {object} attributes Endpoint configuration attributes. + +Every endpoint has a set of API supported attributes that can be used to +control different aspects of the message delivery. + +The currently supported attribute is `x-goog-version`, which you can +use to change the format of the push message. This attribute +indicates the version of the data expected by the endpoint. This +controls the shape of the envelope (i.e. its fields and metadata). +The endpoint version is based on the version of the Pub/Sub +API. + +If not present during the `CreateSubscription` call, it will default to +the version of the API used to make such call. If not present during a +`ModifyPushConfig` call, its value will not be changed. `GetSubscription` +calls will always return a valid version, even if the subscription was +created without this attribute. + +The possible values for this attribute are: + +* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. +* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. +* @property {string} pushEndpoint A URL locating the endpoint to which messages should be pushed. +For example, a Webhook endpoint might use "https://example.com/push". +*/ /** - * @typedef PushConfig + * @typedef PullRequest * @memberOf! pubsub(v1) * @type object - * @property {string} pushEndpoint A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push". - * @property {object} attributes Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. - */ +* @property {boolean} returnImmediately If this field set to true, the system will respond immediately even if +it there are no messages available to return in the `Pull` response. +Otherwise, the system may wait (for a bounded amount of time) until at +least one message is available, rather than returning no messages. The +client may cancel the request if it does not wish to wait any longer for +the response. +* @property {integer} maxMessages The maximum number of messages returned for this request. The Pub/Sub +system may return fewer than the number specified. +*/ /** - * @typedef ListSubscriptionsResponse + * @typedef ModifyPushConfigRequest * @memberOf! pubsub(v1) * @type object - * @property {pubsub(v1).Subscription[]} subscriptions The subscriptions that match the request. - * @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListSubscriptionsRequest` to get more subscriptions. - */ +* @property {pubsub(v1).PushConfig} pushConfig The push configuration for future deliveries. + +An empty `pushConfig` indicates that the Pub/Sub system should +stop pushing messages from the given subscription and allow +messages to be pulled and acknowledged - effectively pausing +the subscription if `Pull` is not called. +*/ /** - * @typedef ModifyAckDeadlineRequest + * @typedef PullResponse * @memberOf! pubsub(v1) * @type object - * @property {string[]} ackIds List of acknowledgment IDs. - * @property {integer} ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero may immediately make the message available for another pull request. - */ +* @property {pubsub(v1).ReceivedMessage[]} receivedMessages Received Pub/Sub messages. The Pub/Sub system will return zero messages if +there are no more available in the backlog. The Pub/Sub system may return +fewer than the `maxMessages` requested even if there are more messages +available in the backlog. +*/ /** - * @typedef AcknowledgeRequest + * @typedef PubsubMessage * @memberOf! pubsub(v1) * @type object - * @property {string[]} ackIds The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty. - */ +* @property {string} data The message payload. +* @property {object} attributes Optional attributes for this message. +* @property {string} messageId ID of this message, assigned by the server when the message is published. +Guaranteed to be unique within the topic. This value may be read by a +subscriber that receives a `PubsubMessage` via a `Pull` call or a push +delivery. It must not be populated by the publisher in a `Publish` call. +* @property {string} publishTime The time at which the message was published, populated by the server when +it receives the `Publish` call. It must not be populated by the +publisher in a `Publish` call. +*/ /** - * @typedef PullRequest + * @typedef AcknowledgeRequest * @memberOf! pubsub(v1) * @type object - * @property {boolean} returnImmediately If this is specified as true the system will respond immediately even if it is not able to return a message in the `Pull` response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response. - * @property {integer} maxMessages The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified. - */ +* @property {string[]} ackIds The acknowledgment ID for the messages being acknowledged that was returned +by the Pub/Sub system in the `Pull` response. Must not be empty. +*/ /** - * @typedef PullResponse + * @typedef Empty * @memberOf! pubsub(v1) * @type object - * @property {pubsub(v1).ReceivedMessage[]} receivedMessages Received Pub/Sub messages. The Pub/Sub system will return zero messages if there are no more available in the backlog. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog. */ /** - * @typedef ReceivedMessage + * @typedef ListTopicsResponse * @memberOf! pubsub(v1) * @type object - * @property {string} ackId This ID can be used to acknowledge the received message. - * @property {pubsub(v1).PubsubMessage} message The message. - */ +* @property {string} nextPageToken If not empty, indicates that there may be more topics that match the +request; this value should be passed in a new `ListTopicsRequest`. +* @property {pubsub(v1).Topic[]} topics The resulting topics. +*/ /** - * @typedef ModifyPushConfigRequest + * @typedef Binding * @memberOf! pubsub(v1) * @type object - * @property {pubsub(v1).PushConfig} pushConfig The push configuration for future deliveries. An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if `Pull` is not called. - */ +* @property {string[]} members 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`. + + +* @property {string} role Role that is assigned to `members`. +For example, `roles/viewer`, `roles/editor`, or `roles/owner`. +Required +*/ module.exports = Pubsub; diff --git a/apis/pubsub/v1beta1a.js b/apis/pubsub/v1beta1a.js index 09e9a1049f..10f14aa978 100644 --- a/apis/pubsub/v1beta1a.js +++ b/apis/pubsub/v1beta1a.js @@ -25,6 +25,7 @@ var utils = require('../../lib/utils'); * Google Cloud Pub/Sub API * * Provides reliable, many-to-many, asynchronous messaging between applications. + * * @example * var google = require('googleapis'); @@ -40,23 +41,23 @@ function Pubsub(options) { // eslint-disable-line var self = this; self._options = options || {}; - self.topics = { + self.subscriptions = { /** - * pubsub.topics.create + * pubsub.subscriptions.modifyPushConfig * - * @desc Creates the given topic with the given name. + * @desc Modifies the PushConfig for a specified subscription. This method can be used to suspend the flow of messages to an endpoint by clearing the PushConfig field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified. * - * @alias pubsub.topics.create + * @alias pubsub.subscriptions.modifyPushConfig * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).Topic} params.resource Request body data + * @param {pubsub(v1beta1a).ModifyPushConfigRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create: function (params, options, callback) { + modifyPushConfig: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -65,7 +66,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/topics', + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/modifyPushConfig', method: 'POST' }, options), params: params, @@ -78,20 +79,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.topics.publish + * pubsub.subscriptions.pull * - * @desc Adds a message to the topic. Returns NOT_FOUND if the topic does not exist. + * @desc Pulls a single message from the server. If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load). * - * @alias pubsub.topics.publish + * @alias pubsub.subscriptions.pull * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).PublishRequest} params.resource Request body data + * @param {pubsub(v1beta1a).PullRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - publish: function (params, options, callback) { + pull: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -100,7 +101,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/topics/publish', + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/pull', method: 'POST' }, options), params: params, @@ -113,20 +114,22 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.topics.publishBatch + * pubsub.subscriptions.list * - * @desc Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist. + * @desc Lists matching subscriptions. * - * @alias pubsub.topics.publishBatch + * @alias pubsub.subscriptions.list * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).PublishBatchRequest} params.resource Request body data + * @param {string=} params.query A valid label query expression. + * @param {integer=} params.maxResults Maximum number of subscriptions to return. + * @param {string=} params.pageToken The value obtained in the last ListSubscriptionsResponse for continuation. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - publishBatch: function (params, options, callback) { + list: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -135,8 +138,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/topics/publishBatch', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions', + method: 'GET' }, options), params: params, requiredParams: [], @@ -148,15 +151,15 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.topics.get + * pubsub.subscriptions.get * - * @desc Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here. + * @desc Gets the configuration details of a subscription. * - * @alias pubsub.topics.get + * @alias pubsub.subscriptions.get * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {string} params.topic The name of the topic to get. + * @param {string} params.subscription The name of the subscription to get. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -170,12 +173,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/topics/{topic}', + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/{subscription}', method: 'GET' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -183,22 +186,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.topics.list + * pubsub.subscriptions.pullBatch * - * @desc Lists matching topics. + * @desc Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription. * - * @alias pubsub.topics.list + * @alias pubsub.subscriptions.pullBatch * @memberOf! pubsub(v1beta1a) * - * @param {object=} params Parameters for request - * @param {string=} params.query A valid label query expression. - * @param {integer=} params.maxResults Maximum number of topics to return. - * @param {string=} params.pageToken The value obtained in the last ListTopicsResponse for continuation. + * @param {object} params Parameters for request + * @param {pubsub(v1beta1a).PullBatchRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list: function (params, options, callback) { + pullBatch: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -207,8 +208,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/topics', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/pullBatch', + method: 'POST' }, options), params: params, requiredParams: [], @@ -220,20 +221,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.topics.delete + * pubsub.subscriptions.create * - * @desc Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name. + * @desc Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. * - * @alias pubsub.topics.delete + * @alias pubsub.subscriptions.create * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {string} params.topic Name of the topic to delete. + * @param {pubsub(v1beta1a).Subscription} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete: function (params, options, callback) { + create: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -242,37 +243,33 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/topics/{topic}', - method: 'DELETE' + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions', + method: 'POST' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: [], + pathParams: [], context: self }; return createAPIRequest(parameters, callback); - } - - }; - - self.subscriptions = { + }, /** - * pubsub.subscriptions.create + * pubsub.subscriptions.modifyAckDeadline * - * @desc Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. + * @desc Modifies the Ack deadline for a message received from a pull request. * - * @alias pubsub.subscriptions.create + * @alias pubsub.subscriptions.modifyAckDeadline * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).Subscription} params.resource Request body data + * @param {pubsub(v1beta1a).ModifyAckDeadlineRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create: function (params, options, callback) { + modifyAckDeadline: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -281,7 +278,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions', + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/modifyAckDeadline', method: 'POST' }, options), params: params, @@ -294,20 +291,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.subscriptions.get + * pubsub.subscriptions.delete * - * @desc Gets the configuration details of a subscription. + * @desc Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. * - * @alias pubsub.subscriptions.get + * @alias pubsub.subscriptions.delete * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {string} params.subscription The name of the subscription to get. + * @param {string} params.subscription The subscription to delete. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get: function (params, options, callback) { + delete: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -317,7 +314,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/{subscription}', - method: 'GET' + method: 'DELETE' }, options), params: params, requiredParams: ['subscription'], @@ -329,22 +326,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.subscriptions.list + * pubsub.subscriptions.acknowledge * - * @desc Lists matching subscriptions. + * @desc Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription. Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull. * - * @alias pubsub.subscriptions.list + * @alias pubsub.subscriptions.acknowledge * @memberOf! pubsub(v1beta1a) * - * @param {object=} params Parameters for request - * @param {string=} params.query A valid label query expression. - * @param {integer=} params.maxResults Maximum number of subscriptions to return. - * @param {string=} params.pageToken The value obtained in the last ListSubscriptionsResponse for continuation. + * @param {object} params Parameters for request + * @param {pubsub(v1beta1a).AcknowledgeRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list: function (params, options, callback) { + acknowledge: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -353,8 +348,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/acknowledge', + method: 'POST' }, options), params: params, requiredParams: [], @@ -363,23 +358,27 @@ function Pubsub(options) { // eslint-disable-line }; return createAPIRequest(parameters, callback); - }, + } + + }; + + self.topics = { /** - * pubsub.subscriptions.delete + * pubsub.topics.publish * - * @desc Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. + * @desc Adds a message to the topic. Returns NOT_FOUND if the topic does not exist. * - * @alias pubsub.subscriptions.delete + * @alias pubsub.topics.publish * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {string} params.subscription The subscription to delete. + * @param {pubsub(v1beta1a).PublishRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete: function (params, options, callback) { + publish: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -388,12 +387,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/{subscription}', - method: 'DELETE' + url: 'https://pubsub.googleapis.com/v1beta1a/topics/publish', + method: 'POST' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: [], + pathParams: [], context: self }; @@ -401,20 +400,22 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.subscriptions.modifyPushConfig + * pubsub.topics.list * - * @desc Modifies the PushConfig for a specified subscription. This method can be used to suspend the flow of messages to an endpoint by clearing the PushConfig field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified. + * @desc Lists matching topics. * - * @alias pubsub.subscriptions.modifyPushConfig + * @alias pubsub.topics.list * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).ModifyPushConfigRequest} params.resource Request body data + * @param {string=} params.query A valid label query expression. + * @param {integer=} params.maxResults Maximum number of topics to return. + * @param {string=} params.pageToken The value obtained in the last ListTopicsResponse for continuation. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - modifyPushConfig: function (params, options, callback) { + list: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -423,8 +424,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/modifyPushConfig', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta1a/topics', + method: 'GET' }, options), params: params, requiredParams: [], @@ -436,20 +437,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.subscriptions.pull + * pubsub.topics.get * - * @desc Pulls a single message from the server. If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load). + * @desc Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here. * - * @alias pubsub.subscriptions.pull + * @alias pubsub.topics.get * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).PullRequest} params.resource Request body data + * @param {string} params.topic The name of the topic to get. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - pull: function (params, options, callback) { + get: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -458,12 +459,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/pull', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta1a/topics/{topic}', + method: 'GET' }, options), params: params, - requiredParams: [], - pathParams: [], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -471,20 +472,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.subscriptions.pullBatch + * pubsub.topics.publishBatch * - * @desc Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription. + * @desc Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist. * - * @alias pubsub.subscriptions.pullBatch + * @alias pubsub.topics.publishBatch * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).PullBatchRequest} params.resource Request body data + * @param {pubsub(v1beta1a).PublishBatchRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - pullBatch: function (params, options, callback) { + publishBatch: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -493,7 +494,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/pullBatch', + url: 'https://pubsub.googleapis.com/v1beta1a/topics/publishBatch', method: 'POST' }, options), params: params, @@ -506,20 +507,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.subscriptions.modifyAckDeadline + * pubsub.topics.create * - * @desc Modifies the Ack deadline for a message received from a pull request. + * @desc Creates the given topic with the given name. * - * @alias pubsub.subscriptions.modifyAckDeadline + * @alias pubsub.topics.create * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).ModifyAckDeadlineRequest} params.resource Request body data + * @param {pubsub(v1beta1a).Topic} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - modifyAckDeadline: function (params, options, callback) { + create: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -528,7 +529,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/modifyAckDeadline', + url: 'https://pubsub.googleapis.com/v1beta1a/topics', method: 'POST' }, options), params: params, @@ -541,20 +542,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.subscriptions.acknowledge + * pubsub.topics.delete * - * @desc Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription. Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull. + * @desc Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name. * - * @alias pubsub.subscriptions.acknowledge + * @alias pubsub.topics.delete * @memberOf! pubsub(v1beta1a) * * @param {object} params Parameters for request - * @param {pubsub(v1beta1a).AcknowledgeRequest} params.resource Request body data + * @param {string} params.topic Name of the topic to delete. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - acknowledge: function (params, options, callback) { + delete: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -563,12 +564,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta1a/subscriptions/acknowledge', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta1a/topics/{topic}', + method: 'DELETE' }, options), params: params, - requiredParams: [], - pathParams: [], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -579,140 +580,211 @@ function Pubsub(options) { // eslint-disable-line } /** - * @typedef Topic + * @typedef PullBatchResponse * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} name Name of the topic. - */ +* @property {pubsub(v1beta1a).PullResponse[]} pullResponses Received Pub/Sub messages or status events. The Pub/Sub system will return +zero messages if there are no more messages available in the backlog. The +Pub/Sub system may return fewer than the max_events requested even if +there are more messages available in the backlog. +*/ /** - * @typedef PublishRequest + * @typedef Topic * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} topic The message in the request will be published on this topic. - * @property {pubsub(v1beta1a).PubsubMessage} message The message to publish. + * @property {string} name Name of the topic. */ /** - * @typedef PubsubMessage + * @typedef PublishBatchResponse * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} data The message payload. - * @property {pubsub(v1beta1a).Label[]} label Optional list of labels for this message. Keys in this collection must be unique. - * @property {string} messageId ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a PubsubMessage via a Pull call or a push delivery. It must not be populated by a publisher in a Publish call. - * @property {string} publishTime The time at which the message was published. The time is milliseconds since the UNIX epoch. - */ +* @property {string[]} messageIds The server-assigned ID of each published message, in the same order as +the messages in the request. IDs are guaranteed to be unique within +the topic. +*/ /** - * @typedef Label + * @typedef PublishRequest * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} key The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a network endpoint. Instead, the namespace indicates what system or entity defines the semantics of the label. Namespaces do not restrict the set of objects to which a label may be associated. Keys are defined by the following grammar: key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ] where "hostname" and "alphadigit" are defined as in RFC 1738. Example key: spanner.google.com/universe - * @property {string} strValue A string value. - * @property {string} numValue An integer value. + * @property {string} topic The message in the request will be published on this topic. + * @property {pubsub(v1beta1a).PubsubMessage} message The message to publish. */ /** - * @typedef Empty + * @typedef ListSubscriptionsResponse * @memberOf! pubsub(v1beta1a) * @type object - */ +* @property {string} nextPageToken If not empty, indicates that there are more subscriptions that match the +request and this value should be passed to the next +<code>ListSubscriptionsRequest</code> to continue. +* @property {pubsub(v1beta1a).Subscription[]} subscription The subscriptions that match the request. +*/ /** - * @typedef PublishBatchRequest + * @typedef Subscription * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} topic The messages in the request will be published on this topic. - * @property {pubsub(v1beta1a).PubsubMessage[]} messages The messages to publish. - */ +* @property {pubsub(v1beta1a).PushConfig} pushConfig If push delivery is used with this subscription, this field is +used to configure it. +* @property {string} topic The name of the topic from which this subscription is receiving messages. +* @property {integer} ackDeadlineSeconds For either push or pull delivery, the value is the maximum time after a +subscriber receives a message before the subscriber should acknowledge or +Nack the message. If the Ack deadline for a message passes without an +Ack or a Nack, the Pub/Sub system will eventually redeliver the message. +If a subscriber acknowledges after the deadline, the Pub/Sub system may +accept the Ack, but it is possible that the message has been already +delivered again. Multiple Acks to the message are allowed and will +succeed. + +For push delivery, this value is used to set the request timeout for +the call to the push endpoint. + +For pull delivery, this value is used as the initial value for the Ack +deadline. It may be overridden for each message using its corresponding +ack_id with <code>ModifyAckDeadline</code>. +While a message is outstanding (i.e. it has been delivered to a pull +subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub +system will not deliver that message to another pull subscriber +(on a best-effort basis). +* @property {string} name Name of the subscription. +*/ /** - * @typedef PublishBatchResponse + * @typedef Label * @memberOf! pubsub(v1beta1a) * @type object - * @property {string[]} messageIds The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic. - */ +* @property {string} strValue A string value. +* @property {string} key The key of a label is a syntactically valid URL (as per RFC 1738) with +the "scheme" and initial slashes omitted and with the additional +restrictions noted below. Each key should be globally unique. The +"host" portion is called the "namespace" and is not necessarily +resolvable to a network endpoint. Instead, the namespace indicates what +system or entity defines the semantics of the label. Namespaces do not +restrict the set of objects to which a label may be associated. + +Keys are defined by the following grammar: + + key = hostname "/" kpath + kpath = ksegment *[ "/" ksegment ] + ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ] + +where "hostname" and "alphadigit" are defined as in RFC 1738. + +Example key: + spanner.google.com/universe +* @property {string} numValue An integer value. +*/ /** - * @typedef ListTopicsResponse + * @typedef ModifyAckDeadlineRequest * @memberOf! pubsub(v1beta1a) * @type object - * @property {pubsub(v1beta1a).Topic[]} topic The resulting topics. - * @property {string} nextPageToken If not empty, indicates that there are more topics that match the request, and this value should be passed to the next ListTopicsRequest to continue. - */ +* @property {integer} ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to the +Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack +deadline will expire 10 seconds after the ModifyAckDeadline call was made. +Specifying zero may immediately make the message available for another pull +request. +* @property {string} ackId The acknowledgment ID. Either this or ack_ids must be populated, +not both. +* @property {string} subscription Next Index: 5 +The name of the subscription from which messages are being pulled. +* @property {string[]} ackIds List of acknowledgment IDs. Either this field or ack_id +should be populated, not both. +*/ /** - * @typedef Subscription + * @typedef PushConfig * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} name Name of the subscription. - * @property {string} topic The name of the topic from which this subscription is receiving messages. - * @property {pubsub(v1beta1a).PushConfig} pushConfig If push delivery is used with this subscription, this field is used to configure it. - * @property {integer} ackDeadlineSeconds For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis). - */ +* @property {string} pushEndpoint A URL locating the endpoint to which messages should be pushed. +For example, a Webhook endpoint might use "https://example.com/push". +*/ /** - * @typedef PushConfig + * @typedef PullRequest * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} pushEndpoint A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push". - */ +* @property {boolean} returnImmediately If this is specified as true the system will respond immediately even if +it is not able to return a message in the Pull response. Otherwise the +system is allowed to wait until at least one message is available rather +than returning FAILED_PRECONDITION. The client may cancel the request if +it does not wish to wait any longer for the response. +* @property {string} subscription The subscription from which a message should be pulled. +*/ /** - * @typedef ListSubscriptionsResponse + * @typedef ModifyPushConfigRequest * @memberOf! pubsub(v1beta1a) * @type object - * @property {pubsub(v1beta1a).Subscription[]} subscription The subscriptions that match the request. - * @property {string} nextPageToken If not empty, indicates that there are more subscriptions that match the request and this value should be passed to the next ListSubscriptionsRequest to continue. - */ +* @property {pubsub(v1beta1a).PushConfig} pushConfig An empty <code>push_config</code> indicates that the Pub/Sub system should +pause pushing messages from the given subscription. +* @property {string} subscription The name of the subscription. +*/ /** - * @typedef ModifyPushConfigRequest + * @typedef PullResponse * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} subscription The name of the subscription. - * @property {pubsub(v1beta1a).PushConfig} pushConfig An empty push_config indicates that the Pub/Sub system should pause pushing messages from the given subscription. + * @property {pubsub(v1beta1a).PubsubEvent} pubsubEvent A pubsub message or truncation event. + * @property {string} ackId This ID must be used to acknowledge the received event or message. */ /** - * @typedef PullRequest + * @typedef PubsubMessage * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} subscription The subscription from which a message should be pulled. - * @property {boolean} returnImmediately If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning FAILED_PRECONDITION. The client may cancel the request if it does not wish to wait any longer for the response. - */ +* @property {string} data The message payload. +* @property {string} messageId ID of this message assigned by the server at publication time. Guaranteed +to be unique within the topic. This value may be read by a subscriber +that receives a PubsubMessage via a Pull call or a push delivery. It must +not be populated by a publisher in a Publish call. +* @property {string} publishTime The time at which the message was published. +The time is milliseconds since the UNIX epoch. +* @property {pubsub(v1beta1a).Label[]} label Optional list of labels for this message. Keys in this collection must +be unique. +*/ /** - * @typedef PullResponse + * @typedef PublishBatchRequest * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} ackId This ID must be used to acknowledge the received event or message. - * @property {pubsub(v1beta1a).PubsubEvent} pubsubEvent A pubsub message or truncation event. + * @property {string} topic The messages in the request will be published on this topic. + * @property {pubsub(v1beta1a).PubsubMessage[]} messages The messages to publish. */ /** - * @typedef PubsubEvent + * @typedef AcknowledgeRequest * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} subscription The subscription that received the event. - * @property {pubsub(v1beta1a).PubsubMessage} message A received message. - * @property {boolean} truncated Indicates that this subscription has been truncated. - * @property {boolean} deleted Indicates that this subscription has been deleted. (Note that pull subscribers will always receive NOT_FOUND in response in their pull request on the subscription, rather than seeing this boolean.) - */ +* @property {string[]} ackId The acknowledgment ID for the message being acknowledged. This was +returned by the Pub/Sub system in the Pull response. +* @property {string} subscription The subscription whose message is being acknowledged. +*/ /** - * @typedef PullBatchRequest + * @typedef Empty * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} subscription The subscription from which messages should be pulled. - * @property {boolean} returnImmediately If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response. - * @property {integer} maxEvents The maximum number of PubsubEvents returned for this request. The Pub/Sub system may return fewer than the number of events specified. */ /** - * @typedef PullBatchResponse + * @typedef ListTopicsResponse * @memberOf! pubsub(v1beta1a) * @type object - * @property {pubsub(v1beta1a).PullResponse[]} pullResponses Received Pub/Sub messages or status events. The Pub/Sub system will return zero messages if there are no more messages available in the backlog. The Pub/Sub system may return fewer than the max_events requested even if there are more messages available in the backlog. - */ +* @property {pubsub(v1beta1a).Topic[]} topic The resulting topics. +* @property {string} nextPageToken If not empty, indicates that there are more topics that match the request, +and this value should be passed to the next <code>ListTopicsRequest</code> +to continue. +*/ /** - * @typedef ModifyAckDeadlineRequest + * @typedef PubsubEvent * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} subscription Next Index: 5 The name of the subscription from which messages are being pulled. - * @property {string} ackId The acknowledgment ID. Either this or ack_ids must be populated, not both. - * @property {string[]} ackIds List of acknowledgment IDs. Either this field or ack_id should be populated, not both. - * @property {integer} ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the ModifyAckDeadline call was made. Specifying zero may immediately make the message available for another pull request. - */ +* @property {boolean} truncated Indicates that this subscription has been truncated. +* @property {boolean} deleted Indicates that this subscription has been deleted. (Note that pull +subscribers will always receive NOT_FOUND in response in their pull +request on the subscription, rather than seeing this boolean.) +* @property {string} subscription The subscription that received the event. +* @property {pubsub(v1beta1a).PubsubMessage} message A received message. +*/ /** - * @typedef AcknowledgeRequest + * @typedef PullBatchRequest * @memberOf! pubsub(v1beta1a) * @type object - * @property {string} subscription The subscription whose message is being acknowledged. - * @property {string[]} ackId The acknowledgment ID for the message being acknowledged. This was returned by the Pub/Sub system in the Pull response. - */ +* @property {integer} maxEvents The maximum number of PubsubEvents returned for this request. The Pub/Sub +system may return fewer than the number of events specified. +* @property {boolean} returnImmediately If this is specified as true the system will respond immediately even if +it is not able to return a message in the Pull response. Otherwise the +system is allowed to wait until at least one message is available rather +than returning no messages. The client may cancel the request if it does +not wish to wait any longer for the response. +* @property {string} subscription The subscription from which messages should be pulled. +*/ module.exports = Pubsub; diff --git a/apis/pubsub/v1beta2.js b/apis/pubsub/v1beta2.js index 91ed4faf80..9a519008f0 100644 --- a/apis/pubsub/v1beta2.js +++ b/apis/pubsub/v1beta2.js @@ -25,6 +25,7 @@ var utils = require('../../lib/utils'); * Google Cloud Pub/Sub API * * Provides reliable, many-to-many, asynchronous messaging between applications. + * * @example * var google = require('googleapis'); @@ -42,24 +43,24 @@ function Pubsub(options) { // eslint-disable-line self.projects = { - topics: { + subscriptions: { /** - * pubsub.projects.topics.setIamPolicy + * pubsub.projects.subscriptions.modifyPushConfig * - * @desc Sets the access control policy on the specified resource. Replaces any existing policy. + * @desc Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`. * - * @alias pubsub.projects.topics.setIamPolicy + * @alias pubsub.projects.subscriptions.modifyPushConfig * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1beta2).SetIamPolicyRequest} params.resource Request body data + * @param {string} params.subscription The name of the subscription. + * @param {pubsub(v1beta2).ModifyPushConfigRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy: function (params, options, callback) { + modifyPushConfig: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -68,12 +69,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{resource}:setIamPolicy', + url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:modifyPushConfig', method: 'POST' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -81,11 +82,11 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.getIamPolicy + * pubsub.projects.subscriptions.getIamPolicy * * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. * - * @alias pubsub.projects.topics.getIamPolicy + * @alias pubsub.projects.subscriptions.getIamPolicy * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request @@ -116,21 +117,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.testIamPermissions + * pubsub.projects.subscriptions.pull * - * @desc Returns permissions that a caller has on the specified resource. + * @desc Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription. * - * @alias pubsub.projects.topics.testIamPermissions + * @alias pubsub.projects.subscriptions.pull * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1beta2).TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.subscription The subscription from which messages should be pulled. + * @param {pubsub(v1beta2).PullRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions: function (params, options, callback) { + pull: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -139,12 +140,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{resource}:testIamPermissions', + url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:pull', method: 'POST' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -152,21 +153,22 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.create + * pubsub.projects.subscriptions.list * - * @desc Creates the given topic with the given name. + * @desc Lists matching subscriptions. * - * @alias pubsub.projects.topics.create + * @alias pubsub.projects.subscriptions.list * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.name The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - * @param {pubsub(v1beta2).Topic} params.resource Request body data + * @param {integer=} params.pageSize Maximum number of subscriptions to return. + * @param {string} params.project The name of the cloud project that subscriptions belong to. + * @param {string=} params.pageToken The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create: function (params, options, callback) { + list: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -175,12 +177,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{name}', - method: 'PUT' + url: 'https://pubsub.googleapis.com/v1beta2/{project}/subscriptions', + method: 'GET' }, options), params: params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['project'], + pathParams: ['project'], context: self }; @@ -188,21 +190,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.publish + * pubsub.projects.subscriptions.get * - * @desc Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute. + * @desc Gets the configuration details of a subscription. * - * @alias pubsub.projects.topics.publish + * @alias pubsub.projects.subscriptions.get * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.topic The messages in the request will be published on this topic. - * @param {pubsub(v1beta2).PublishRequest} params.resource Request body data + * @param {string} params.subscription The name of the subscription to get. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - publish: function (params, options, callback) { + get: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -211,12 +212,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{topic}:publish', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta2/{subscription}', + method: 'GET' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -224,20 +225,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.get + * pubsub.projects.subscriptions.create * - * @desc Gets the configuration of a topic. + * @desc Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. Note that for REST API requests, you must specify a name. * - * @alias pubsub.projects.topics.get + * @alias pubsub.projects.subscriptions.create * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.topic The name of the topic to get. + * @param {string} params.name The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. + * @param {pubsub(v1beta2).Subscription} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get: function (params, options, callback) { + create: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -246,12 +248,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{topic}', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1beta2/{name}', + method: 'PUT' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: ['name'], + pathParams: ['name'], context: self }; @@ -259,22 +261,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.list + * pubsub.projects.subscriptions.modifyAckDeadline * - * @desc Lists matching topics. + * @desc Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages. * - * @alias pubsub.projects.topics.list + * @alias pubsub.projects.subscriptions.modifyAckDeadline * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.project The name of the cloud project that topics belong to. - * @param {integer=} params.pageSize Maximum number of topics to return. - * @param {string=} params.pageToken The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data. + * @param {string} params.subscription The name of the subscription. + * @param {pubsub(v1beta2).ModifyAckDeadlineRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list: function (params, options, callback) { + modifyAckDeadline: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -283,12 +284,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{project}/topics', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:modifyAckDeadline', + method: 'POST' }, options), params: params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -296,20 +297,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.topics.delete + * pubsub.projects.subscriptions.setIamPolicy * - * @desc Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`. + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. * - * @alias pubsub.projects.topics.delete + * @alias pubsub.projects.subscriptions.setIamPolicy * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.topic Name of the topic to delete. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1beta2).SetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete: function (params, options, callback) { + setIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -318,77 +320,33 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{topic}', - method: 'DELETE' + url: 'https://pubsub.googleapis.com/v1beta2/{resource}:setIamPolicy', + method: 'POST' }, options), params: params, - requiredParams: ['topic'], - pathParams: ['topic'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; return createAPIRequest(parameters, callback); }, - subscriptions: { - - /** - * pubsub.projects.topics.subscriptions.list - * - * @desc Lists the name of the subscriptions for this topic. - * - * @alias pubsub.projects.topics.subscriptions.list - * @memberOf! pubsub(v1beta2) - * - * @param {object} params Parameters for request - * @param {string} params.topic The name of the topic that subscriptions are attached to. - * @param {integer=} params.pageSize Maximum number of subscription names to return. - * @param {string=} params.pageToken The value returned by the last `ListTopicSubscriptionsResponse`; indicates that this is a continuation of a prior `ListTopicSubscriptions` call, and that the system should return the next page of data. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list: function (params, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - options || (options = {}); - - var parameters = { - options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{topic}/subscriptions', - method: 'GET' - }, options), - params: params, - requiredParams: ['topic'], - pathParams: ['topic'], - context: self - }; - - return createAPIRequest(parameters, callback); - } - } - }, - - subscriptions: { - /** - * pubsub.projects.subscriptions.setIamPolicy + * pubsub.projects.subscriptions.delete * - * @desc Sets the access control policy on the specified resource. Replaces any existing policy. + * @desc Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified. * - * @alias pubsub.projects.subscriptions.setIamPolicy + * @alias pubsub.projects.subscriptions.delete * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1beta2).SetIamPolicyRequest} params.resource Request body data + * @param {string} params.subscription The subscription to delete. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy: function (params, options, callback) { + delete: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -397,12 +355,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{resource}:setIamPolicy', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta2/{subscription}', + method: 'DELETE' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; @@ -410,20 +368,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.getIamPolicy + * pubsub.projects.subscriptions.testIamPermissions * - * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. * - * @alias pubsub.projects.subscriptions.getIamPolicy + * @alias pubsub.projects.subscriptions.testIamPermissions * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1beta2).TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy: function (params, options, callback) { + testIamPermissions: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -432,8 +391,8 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{resource}:getIamPolicy', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1beta2/{resource}:testIamPermissions', + method: 'POST' }, options), params: params, requiredParams: ['resource'], @@ -445,21 +404,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.testIamPermissions + * pubsub.projects.subscriptions.acknowledge * - * @desc Returns permissions that a caller has on the specified resource. + * @desc Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error. * - * @alias pubsub.projects.subscriptions.testIamPermissions + * @alias pubsub.projects.subscriptions.acknowledge * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. - * @param {pubsub(v1beta2).TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.subscription The subscription whose message is being acknowledged. + * @param {pubsub(v1beta2).AcknowledgeRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions: function (params, options, callback) { + acknowledge: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -468,34 +427,36 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{resource}:testIamPermissions', + url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:acknowledge', method: 'POST' }, options), params: params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['subscription'], + pathParams: ['subscription'], context: self }; return createAPIRequest(parameters, callback); - }, + } + }, + + topics: { /** - * pubsub.projects.subscriptions.create + * pubsub.projects.topics.getIamPolicy * - * @desc Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. Note that for REST API requests, you must specify a name. + * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. * - * @alias pubsub.projects.subscriptions.create + * @alias pubsub.projects.topics.getIamPolicy * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.name The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - * @param {pubsub(v1beta2).Subscription} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create: function (params, options, callback) { + getIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -504,12 +465,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{name}', - method: 'PUT' + url: 'https://pubsub.googleapis.com/v1beta2/{resource}:getIamPolicy', + method: 'GET' }, options), params: params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; @@ -517,20 +478,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.get + * pubsub.projects.topics.publish * - * @desc Gets the configuration details of a subscription. + * @desc Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute. * - * @alias pubsub.projects.subscriptions.get + * @alias pubsub.projects.topics.publish * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.subscription The name of the subscription to get. + * @param {string} params.topic The messages in the request will be published on this topic. + * @param {pubsub(v1beta2).PublishRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get: function (params, options, callback) { + publish: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -539,12 +501,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{subscription}', - method: 'GET' + url: 'https://pubsub.googleapis.com/v1beta2/{topic}:publish', + method: 'POST' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -552,17 +514,17 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.list + * pubsub.projects.topics.list * - * @desc Lists matching subscriptions. + * @desc Lists matching topics. * - * @alias pubsub.projects.subscriptions.list + * @alias pubsub.projects.topics.list * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.project The name of the cloud project that subscriptions belong to. - * @param {integer=} params.pageSize Maximum number of subscriptions to return. - * @param {string=} params.pageToken The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data. + * @param {integer=} params.pageSize Maximum number of topics to return. + * @param {string} params.project The name of the cloud project that topics belong to. + * @param {string=} params.pageToken The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -576,7 +538,7 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{project}/subscriptions', + url: 'https://pubsub.googleapis.com/v1beta2/{project}/topics', method: 'GET' }, options), params: params, @@ -589,20 +551,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.delete + * pubsub.projects.topics.get * - * @desc Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified. + * @desc Gets the configuration of a topic. * - * @alias pubsub.projects.subscriptions.delete + * @alias pubsub.projects.topics.get * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.subscription The subscription to delete. + * @param {string} params.topic The name of the topic to get. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete: function (params, options, callback) { + get: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -611,12 +573,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{subscription}', - method: 'DELETE' + url: 'https://pubsub.googleapis.com/v1beta2/{topic}', + method: 'GET' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -624,21 +586,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.modifyAckDeadline + * pubsub.projects.topics.create * - * @desc Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages. + * @desc Creates the given topic with the given name. * - * @alias pubsub.projects.subscriptions.modifyAckDeadline + * @alias pubsub.projects.topics.create * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.subscription The name of the subscription. - * @param {pubsub(v1beta2).ModifyAckDeadlineRequest} params.resource Request body data + * @param {string} params.name The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. + * @param {pubsub(v1beta2).Topic} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - modifyAckDeadline: function (params, options, callback) { + create: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -647,12 +609,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:modifyAckDeadline', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta2/{name}', + method: 'PUT' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['name'], + pathParams: ['name'], context: self }; @@ -660,21 +622,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.acknowledge + * pubsub.projects.topics.setIamPolicy * - * @desc Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error. + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. * - * @alias pubsub.projects.subscriptions.acknowledge + * @alias pubsub.projects.topics.setIamPolicy * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.subscription The subscription whose message is being acknowledged. - * @param {pubsub(v1beta2).AcknowledgeRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1beta2).SetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - acknowledge: function (params, options, callback) { + setIamPolicy: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -683,12 +645,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:acknowledge', + url: 'https://pubsub.googleapis.com/v1beta2/{resource}:setIamPolicy', method: 'POST' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; @@ -696,21 +658,20 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.pull + * pubsub.projects.topics.delete * - * @desc Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription. + * @desc Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`. * - * @alias pubsub.projects.subscriptions.pull + * @alias pubsub.projects.topics.delete * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.subscription The subscription from which messages should be pulled. - * @param {pubsub(v1beta2).PullRequest} params.resource Request body data + * @param {string} params.topic Name of the topic to delete. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - pull: function (params, options, callback) { + delete: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -719,12 +680,12 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:pull', - method: 'POST' + url: 'https://pubsub.googleapis.com/v1beta2/{topic}', + method: 'DELETE' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['topic'], + pathParams: ['topic'], context: self }; @@ -732,21 +693,21 @@ function Pubsub(options) { // eslint-disable-line }, /** - * pubsub.projects.subscriptions.modifyPushConfig + * pubsub.projects.topics.testIamPermissions * - * @desc Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`. + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. * - * @alias pubsub.projects.subscriptions.modifyPushConfig + * @alias pubsub.projects.topics.testIamPermissions * @memberOf! pubsub(v1beta2) * * @param {object} params Parameters for request - * @param {string} params.subscription The name of the subscription. - * @param {pubsub(v1beta2).ModifyPushConfigRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + * @param {pubsub(v1beta2).TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - modifyPushConfig: function (params, options, callback) { + testIamPermissions: function (params, options, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -755,161 +716,328 @@ function Pubsub(options) { // eslint-disable-line var parameters = { options: utils.extend({ - url: 'https://pubsub.googleapis.com/v1beta2/{subscription}:modifyPushConfig', + url: 'https://pubsub.googleapis.com/v1beta2/{resource}:testIamPermissions', method: 'POST' }, options), params: params, - requiredParams: ['subscription'], - pathParams: ['subscription'], + requiredParams: ['resource'], + pathParams: ['resource'], context: self }; return createAPIRequest(parameters, callback); + }, + + subscriptions: { + + /** + * pubsub.projects.topics.subscriptions.list + * + * @desc Lists the name of the subscriptions for this topic. + * + * @alias pubsub.projects.topics.subscriptions.list + * @memberOf! pubsub(v1beta2) + * + * @param {object} params Parameters for request + * @param {string} params.topic The name of the topic that subscriptions are attached to. + * @param {integer=} params.pageSize Maximum number of subscription names to return. + * @param {string=} params.pageToken The value returned by the last `ListTopicSubscriptionsResponse`; indicates that this is a continuation of a prior `ListTopicSubscriptions` call, and that the system should return the next page of data. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list: function (params, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); + + var parameters = { + options: utils.extend({ + url: 'https://pubsub.googleapis.com/v1beta2/{topic}/subscriptions', + method: 'GET' + }, options), + params: params, + requiredParams: ['topic'], + pathParams: ['topic'], + context: self + }; + + return createAPIRequest(parameters, callback); + } } } }; } /** - * @typedef SetIamPolicyRequest + * @typedef Topic * @memberOf! pubsub(v1beta2) * @type object - * @property {pubsub(v1beta2).Policy} policy 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. - */ +* @property {string} name The name of the topic. It must have the format +`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, +and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), +underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent +signs (`%`). It must be between 3 and 255 characters in length, and it +must not start with `"goog"`. +*/ /** - * @typedef Policy + * @typedef SetIamPolicyRequest * @memberOf! pubsub(v1beta2) * @type object - * @property {integer} version Version of the `Policy`. The default version is 0. - * @property {pubsub(v1beta2).Binding[]} bindings 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. - * @property {string} etag `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. - */ +* @property {pubsub(v1beta2).Policy} policy 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. +*/ /** - * @typedef Binding + * @typedef ReceivedMessage * @memberOf! pubsub(v1beta2) * @type object - * @property {string} role Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required - * @property {string[]} members 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`. + * @property {string} ackId This ID can be used to acknowledge the received message. + * @property {pubsub(v1beta2).PubsubMessage} message The message. */ /** - * @typedef TestIamPermissionsRequest + * @typedef PublishRequest * @memberOf! pubsub(v1beta2) * @type object - * @property {string[]} permissions 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). + * @property {pubsub(v1beta2).PubsubMessage[]} messages The messages to publish. */ /** * @typedef TestIamPermissionsResponse * @memberOf! pubsub(v1beta2) * @type object - * @property {string[]} permissions A subset of `TestPermissionsRequest.permissions` that the caller is allowed. - */ +* @property {string[]} permissions A subset of `TestPermissionsRequest.permissions` that the caller is +allowed. +*/ /** - * @typedef Topic + * @typedef PublishResponse * @memberOf! pubsub(v1beta2) * @type object - * @property {string} name The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - */ +* @property {string[]} messageIds The server-assigned ID of each published message, in the same order as +the messages in the request. IDs are guaranteed to be unique within +the topic. +*/ /** - * @typedef PublishRequest + * @typedef ListSubscriptionsResponse * @memberOf! pubsub(v1beta2) * @type object - * @property {pubsub(v1beta2).PubsubMessage[]} messages The messages to publish. - */ +* @property {pubsub(v1beta2).Subscription[]} subscriptions The subscriptions that match the request. +* @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match +the request; this value should be passed in a new +`ListSubscriptionsRequest` to get more subscriptions. +*/ /** - * @typedef PubsubMessage + * @typedef Policy * @memberOf! pubsub(v1beta2) * @type object - * @property {string} data The message payload. For JSON requests, the value of this field must be [base64-encoded](https://tools.ietf.org/html/rfc4648). - * @property {object} attributes Optional attributes for this message. - * @property {string} messageId ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call. - * @property {string} publishTime The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call. - */ +* @property {pubsub(v1beta2).Binding[]} bindings 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. +* @property {string} etag `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. +* @property {integer} version Version of the `Policy`. The default version is 0. +*/ /** - * @typedef PublishResponse + * @typedef ListTopicSubscriptionsResponse * @memberOf! pubsub(v1beta2) * @type object - * @property {string[]} messageIds The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic. - */ +* @property {string[]} subscriptions The names of the subscriptions that match the request. +* @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match +the request; this value should be passed in a new +`ListTopicSubscriptionsRequest` to get more subscriptions. +*/ /** - * @typedef ListTopicsResponse + * @typedef Subscription * @memberOf! pubsub(v1beta2) * @type object - * @property {pubsub(v1beta2).Topic[]} topics The resulting topics. - * @property {string} nextPageToken If not empty, indicates that there may be more topics that match the request; this value should be passed in a new `ListTopicsRequest`. - */ +* @property {pubsub(v1beta2).PushConfig} pushConfig If push delivery is used with this subscription, this field is +used to configure it. An empty `pushConfig` signifies that the subscriber +will pull and ack messages using API methods. +* @property {string} topic The name of the topic from which this subscription is receiving messages. +The value of this field will be `_deleted-topic_` if the topic has been +deleted. +* @property {integer} ackDeadlineSeconds This value is the maximum time after a subscriber receives a message +before the subscriber should acknowledge the message. After message +delivery but before the ack deadline expires and before the message is +acknowledged, it is an outstanding message and will not be delivered +again during that time (on a best-effort basis). + +For pull subscriptions, this value is used as the initial value for the ack +deadline. To override this value for a given message, call +`ModifyAckDeadline` with the corresponding `ack_id` if using pull. +The maximum custom deadline you can specify is 600 seconds (10 minutes). + +For push delivery, this value is also used to set the request timeout for +the call to the push endpoint. + +If the subscriber never acknowledges the message, the Pub/Sub +system will eventually redeliver the message. + +If this parameter is 0, a default value of 10 seconds is used. +* @property {string} name The name of the subscription. It must have the format +`"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must +start with a letter, and contain only letters (`[A-Za-z]`), numbers +(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), +plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters +in length, and it must not start with `"goog"`. +*/ /** - * @typedef ListTopicSubscriptionsResponse + * @typedef ModifyAckDeadlineRequest * @memberOf! pubsub(v1beta2) * @type object - * @property {string[]} subscriptions The names of the subscriptions that match the request. - * @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListTopicSubscriptionsRequest` to get more subscriptions. - */ +* @property {integer} ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to +the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new +ack deadline will expire 10 seconds after the `ModifyAckDeadline` call +was made. Specifying zero may immediately make the message available for +another pull request. +* @property {string} ackId The acknowledgment ID. Either this or ack_ids must be populated, but not +both. +* @property {string[]} ackIds List of acknowledgment IDs. +*/ /** - * @typedef Empty + * @typedef TestIamPermissionsRequest * @memberOf! pubsub(v1beta2) * @type object - */ +* @property {string[]} permissions 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). +*/ /** - * @typedef Subscription + * @typedef PushConfig * @memberOf! pubsub(v1beta2) * @type object - * @property {string} name The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. - * @property {string} topic The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted. - * @property {pubsub(v1beta2).PushConfig} pushConfig If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods. - * @property {integer} ackDeadlineSeconds This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is 0, a default value of 10 seconds is used. - */ +* @property {object} attributes Endpoint configuration attributes. + +Every endpoint has a set of API supported attributes that can be used to +control different aspects of the message delivery. + +The currently supported attribute is `x-goog-version`, which you can +use to change the format of the push message. This attribute +indicates the version of the data expected by the endpoint. This +controls the shape of the envelope (i.e. its fields and metadata). +The endpoint version is based on the version of the Pub/Sub +API. + +If not present during the `CreateSubscription` call, it will default to +the version of the API used to make such call. If not present during a +`ModifyPushConfig` call, its value will not be changed. `GetSubscription` +calls will always return a valid version, even if the subscription was +created without this attribute. + +The possible values for this attribute are: + +* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. +* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. +* @property {string} pushEndpoint A URL locating the endpoint to which messages should be pushed. +For example, a Webhook endpoint might use "https://example.com/push". +*/ /** - * @typedef PushConfig + * @typedef PullRequest * @memberOf! pubsub(v1beta2) * @type object - * @property {string} pushEndpoint A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push". - * @property {object} attributes Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. - */ +* @property {boolean} returnImmediately If this is specified as true the system will respond immediately even if +it is not able to return a message in the `Pull` response. Otherwise the +system is allowed to wait until at least one message is available rather +than returning no messages. The client may cancel the request if it does +not wish to wait any longer for the response. +* @property {integer} maxMessages The maximum number of messages returned for this request. The Pub/Sub +system may return fewer than the number specified. +*/ /** - * @typedef ListSubscriptionsResponse + * @typedef ModifyPushConfigRequest * @memberOf! pubsub(v1beta2) * @type object - * @property {pubsub(v1beta2).Subscription[]} subscriptions The subscriptions that match the request. - * @property {string} nextPageToken If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListSubscriptionsRequest` to get more subscriptions. - */ +* @property {pubsub(v1beta2).PushConfig} pushConfig The push configuration for future deliveries. + +An empty `pushConfig` indicates that the Pub/Sub system should +stop pushing messages from the given subscription and allow +messages to be pulled and acknowledged - effectively pausing +the subscription if `Pull` is not called. +*/ /** - * @typedef ModifyAckDeadlineRequest + * @typedef PullResponse * @memberOf! pubsub(v1beta2) * @type object - * @property {string} ackId The acknowledgment ID. Either this or ack_ids must be populated, but not both. - * @property {string[]} ackIds List of acknowledgment IDs. - * @property {integer} ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero may immediately make the message available for another pull request. - */ +* @property {pubsub(v1beta2).ReceivedMessage[]} receivedMessages Received Pub/Sub messages. The Pub/Sub system will return zero messages if +there are no more available in the backlog. The Pub/Sub system may return +fewer than the `maxMessages` requested even if there are more messages +available in the backlog. +*/ /** - * @typedef AcknowledgeRequest + * @typedef PubsubMessage * @memberOf! pubsub(v1beta2) * @type object - * @property {string[]} ackIds The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty. - */ +* @property {string} data The message payload. For JSON requests, the value of this field must be +[base64-encoded](https://tools.ietf.org/html/rfc4648). +* @property {object} attributes Optional attributes for this message. +* @property {string} messageId ID of this message, assigned by the server when the message is published. +Guaranteed to be unique within the topic. This value may be read by a +subscriber that receives a `PubsubMessage` via a `Pull` call or a push +delivery. It must not be populated by the publisher in a `Publish` call. +* @property {string} publishTime The time at which the message was published, populated by the server when +it receives the `Publish` call. It must not be populated by the +publisher in a `Publish` call. +*/ /** - * @typedef PullRequest + * @typedef AcknowledgeRequest * @memberOf! pubsub(v1beta2) * @type object - * @property {boolean} returnImmediately If this is specified as true the system will respond immediately even if it is not able to return a message in the `Pull` response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response. - * @property {integer} maxMessages The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified. - */ +* @property {string[]} ackIds The acknowledgment ID for the messages being acknowledged that was returned +by the Pub/Sub system in the `Pull` response. Must not be empty. +*/ /** - * @typedef PullResponse + * @typedef Empty * @memberOf! pubsub(v1beta2) * @type object - * @property {pubsub(v1beta2).ReceivedMessage[]} receivedMessages Received Pub/Sub messages. The Pub/Sub system will return zero messages if there are no more available in the backlog. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog. */ /** - * @typedef ReceivedMessage + * @typedef ListTopicsResponse * @memberOf! pubsub(v1beta2) * @type object - * @property {string} ackId This ID can be used to acknowledge the received message. - * @property {pubsub(v1beta2).PubsubMessage} message The message. - */ +* @property {string} nextPageToken If not empty, indicates that there may be more topics that match the +request; this value should be passed in a new `ListTopicsRequest`. +* @property {pubsub(v1beta2).Topic[]} topics The resulting topics. +*/ /** - * @typedef ModifyPushConfigRequest + * @typedef Binding * @memberOf! pubsub(v1beta2) * @type object - * @property {pubsub(v1beta2).PushConfig} pushConfig The push configuration for future deliveries. An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if `Pull` is not called. - */ +* @property {string[]} members 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`. + + +* @property {string} role Role that is assigned to `members`. +For example, `roles/viewer`, `roles/editor`, or `roles/owner`. +Required +*/ module.exports = Pubsub; diff --git a/apis/runtimeconfig/v1beta1.js b/apis/runtimeconfig/v1beta1.js index 4a38f900ce..767316a3e9 100644 --- a/apis/runtimeconfig/v1beta1.js +++ b/apis/runtimeconfig/v1beta1.js @@ -860,18 +860,6 @@ common set of message types for APIs to use. user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */ -/** - * @typedef ListConfigsResponse - * @memberOf! runtimeconfig(v1beta1) - * @type object -* @property {string} nextPageToken This token allows you to get the next page of results for list requests. -If the number of results is larger than `pageSize`, 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 -* @property {runtimeconfig(v1beta1).RuntimeConfig[]} configs A list of the configurations in the project. The order of returned -objects is arbitrary; that is, it is not ordered in any particular way. -*/ /** * @typedef Variable * @memberOf! runtimeconfig(v1beta1) @@ -903,6 +891,18 @@ The length of a `[VARIABLE_NAME]` must be less than 256 bytes. Once you create a variable, you cannot change the variable name. */ +/** + * @typedef ListConfigsResponse + * @memberOf! runtimeconfig(v1beta1) + * @type object +* @property {string} nextPageToken This token allows you to get the next page of results for list requests. +If the number of results is larger than `pageSize`, 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 +* @property {runtimeconfig(v1beta1).RuntimeConfig[]} configs A list of the configurations in the project. The order of returned +objects is arbitrary; that is, it is not ordered in any particular way. +*/ /** * @typedef Operation * @memberOf! runtimeconfig(v1beta1) diff --git a/apis/servicecontrol/v1.js b/apis/servicecontrol/v1.js index c8377cad7e..4fbf24f2c6 100644 --- a/apis/servicecontrol/v1.js +++ b/apis/servicecontrol/v1.js @@ -45,7 +45,7 @@ function Servicecontrol(options) { // eslint-disable-line /** * servicecontrol.services.check * - * @desc Checks an operation with Google Service Control to decide whether the given operation should proceed. It should be called before the operation is executed. If feasible, the client should cache the check results and reuse them for up to 60s. In case of server errors, the client may rely on the cached results for longer time. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam). + * @desc Checks an operation with Google Service Control to decide whether the given operation should proceed. It should be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of server errors, the client can rely on the cached results for longer time. NOTE: the `CheckRequest` has the size limit of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam). * * @alias servicecontrol.services.check * @memberOf! servicecontrol(v1) @@ -81,7 +81,7 @@ function Servicecontrol(options) { // eslint-disable-line /** * servicecontrol.services.report * - * @desc Reports operations to Google Service Control. It should be called after the operation is completed. If feasible, the client should aggregate reporting data for up to 5s to reduce API traffic. Limiting aggregation to 5s is to reduce data loss during client crashes. Clients should carefully choose the aggregation window to avoid data loss risk more than 0.01% for business and compliance reasons. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam). + * @desc Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the `ReportRequest` has the size limit of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam). * * @alias servicecontrol.services.report * @memberOf! servicecontrol(v1) diff --git a/apis/servicemanagement/v1.js b/apis/servicemanagement/v1.js index 7020d8d664..0b1de04938 100644 --- a/apis/servicemanagement/v1.js +++ b/apis/servicemanagement/v1.js @@ -40,6 +40,45 @@ function Servicemanagement(options) { // eslint-disable-line var self = this; self._options = options || {}; + self.operations = { + + /** + * servicemanagement.operations.get + * + * @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + * + * @alias servicemanagement.operations.get + * @memberOf! servicemanagement(v1) + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get: function (params, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); + + var parameters = { + options: utils.extend({ + url: 'https://servicemanagement.googleapis.com/v1/{name}', + method: 'GET' + }, options), + params: params, + requiredParams: ['name'], + pathParams: ['name'], + context: self + }; + + return createAPIRequest(parameters, callback); + } + + }; + self.services = { /** @@ -258,7 +297,7 @@ function Servicemanagement(options) { // eslint-disable-line /** * servicemanagement.services.list * - * @desc Lists all managed services. The result is limited to services that the caller has "servicemanagement.services.get" permission for. If the request is made without authentication, it returns only public services that are available to everyone. + * @desc Lists managed services. If called without any authentication, it returns only the public services. If called with authentication, it returns all services that the caller has "servicemanagement.services.get" permission for. **BETA:** If the caller specifies the `consumer_id`, it returns only the services enabled on the consumer. The `consumer_id` must have the format of "project:{PROJECT-ID}". * * @alias servicemanagement.services.list * @memberOf! servicemanagement(v1) @@ -731,45 +770,6 @@ function Servicemanagement(options) { // eslint-disable-line } } }; - - self.operations = { - - /** - * servicemanagement.operations.get - * - * @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. - * - * @alias servicemanagement.operations.get - * @memberOf! servicemanagement(v1) - * - * @param {object} params Parameters for request - * @param {string} params.name The name of the operation resource. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get: function (params, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - options || (options = {}); - - var parameters = { - options: utils.extend({ - url: 'https://servicemanagement.googleapis.com/v1/{name}', - method: 'GET' - }, options), - params: params, - requiredParams: ['name'], - pathParams: ['name'], - context: self - }; - - return createAPIRequest(parameters, callback); - } - - }; } /** @@ -1379,6 +1379,11 @@ is used. * @typedef SetIamPolicyRequest * @memberOf! servicemanagement(v1) * @type object +* @property {string} updateMask 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, a default +mask is used: +paths: "bindings, etag" +This field is only used by Cloud IAM. * @property {servicemanagement(v1).Policy} policy 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) @@ -1470,9 +1475,15 @@ Refer to selector for syntax details. * @typedef Option * @memberOf! servicemanagement(v1) * @type object - * @property {object} value The option's value. For example, `"com.google.protobuf"`. - * @property {string} name The option's name. For example, `"java_package"`. - */ +* @property {object} value The option's value packed in an Any message. If the value is a primitive, +the corresponding wrapper type defined in google/protobuf/wrappers.proto +should be used. If the value is an enum, it should be stored as an int32 +value using the google.protobuf.Int32Value type. +* @property {string} name The option's name. For protobuf built-in options (options defined in +descriptor.proto), this is the short name. For example, `"map_entry"`. +For custom options, it should be the fully-qualified name. For example, +`"google.api.http"`. +*/ /** * @typedef HttpRule * @memberOf! servicemanagement(v1) diff --git a/apis/sheets/v4.js b/apis/sheets/v4.js index 60969a7223..6c2e5044f1 100644 --- a/apis/sheets/v4.js +++ b/apis/sheets/v4.js @@ -1753,7 +1753,13 @@ This parameter is ignored if a field mask was set in the request. * @property {integer} index The index of the sheet within the spreadsheet. When adding or updating sheet properties, if this field is excluded then the sheet will be added or moved to the end -of the sheet list. +of the sheet list. When updating sheet indices or inserting +sheets, movement is considered in "before the move" indexes. +For example, if there were 3 sheets (S1, S2, S3) in order to +move S1 ahead of S2 the index would have to be set to 2. A sheet +index update request will be ignored if the requested index is +identical to the sheets current index or if the requested new +index is equal to the current sheet index + 1. * @property {boolean} hidden True if the sheet is hidden in the UI, false if it's visible. * @property {sheets(v4).GridProperties} gridProperties Additional properties of the sheet if this sheet is a grid. (If the sheet is an object sheet, containing a chart or image, then @@ -1942,6 +1948,8 @@ range. Domain protection is only supported on documents within a domain. * @property {string} spreadsheetId The ID of the spreadsheet. This field is read-only. * @property {sheets(v4).SpreadsheetProperties} properties Overall properties of a spreadsheet. +* @property {string} spreadsheetUrl The url of the spreadsheet. +This field is read-only. * @property {sheets(v4).Sheet[]} sheets The sheets that are part of a spreadsheet. * @property {sheets(v4).NamedRange[]} namedRanges The named ranges defined in a spreadsheet. */ @@ -2165,12 +2173,12 @@ Only COLUMNS are supported. * @memberOf! sheets(v4) * @type object * @property {sheets(v4).Color} footerColor The color of the last row or column. If this field is not set, the last -row or column will be filled with either first_row_color or -second_row_color, depending on the color of the previous row or +row or column will be filled with either first_band_color or +second_band_color, depending on the color of the previous row or column. * @property {sheets(v4).Color} headerColor The color of the first row or column. If this field is set, the first row or column will be filled with this color and the colors will -alternate between first_band_color and [second_band_color[] starting +alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column will be filled with first_band_color and the colors will proceed to alternate as they normally would. diff --git a/apis/sqladmin/v1beta4.js b/apis/sqladmin/v1beta4.js index 126f09d3c5..7a4a4c834e 100644 --- a/apis/sqladmin/v1beta4.js +++ b/apis/sqladmin/v1beta4.js @@ -1007,6 +1007,43 @@ function Sqladmin(options) { // eslint-disable-line return createAPIRequest(parameters, callback); }, + /** + * sql.instances.truncateLog + * + * @desc Truncate MySQL general and slow query log tables + * + * @alias sql.instances.truncateLog + * @memberOf! sqladmin(v1beta4) + * + * @param {object} params Parameters for request + * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. + * @param {string} params.project Project ID of the Cloud SQL project. + * @param {sqladmin(v1beta4).InstancesTruncateLogRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + truncateLog: function (params, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); + + var parameters = { + options: utils.extend({ + url: 'https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/truncateLog', + method: 'POST' + }, options), + params: params, + requiredParams: ['project', 'instance'], + pathParams: ['instance', 'project'], + context: self + }; + + return createAPIRequest(parameters, callback); + }, + /** * sql.instances.update * @@ -1722,6 +1759,12 @@ CSV: The file contains CSV data. * @type object * @property {sqladmin(v1beta4).RestoreBackupContext} restoreBackupContext Parameters required to perform the restore backup operation. */ +/** + * @typedef InstancesTruncateLogRequest + * @memberOf! sqladmin(v1beta4) + * @type object + * @property {sqladmin(v1beta4).TruncateLogContext} truncateLogContext Contains details about the truncate log operation. + */ /** * @typedef IpConfiguration * @memberOf! sqladmin(v1beta4) @@ -1929,6 +1972,13 @@ ON_DEMAND: The instance responds to incoming requests, and turns itself off when * @property {sqladmin(v1beta4).Tier[]} items List of tiers. * @property {string} kind This is always sql#tiersList. */ +/** + * @typedef TruncateLogContext + * @memberOf! sqladmin(v1beta4) + * @type object + * @property {string} kind This is always sql#truncateLogContext. + * @property {string} logType The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE. + */ /** * @typedef User * @memberOf! sqladmin(v1beta4) diff --git a/apis/storage/v1.js b/apis/storage/v1.js index ab24ae8b5b..981861e12c 100644 --- a/apis/storage/v1.js +++ b/apis/storage/v1.js @@ -55,46 +55,48 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * storage.bucketAccessControls.delete(request, function(err, result) { + * storage.bucketAccessControls.delete(request, function(err) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.bucketAccessControls.delete * @memberOf! storage(v1) * @@ -139,46 +141,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * storage.bucketAccessControls.get(request, function(err, result) { + * storage.bucketAccessControls.get(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.bucketAccessControls.get * @memberOf! storage(v1) * @@ -223,44 +230,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'insert' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", - * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.bucketAccessControls.insert(request, function(err, result) { + * storage.bucketAccessControls.insert(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.bucketAccessControls.insert * @memberOf! storage(v1) * @@ -305,42 +319,47 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * storage.bucketAccessControls.list(request, function(err, result) { + * storage.bucketAccessControls.list(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.bucketAccessControls.list * @memberOf! storage(v1) * @@ -384,48 +403,56 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'patch' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. Only added properties + * // will be changed. + * }, * - * // Auth client * auth: authClient * }; * - * storage.bucketAccessControls.patch(request, function(err, result) { + * storage.bucketAccessControls.patch(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.bucketAccessControls.patch * @memberOf! storage(v1) * @@ -471,48 +498,55 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'update' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", - * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.bucketAccessControls.update(request, function(err, result) { + * storage.bucketAccessControls.update(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.bucketAccessControls.update * @memberOf! storage(v1) * @@ -562,42 +596,44 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", - * - * // Auth client * auth: authClient * }; * - * storage.buckets.delete(request, function(err, result) { + * storage.buckets.delete(request, function(err) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.buckets.delete * @memberOf! storage(v1) * @@ -643,42 +679,47 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", - * - * // Auth client * auth: authClient * }; * - * storage.buckets.get(request, function(err, result) { + * storage.buckets.get(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.buckets.get * @memberOf! storage(v1) * @@ -725,44 +766,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'insert' method: - * - * // * A valid API project identifier. - * project: "", + * // A valid API project identifier. + * project: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.buckets.insert(request, function(err, result) { + * storage.buckets.insert(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.buckets.insert * @memberOf! storage(v1) * @@ -810,49 +858,60 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: - * - * // * A valid API project identifier. - * project: "", + * // A valid API project identifier. + * project: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * - * var recur = function(err, result) { + * var handlePage = function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); - * if (result.nextPageToken) { - * request.pageToken = result.nextPageToken; - * storage.buckets.list(request, recur); - * } + * return; + * } + * + * var itemsPage = response['items']; + * if (!itemsPage) { + * return; + * } + * for (var i = 0; i < itemsPage.length; i++) { + * // TODO: Change code below to process each resource in `itemsPage`: + * console.log(JSON.stringify(itemsPage[i], null, 2)); + * } + * + * if (response.nextPageToken) { + * request.pageToken = response.nextPageToken; + * storage.buckets.list(request, handlePage); * } * }; * - * storage.buckets.list(request, recur); + * storage.buckets.list(request, handlePage); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.buckets.list * @memberOf! storage(v1) * @@ -900,44 +959,52 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'patch' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. Only added properties + * // will be changed. + * }, * - * // Auth client * auth: authClient * }; * - * storage.buckets.patch(request, function(err, result) { + * storage.buckets.patch(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.buckets.patch * @memberOf! storage(v1) * @@ -987,44 +1054,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'update' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.buckets.update(request, function(err, result) { + * storage.buckets.update(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.buckets.update * @memberOf! storage(v1) * @@ -1078,41 +1152,45 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'stop' method: - * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.channels.stop(request, function(err, result) { + * storage.channels.stop(request, function(err) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.channels.stop * @memberOf! storage(v1) * @@ -1160,46 +1238,48 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * storage.defaultObjectAccessControls.delete(request, function(err, result) { + * storage.defaultObjectAccessControls.delete(request, function(err) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.defaultObjectAccessControls.delete * @memberOf! storage(v1) * @@ -1244,46 +1324,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * storage.defaultObjectAccessControls.get(request, function(err, result) { + * storage.defaultObjectAccessControls.get(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.defaultObjectAccessControls.get * @memberOf! storage(v1) * @@ -1328,44 +1413,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'insert' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", - * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.defaultObjectAccessControls.insert(request, function(err, result) { + * storage.defaultObjectAccessControls.insert(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.defaultObjectAccessControls.insert * @memberOf! storage(v1) * @@ -1410,42 +1502,47 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * storage.defaultObjectAccessControls.list(request, function(err, result) { + * storage.defaultObjectAccessControls.list(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.defaultObjectAccessControls.list * @memberOf! storage(v1) * @@ -1491,48 +1588,56 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'patch' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. Only added properties + * // will be changed. + * }, * - * // Auth client * auth: authClient * }; * - * storage.defaultObjectAccessControls.patch(request, function(err, result) { + * storage.defaultObjectAccessControls.patch(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.defaultObjectAccessControls.patch * @memberOf! storage(v1) * @@ -1578,48 +1683,55 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'update' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", - * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.defaultObjectAccessControls.update(request, function(err, result) { + * storage.defaultObjectAccessControls.update(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.defaultObjectAccessControls.update * @memberOf! storage(v1) * @@ -1669,50 +1781,52 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", - * - * // Auth client * auth: authClient * }; * - * storage.objectAccessControls.delete(request, function(err, result) { + * storage.objectAccessControls.delete(request, function(err) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objectAccessControls.delete * @memberOf! storage(v1) * @@ -1759,50 +1873,55 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of a bucket. - * bucket: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", - * - * // Auth client * auth: authClient * }; * - * storage.objectAccessControls.get(request, function(err, result) { + * storage.objectAccessControls.get(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objectAccessControls.get * @memberOf! storage(v1) * @@ -1849,48 +1968,55 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'insert' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.objectAccessControls.insert(request, function(err, result) { + * storage.objectAccessControls.insert(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objectAccessControls.insert * @memberOf! storage(v1) * @@ -1937,46 +2063,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * storage.objectAccessControls.list(request, function(err, result) { + * storage.objectAccessControls.list(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objectAccessControls.list * @memberOf! storage(v1) * @@ -2022,52 +2153,60 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'patch' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. Only added properties + * // will be changed. + * }, * - * // Auth client * auth: authClient * }; * - * storage.objectAccessControls.patch(request, function(err, result) { + * storage.objectAccessControls.patch(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objectAccessControls.patch * @memberOf! storage(v1) * @@ -2115,52 +2254,59 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'update' method: - * - * // * Name of a bucket. - * bucket: "", + * // Name of a bucket. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, - * // group-emailAddress, allUsers, or allAuthenticatedUsers. - * entity: "", + * // The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, + * // group-emailAddress, allUsers, or allAuthenticatedUsers. + * entity: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.objectAccessControls.update(request, function(err, result) { + * storage.objectAccessControls.update(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objectAccessControls.update * @memberOf! storage(v1) * @@ -2212,48 +2358,59 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'compose' method: + * // Name of the bucket in which to store the new object. + * destinationBucket: '', // TODO: Update placeholder value. * - * // * Name of the bucket in which to store the new object. - * destinationBucket: "", + * // Name of the new object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * destinationObject: '', // TODO: Update placeholder value. * - * // * Name of the new object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * destinationObject: "", + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * resource: {}, + * // TODO: To download media content, use: + * // + * // alt: 'media', * - * // Auth client * auth: authClient * }; * - * storage.objects.compose(request, function(err, result) { + * storage.objects.compose(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.compose * @memberOf! storage(v1) * @@ -2302,57 +2459,68 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'copy' method: + * // Name of the bucket in which to find the source object. + * sourceBucket: '', // TODO: Update placeholder value. * - * // * Name of the bucket in which to find the source object. - * sourceBucket: "", + * // Name of the source object. For information about how to URL encode object names to be path safe, + * // see Encoding URI Path Parts. + * sourceObject: '', // TODO: Update placeholder value. * - * // * Name of the source object. For information about how to URL encode object names to be path safe, - * // see Encoding URI Path Parts. - * sourceObject: "", + * // Name of the bucket in which to store the new object. Overrides the provided object metadata's + * // bucket value, if any.For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * destinationBucket: '', // TODO: Update placeholder value. * - * // * Name of the bucket in which to store the new object. Overrides the provided object metadata's - * // bucket value, if any.For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * destinationBucket: "", + * // Name of the new object. Required when the object metadata is not otherwise provided. Overrides the + * // object metadata's name value, if any. + * destinationObject: '', // TODO: Update placeholder value. * - * // * Name of the new object. Required when the object metadata is not otherwise provided. Overrides the - * // object metadata's name value, if any. - * destinationObject: "", + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * resource: {}, + * // TODO: To download media content, use: + * // + * // alt: 'media', * - * // Auth client * auth: authClient * }; * - * storage.objects.copy(request, function(err, result) { + * storage.objects.copy(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.copy * @memberOf! storage(v1) * @@ -2411,46 +2579,48 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'delete' method: + * // Name of the bucket in which the object resides. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the bucket in which the object resides. - * bucket: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", - * - * // Auth client * auth: authClient * }; * - * storage.objects.delete(request, function(err, result) { + * storage.objects.delete(request, function(err) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.delete * @memberOf! storage(v1) * @@ -2500,46 +2670,55 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'get' method: + * // Name of the bucket in which the object resides. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the bucket in which the object resides. - * bucket: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // TODO: To download media content, use: + * // + * // alt: 'media', * - * // Auth client * auth: authClient * }; * - * storage.objects.get(request, function(err, result) { + * storage.objects.get(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.get * @memberOf! storage(v1) * @@ -2590,50 +2769,59 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'insert' method: - * - * // * Name of the bucket in which to store the new object. Overrides the provided object metadata's - * // bucket value, if any. - * bucket: "", + * // Name of the bucket in which to store the new object. Overrides the provided object metadata's + * // bucket value, if any. + * bucket: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * * media: { - * // See https://github.com/google/google-api-nodejs-client#media-uploads - * mimeType: 'text/plain', - * body: 'Hello World!' + * // TODO: Add desired media content for upload. See: + * // https://github.com/google/google-api-nodejs-client#media-uploads + * mimeType: '', // See https://www.w3.org/Protocols/rfc1341/4_Content-Type.html + * body: {} * }, - * // Auth client + * * auth: authClient * }; * - * storage.objects.insert(request, function(err, result) { + * storage.objects.insert(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.insert * @memberOf! storage(v1) * @@ -2690,49 +2878,60 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'list' method: - * - * // * Name of the bucket in which to look for objects. - * bucket: "", + * // Name of the bucket in which to look for objects. + * bucket: '', // TODO: Update placeholder value. * - * // Auth client * auth: authClient * }; * - * - * var recur = function(err, result) { + * var handlePage = function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); - * if (result.nextPageToken) { - * request.pageToken = result.nextPageToken; - * storage.objects.list(request, recur); - * } + * return; + * } + * + * var itemsPage = response['items']; + * if (!itemsPage) { + * return; + * } + * for (var i = 0; i < itemsPage.length; i++) { + * // TODO: Change code below to process each resource in `itemsPage`: + * console.log(JSON.stringify(itemsPage[i], null, 2)); + * } + * + * if (response.nextPageToken) { + * request.pageToken = response.nextPageToken; + * storage.objects.list(request, handlePage); * } * }; * - * storage.objects.list(request, recur); + * storage.objects.list(request, handlePage); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.list * @memberOf! storage(v1) * @@ -2782,48 +2981,56 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'patch' method: - * - * // * Name of the bucket in which the object resides. - * bucket: "", + * // Name of the bucket in which the object resides. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. Only added properties + * // will be changed. + * }, * - * // Auth client * auth: authClient * }; * - * storage.objects.patch(request, function(err, result) { + * storage.objects.patch(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.patch * @memberOf! storage(v1) * @@ -2876,57 +3083,64 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'rewrite' method: - * - * // * Name of the bucket in which to find the source object. - * sourceBucket: "", + * // Name of the bucket in which to find the source object. + * sourceBucket: '', // TODO: Update placeholder value. * - * // * Name of the source object. For information about how to URL encode object names to be path safe, - * // see Encoding URI Path Parts. - * sourceObject: "", + * // Name of the source object. For information about how to URL encode object names to be path safe, + * // see Encoding URI Path Parts. + * sourceObject: '', // TODO: Update placeholder value. * - * // * Name of the bucket in which to store the new object. Overrides the provided object metadata's - * // bucket value, if any. - * destinationBucket: "", + * // Name of the bucket in which to store the new object. Overrides the provided object metadata's + * // bucket value, if any. + * destinationBucket: '', // TODO: Update placeholder value. * - * // * Name of the new object. Required when the object metadata is not otherwise provided. Overrides the - * // object metadata's name value, if any. For information about how to URL encode object names to be - * // path safe, see Encoding URI Path Parts. - * destinationObject: "", + * // Name of the new object. Required when the object metadata is not otherwise provided. Overrides the + * // object metadata's name value, if any. For information about how to URL encode object names to be + * // path safe, see Encoding URI Path Parts. + * destinationObject: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.objects.rewrite(request, function(err, result) { + * storage.objects.rewrite(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.rewrite * @memberOf! storage(v1) * @@ -2987,48 +3201,59 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'update' method: + * // Name of the bucket in which the object resides. + * bucket: '', // TODO: Update placeholder value. * - * // * Name of the bucket in which the object resides. - * bucket: "", + * // Name of the object. For information about how to URL encode object names to be path safe, see + * // Encoding URI Path Parts. + * object: '', // TODO: Update placeholder value. * - * // * Name of the object. For information about how to URL encode object names to be path safe, see - * // Encoding URI Path Parts. - * object: "", + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * resource: {}, + * // TODO: To download media content, use: + * // + * // alt: 'media', * - * // Auth client * auth: authClient * }; * - * storage.objects.update(request, function(err, result) { + * storage.objects.update(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.update * @memberOf! storage(v1) * @@ -3081,44 +3306,51 @@ function Storage(options) { // eslint-disable-line * // https://console.developers.google.com/apis/api/storage * // 2. This sample uses Application Default Credentials for authentication. * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk/ and run - * // 'gcloud beta auth application-default login' - * // 3. Install the Node.js client library and Application Default Credentials - * // library by running 'npm install googleapis --save' + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login` + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * * var google = require('googleapis'); * var storage = google.storage('v1'); * - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.log('Authentication failed because of ', err); - * return; - * } - * if (authClient.createScopedRequired && authClient.createScopedRequired()) { - * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; - * authClient = authClient.createScoped(scopes); - * } - * + * authorize(function(authClient) { * var request = { - * // TODO: Change placeholders below to appropriate parameter values for the 'watchAll' method: - * - * // * Name of the bucket in which to look for objects. - * bucket: "", + * // Name of the bucket in which to look for objects. + * bucket: '', // TODO: Update placeholder value. * - * resource: {}, + * resource: { + * // TODO: Add desired properties of the request body. + * }, * - * // Auth client * auth: authClient * }; * - * storage.objects.watchAll(request, function(err, result) { + * storage.objects.watchAll(request, function(err, response) { * if (err) { * console.log(err); - * } else { - * console.log(result); + * return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient)) { + * if (err) { + * console.log('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && authClient.createScopedRequired()) { + * var scopes = ['https://www.googleapis.com/auth/cloud-platform']; + * authClient = authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * * @alias storage.objects.watchAll * @memberOf! storage(v1) * diff --git a/apis/youtube/v3.js b/apis/youtube/v3.js index 3c02361d68..611d86cbfb 100644 --- a/apis/youtube/v3.js +++ b/apis/youtube/v3.js @@ -2665,11 +2665,11 @@ function Youtube(options) { // eslint-disable-line * @param {string=} params.id The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID. * @param {string=} params.locale DEPRECATED * @param {integer=} params.maxHeight The maxHeight parameter specifies a maximum height of the embedded player. If maxWidth is provided, maxHeight may not be reached in order to not violate the width request. - * @param {integer=} params.maxResults The maxResults parameter specifies the maximum number of items that should be returned in the result set. Note: This parameter is supported for use in conjunction with the myRating parameter, but it is not supported for use in conjunction with the id parameter. + * @param {integer=} params.maxResults The maxResults parameter specifies the maximum number of items that should be returned in the result set. Note: This parameter is supported for use in conjunction with the myRating and chart parameters, but it is not supported for use in conjunction with the id parameter. * @param {integer=} params.maxWidth The maxWidth parameter specifies a maximum width of the embedded player. If maxHeight is provided, maxWidth may not be reached in order to not violate the height request. * @param {string=} params.myRating Set this parameter's value to like or dislike to instruct the API to only return videos liked or disliked by the authenticated user. * @param {string=} params.onBehalfOfContentOwner Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - * @param {string=} params.pageToken The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. Note: This parameter is supported for use in conjunction with the myRating parameter, but it is not supported for use in conjunction with the id parameter. + * @param {string=} params.pageToken The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. Note: This parameter is supported for use in conjunction with the myRating and chart parameters, but it is not supported for use in conjunction with the id parameter. * @param {string} params.part The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties. * @param {string=} params.regionCode The regionCode parameter instructs the API to select a video chart available in the specified region. This parameter can only be used in conjunction with the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code. * @param {string=} params.videoCategoryId The videoCategoryId parameter identifies the video category for which the chart should be retrieved. This parameter can only be used in conjunction with the chart parameter. By default, charts are not restricted to a particular category. @@ -3421,6 +3421,7 @@ function Youtube(options) { // eslint-disable-line * @property {string} lsfRating The video's rating from Indonesia's Lembaga Sensor Film. * @property {string} mccaaRating The video's rating from Malta's Film Age-Classification Board. * @property {string} mccypRating The video's rating from the Danish Film Institute's (Det Danske Filminstitut) Media Council for Children and Young People. + * @property {string} mcstRating The video's rating system for Vietnam - MCST * @property {string} mdaRating The video's rating from Singapore's Media Development Authority (MDA) and, specifically, it's Board of Film Censors (BFC). * @property {string} medietilsynetRating The video's rating from Medietilsynet, the Norwegian Media Authority. * @property {string} mekuRating The video's rating from Finland's Kansallinen Audiovisuaalinen Instituutti (National Audiovisual Institute). @@ -4076,6 +4077,7 @@ Note: This property cannot be updated once the broadcast is in the testing or li * @property {string} note A user-generated note for this item. * @property {string} startAt The time, measured in seconds from the start of the video, when the video should start playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) The default value is 0. * @property {string} videoId The ID that YouTube uses to uniquely identify a video. To retrieve the video resource, set the id query parameter to this value in your API request. + * @property {string} videoPublishedAt The date and time that the video was published to YouTube. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. */ /** * @typedef PlaylistItemListResponse diff --git a/package.json b/package.json index c127475264..2c0009a0f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "googleapis", - "version": "15.0.0", + "version": "15.1.0", "author": "Google Inc.", "license": "Apache-2.0", "description": "Google APIs Client Library for Node.js", From e93ccce00a0791c6ec75bc06e2088990652f4f01 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 28 Dec 2016 14:30:54 -0800 Subject: [PATCH 2/4] Add drive.files.list sample --- samples/drive/list.js | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 samples/drive/list.js diff --git a/samples/drive/list.js b/samples/drive/list.js new file mode 100644 index 0000000000..50658c6665 --- /dev/null +++ b/samples/drive/list.js @@ -0,0 +1,60 @@ +// Copyright 2016, Google, Inc. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +var google = require('../../'); +var sampleClient = require('../sampleclient'); +var fs = require('fs'); + +var auth = sampleClient.oAuth2Client; + +var drive = google.drive({ + version: 'v3', + auth: auth +}); + +function list (query, tokens) { + var params = { + pageSize: 3 + }; + if (query) { + params.q = query; + } + drive.files.list(params, function (err, result) { + if (err) { + console.error(err); + process.exit(); + return; + } + + console.log(result.files); + process.exit(); + }); +} + +var scopes = [ + 'https://www.googleapis.com/auth/drive', + 'https://www.googleapis.com/auth/drive.appdata', + 'https://www.googleapis.com/auth/drive.file', + 'https://www.googleapis.com/auth/drive.metadata', + 'https://www.googleapis.com/auth/drive.metadata.readonly', + 'https://www.googleapis.com/auth/drive.photos.readonly', + 'https://www.googleapis.com/auth/drive.readonly' +]; + +if (module === require.main) { + sampleClient.execute(scopes, function (tokens) { + list(process.argv.slice(2)[0], tokens); + }); +} From 707b11359c14d5e5c129f832c8d0b64e2198c25a Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 28 Dec 2016 14:48:13 -0800 Subject: [PATCH 3/4] Add plus.people.me example. --- samples/people/me.js | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 samples/people/me.js diff --git a/samples/people/me.js b/samples/people/me.js new file mode 100644 index 0000000000..536e6f574d --- /dev/null +++ b/samples/people/me.js @@ -0,0 +1,53 @@ +// Copyright 2016, Google, Inc. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +var google = require('../../'); +var sampleClient = require('../sampleclient'); +var fs = require('fs'); + +var auth = sampleClient.oAuth2Client; + +var plus = google.plus({ + version: 'v1', + auth: auth +}); + +function me (tokens) { + plus.people.get({ + userId: 'me' + }, function (err, me) { + if (err) { + console.error(err); + process.exit(); + return; + } + + console.log(me); + process.exit(); + }); +} + +var scopes = [ + 'https://www.googleapis.com/auth/plus.login', + 'https://www.googleapis.com/auth/plus.me', + 'https://www.googleapis.com/auth/userinfo.email', + 'https://www.googleapis.com/auth/userinfo.profile' +]; + +if (module === require.main) { + sampleClient.execute(scopes, function (tokens) { + me(tokens); + }); +} From 0888002df87335b07a0c50e00e6370d260bb3e06 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 28 Dec 2016 15:50:58 -0800 Subject: [PATCH 4/4] Fix lint issues. --- samples/drive/list.js | 1 - samples/people/me.js | 1 - 2 files changed, 2 deletions(-) diff --git a/samples/drive/list.js b/samples/drive/list.js index 50658c6665..cece31b2ee 100644 --- a/samples/drive/list.js +++ b/samples/drive/list.js @@ -15,7 +15,6 @@ var google = require('../../'); var sampleClient = require('../sampleclient'); -var fs = require('fs'); var auth = sampleClient.oAuth2Client; diff --git a/samples/people/me.js b/samples/people/me.js index 536e6f574d..66a57d6e28 100644 --- a/samples/people/me.js +++ b/samples/people/me.js @@ -15,7 +15,6 @@ var google = require('../../'); var sampleClient = require('../sampleclient'); -var fs = require('fs'); var auth = sampleClient.oAuth2Client;